/* ===================================================================
   thisonethat.one — Quiet Glass
   Ported from the Direction D design exploration into a real,
   reusable stylesheet. Dark frosted glass on a warm-charcoal base,
   with a single soft glow and a quiet pink accent.
   =================================================================== */

:root {
  /* Base + glow (warm) */
  --base:        #15131a;
  --glow-a:      rgba(255, 180, 140, 0.18);
  --glow-b:      rgba(120, 90, 140, 0.12);

  /* Accent — a softened pink, used sparingly */
  --acc:         rgba(255, 77, 109, 0.95);
  --acc-solid:   #ff4d6d;
  --acc-dim:     rgba(255, 77, 109, 0.30);
  --acc-glow:    rgba(255, 77, 109, 0.30);

  /* Text on dark */
  --text:        #f3f0ec;
  --text-2:      rgba(243, 240, 236, 0.74);
  --text-3:      rgba(243, 240, 236, 0.50);
  --text-4:      rgba(243, 240, 236, 0.30);
  --hair:        rgba(255, 255, 255, 0.08);

  /* Status colors */
  --good:        #90e2a8;
  --warn:        #f2b07a;

  /* Glass surfaces */
  --glass-bg:        rgba(255, 255, 255, 0.055);
  --glass-bg-raised: rgba(255, 255, 255, 0.085);
  --glass-border:    rgba(255, 255, 255, 0.10);
  --glass-border-2:  rgba(255, 255, 255, 0.16);

  /* Radii */
  --r-xs: 7px; --r-sm: 9px; --r-md: 12px; --r-lg: 16px;
  --r-xl: 20px; --r-2xl: 24px;

  /* Type */
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Monaco, "Cascadia Mono", monospace;

  --sidebar-w: 248px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  min-height: 100%;
  background: var(--base);
  color: var(--text);
  font-family: var(--font-system);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
::selection { background: var(--acc-dim); }

/* === Background glow ============================================== */
.bg-glow {
  position: fixed; inset: 0; z-index: -2; background: var(--base);
}
.bg-glow::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(55% 45% at 22% 18%, var(--glow-a) 0%, transparent 65%),
    radial-gradient(45% 45% at 88% 92%, var(--glow-b) 0%, transparent 60%);
}
.bg-glow::after {
  content: ""; position: absolute; inset: 0; opacity: 0.5; mix-blend-mode: overlay;
  background:
    radial-gradient(circle at 30% 60%, rgba(255,255,255,0.025), transparent 35%),
    radial-gradient(circle at 70% 30%, rgba(255,255,255,0.015), transparent 40%);
}

/* === Glass helpers =============================================== */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(36px) saturate(140%);
  backdrop-filter: blur(36px) saturate(140%);
  border: 0.5px solid var(--glass-border);
  box-shadow: inset 0 0.5px 0 rgba(255,255,255,0.10), 0 8px 28px rgba(0,0,0,0.30);
}
.glass-raised {
  background: var(--glass-bg-raised);
  -webkit-backdrop-filter: blur(44px) saturate(160%);
  backdrop-filter: blur(44px) saturate(160%);
  border: 0.5px solid var(--glass-border-2);
  box-shadow: inset 0 0.5px 0 rgba(255,255,255,0.14), 0 16px 40px rgba(0,0,0,0.36);
}

/* === App shell (sidebar split-view) ============================== */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky; top: 0; align-self: start;
  height: 100vh; overflow-y: auto;
  padding: 10px 10px 14px;
  display: flex; flex-direction: column; gap: 1px;
  background: rgba(255,255,255,0.03);
  border-right: 0.5px solid var(--hair);
  -webkit-backdrop-filter: blur(36px) saturate(140%);
  backdrop-filter: blur(36px) saturate(140%);
}
.brand {
  padding: 12px 10px 16px; display: flex; align-items: center; gap: 10px;
}
.brand .mark {
  width: 28px; height: 28px; border-radius: 8px; flex: 0 0 auto;
  background: rgba(255,255,255,0.94); color: var(--base);
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
}
.brand .name { font-weight: 700; font-size: 14px; letter-spacing: -0.015em; }
.brand .sub  { font-size: 11px; color: var(--text-3); }
.brand .acc  { color: var(--acc); }

