/* — PONGI HUB — Browse Houses · standalone page — */
:root {
  --bg: #050308;
  --card: #0e0a18;
  --card-2: #150e24;
  --card-3: #1d1530;
  --line: #241b3d;
  --line-2: #322550;
  --text: #f0edf8;
  --muted: #9d97b8;
  --dim: #5e5779;
  --purple: #7c3aed;
  --purple-2: #a78bfa;
  --purple-3: #c4b5fd;
  --green: #34d399;
  --red: #f87171;
  --font-display: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.hidden { display: none !important; }
[hidden] { display: none !important; }

/* ── ambient ── */
.bg-glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(800px 500px at 60% -10%, rgba(124,58,237,.12), transparent 60%),
    radial-gradient(600px 400px at -10% 50%, rgba(88,28,135,.08), transparent 50%);
}
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .35;
  background-image:
    linear-gradient(rgba(124,58,237,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,.04) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 90% 50% at 50% 0%, black 20%, transparent 70%);
  mask-image: radial-gradient(ellipse 90% 50% at 50% 0%, black 20%, transparent 70%);
}

/* ── topbar ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; z-index: 10; position: relative;
  border-bottom: 1px solid rgba(124,58,237,.15);
  background: rgba(11,8,18,.6);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg, var(--purple), #a855f7);
  display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(124,58,237,.45);
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-name { font-family: var(--font-display); font-size: 15px; font-weight: 500; letter-spacing: .18em; color: var(--dim); }
.brand-name b { color: var(--text); font-weight: 800; }
.discord-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: #fff; text-decoration: none; font-weight: 700; font-size: 13px;
  background: linear-gradient(135deg, #5865f2, #4752c4);
  padding: 8px 16px; border-radius: 10px;
  box-shadow: 0 4px 14px rgba(88,101,242,.3);
  transition: transform .12s ease, box-shadow .12s ease;
}
.discord-link:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(88,101,242,.45); }

/* ── layout ── */
.browse-wrap {
  max-width: 1200px; margin: 0 auto; padding: 32px 24px 60px;
  position: relative; z-index: 1;
  flex: 1; width: 100%;
}

.browse-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 16px;
}
.browse-title {
  font-family: var(--font-display); font-size: 28px; font-weight: 800;
  margin-bottom: 4px;
  background: linear-gradient(180deg, #fff 20%, var(--purple-3) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.browse-sub { color: var(--muted); font-size: 14px; margin: 0; }
.browse-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.search-wrap { position: relative; min-width: 240px; }
.search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--dim); pointer-events: none;
}
#search-box {
  width: 100%; font: inherit; font-size: 14px;
  padding: 11px 16px 11px 42px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--card);
  color: var(--text); outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
#search-box:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(124,58,237,.12); }
#search-box::placeholder { color: var(--dim); }
.submit-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: 14px;
  color: #fff; background: linear-gradient(135deg, var(--purple), #9333ea);
  border: none; border-radius: 12px; padding: 11px 22px; cursor: pointer;
  box-shadow: 0 6px 24px rgba(124,58,237,.4), inset 0 1px 0 rgba(255,255,255,.15);
  transition: transform .14s ease, box-shadow .14s ease;
  white-space: nowrap;
}
.submit-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(124,58,237,.6); }
.submit-cta:active { transform: translateY(0) scale(.98); }

/* ── house grid ── */
.houses-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 22px;
}
.loading-houses { text-align: center; color: var(--dim); font-size: 15px; padding: 60px 0; }
.empty-houses { text-align: center; color: var(--muted); font-size: 15px; padding: 60px 0; }

.house-tile {
  background: linear-gradient(160deg, var(--card), var(--card-2) 80%);
  border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; cursor: pointer;
  
  transition: transform .18s cubic-bezier(.34,1.4,.64,1), border-color .18s ease, box-shadow .18s ease;
}
.house-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(124,58,237,.45);
  box-shadow: 0 16px 48px rgba(124,58,237,.16);
}