.searchbox {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px; margin-bottom: 8px;
  background: rgba(255,255,255,0.06); border: 0.5px solid var(--hair);
  font-size: 13px; color: var(--text-3); cursor: text; width: 100%;
}
.searchbox kbd {
  margin-left: auto; font-family: var(--font-mono); font-size: 10px;
  color: var(--text-3); background: rgba(255,255,255,0.06);
  padding: 1px 5px; border-radius: 4px; border: 0.5px solid var(--hair);
}

.nav-label {
  font-size: 11px; color: var(--text-3); text-transform: uppercase;
  letter-spacing: 0.06em; font-weight: 700; padding: 12px 10px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 7px;
  color: var(--text-2); font-size: 13.5px; font-weight: 500;
  border: 0.5px solid transparent; transition: background .15s, color .15s;
}
.nav-item .ic { color: var(--text-3); flex: 0 0 auto; }
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.nav-item.active {
  background: rgba(255,255,255,0.10); color: var(--text);
  border-color: rgba(255,255,255,0.15); font-weight: 600;
}
.nav-item.active .ic { color: var(--acc); }
.nav-item .label { flex: 1; min-width: 0; }
.nav-item .badge {
  font-size: 10px; background: rgba(255,255,255,0.10); color: var(--text-2);
  padding: 1px 6px; border-radius: 999px; font-weight: 700;
}
.nav-spacer { flex: 1; }

.sidecard {
  margin-top: 8px; padding: 8px 10px; border-radius: 8px;
  background: rgba(255,255,255,0.04); border: 0.5px solid var(--hair);
  display: flex; align-items: center; gap: 10px;
}
.sidecard .who { font-size: 12px; font-weight: 600; }
.sidecard .meta { font-size: 10px; color: var(--text-3); }

/* === Main column ================================================= */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 28px; border-bottom: 0.5px solid var(--hair);
  background: rgba(21,19,26,0.55);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  backdrop-filter: blur(28px) saturate(160%);
}
.topbar .crumb { color: var(--text-3); font-size: 12.5px; }
.topbar .crumb b { color: var(--text-2); font-weight: 600; }
.topbar .spacer { flex: 1; }

.content { padding: 26px 28px 60px; max-width: 1180px; width: 100%; }
.content.narrow { max-width: 760px; }
.content.wide { max-width: 100%; }

/* === Display type ================================================ */
.display {
  font-family: var(--font-rounded); font-weight: 300;
  letter-spacing: -0.03em; line-height: 1.02;
}
.display b, .display strong { font-weight: 700; }
.display .acc { color: var(--acc); }
.display .mut { opacity: 0.6; font-style: italic; font-weight: 200; }

.eyebrow {
  font-size: 11px; color: var(--text-3); letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 700;
}
.muted  { color: var(--text-3); }
.muted2 { color: var(--text-2); }

/* === Buttons ===================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 15px; border-radius: 10px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--text);
  background: rgba(255,255,255,0.06); border: 0.5px solid var(--hair);
  transition: background .15s, transform .05s;
}
.btn:hover { background: rgba(255,255,255,0.10); }
.btn:active { transform: translateY(0.5px); }
.btn-primary {
  background: var(--acc); color: #fff; border: 0.5px solid rgba(255,255,255,0.2);
  box-shadow: 0 8px 24px var(--acc-glow), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover { background: var(--acc-solid); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 18px; font-size: 15px; border-radius: 14px; }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.btn-ghost { background: transparent; }
.btn-danger { color: #ffb3c0; }

/* Pills / tags */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; background: rgba(255,255,255,0.06);
  border: 0.5px solid var(--hair); color: var(--text-2);
}
.pill.acc { background: var(--acc-dim); color: var(--acc); border-color: transparent; }
.pill.good { background: rgba(144,226,168,0.16); color: var(--good); border-color: transparent; }
.pill.warn { background: rgba(242,176,122,0.16); color: var(--warn); border-color: transparent; }