/* 4:3 preview container — inline SVG fills this */
.tile-preview {
  width: 100%; aspect-ratio: 4 / 3;
  background: var(--bg); border-bottom: 1px solid var(--line);
  overflow: hidden;
  display: grid; place-items: center;
}
.tile-preview svg {
  width: 100%; height: 100%; display: block;
  object-fit: contain;
}
.tile-preview .no-preview {
  color: var(--dim); font-size: 13px;
  display: grid; place-items: center; width: 100%; height: 100%;
}

.tile-body { padding: 15px 18px; }
.tile-name { font-weight: 700; font-size: 15px; color: var(--text); margin-bottom: 3px; }
.tile-owner { font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.tile-meta { font-size: 12px; color: var(--dim); }

/* 4:3 preview container — submitted image or placeholder */
.tile-img-wrap {
  width: 100%; aspect-ratio: 4 / 3;
  background: var(--bg); border-bottom: 1px solid var(--line);
  overflow: hidden; position: relative;
}
.tile-img-wrap .tile-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.tile-img-wrap .tile-placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  color: var(--dim);
}

/* modals — the FRAME wraps the card and holds the X button so it floats
   OUTSIDE the card edge even while the card itself scrolls */
.modal-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0, 0, 0, .72); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-frame {
  position: relative;
  max-width: 680px; width: 100%;
}
.modal-card {
  background: var(--card); border: 1px solid var(--line-2); border-radius: 20px;
  max-height: calc(90vh - 28px); overflow-y: auto;
  padding: 28px; position: relative;
  box-shadow: 0 24px 70px rgba(0,0,0,.7);
  
}
.modal-close {
  position: absolute; top: -14px; right: -14px;
  width: 34px; height: 34px; border-radius: 50%;
  font-size: 20px; color: var(--muted);
  background: var(--card-3); border: 1px solid var(--line-2);
  cursor: pointer; line-height: 1; z-index: 2;
  display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .5);
  transition: color .12s ease, background .12s ease, border-color .12s ease;
}
.modal-close:hover { color: #fff; background: var(--red); border-color: var(--red); }
.modal-title { font-family: var(--font-display); font-size: 20px; margin-bottom: 4px; }
.modal-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }

/* ── detail modal ── */
.detail-viewer {
  width: 100%; aspect-ratio: 4 / 3;
  background: var(--bg-2); border-radius: 12px;
  overflow: hidden; margin-bottom: 18px;
  border: 1px solid var(--line);
  position: relative;
  display: grid; place-items: center;
}
.detail-viewer svg {
  width: 100%; height: 100%; display: block;
}
.detail-viewer img {
  width: 100%; height: 100%; object-fit: contain; display: block;
}
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0, 0, 0, .55); color: #fff;
  border: 1px solid rgba(255, 255, 255, .15);
  cursor: pointer; z-index: 2;
  display: grid; place-items: center;
}
.gallery-nav:hover { background: rgba(124, 58, 237, .7); scale: 1.1; }
.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }
.gallery-counter {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: rgba(255, 255, 255, .7); background: rgba(0, 0, 0, .5);
  padding: 2px 10px; border-radius: 999px;
}
.detail-body h2 { margin-bottom: 4px; font-family: var(--font-display); font-size: 18px; }
.detail-meta { font-size: 14px; color: var(--muted); margin: 8px 0; display: grid; gap: 4px; }
.detail-row { display: flex; gap: 8px; font-size: 13.5px; line-height: 1.55; }
.detail-row-k { color: var(--dim); min-width: 118px; font-weight: 600; }
.detail-row-v { color: var(--text); font-weight: 500; }
.detail-req {
  font-size: 13px; color: var(--muted); margin: 10px 0;
  padding: 12px 14px; background: var(--card-2); border-radius: 10px;
  border: 1px solid var(--line);
  white-space: pre-line;
}
.detail-id-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.detail-lbl { font-size: 11px; color: var(--dim); text-transform: uppercase; font-weight: 600; letter-spacing: .08em; }
.detail-id {
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  color: var(--purple-3); background: var(--card-2);
  border: 1px solid rgba(124,58,237,.3);
  padding: 6px 14px; border-radius: 8px; letter-spacing: .06em;
  user-select: all; word-break: break-all;
}
.detail-copy-btn {
  font: inherit; font-weight: 600; font-size: 12.5px; color: var(--text);
  background: rgba(255,255,255,.04); border: 1px solid var(--line-2);
  padding: 6px 14px; border-radius: 8px; cursor: pointer;
  transition: border-color .12s ease, color .12s ease;
}
.detail-copy-btn:hover { border-color: var(--purple); color: var(--purple-2); }