/* Segmented control / tab strip */
.seg {
  display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px;
  background: rgba(0,0,0,0.20); border: 0.5px solid var(--hair);
}
.seg a, .seg button {
  padding: 5px 11px; border-radius: 7px; font-size: 12px; font-weight: 600;
  color: var(--text-3); background: transparent; border: none; cursor: pointer;
}
.seg a.on, .seg button.on { background: rgba(255,255,255,0.10); color: var(--text); }

/* === Cards / lists =============================================== */
.card { border-radius: var(--r-lg); padding: 16px 18px; }
.card-raised { border-radius: var(--r-xl); padding: 16px 18px; }
.section-title {
  font-size: 12px; font-weight: 700; color: var(--text-2);
  text-transform: uppercase; letter-spacing: 0.06em;
}

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }

.row { display: flex; align-items: center; gap: 12px; }
.col { display: flex; flex-direction: column; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; }
.gap-16 { gap: 16px; } .gap-22 { gap: 22px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }

/* Avatar */
.avatar {
  border-radius: 50%; flex: 0 0 auto; color: #fff; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--acc-solid), #af52de);
  text-transform: uppercase;
}
.avatar.b { background: linear-gradient(135deg, #007aff, #af52de); }
.avatar.g { background: linear-gradient(135deg, #34c759, #007aff); }
.avatar.o { background: linear-gradient(135deg, #ff9500, var(--acc-solid)); }

/* === Status / microblog ========================================== */
.note { padding: 14px 0; border-bottom: 0.5px solid var(--hair); }
.note:last-child { border-bottom: none; }
.note-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.note-head .name { font-size: 13px; font-weight: 600; }
.note-head .when { font-size: 12px; color: var(--text-3); }
.note-body { font-size: 14.5px; line-height: 1.55; color: var(--text); }
.note-actions { display: flex; gap: 22px; margin-top: 10px; color: var(--text-3); font-size: 12px; }
.note-actions .act { display: flex; gap: 5px; align-items: center; cursor: pointer; background: none; border: none; color: inherit; font-size: inherit; }
.note-actions .act:hover { color: var(--text); }
.note-actions .act.liked { color: var(--acc); }

/* === Poll (this / that) ========================================== */
.poll { margin-top: 12px; }
.poll-head { display: flex; justify-content: space-between; align-items: baseline; }
.poll-q { font-size: 15px; font-weight: 600; margin-top: 6px; line-height: 1.35; }
.poll-opts { display: flex; gap: 10px; margin-top: 12px; }
.poll-opt {
  flex: 1; position: relative; overflow: hidden; cursor: pointer;
  padding: 11px 14px; border-radius: 11px; text-align: center;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  background: rgba(255,255,255,0.06); border: 0.5px solid var(--hair);
  transition: background .15s;
}
.poll-opt:hover { background: rgba(255,255,255,0.10); }
.poll-opt .fill {
  position: absolute; inset: 0; width: 0; background: var(--acc-dim);
  transition: width .5s cubic-bezier(.2,.7,.2,1); z-index: 0;
}
.poll-opt.win .fill { background: var(--acc); }
.poll-opt .lbl { position: relative; z-index: 1; }
.poll-opt.voted { cursor: default; }
.poll-opt.chosen { box-shadow: inset 0 0 0 1px var(--acc); }

/* compact inline poll bar */
.poll-bar { display: flex; height: 26px; border-radius: 7px; overflow: hidden; margin-top: 6px;
  background: rgba(255,255,255,0.05); border: 0.5px solid var(--hair); }
.poll-bar .a { background: var(--acc); color: #fff; }
.poll-bar .b { background: transparent; color: var(--text-2); }
.poll-bar .a, .poll-bar .b { display: grid; place-items: center; font-size: 11px; font-weight: 700; }

/* === Image placeholder (mono caption) ============================ */
.imgph {
  position: relative; overflow: hidden;
  background: repeating-linear-gradient(135deg,
    rgba(255,255,255,0.05) 0 12px, rgba(255,255,255,0.08) 12px 24px);
  color: var(--text-3); font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center; text-align: center;
}

/* cover that fills + holds caption bottom-left */
.cover { position: relative; overflow: hidden; }
.cover .meta { position: absolute; left: 18px; right: 18px; bottom: 16px; }

/* === Article / reading view ====================================== */
.prose { font-family: var(--font-system); color: var(--text); }
.prose p { font-size: 16px; line-height: 1.75; margin: 0 0 1.1em; color: var(--text); }
.prose h2 { font-family: var(--font-rounded); font-weight: 700; font-size: 26px; letter-spacing: -0.02em; margin: 1.6em 0 0.5em; }
.prose h3 { font-weight: 700; font-size: 20px; margin: 1.4em 0 0.4em; }
.prose a { color: var(--acc); text-decoration: none; border-bottom: 1px solid var(--acc-dim); }
.prose ul, .prose ol { padding-left: 1.3em; line-height: 1.7; font-size: 16px; color: var(--text); }
.prose li { margin: 0.3em 0; }
.prose blockquote {
  margin: 1.2em 0; padding: 6px 18px; border-left: 2px solid var(--acc);
  color: var(--text-2); font-style: italic;
}
.prose code {
  font-family: var(--font-mono); font-size: 0.88em;
  background: rgba(255,255,255,0.08); padding: 2px 6px; border-radius: 5px;
}
.prose pre {
  background: rgba(0,0,0,0.30); border: 0.5px solid var(--hair);
  border-radius: 12px; padding: 16px 18px; overflow-x: auto; margin: 1.2em 0;
}
.prose pre code { background: none; padding: 0; font-size: 13.5px; line-height: 1.6; }
.prose img { border-radius: 14px; margin: 1.2em 0; }
.prose hr { border: none; border-top: 0.5px solid var(--hair); margin: 2em 0; }

.byline { display: flex; align-items: center; gap: 10px; padding: 14px 0;
  border-top: 0.5px solid var(--hair); border-bottom: 0.5px solid var(--hair); }

/* === Forms ======================================================= */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 6px; font-weight: 600; }
.input, .textarea, .select {
  width: 100%; padding: 12px 14px; border-radius: 11px;
  background: rgba(0,0,0,0.25); border: 0.5px solid var(--hair);
  color: var(--text); font-size: 15px; font-family: inherit;
}
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--acc); background: rgba(0,0,0,0.30); }
.textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.textarea.code { font-family: var(--font-mono); font-size: 13.5px; }
.field .hint { font-size: 11px; color: var(--text-4); margin-top: 5px; }

/* === Auth pages ================================================== */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px;
  align-items: center; padding: 80px 56px; max-width: 1180px; margin: 0 auto; }
@media (max-width: 860px) { .auth-wrap { grid-template-columns: 1fr; padding: 48px 24px; } .auth-art { display: none; } }
.auth-card { width: 100%; max-width: 440px; margin-left: auto; border-radius: 24px; padding: 26px; }

/* === Stat tiles ================================================== */
.stat { border-radius: var(--r-lg); padding: 14px 16px; }
.stat .k { font-size: 11px; color: var(--text-3); letter-spacing: 0.06em; font-weight: 700; }
.stat .v { font-size: 30px; font-weight: 300; margin-top: 6px; font-family: var(--font-rounded);
  letter-spacing: -0.02em; font-feature-settings: "tnum"; }
.stat .d { font-size: 11.5px; margin-top: 2px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.stat .d.up { color: var(--good); } .stat .d.down { color: var(--warn); }

/* === Tables (admin) ============================================== */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-3); font-weight: 700; padding: 10px 14px; border-bottom: 0.5px solid var(--hair); }
.tbl td { padding: 13px 14px; border-bottom: 0.5px solid var(--hair); font-size: 13.5px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: rgba(255,255,255,0.025); }
.tbl .t-title { font-weight: 600; font-size: 14px; }

/* === Game / arcade =============================================== */
.game-frame {
  width: 100%; border: 0.5px solid var(--glass-border-2); border-radius: 16px;
  overflow: hidden; background: #000; aspect-ratio: 16 / 9; display: block;
}
.game-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.game-card { border-radius: var(--r-lg); overflow: hidden; transition: transform .12s; }
.game-card:hover { transform: translateY(-2px); }
.game-card .thumb { aspect-ratio: 16 / 10; }

/* === Flash / alerts ============================================== */
.flash { padding: 11px 15px; border-radius: 11px; font-size: 13.5px; margin-bottom: 16px;
  border: 0.5px solid var(--hair); }
.flash.ok { background: rgba(144,226,168,0.14); color: var(--good); }
.flash.err { background: rgba(255,77,109,0.14); color: #ffb3c0; }
.flash.info { background: rgba(255,255,255,0.06); color: var(--text-2); }

/* === Chart ======================================================= */
.chart { width: 100%; height: 100%; }

/* === Empty state ================================================= */
.empty { text-align: center; padding: 60px 20px; color: var(--text-3); }
.empty .big { font-size: 17px; color: var(--text-2); font-weight: 600; margin-bottom: 6px; }

/* === Footer ====================================================== */
.foot { padding: 28px; border-top: 0.5px solid var(--hair); color: var(--text-3);
  font-size: 12.5px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.foot a:hover { color: var(--text); }

/* === Mobile: collapse sidebar to a top bar ======================= */
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: static; height: auto; flex-direction: row; flex-wrap: wrap;
    align-items: center; gap: 6px; overflow: visible;
    border-right: none; border-bottom: 0.5px solid var(--hair);
  }
  .sidebar .nav-label, .sidebar .nav-spacer, .sidebar .sidecard, .sidebar .searchbox { display: none; }
  .nav-item { padding: 7px 9px; }
  .nav-item .label { display: none; }
  .brand { padding: 8px; }
  .content { padding: 20px 16px 48px; }
  .auth-wrap { padding: 32px 18px; }
}

/* utility */
.hide { display: none !important; }
.center { text-align: center; }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* === Photo gallery (masonry) ===================================== */
.photo-grid { columns: 3; column-gap: 14px; }
@media (max-width: 900px) { .photo-grid { columns: 2; } }
@media (max-width: 560px) { .photo-grid { columns: 1; } }
.photo {
  break-inside: avoid; margin: 0 0 14px; position: relative; cursor: zoom-in;
  border-radius: 14px; overflow: hidden; border: 0.5px solid var(--hair); background: #0c0b10;
}
.photo img { width: 100%; height: auto; display: block; transition: transform .3s ease; }
.photo:hover img { transform: scale(1.03); }
.photo figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 9px;
  font-size: 11.5px; color: #fff; opacity: 0; transition: opacity .2s;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
}
.photo:hover figcaption { opacity: 1; }

/* === Lightbox ==================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center;
  background: rgba(8,7,11,0.92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.lightbox.open { display: flex; }
.lb-stage { margin: 0; max-width: 90vw; max-height: 86vh; text-align: center; }
.lb-stage img { max-width: 90vw; max-height: 80vh; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.lb-stage figcaption { color: var(--text-2); font-size: 13px; margin-top: 12px; }
.lb-nav, .lb-close {
  position: absolute; background: rgba(255,255,255,0.08); border: 0.5px solid var(--glass-border-2);
  color: #fff; width: 44px; height: 44px; border-radius: 999px; cursor: pointer;
  display: grid; place-items: center;
}
.lb-nav:hover, .lb-close:hover { background: rgba(255,255,255,0.16); }
.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 22px; transform: rotate(180deg); }
.lb-next { right: 22px; }
@media (max-width: 560px) { .lb-prev { left: 10px; } .lb-next { right: 10px; } }