/* ── submit form ── */
.submit-field { margin-bottom: 16px; }
.submit-lbl { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.submit-lbl .req { color: var(--red); }
.submit-lbl .opt { color: var(--dim); font-weight: 400; }
.submit-input {
  width: 100%; font: inherit; font-size: 14px;
  padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--card-2); color: var(--text); outline: none;
  transition: border-color .15s ease;
}
.submit-input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(124,58,237,.1); }
.submit-input::placeholder { color: var(--dim); }
.submit-input.mono { font-family: var(--font-mono); letter-spacing: .05em; }
.img-upload-area {
  border: 2px dashed var(--line-2); border-radius: 12px;
  padding: 24px; text-align: center; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.img-upload-area:hover, .img-upload-area.dragover { border-color: var(--purple); background: rgba(124,58,237,.05); }
.img-upload-hint {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--dim); font-size: 13px;
}
.img-upload-hint svg { color: var(--purple-2); opacity: .6; }
.img-previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.img-thumb { position: relative; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; }
.img-remove {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px;
  background: rgba(0,0,0,.6); color: #fff; border: none; border-radius: 50%;
  font-size: 14px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.img-remove:hover { background: var(--red); }
.submit-btn {
  width: 100%; margin-top: 8px;
  font: inherit; font-weight: 700; font-size: 14.5px; color: #fff;
  background: linear-gradient(135deg, var(--purple), #9333ea);
  border: none; border-radius: 12px; padding: 13px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(124,58,237,.4);
  transition: transform .12s ease, box-shadow .12s ease;
}
.submit-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(124,58,237,.55); }
.submit-btn:active { transform: scale(.98); }
.submit-msg { margin-top: 12px; font-size: 14px; font-weight: 600; text-align: center; }
.img-err {
  margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--red);
  background: rgba(248,113,113,.08); border: 1px solid rgba(248,113,113,.3);
  border-radius: 10px; padding: 8px 12px; text-align: center;
}
.img-err.hidden { display: none; }

/* ── toast ── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--card-2); border: 1px solid var(--line-2); color: var(--text);
  padding: 13px 24px; border-radius: 13px; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 12px 40px rgba(0,0,0,.6);
  z-index: 50; backdrop-filter: blur(8px);
  animation: toastIn .25s cubic-bezier(.34,1.4,.64,1) both;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── responsive ── */
@media (max-width: 640px) {
  .browse-wrap { padding: 20px 14px 40px; }
  .browse-header { flex-direction: column; align-items: flex-start; }
  .browse-title { font-size: 22px; }
  .houses-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
  .modal-card { padding: 20px; }
  .modal-close { top: -12px; right: -8px; }
  .topbar { padding: 12px 16px; }
}

/* ── sort dropdown (matches the search box) ── */
.select-wrap { position: relative; display: inline-flex; }
.browse-sort {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  font: inherit; font-size: 14px; padding: 11px 38px 11px 16px;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--card);
  color: var(--text); cursor: pointer; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.browse-sort:hover { border-color: var(--purple); }
.browse-sort:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(124,58,237,.12); }
.browse-sort option { background: var(--card-2); color: var(--text); }
.select-arrow { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--dim); pointer-events: none; }

/* ── gallery loading overlay ── */
.gallery-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  gap: 10px; background: rgba(5,3,8,.55); color: var(--purple-3);
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
  backdrop-filter: blur(2px); z-index: 3;
}
.gallery-loading.hidden { display: none; }
.gallery-loading::before {
  content: ''; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(167,139,250,.25); border-top-color: var(--purple-2);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── pagination ── */
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 26px 0 8px; }
.pager.hidden { display: none; }
.pager-arrow {
  width: 40px; height: 40px; border-radius: 12px; cursor: pointer;
  background: var(--card-2); border: 1px solid var(--line-2); color: var(--text);
  display: grid; place-items: center; transition: border-color .15s ease, color .15s ease;
}
.pager-arrow:hover { border-color: var(--purple); color: var(--purple-3); }
.pager-mid { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 600; }
#page-input {
  width: 58px; text-align: center; background: var(--card-2); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 6px;
  font: inherit; font-weight: 700; outline: none; -moz-appearance: textfield;
}
#page-input:focus { border-color: var(--purple); }
#page-input::-webkit-outer-spin-button, #page-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ── tile image loading spinner ── */
.tile-img-wrap .tile-spin {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
}
.tile-img-wrap .tile-spin::before {
  content: ''; width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid rgba(124,58,237,.18); border-top-color: var(--purple-2);
  animation: spin .8s linear infinite;
}
.tile-img-wrap.loaded .tile-spin { display: none; }

/* ── fullscreen button on the detail image ── */
.gallery-fs {
  position: absolute; bottom: 10px; right: 10px; z-index: 4;
  width: 30px; height: 30px; border-radius: 9px; cursor: pointer;
  background: rgba(10,8,18,.72); border: 1px solid var(--line-2); color: #fff;
  display: grid; place-items: center;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: border-color .15s ease, color .15s ease, transform .15s ease;
}
.gallery-fs svg { width: 14px; height: 14px; }
.gallery-fs:hover { border-color: var(--purple); color: var(--purple-3); transform: scale(1.06); }

/* ── fullscreen zoomable viewer ── */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(3,2,6,.97);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; touch-action: none; overscroll-behavior: contain;
}
.lightbox.hidden { display: none; }
.lightbox-img {
  max-width: 100vw; max-height: 100vh; width: auto; height: auto;
  object-fit: contain; user-select: none; -webkit-user-drag: none;
  transform-origin: center center; will-change: transform;
  cursor: grab; touch-action: none;
}
.lightbox-img:active { cursor: grabbing; }
.lightbox-x {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  background: rgba(22,15,38,.9); border: 1px solid var(--line-2); color: #fff;
  font-size: 26px; line-height: 1; display: grid; place-items: center;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.lightbox-x:hover { background: #e5484d; border-color: #e5484d; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  background: rgba(22,15,38,.9); border: 1px solid var(--line-2); color: #fff;
  display: grid; place-items: center;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.lightbox-nav:hover { border-color: var(--purple); color: var(--purple-3); }
.lightbox-prev { left: 14px; }
.lightbox-next { right: 14px; }
.lightbox-hint {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  color: var(--muted); font-size: 12px; text-align: center; pointer-events: none;
  background: rgba(10,8,18,.6); padding: 6px 12px; border-radius: 99px;
  max-width: 92vw;
}
@media (max-width: 640px) {
  .lightbox-hint { font-size: 10.5px; bottom: 10px; }
  .lightbox-x { top: 10px; right: 10px; width: 42px; height: 42px; }
  .lightbox-nav { width: 42px; height: 42px; }
}

/* ══ house status + description (added 2026-09-23) ══════════════════════ */

/* the grid's own children must be able to span every column */
.houses-loading, .empty-houses { grid-column: 1 / -1; }

/* ── centred loader: pongi icon inside a spinning ring ── */
.houses-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 72px 0 84px;
}
.loader-ring {
  position: relative; width: 76px; height: 76px;
  display: grid; place-items: center;
}
.loader-ring::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid rgba(124,58,237,.16);
  border-top-color: var(--purple-2);
  border-right-color: var(--purple-3);
  animation: spin .9s linear infinite;
}
.loader-icon {
  width: 44px; height: 44px; border-radius: 12px; object-fit: contain;
  animation: loaderPulse 1.6s ease-in-out infinite;
}
.loader-text { color: var(--muted); font-size: 14px; font-weight: 600; letter-spacing: .01em; }
@keyframes loaderPulse {
  0%, 100% { transform: scale(1); opacity: .75; }
  50%      { transform: scale(1.08); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .loader-ring::before, .loader-icon { animation: none; }
}

/* ── status pill on a house card ── */
.tile-status {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  padding: 4px 9px; border-radius: 999px;
  background: rgba(10,8,18,.78); border: 1px solid var(--line-2); color: var(--muted);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  pointer-events: none;
}
.tile-status.st-finished   { color: #6ee7b7; border-color: rgba(52,211,153,.45); background: rgba(6,32,24,.82); }
.tile-status.st-unfinished { color: #fcd34d; border-color: rgba(252,211,77,.4);  background: rgba(38,28,4,.82); }

/* ── description block in the detail modal ── */
.detail-desc { margin: 10px 0 4px; }
.detail-desc-k {
  font-size: 11px; color: var(--dim); text-transform: uppercase;
  font-weight: 600; letter-spacing: .08em; margin-bottom: 5px;
}
.detail-desc-v {
  font-size: 13.5px; line-height: 1.6; color: var(--text);
  white-space: pre-line; overflow-wrap: anywhere;
  padding: 12px 14px; background: var(--card-2); border-radius: 10px;
  border: 1px solid var(--line);
}
.detail-desc-v.is-empty { color: var(--dim); font-style: italic; }

/* ── status value colouring in the detail rows ── */
.detail-row-v.detail-status.st-finished   { color: #6ee7b7; }
.detail-row-v.detail-status.st-unfinished { color: #fcd34d; }
.detail-row-v.detail-status.st-unknown    { color: var(--dim); }

/* ── publish form: status select + description textarea ── */
.select-wrap-full { display: flex; width: 100%; }
.submit-select {
  width: 100%; cursor: pointer; padding-right: 38px;
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
}
.submit-select option { background: var(--card-2); color: var(--text); }
.submit-select:invalid { color: var(--dim); }
.submit-textarea {
  resize: vertical; min-height: 92px; line-height: 1.55;
  font-family: var(--font-body);
}

/* ══ scrollbars: slim + on-palette (the default bright bar killed the vibe) ══ */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) var(--bg); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 999px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--purple); }
::-webkit-scrollbar-thumb:active { background: var(--purple-2); }
::-webkit-scrollbar-corner { background: var(--bg); }

/* ══ fullscreen gate (added 2026-09-23) ════════════════════════════════════
   The loading overlay itself is unchanged (full-bleed, blurred, centred —
   see .gallery-loading above). All this adds is a lock on the fullscreen
   button until the gallery has finished arriving. */

/* "wait" label shown beside the fullscreen button while the gallery loads */
.gallery-fs-hint {
  position: absolute; bottom: 10px; right: 48px; z-index: 4;
  font-size: 11px; font-weight: 600; color: var(--purple-3);
  background: rgba(10, 8, 18, .82);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
  pointer-events: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.gallery-fs-hint.hidden { display: none; }
.gallery-fs:disabled { opacity: .4; cursor: not-allowed; }

/* defensive: "Uncertain" never gets a card pill, but keep the colour defined */
.tile-status.st-uncertain { color: #93c5fd; border-color: rgba(147,197,253,.4); background: rgba(8,24,44,.82); }
