/* jingrut — midnight glass */
:root {
  /* ink */
  --ink: #eef2fb;
  --ink-2: #c4cde2;
  --muted: #8e9bb8;
  --faint: #7d89a6;
  /* one accent, a few signals */
  --accent: #86b6ff;
  --accent-2: #b9d5ff;
  --blue: #4d8dff;
  --blue-2: #3366dd;
  --violet: #a99bff;
  --mint: #62e3ad;
  --coral: #ff8a80;
  --amber: #ffc66b;
  /* surfaces (inside glass) */
  --s1: rgba(255, 255, 255, 0.045);
  --s2: rgba(255, 255, 255, 0.08);
  --s3: rgba(255, 255, 255, 0.13);
  --well: rgba(2, 5, 14, 0.36);
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.14);
  /* glass */
  --glass-tint: rgba(12, 18, 40, 0.34);
  --glass-hi: rgba(255, 255, 255, 0.07);
  --blur: 26px;
  --lift: 0 28px 64px -30px rgba(0, 0, 0, 0.75), 0 2px 10px -4px rgba(0, 0, 0, 0.35);
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --pane-r: 26px;
}
@property --rim { syntax: '<number>'; inherits: true; initial-value: 0; }
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* no double-tap zoom delay; pinch zoom stays available */
html { touch-action: manipulation; }
body { -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: #060914; color: var(--ink); font: 14.5px/1.55 var(--font);
  letter-spacing: -0.012em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow: hidden;
  font-feature-settings: 'ss06';
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
::selection { background: rgba(134, 182, 255, 0.32); }
.hidden { display: none !important; }

/* ================= background ================= */
/* a living night sky: three lights that wander and breathe, an aurora ribbon, two layers of slow motes and a fine grain.
   Everything moves with transform/opacity only (compositor), and each layer leans a different amount away from the pointer. */
.bg { position: fixed; inset: -60px; z-index: 0; overflow: hidden; pointer-events: none;
  background: radial-gradient(120% 80% at 50% -10%, #13214d 0%, #0a1230 42%, #060914 100%); }
.bg::before { content: ''; position: absolute; inset: 0; z-index: 2; background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(3, 5, 12, 0.55)); }
.bg::after { content: ''; position: absolute; inset: 0; z-index: 3; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.bg i, .bg .motes { position: absolute; will-change: transform; translate: calc(var(--px, 0px) * var(--k, 1)) calc(var(--py, 0px) * var(--k, 1)); transition: translate 1.6s var(--ease); }
.bg i { border-radius: 50%; }
.bg .b1 { --k: 1.4; width: 72vmax; height: 72vmax; left: -20vmax; top: -32vmax; background: radial-gradient(closest-side, rgba(64, 116, 255, 0.55), rgba(64, 116, 255, 0.16) 55%, transparent); animation: drift1 28s ease-in-out infinite alternate; }
.bg .b2 { --k: -0.9; width: 62vmax; height: 62vmax; right: -24vmax; top: 6vh; background: radial-gradient(closest-side, rgba(132, 98, 255, 0.42), rgba(132, 98, 255, 0.1) 55%, transparent); animation: drift2 36s ease-in-out infinite alternate; }
.bg .b3 { --k: 0.8; width: 58vmax; height: 58vmax; left: 16vw; bottom: -36vmax; background: radial-gradient(closest-side, rgba(40, 186, 235, 0.32), rgba(40, 186, 235, 0.08) 55%, transparent); animation: drift3 31s ease-in-out infinite alternate; }
/* aurora: a soft ribbon that sways and breathes across the upper sky */
.bg .b4 { --k: 0.5; border-radius: 50%; width: 150vw; height: 46vh; left: -25vw; top: 8vh; opacity: 0.8;
  background: linear-gradient(100deg, transparent 12%, rgba(70, 130, 255, 0.28) 34%, rgba(150, 110, 255, 0.24) 52%, rgba(50, 200, 230, 0.18) 68%, transparent 88%);
  -webkit-mask-image: radial-gradient(closest-side, #000 25%, transparent); mask-image: radial-gradient(closest-side, #000 25%, transparent);
  animation: aurora 24s ease-in-out infinite alternate; }
@keyframes drift1 { 0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.85; } 50% { opacity: 1; } 100% { transform: translate3d(22vw, 16vh, 0) scale(1.15); opacity: 0.8; } }
@keyframes drift2 { 0% { transform: translate3d(0, 0, 0) scale(1); opacity: 1; } 50% { opacity: 0.7; } 100% { transform: translate3d(-20vw, 22vh, 0) scale(0.88); opacity: 1; } }
@keyframes drift3 { 0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.8; } 50% { opacity: 1; } 100% { transform: translate3d(18vw, -20vh, 0) scale(1.18); opacity: 0.85; } }
@keyframes aurora { 0% { transform: rotate(-9deg) translate3d(-4vw, -5vh, 0) scaleY(0.85); opacity: 0.55; } 50% { opacity: 0.95; } 100% { transform: rotate(7deg) translate3d(5vw, 9vh, 0) scaleY(1.25); opacity: 0.65; } }
/* motes: tiled dots that rise forever; the tile height equals the travel, so the loop is seamless */
.bg .motes { left: 0; right: 0; top: 0; height: calc(100% + var(--tile)); background-repeat: repeat; background-size: var(--tile) var(--tile); animation: rise var(--dur) linear infinite; }
.bg .m1 { --k: 0.4; --tile: 420px; --dur: 70s; opacity: 0.55;
  background-image: radial-gradient(1.2px 1.2px at 12% 18%, #cfe0ff, transparent), radial-gradient(1px 1px at 68% 34%, #fff, transparent), radial-gradient(1.4px 1.4px at 38% 72%, #b9cfff, transparent), radial-gradient(1px 1px at 86% 86%, #e8e0ff, transparent), radial-gradient(1.2px 1.2px at 52% 8%, #fff, transparent); }
.bg .m2 { --k: 2; --tile: 760px; --dur: 46s; opacity: 0.45;
  background-image: radial-gradient(3px 3px at 22% 28%, rgba(170, 200, 255, 0.9), transparent), radial-gradient(2.5px 2.5px at 74% 62%, rgba(190, 170, 255, 0.85), transparent), radial-gradient(3.5px 3.5px at 46% 90%, rgba(140, 210, 255, 0.7), transparent); }
@keyframes rise { to { transform: translate3d(0, calc(var(--tile) * -1), 0); } }

/* ================= glass ================= */
.glass {
  position: relative; isolation: isolate;
  background: linear-gradient(165deg, var(--glass-hi), rgba(255, 255, 255, 0.015) 55%), var(--glass-tint);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(180%); backdrop-filter: blur(var(--blur)) saturate(180%);
  box-shadow: var(--lift), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
/* rim: a hairline that is brighter on top, and catches the pointer while it is over this pane */
.glass::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 3;
  background:
    radial-gradient(280px circle at var(--mx, -999px) var(--my, -999px), rgba(200, 222, 255, var(--rim, 0)), transparent 70%),
    linear-gradient(170deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.06) 30%, rgba(255, 255, 255, 0.04) 70%, rgba(255, 255, 255, 0.12));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  transition: --rim 0.4s;
}
.glass::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0; opacity: 0; transition: opacity 0.45s var(--ease);
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 0), rgba(130, 170, 255, 0.11), transparent 60%);
}
.glass.lit { --rim: 1; }
.glass.lit::after { opacity: 1; }
.glass > * { position: relative; z-index: 1; }

/* ================= app shell ================= */
.app { position: relative; z-index: 1; height: 100dvh; max-width: 1720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 16px; }
.top { height: 56px; border-radius: 999px; display: flex; align-items: center; gap: 6px; padding: 0 8px 0 18px; flex: none; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 17px; letter-spacing: -0.035em; margin-right: 6px; }
.brand .logo, .auth-hero .logo { width: 26px; height: 26px; border-radius: 9px; background: linear-gradient(145deg, #9cc4ff, #5b7cff 55%, #8b78ff); box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), 0 6px 16px -4px rgba(80,120,255,0.6); position: relative; transition: transform 0.5s var(--spring); }
.brand .logo::after, .auth-hero .logo::after { content: ''; position: absolute; inset: 7.5px; border-radius: 50%; background: rgba(255,255,255,0.92); }
.brand:hover .logo { transform: rotate(-8deg) scale(1.06); }
.livechip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--well); box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; color: var(--ink-2); }
.livechip i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.livechip.on i { background: var(--mint); box-shadow: 0 0 0 3px rgba(98, 227, 173, 0.18); }
.top .sp { flex: 1; }
/* pills: quiet by default, they light up under the pointer and lean toward it */
.pill { white-space: nowrap; flex: none; height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  background: transparent; box-shadow: inset 0 0 0 1px transparent;
  translate: var(--tx, 0) var(--ty, 0); transition: background 0.2s, color 0.2s, box-shadow 0.2s, translate 0.35s var(--ease), transform 0.3s var(--spring); }
.pill:hover { background: var(--s2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255,255,255,0.1); }
.pill:active { transform: scale(0.94); }
.pill.icon { width: 38px; padding: 0; justify-content: center; }
.pill svg { width: 17px; height: 17px; }
.pill.on { color: var(--accent-2); }
.pill .nm { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(145deg, hsl(var(--h, 215) 62% 50%), hsl(calc(var(--h, 215) + 36) 60% 38%)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.35); }
.pill .avatar { margin-left: -8px; }
.pill[data-nick] { background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }

.dash { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1.35fr) minmax(310px, 0.82fr); gap: 12px; }
.stack { display: grid; grid-template-rows: minmax(0, 1.1fr) minmax(0, 1fr); gap: 12px; min-height: 0; }
.pane { display: flex; flex-direction: column; min-height: 0; border-radius: var(--pane-r); overflow: hidden; animation: paneIn 0.8s var(--ease) backwards; }
.dash > .pane:nth-child(2) { animation-delay: 0.05s; } .stack .pane:first-child { animation-delay: 0.1s; } .stack .pane:last-child { animation-delay: 0.15s; }
@keyframes paneIn { 0% { opacity: 0; transform: translateY(40px) scale(0.88, 0.8); } 40% { opacity: 1; transform: translateY(-9px) scale(1.025, 0.975); } 62% { transform: translateY(3px) scale(0.99, 1.015); } 80% { transform: scale(1.004, 0.996); } 100% { transform: none; } }
.ph { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px 20px; flex: none; min-width: 0; min-height: 60px; }
.ph h2 { margin: 0; font-size: 17px; font-weight: 750; letter-spacing: -0.035em; white-space: nowrap; }
.ph .sub { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ph .gap { flex: 1; }
.ph2 { padding: 0 16px 10px; flex: none; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px 10px 14px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.12) transparent; }
.scroll::-webkit-scrollbar { width: 8px; } .scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
.scroll::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,0.2); }

/* segmented control with sliding glass thumb */
.seg { position: relative; display: inline-flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: 3px; border-radius: 999px; background: var(--well); box-shadow: inset 0 1px 2px rgba(0,0,0,0.35), inset 0 0 0 1px var(--line); }
.seg::-webkit-scrollbar { display: none; }
.seg .thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; width: 0; border-radius: 999px; z-index: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.1)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 4px 12px -2px rgba(0,0,0,0.35);
  transition: transform 0.45s var(--spring), width 0.45s var(--spring); }
.seg button { position: relative; z-index: 1; padding: 6px 13px; border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; transition: color 0.2s; }
.seg button:hover { color: var(--ink); }
.seg button.on { color: #fff; }
.seg button i { font-style: normal; margin-left: 5px; font-size: 11px; color: var(--mint); font-variant-numeric: tabular-nums; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 16px; border-radius: 999px; font-size: 13.5px; font-weight: 650; color: var(--ink);
  background: var(--s2); box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), inset 0 0 0 1px var(--line);
  translate: var(--tx, 0) var(--ty, 0); transition: background 0.2s, box-shadow 0.2s, translate 0.35s var(--ease), transform 0.3s var(--spring); white-space: nowrap; }
.btn:hover { background: var(--s3); }
.btn:active { transform: scale(0.95); }
.btn.primary { color: #fff; background: linear-gradient(180deg, #5b8ff6, var(--blue-2)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -1px 0 rgba(0,0,0,0.15), 0 8px 22px -8px rgba(77, 141, 255, 0.75); }
.btn.primary:hover { background: linear-gradient(180deg, #6a9bf8, #3a70e6); }
.btn.green { color: #04281b; background: linear-gradient(180deg, #8ff0c8, #47d398); box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 8px 20px -8px rgba(71, 211, 152, 0.7); }
.btn.red { color: #fff; background: linear-gradient(180deg, #ff8d84, #ec5248); box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 8px 20px -8px rgba(236, 82, 72, 0.7); }
.btn.ghost { background: transparent; box-shadow: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--s2); color: var(--ink); }
.btn.danger { color: #ffb0a8; }
.btn.sm { height: 32px; padding: 0 13px; font-size: 12.5px; }
.btn.icon { width: 36px; padding: 0; }
.btn.sm.icon { width: 32px; }
.btn svg { width: 15px; height: 15px; }
.btn:disabled { opacity: 0.45; pointer-events: none; }

/* inputs */
.input, textarea.input, select.input { width: 100%; border: 0; outline: none; color: var(--ink); background: var(--well); border-radius: 14px; padding: 11px 14px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.35), inset 0 0 0 1px var(--line); transition: box-shadow 0.2s, background 0.2s; }
.input:hover { box-shadow: inset 0 1px 2px rgba(0,0,0,0.35), inset 0 0 0 1px var(--line-2); }
.input:focus { box-shadow: inset 0 0 0 1.5px rgba(134, 182, 255, 0.85), 0 0 0 4px rgba(134, 182, 255, 0.14); background: rgba(2, 5, 14, 0.46); }
.input::placeholder { color: var(--faint); }
textarea.input { resize: vertical; min-height: 150px; line-height: 1.65; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238e9bb8' stroke-width='1.8'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
select.input option { background: #0f1830; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; color: var(--muted); font-weight: 600; padding-left: 4px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12.5px; }

/* ================= board ================= */
.notice { margin: 0 6px 8px; padding: 12px 14px; border-radius: 18px; font-size: 13.5px; white-space: pre-wrap; line-height: 1.5;
  background: linear-gradient(135deg, rgba(140, 196, 255, 0.18), rgba(157, 140, 255, 0.10)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), inset 0 0 0 1px rgba(140,196,255,0.22); }
.notice b { display: block; font-size: 11.5px; color: var(--accent-2); margin-bottom: 3px; }
.prow { display: block; padding: 11px 12px; border-radius: 18px; transition: background 0.25s, transform 0.35s var(--spring); }
.prow:hover { background: rgba(255, 255, 255, 0.08); transform: translateX(2px); }
.prow:active { transform: scale(0.985); }
.prow .pt { display: flex; align-items: center; gap: 7px; font-weight: 620; font-size: 14.5px; min-width: 0; }
.prow .ttl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .cc { color: var(--accent); font-size: 12px; font-weight: 700; flex: none; }
.prow svg { width: 13px; height: 13px; flex: none; }
.prow .pin { color: var(--accent); } .prow .clip { color: var(--faint); }
.prow .pm { display: flex; gap: 10px; color: var(--muted); font-size: 12px; margin-top: 2px; }
.prow .pm .lk { color: #ffb4aa; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; color: #0b1222; background: linear-gradient(135deg, var(--accent-2), #b9b0ff); vertical-align: 1px; }
.more:not(.pill) { display: flex; margin: 8px auto 0; }
.empty { margin: 8px 6px; padding: 34px 16px; text-align: center; color: var(--muted); font-size: 13.5px; border-radius: 22px; background: rgba(255,255,255,0.03); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05); }
.empty b { display: block; color: var(--ink-2); font-weight: 650; margin-bottom: 3px; font-size: 14.5px; }

/* feed cards */
.is-feed { padding: 2px 12px 14px; }
.fcard { padding: 16px 16px 10px; margin-bottom: 10px; border-radius: 22px; background: rgba(255,255,255,0.05); box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), inset 0 0 0 1px rgba(255,255,255,0.05); animation: msgIn 0.6s var(--ease) backwards; }
.fcard.is-notice { background: linear-gradient(150deg, rgba(140, 196, 255, 0.14), rgba(157, 140, 255, 0.07)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), inset 0 0 0 1px rgba(140, 196, 255, 0.22); }
.fcard.is-pin { box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), inset 0 0 0 1px rgba(198, 226, 255, 0.4); }
.fh { display: flex; align-items: center; gap: 10px; }
.fh .avatar { width: 32px; height: 32px; font-size: 13px; }
.fw { min-width: 0; flex: 1; }
.fn { font-size: 13.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fn b { font-weight: 650; }
.ft { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.pinb { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--accent-2); padding: 3px 9px; border-radius: 999px; background: rgba(140,196,255,0.14); flex: none; }
.pinb svg { width: 11px; height: 11px; }
.qa { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; flex: none; }
.qa.ok { color: #05281b; background: linear-gradient(180deg, #9af6d2, #4fdca6); }
.qa.wait { color: #d6ccff; background: rgba(169, 155, 255, 0.14); box-shadow: inset 0 0 0 1px rgba(169, 155, 255, 0.35); }
.ftl { margin: 12px 0 6px; font-size: 17px; font-weight: 750; letter-spacing: -0.025em; line-height: 1.35; word-break: break-word; }
.ftl .q { font-style: normal; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 7px; border-radius: 7px; font-size: 12px; font-weight: 800; color: #0b1222; background: linear-gradient(135deg, var(--accent-2), #b9b0ff); vertical-align: 2px; }
.fb { font-size: 14.5px; line-height: 1.7; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
.fb.clamp { max-height: 15.5em; overflow: hidden; }
.fb.clamp.fade { -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.fb img { border-radius: 14px; margin: 8px 0; max-height: 360px; object-fit: cover; cursor: zoom-in; }
.fb a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.fb code { background: rgba(0,0,0,0.3); padding: 1px 5px; border-radius: 5px; }
.fb pre { background: rgba(0,0,0,0.3); padding: 10px; border-radius: 10px; overflow: auto; }
.fb blockquote { white-space: pre-wrap; margin: 6px 0; padding: 4px 12px; border-left: 3px solid var(--accent); background: rgba(140,196,255,0.07); border-radius: 0 8px 8px 0; }
.fmore { margin-top: 4px; font-size: 13px; font-weight: 650; color: var(--accent-2); }
.fa { display: flex; align-items: center; gap: 4px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.fbtn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-2); transition: background 0.2s, transform 0.3s var(--spring); }
.fbtn:hover { background: rgba(255,255,255,0.08); color: var(--ink); }
.fbtn:active { transform: scale(0.92); }
.fbtn svg { width: 16px; height: 16px; }
.fbtn.like.on { color: #ffc2b9; }
.fbtn.like.on svg { fill: #ff8a7a; stroke: #ff8a7a; }
.fbtn.ghost { color: var(--muted); }
.fc { margin-top: 8px; padding: 10px 12px 4px; border-radius: 16px; background: rgba(0,0,0,0.18); }
.ic { display: grid; grid-template-columns: 24px 1fr; gap: 8px; padding: 6px 0; }
.ic.reply { margin-left: 28px; }
.ic .avatar { width: 24px; height: 24px; font-size: 10.5px; }
.ich { display: flex; gap: 8px; align-items: baseline; font-size: 11.5px; color: var(--muted); }
.ich b { color: var(--ink); font-size: 13px; font-weight: 650; }
.ich button { margin-left: auto; font-size: 11.5px; color: var(--faint); }
.ich button:hover { color: var(--coral); }
.ict { font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.icf { display: flex; gap: 6px; margin: 8px 0 8px; }
.icf { align-items: center; }
.icf .input { border-radius: 999px; padding: 0 14px; height: 38px; font-size: 13.5px; }
.icsend { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, #5a96ff, #3c72ea); box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 4px 12px rgba(60,114,234,0.35); transition: transform 0.3s var(--spring); }
.icsend:active { transform: scale(0.88); }
.icsend svg { width: 15px; height: 15px; margin-left: 2px; }
.ipt { color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; }

/* gallery */
.is-gallery { padding: 2px 12px 14px; }
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.gtile { display: block; border-radius: 20px; overflow: hidden; background: rgba(255,255,255,0.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06); transition: transform 0.4s var(--spring); animation: msgIn 0.6s var(--ease) backwards; }
.gtile:hover { transform: translateY(-3px) scale(1.01); }
.gimg { position: relative; aspect-ratio: 1; background: rgba(0,0,0,0.3); }
.gimg img { width: 100%; height: 100%; object-fit: cover; }
.gcount { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,0.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.gcount svg { width: 11px; height: 11px; }
.gmeta { padding: 9px 11px 11px; }
.gmeta b { display: block; font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gmeta span { font-size: 11.5px; color: var(--muted); }
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; justify-content: center; }
.thumbs:empty { display: none; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2); }

/* ================= chat ================= */
.who { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.msgs { display: flex; flex-direction: column; gap: 3px; padding: 6px 18px 10px; }
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 80%; animation: msgIn 0.45s var(--spring) both; }
@keyframes msgIn { 0% { opacity: 0; transform: translateY(16px) scale(0.4, 0.3); } 35% { opacity: 1; transform: translateY(-5px) scale(1.14, 0.86); } 55% { transform: translateY(2px) scale(0.92, 1.08); } 75% { transform: scale(1.04, 0.97); } 100% { transform: none; } }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg .nm { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); margin: 10px 8px 3px; font-weight: 550; }
.msg .nm .avatar { width: 18px; height: 18px; font-size: 9.5px; }
.bubble { padding: 8px 13px; border-radius: 20px; white-space: pre-wrap; word-break: break-word; line-height: 1.45; font-size: 14.5px;
  background: rgba(255, 255, 255, 0.11); box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), inset 0 0 0 1px rgba(255,255,255,0.04); }
.msg.mine .bubble { color: #fff; background: linear-gradient(180deg, #5a96ff, #3c72ea); box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 4px 16px rgba(60, 114, 234, 0.35); }
.msg.admin .bubble { box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), inset 0 0 0 1px rgba(198, 226, 255, 0.45); }
.bubble a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.msg .tm { font-size: 11px; color: var(--faint); margin: 2px 9px 0; }
.sysmsg { align-self: center; color: var(--faint); font-size: 12px; padding: 10px 0; }
.typing { height: 18px; padding: 0 22px; color: var(--faint); font-size: 12px; flex: none; }
.composer { display: flex; gap: 6px; align-items: center; margin: 4px 12px 12px; padding: 5px 5px 5px 6px; border-radius: 999px; flex: none; position: relative;
  background: var(--well); box-shadow: inset 0 1px 2px rgba(0,0,0,0.35), inset 0 0 0 1px var(--line); transition: box-shadow 0.2s; }
.composer:focus-within { box-shadow: inset 0 0 0 1.5px rgba(140, 196, 255, 0.8), 0 0 0 4px rgba(140, 196, 255, 0.14); }
.composer input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--ink); height: 34px; }
.composer input::placeholder { color: var(--faint); }
.composer .cattach { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); flex: none; background: rgba(255,255,255,0.08); box-shadow: inset 0 1px 0 rgba(255,255,255,0.15); transition: background 0.2s, transform 0.3s var(--spring); }
.composer .cattach:hover { background: rgba(255,255,255,0.15); color: #fff; }
.composer .cattach:active { transform: scale(0.88); }
.composer .cattach svg { width: 17px; height: 17px; }
.composer input[name=body] { padding-left: 4px; }
.bubble.media { padding: 4px; background: rgba(255,255,255,0.06); overflow: hidden; }
.msg.mine .bubble.media { background: rgba(90, 150, 255, 0.25); box-shadow: inset 0 1px 0 rgba(255,255,255,0.25); }
.bubble.media img, .bubble.media video { display: block; max-width: min(300px, 62vw); max-height: 320px; border-radius: 16px; background: rgba(0,0,0,0.3); }
.bubble.media img { cursor: zoom-in; }
.fchip { display: inline-flex; align-items: center; gap: 6px; text-decoration: none !important; font-weight: 600; }
.fchip svg { width: 14px; height: 14px; }
.lightbox { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 20px; background: rgba(2,5,12,0.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fadeIn 0.2s both; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 40px); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,0.6); animation: sheetUp 0.4s var(--spring) both; }
.lightbox .x { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,0.14); }
.lightbox .x svg { width: 16px; height: 16px; }
.btn.off { opacity: 0.55; }
.composer .send { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, #5a96ff, #3c72ea); box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 4px 12px rgba(60,114,234,0.4); transition: transform 0.3s var(--spring); flex: none; }
.composer .send:active { transform: scale(0.88); }
.composer .send svg { width: 15px; height: 15px; margin-left: 2px; }

.msg { position: relative; }
.msg.mine .bubble, .msg.can-mod .bubble { cursor: pointer; }
.mact { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; animation: msgIn 0.25s var(--ease) both; }
.mact .mreact, .mact .mbtns { display: flex; gap: 4px; flex-wrap: wrap; }
.msg.mine .mact { align-items: flex-end; }
.mact .mreact button { padding: 3px 7px; font-size: 16px; background: rgba(255,255,255,0.08); }
.mact .mreact button:hover { transform: scale(1.15); }
.mact .mbtns button { display: inline-flex; align-items: center; gap: 4px; } .mact .mbtns svg { width: 13px; height: 13px; }
.mact button { font-size: 12px; font-weight: 650; padding: 4px 11px; border-radius: 999px; color: var(--ink-2); background: rgba(255,255,255,0.1); box-shadow: inset 0 1px 0 rgba(255,255,255,0.15); }
.mact button.del { color: #ffb4aa; }
.medit { display: flex; gap: 4px; align-items: center; width: min(360px, 70vw); }
.medit input { flex: 1; min-width: 0; height: 36px; padding: 0 12px; border-radius: 18px; border: 0; outline: none; color: var(--ink); background: rgba(0,0,0,0.3); box-shadow: inset 0 0 0 1.5px rgba(140,196,255,0.8); }
.medit button { font-size: 12px; font-weight: 650; padding: 6px 10px; border-radius: 999px; color: var(--ink-2); }
.medit button.ok { color: #fff; background: linear-gradient(180deg, #5a96ff, #3c72ea); }
.bubble .gone { opacity: 0.55; font-style: italic; }
.skel { height: 120px; margin: 0 2px 10px; border-radius: 22px; background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.08), rgba(255,255,255,0.04)); background-size: 200% 100%; animation: skel 1.1s linear infinite; }
.skel.short { height: 70px; }
@keyframes skel { to { background-position: -200% 0; } }

/* ================= voice ================= */
.vroom { padding: 14px; margin: 0 4px 10px; border-radius: 22px; background: rgba(255, 255, 255, 0.045); box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), inset 0 0 0 1px rgba(255,255,255,0.05); transition: background 0.3s, box-shadow 0.3s; }
.vroom.on { background: linear-gradient(160deg, rgba(116, 239, 192, 0.16), rgba(116, 239, 192, 0.04)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), inset 0 0 0 1px rgba(116, 239, 192, 0.4); }
.vroom .vh { display: flex; align-items: center; gap: 8px; }
.vroom .vh b { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.vroom .vh span { color: var(--muted); font-size: 12px; }
.vroom .vh .gap { flex: 1; }
.ppl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ppl:empty { display: none; }
.peer { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; font-size: 12.5px; background: rgba(255,255,255,0.08); box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow 0.15s; }
.peer .avatar { width: 22px; height: 22px; font-size: 10.5px; }
.peer.speaking { box-shadow: inset 0 0 0 1.5px var(--mint), 0 0 14px rgba(116, 239, 192, 0.45); }
.peer.muted { opacity: 0.55; }
.peer svg { width: 12px; height: 12px; color: var(--muted); }
.vctl { display: flex; gap: 8px; margin-top: 12px; }
.vctl { flex-wrap: wrap; }
.vctl .btn { flex: 1 1 auto; }
.meter { height: 4px; border-radius: 4px; background: rgba(255,255,255,0.08); margin-top: 12px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--mint), #8cc4ff); transition: width 0.08s linear; }

.vroom.user { background: rgba(140, 196, 255, 0.05); }
.vroom .lock { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: rgba(255,255,255,0.1); color: var(--accent-2); flex: none; }
.vroom .lock svg { width: 12px; height: 12px; }
.vroom .vh { min-width: 0; }
.vroom .vh b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.vroom .vh span:not(.gap):not(.lock) { white-space: nowrap; }
.peer .host { display: inline-grid; place-items: center; font-style: normal; color: #ffd36e; }
.peer .host svg { width: 12px; height: 12px; color: #ffd36e; filter: drop-shadow(0 0 4px rgba(255, 211, 110, 0.6)); }
.peer .kick { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 2px; border-radius: 50%; color: #ffb4aa; background: rgba(255, 138, 122, 0.16); opacity: 0.55; transition: opacity 0.2s, background 0.2s; }
.peer:hover .kick, .peer .kick:focus-visible { opacity: 1; }
.peer .kick:hover { background: rgba(255, 138, 122, 0.35); }
.peer .kick svg { width: 10px; height: 10px; color: #ffb4aa; }
.modal h3 .mlock { width: 16px; height: 16px; margin-right: 6px; vertical-align: -2px; color: var(--accent-2); }
.peer .live-s { display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-size: 10.5px; font-weight: 700; color: #0b1222; background: var(--accent-2); padding: 1px 6px 1px 5px; border-radius: 999px; }
.peer .live-s svg { width: 10px; height: 10px; color: #0b1222; }
.shares { display: none; flex: none; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; padding: 0 14px 14px; max-height: 42%; overflow-y: auto; }
.shares.has { display: grid; }
.share { position: relative; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: #000; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14), 0 8px 20px rgba(0,0,0,0.35); transition: transform 0.35s var(--spring); }
.share:hover { transform: scale(1.03); }
.share video { width: 100%; height: 100%; object-fit: contain; display: block; }
.share .cap { position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,0.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share .cap svg { width: 11px; height: 11px; flex: none; }
.share .exp { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 650; background: rgba(10, 20, 40, 0.45); opacity: 0; transition: opacity 0.2s; }
.share:hover .exp { opacity: 1; }
.share[data-sid="me"] { cursor: default; }
.stage-bg { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: 20px; background: rgba(2, 5, 12, 0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fadeIn 0.25s both; }
.stage { width: min(1400px, 100%); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; border-radius: 30px; overflow: hidden; animation: sheetUp 0.5s var(--spring) both; background: linear-gradient(150deg, rgba(40,56,92,0.55), rgba(18,26,48,0.62)); -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%); }
.stage-h { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 20px; }
.stage-h b { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.stage-h b svg { width: 16px; height: 16px; }
.stage-h .gap { flex: 1; }
.stage-h .x { position: static; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); background: rgba(255,255,255,0.1); box-shadow: inset 0 1px 0 rgba(255,255,255,0.2); }
.stage-h .x svg { width: 15px; height: 15px; }
.stage video { width: 100%; max-height: calc(100dvh - 120px); background: #000; display: block; object-fit: contain; }

/* ================= files ================= */
.frow { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 8px 10px; border-radius: 16px; transition: background 0.2s; }
.frow:hover { background: rgba(255,255,255,0.07); }
.frow .fi { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 9.5px; font-weight: 800; text-transform: uppercase; color: var(--ink-2);
  background: linear-gradient(140deg, rgba(255,255,255,0.16), rgba(255,255,255,0.05)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.25); overflow: hidden; }
.frow .fi img { width: 100%; height: 100%; object-fit: cover; }
.frow .fn { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frow .fd { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frow .fa { display: flex; gap: 4px; }
.dropzone { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; border-radius: inherit; font-weight: 650; color: #fff; background: rgba(62, 123, 255, 0.28); box-shadow: inset 0 0 0 2px rgba(140, 196, 255, 0.8); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.prog { height: 4px; margin: 0 16px 10px; border-radius: 4px; background: rgba(255,255,255,0.08); overflow: hidden; flex: none; }
.prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--violet)); transition: width 0.2s; }

/* ================= sheet / modal ================= */
/* reading and form surfaces are thick (nearly opaque) so nothing shows through text; only the scrim is blurred */
.sheet-bg { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; padding: 14px; background: rgba(3, 6, 16, 0.5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fadeIn 0.25s both; }
.sheet-bg.out { animation: fadeOut 0.22s both; }
.sheet-bg.out .sheet { animation: sheetOut 0.22s both; }
@keyframes fadeIn { from { opacity: 0; } } @keyframes fadeOut { to { opacity: 0; } }
.sheet { position: relative; width: min(800px, 100%); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; border-radius: 30px; outline: none; animation: sheetUp 0.5s var(--spring) both; transition: transform 0.35s var(--ease);
  background: linear-gradient(175deg, #1a2548, #0f1631 60%, #0c1229); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px var(--line); }
@keyframes sheetUp { 0% { opacity: 0; transform: translateY(90px) scale(0.86, 0.74); } 38% { opacity: 1; transform: translateY(-14px) scale(1.04, 0.96); } 58% { transform: translateY(5px) scale(0.98, 1.025); } 76% { transform: translateY(-2px) scale(1.01, 0.99); } 100% { transform: none; } }
@keyframes sheetOut { to { opacity: 0; transform: translateY(36px) scale(0.98); } }
.sheet .grabber { width: 40px; height: 5px; border-radius: 5px; background: rgba(255,255,255,0.22); margin: 9px auto 0; flex: none; cursor: grab; }
.sheet .x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); z-index: 4;
  background: var(--s2); box-shadow: inset 0 1px 0 rgba(255,255,255,0.12); translate: var(--tx, 0) var(--ty, 0); transition: background 0.2s, translate 0.35s var(--ease), transform 0.3s var(--spring); }
.sheet .x:hover { background: var(--s3); color: #fff; } .sheet .x:active { transform: scale(0.9); }
.sheet .x svg { width: 15px; height: 15px; }
.sheet-body { overflow-y: auto; padding: 18px 34px 30px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.14) transparent; }
.sheet-body h1 { font-size: 26px; font-weight: 750; letter-spacing: -0.04em; line-height: 1.25; margin: 6px 44px 10px 0; text-wrap: balance; }
.sheet-body h3 { font-size: 15px; font-weight: 700; margin: 0 0 10px; }
.crumb { display: inline-flex; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--accent-2); background: rgba(140,196,255,0.14); }
.meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 12.5px; }
.meta b { color: var(--ink); font-weight: 650; }
.hr { height: 1px; background: var(--line); margin: 18px 0; }
.body { font-size: 15.5px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; }
.body img { border-radius: 18px; margin: 12px 0; max-height: 620px; object-fit: contain; box-shadow: 0 16px 40px rgba(0,0,0,0.4); }
.body a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.body code { background: rgba(0,0,0,0.3); padding: 2px 6px; border-radius: 6px; font-size: 0.92em; }
.body pre { background: rgba(0,0,0,0.3); padding: 14px; border-radius: 14px; overflow: auto; }
.body blockquote { white-space: pre-wrap; margin: 8px 0; padding: 6px 14px; border-left: 3px solid var(--accent); background: rgba(140,196,255,0.07); border-radius: 0 10px 10px 0; color: var(--ink-2); }
.attach { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }
.attach a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; font-size: 13.5px; background: rgba(255,255,255,0.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06); }
.attach a:hover { background: rgba(255,255,255,0.11); }
.attach svg { width: 14px; height: 14px; color: var(--muted); }
.attach .sz { margin-left: auto; color: var(--faint); font-size: 12px; }
.actions { display: flex; gap: 8px; align-items: center; margin-top: 22px; }
.like { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 15px; border-radius: 999px; font-weight: 650; color: var(--ink-2); background: rgba(255,255,255,0.08); box-shadow: inset 0 1px 0 rgba(255,255,255,0.15); transition: transform 0.35s var(--spring), background 0.2s; }
.like svg { width: 16px; height: 16px; }
.like:active { transform: scale(0.88); }
.like.on { color: #ffc2b9; background: rgba(255, 138, 122, 0.18); box-shadow: inset 0 0 0 1px rgba(255,138,122,0.4); }
.like.on svg { fill: #ff8a7a; stroke: #ff8a7a; }
.cmt { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 10px 0; }
.cmt.reply { margin-left: 38px; }
.cmt .avatar { width: 28px; height: 28px; }
.cmt .ch { display: flex; gap: 8px; align-items: baseline; font-size: 12px; color: var(--muted); }
.cmt .ch b { color: var(--ink); font-size: 13.5px; font-weight: 650; }
.cmt .cb { white-space: pre-wrap; word-break: break-word; margin-top: 1px; }
.cmt .cb.del { color: var(--faint); font-style: italic; }
.cmt .ca { display: flex; gap: 12px; margin-top: 3px; }
.cmt .ca button { font-size: 12px; color: var(--faint); font-weight: 550; }
.cmt .ca button:hover { color: var(--ink); }
.cform { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; align-items: end; }
.cform textarea { min-height: 52px; }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.drop2 { padding: 22px; text-align: center; border-radius: 20px; color: var(--muted); font-size: 13.5px; background: rgba(255,255,255,0.03); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.12); transition: background 0.2s, box-shadow 0.2s; }
.drop2.over { background: rgba(62,123,255,0.16); box-shadow: inset 0 0 0 2px var(--accent); }
.att2 { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.att2 span { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,0.08); }

.modal-bg { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 20px; background: rgba(3, 6, 16, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fadeIn 0.2s both; }
.modal { position: relative; width: min(400px, 100%); padding: 24px; border-radius: 26px; animation: sheetUp 0.4s var(--spring) both;
  background: linear-gradient(175deg, #1c284d, #111a37); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.13), inset 0 0 0 1px var(--line); }
.modal h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; letter-spacing: -0.03em; }
.modal p { margin: 0 0 16px; color: var(--muted); font-size: 13.5px; }
.modal .row { justify-content: flex-end; margin-top: 16px; }
/* dynamic island toasts */
.island { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { pointer-events: auto; max-width: min(460px, calc(100vw - 24px)); padding: 10px 18px; border-radius: 22px; line-height: 1.4; font-size: 13.5px; font-weight: 550; color: #fff; background: rgba(0, 0, 0, 0.82);
  box-shadow: 0 12px 34px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.08); animation: island 0.55s var(--spring) both; display: flex; align-items: center; gap: 9px; }
.toast i { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); flex: none; }
.toast.err i { background: var(--coral); } .toast.sys i { background: var(--accent); }
.toast.out { animation: islandOut 0.3s var(--ease) both; }
.toast.ntoast { gap: 11px; padding: 9px 16px 9px 9px; text-align: left; cursor: pointer; color: #0d1730; font-weight: 500;
  background: linear-gradient(135deg, rgba(240, 247, 255, 0.96), rgba(222, 234, 255, 0.94)); box-shadow: 0 14px 40px rgba(60, 110, 230, 0.35), 0 0 0 1px rgba(255,255,255,0.7), 0 0 26px rgba(140, 196, 255, 0.45); animation: island 0.55s var(--spring) both, nglow 1.6s ease 0.4s 2; }
.toast.ntoast.out { animation: islandOut 0.3s var(--ease) both; }
.ntoast .avatar { width: 34px; height: 34px; font-size: 13px; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.ntoast .ntx { min-width: 0; font-size: 13.5px; } .ntoast .ntx b { color: #0a1430; font-weight: 750; }
.ntoast .ntx em { display: block; font-style: normal; font-size: 12.5px; color: #44557a; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 300px; }
.ntoast .nti { width: 17px; height: 17px; color: #3c72ea; flex: none; }
@keyframes nglow { 50% { box-shadow: 0 14px 40px rgba(60,110,230,0.45), 0 0 0 1px #fff, 0 0 40px rgba(140,196,255,0.75); } }
.pill.bell.ring svg { animation: bellring 0.9s ease 2; transform-origin: 50% 10%; }
@keyframes bellring { 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } 75% { transform: rotate(2deg); } }
@keyframes island { 0% { opacity: 0; transform: scale(0.3, 0.5); filter: blur(4px); } 45% { opacity: 1; transform: scale(1.08, 0.94); filter: none; } 65% { transform: scale(0.97, 1.04); } 82% { transform: scale(1.01, 0.99); } 100% { transform: none; } }
@keyframes islandOut { to { opacity: 0; transform: scale(0.6, 0.7); } }

/* ================= pointer fx ================= */
.fxlayer { position: fixed; inset: 0; z-index: 198; pointer-events: none; overflow: hidden; }
.cursor-dot { position: fixed; left: 0; top: 0; z-index: 199; width: 22px; height: 22px; border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity 0.25s;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.28), rgba(160, 200, 255, 0.06) 60%, transparent 72%);
  box-shadow: inset 0 0 0 1px rgba(200, 222, 255, 0.45), 0 2px 10px rgba(80, 130, 255, 0.25); will-change: transform; }
[data-theme="light"] .cursor-dot { background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.7), rgba(77,141,255,0.08) 60%, transparent 72%); box-shadow: inset 0 0 0 1px rgba(47, 111, 228, 0.35), 0 2px 10px rgba(47, 111, 228, 0.18); }
.ripple { position: absolute; width: 34px; height: 34px; border-radius: 50%; pointer-events: none; box-shadow: inset 0 0 0 1.5px rgba(190, 215, 255, 0.7), 0 0 14px rgba(134, 182, 255, 0.3); }
.spark { position: absolute; width: 7px; height: 7px; border-radius: 50%; pointer-events: none; z-index: 199; background: radial-gradient(circle at 35% 30%, #fff, #ff9aa8 60%); box-shadow: 0 0 8px rgba(255, 138, 160, 0.7); }
/* cards: a soft light follows the pointer inside the card it is over */
.fcard, .gtile, .vroom, .prow, .frow, .evcard, .donate-opt { --cx: 50%; --cy: 0; }
.fcard.lit, .vroom.lit, .evcard.lit, .donate-opt.lit, .prow.lit, .frow.lit { background-image: radial-gradient(320px circle at var(--cx) var(--cy), rgba(140, 180, 255, 0.13), transparent 70%); }
html[data-motion="low"] .bg, html[data-motion="low"] .bg i, html[data-motion="low"] .bg .motes { animation: none !important; transition: none !important; }
html[data-motion="low"] .pane, html[data-motion="low"] .msg, html[data-motion="low"] .fcard, html[data-motion="low"] .gtile, html[data-motion="low"] .sheet, html[data-motion="low"] .modal, html[data-motion="low"] .toast { animation-duration: 0.01ms !important; }

/* language toggle */
.pill.lang { gap: 0; padding: 3px; height: 38px; }
.pill.lang span { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 6px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--muted); transition: background 0.25s, color 0.25s; }
.pill.lang span.on { color: #fff; background: linear-gradient(180deg, rgba(255,255,255,0.28), rgba(255,255,255,0.12)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.45); }

/* donate */
.pill.donate { color: var(--ink-2); }
.pill.donate svg { fill: #ff7aa8; stroke: #ff7aa8; transition: transform 0.4s var(--spring); }
.pill.donate:hover { color: #ffd0e0; background: rgba(255, 122, 168, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 122, 168, 0.25); }
.pill.donate:hover svg { transform: scale(1.18); }
.donate-hero { text-align: center; padding: 10px 0 6px; }
.donate-hero h1 { margin: 12px 0 8px !important; }
.donate-hero p { color: var(--ink-2); max-width: 46ch; margin: 0 auto 22px; line-height: 1.7; white-space: pre-wrap; }
.dh-icon { width: 64px; height: 64px; margin: 6px auto 0; border-radius: 22px; display: grid; place-items: center; background: linear-gradient(140deg, #ff9ac1, #ff6f9f 55%, #c084fc); box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 12px 30px rgba(255, 111, 159, 0.4); }
.dh-icon svg { width: 30px; height: 30px; fill: #fff; stroke: #fff; }
.donate-list { display: flex; flex-direction: column; gap: 10px; max-width: 420px; margin: 0 auto; }
.donate-opt { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-radius: 20px; background: rgba(255,255,255,0.07); box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), inset 0 0 0 1px rgba(255,255,255,0.06); transition: background 0.2s, transform 0.35s var(--spring); }
.donate-opt:hover { background: rgba(255,255,255,0.13); transform: translateY(-2px); }
.donate-opt:active { transform: scale(0.98); }
.donate-opt .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c); flex: none; }
.donate-opt b { flex: 1; font-size: 15px; }
.donate-opt .go svg { width: 15px; height: 15px; color: var(--muted); }
.thanks { display: flex; flex-wrap: wrap; gap: 6px; }
.thanks span { font-size: 13px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 138, 179, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 138, 179, 0.25); color: #ffd3e2; }

/* ================= mobile tab bar ================= */
.mtab { display: none; }
.voicebar { display: none; }

/* ---------- login / locked ---------- */
.pill.login { color: #fff; background: linear-gradient(180deg, rgba(110, 170, 255, 0.55), rgba(62, 123, 255, 0.45)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 4px 14px rgba(62,123,255,0.28); }
.pill.login:hover { background: linear-gradient(180deg, rgba(130, 185, 255, 0.7), rgba(72, 133, 255, 0.6)); color: #fff; }
.pill.member .avatar { box-shadow: 0 0 0 2px rgba(124, 196, 255, 0.55); }
.seg button .sl { width: 12px; height: 12px; margin-right: 4px; opacity: 0.7; vertical-align: -1px; }
.seg button.lockd { color: var(--faint, rgba(255,255,255,0.45)); }
.locked { margin: 10px 6px; padding: 30px 18px 24px; text-align: center; border-radius: 24px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted);
  background: radial-gradient(120% 90% at 50% 0%, rgba(110,170,255,0.12), rgba(255,255,255,0.025)); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07), inset 0 1px 0 rgba(255,255,255,0.08); font-size: 13px; }
.locked .lk-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 6px; color: #cfe3ff;
  background: linear-gradient(180deg, rgba(255,255,255,0.2), rgba(255,255,255,0.06)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 6px 18px rgba(0,0,0,0.3); }
.locked .lk-ic svg { width: 20px; height: 20px; }
.locked b { color: var(--ink); font-size: 15px; font-weight: 650; }
.locked .row { margin-top: 10px; gap: 8px; justify-content: center; }
.locked.sm { padding: 18px 14px 16px; }
.locked.sm .lk-ic { width: 36px; height: 36px; } .locked.sm b { font-size: 13.5px; }
.iclogin { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 38px; margin-top: 6px; border-radius: 999px; font-size: 13px; color: var(--ink-2); background: rgba(255,255,255,0.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); }
.iclogin svg { width: 14px; height: 14px; } .iclogin:hover { background: rgba(255,255,255,0.1); color: var(--ink); }
.composer.off { opacity: 0.5; }
.auth { max-width: 400px; margin: 0 auto; padding: 4px 0 8px; }
.auth-hero { text-align: center; margin: 4px 0 18px; }
.auth-hero .logo { display: inline-block; width: 44px; height: 44px; border-radius: 14px; margin-bottom: 8px; }
.auth-hero .logo::after { inset: 12px; }
.auth-hero h1 { margin: 0 0 6px; font-size: 24px; }
.auth-hero p { margin: 0; color: var(--muted); font-size: 13.5px; }
.auth-seg { display: flex; width: 100%; margin-bottom: 18px; }
.auth-seg button { flex: 1; }
.auth-warn { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; margin-bottom: 14px; font-size: 13px; color: #ffd9a8; background: rgba(255, 170, 60, 0.1); box-shadow: inset 0 0 0 1px rgba(255,170,60,0.25); }
.auth-warn svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.btn.wide { width: 100%; height: 46px; font-size: 15px; margin-top: 4px; }
.linkbtn { display: block; margin: 14px auto 0; font-size: 13px; color: var(--accent-2); }
.guestname { margin-top: 22px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.08); text-align: center; font-size: 12.5px; color: var(--muted); }
.guestname .linkbtn { display: inline; margin: 0 0 0 6px; font-size: 12.5px; }
.linkbtn:disabled { color: var(--muted); cursor: default; }
.input.code { text-align: center; font-size: 26px; letter-spacing: 10px; font-weight: 700; height: 58px; font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.row.nowrap { flex-wrap: nowrap; }
.acct { display: flex; align-items: center; gap: 14px; margin: 6px 0 22px; }
.acct b { display: block; font-size: 18px; } .acct span { color: var(--muted); font-size: 13px; }
.avatar.big { width: 54px; height: 54px; font-size: 22px; }

/* ---------- status & members ---------- */
.sdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; background: #6b768c; box-shadow: 0 0 0 2px rgba(0,0,0,0.25); }
.sdot.on { background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.16), 0 0 10px rgba(74, 222, 128, 0.7); }
.sdot.away { background: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.16), 0 0 8px rgba(251, 191, 36, 0.5); }
.sdot.off { background: transparent; box-shadow: inset 0 0 0 2px #8a94a8; }
.sdot.m-only { display: none; }
.pill.status { gap: 8px; padding: 0 14px 0 12px; }
.pill.members { gap: 7px; padding: 0 12px; }
.pill.members b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; font-size: 12px; background: rgba(255,255,255,0.12); color: var(--ink); }
.smenu { position: fixed; z-index: 120; width: 168px; padding: 6px; border-radius: 20px; background: rgba(14, 22, 42, 0.94) !important; -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4); box-shadow: 0 18px 50px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.1), inset 0 1px 0 rgba(255,255,255,0.14); display: flex; flex-direction: column; gap: 2px; animation: fadeIn 0.18s both; }
.smenu button { display: flex; gap: 11px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 14px; }
.smenu button:hover { background: rgba(255,255,255,0.08); }
.smenu button.on { background: rgba(255,255,255,0.12); }
.smenu .sdot { margin-top: 0; }
.smenu b { display: block; font-size: 14px; font-weight: 650; }
.smenu em { display: block; font-style: normal; font-size: 12px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.members-sheet { max-width: 520px; margin: 0 auto; }
.members-sheet h1 { margin: 2px 0 14px; }
.mystatus { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.mystatus .seg button { display: inline-flex; align-items: center; gap: 7px; }
.msec { margin-bottom: 16px; }
.msec h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.msec h3 span { color: var(--faint, rgba(255,255,255,0.45)); font-weight: 500; }
.msec p { margin: 4px 0 0 2px; }
.mrow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; position: relative; }
.mrow:hover { background: rgba(255,255,255,0.05); }
.mrow .avatar { width: 30px; height: 30px; font-size: 12.5px; }
.mrow .sdot { position: absolute; left: 32px; top: 28px; width: 10px; height: 10px; box-shadow: 0 0 0 2.5px #0f1830; }
.mrow .sdot.off { background: #0f1830; box-shadow: inset 0 0 0 2px #8a94a8, 0 0 0 2.5px #0f1830; }
.mrow b { font-weight: 600; font-size: 14px; }
.tag.guest { background: rgba(255,255,255,0.08); color: var(--muted); }
.tag.me { background: rgba(124, 196, 255, 0.18); color: #a9d4ff; }


/* ---------- rich posts ---------- */
.rich { white-space: normal; }
.rich p { margin: 0 0 0.55em; } .rich p:last-child { margin-bottom: 0; }
.rich h2 { font-size: 1.35em; margin: 0.6em 0 0.35em; color: var(--ink); } .rich h3 { font-size: 1.15em; margin: 0.5em 0 0.3em; color: var(--ink); }
.rich ul, .rich ol { margin: 0.3em 0 0.6em; padding-left: 1.4em; }
.rich blockquote { margin: 0.5em 0; padding: 6px 14px; border-left: 3px solid var(--accent); background: rgba(140,196,255,0.07); border-radius: 0 10px 10px 0; }
.rich pre { white-space: pre-wrap; background: rgba(0,0,0,0.3); padding: 10px 12px; border-radius: 12px; font-size: 0.92em; }
.rich a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; }
.rich hr { border: 0; height: 1px; background: rgba(255,255,255,0.14); margin: 1em 0; }
.rich img { max-width: 100%; border-radius: 12px; display: block; margin: 6px 0; }
.rich table, .rte-area table { border-collapse: collapse; margin: 0.6em 0; max-width: 100%; font-size: 0.95em; display: block; overflow-x: auto; }
.rich th, .rich td, .rte-area th, .rte-area td { border: 1px solid rgba(255,255,255,0.18); padding: 6px 10px; min-width: 56px; vertical-align: top; text-align: left; }
.rich th, .rte-area th { background: rgba(255,255,255,0.07); font-weight: 650; color: var(--ink); }
.rte { border-radius: 18px; background: rgba(0,0,0,0.22); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); overflow: visible; }
.rte-bar { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; padding: 6px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.rte-bar button, .rte-tbl button { height: 32px; min-width: 32px; padding: 0 7px; border-radius: 9px; display: inline-grid; place-items: center; color: var(--ink-2); font-size: 14px; }
.rte-bar button:hover, .rte-tbl button:hover { background: rgba(255,255,255,0.09); color: var(--ink); }
.rte-bar button.on { background: rgba(140,196,255,0.2); color: #fff; }
.rte-bar svg { width: 17px; height: 17px; }
.rte-bar select { height: 32px; border-radius: 9px; border: 0; background: rgba(255,255,255,0.06); color: var(--ink-2); padding: 0 6px; font-size: 13px; }
.rte-bar select option { background: #0f1830; }
.rte-bar .sep { width: 1px; height: 18px; background: rgba(255,255,255,0.1); margin: 0 3px; }
.rte-bar .rcol { font-weight: 700; border-bottom: 3px solid #ff6b6b; line-height: 1.1; }
.rte-bar .rhl { font-weight: 700; background: rgba(134,182,255,0.4); padding: 0 3px; border-radius: 3px; }
.rte .pop { position: relative; display: inline-flex; }
.rte-pop { position: absolute; top: 38px; left: 0; z-index: 30; padding: 8px; border-radius: 14px; background: rgba(14,22,42,0.96) !important; box-shadow: 0 12px 34px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.1); }
.rte-pop .sw { display: grid; grid-template-columns: repeat(6, 24px); gap: 6px; }
.rte-pop .sw button { width: 24px; height: 24px; min-width: 0; padding: 0; border-radius: 7px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25); }
.rte-pop .sw button.none { background: repeating-linear-gradient(45deg, transparent 0 5px, rgba(255,107,107,0.6) 5px 7px); }
.rte-pop .grid { display: grid; grid-template-columns: repeat(6, 20px); gap: 3px; }
.rte-pop .grid i { width: 20px; height: 20px; border-radius: 4px; background: rgba(255,255,255,0.08); cursor: pointer; }
.rte-pop .grid i.on { background: rgba(140,196,255,0.55); }
.rte-pop .gl { text-align: center; font-size: 12px; color: var(--muted); margin-top: 6px; }
.rte-tbl { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 5px 8px; border-bottom: 1px solid rgba(255,255,255,0.07); font-size: 12.5px; color: var(--muted); }
.rte-tbl button { font-size: 12.5px; height: 28px; } .rte-tbl .danger { color: #ff8a8a; }
.rte-area { min-height: 240px; max-height: 52vh; overflow-y: auto; padding: 14px 16px; outline: none; font-size: 15px; line-height: 1.75; color: var(--ink); white-space: normal; word-break: break-word; }
.rte-area p { margin: 0 0 0.4em; } .rte-area img { max-width: 100%; border-radius: 10px; }
.rte-area blockquote { margin: 0.4em 0; padding: 4px 12px; border-left: 3px solid var(--accent); background: rgba(140,196,255,0.07); }
.rte-area pre { background: rgba(0,0,0,0.3); padding: 8px 10px; border-radius: 10px; white-space: pre-wrap; }
.rte-area a { color: var(--accent-2); text-decoration: underline; } .rte-area hr { border: 0; height: 1px; background: rgba(255,255,255,0.18); margin: 0.8em 0; }
.rte-area ul, .rte-area ol { padding-left: 1.4em; }

/* ---------- avatars with photos, profile card, settings ---------- */
.avatar.img { overflow: hidden; background: rgba(255,255,255,0.08); }
.avatar.img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar[data-prof] { cursor: pointer; }
.avatar.xl { width: 84px; height: 84px; font-size: 32px; box-shadow: 0 0 0 4px #0f1830, 0 8px 24px rgba(0,0,0,0.4); }
.mrow[data-prof] { cursor: pointer; }
.pbanner { height: 96px; border-radius: 22px 22px 0 0; position: relative; overflow: hidden; }
.pbanner i { position: absolute; border-radius: 50%; filter: blur(18px); opacity: 0.7; }
.pbanner i:nth-child(1) { width: 120px; height: 120px; left: -20px; top: -40px; background: rgba(255,255,255,0.35); }
.pbanner i:nth-child(2) { width: 90px; height: 90px; right: 12%; top: 10px; background: rgba(255,255,255,0.22); }
.pbanner i:nth-child(3) { width: 60px; height: 60px; right: -10px; bottom: -20px; background: rgba(255,255,255,0.3); }
.t-navy { background: linear-gradient(135deg, #1b2a6b, #3e7bff 60%, #6a5cff); }
.t-aurora { background: linear-gradient(135deg, #0f766e, #22d3ee 45%, #a78bfa); }
.t-sunset { background: linear-gradient(135deg, #f97316, #ec4899 55%, #7c3aed); }
.t-ocean { background: linear-gradient(135deg, #0c4a6e, #0ea5e9 55%, #67e8f9); }
.t-forest { background: linear-gradient(135deg, #14532d, #16a34a 50%, #a3e635); }
.t-rose { background: linear-gradient(135deg, #fda4af, #f472b6 50%, #c084fc); }
.t-mono { background: linear-gradient(135deg, #111827, #4b5563 55%, #d1d5db); }
.t-galaxy { background: radial-gradient(circle at 20% 30%, #a78bfa 0 8%, transparent 30%), radial-gradient(circle at 80% 60%, #f472b6 0 6%, transparent 28%), linear-gradient(135deg, #0b0a23, #312e81 60%, #1e1b4b); }
.pcard { border-radius: 22px; background: rgba(255,255,255,0.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); max-width: 460px; margin: 0 auto; }
.phead { display: flex; align-items: flex-end; justify-content: space-between; padding: 0 18px; margin-top: -42px; position: relative; }
.pav { position: relative; }
.pav .sdot { position: absolute; right: 4px; bottom: 4px; width: 18px; height: 18px; box-shadow: 0 0 0 4px #0f1830; }
.pav .sdot.off { background: #0f1830; box-shadow: inset 0 0 0 3px #8a94a8, 0 0 0 4px #0f1830; }
.phead .btn { margin-bottom: 6px; } .phead .btn svg { width: 15px; height: 15px; }
.pbody { padding: 10px 20px 20px; }
.pbody h2 { margin: 0; font-size: 22px; }
.pstate { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); margin: 4px 0 12px; }
.pbio { margin: 0 0 14px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; color: var(--ink-2); font-size: 14px; }
.pstats { display: flex; gap: 22px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 12.5px; color: var(--muted); }
.pstats b { display: block; font-size: 16px; color: var(--ink); }
.pill.gear svg { width: 17px; height: 17px; }
.settings h1 { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; } .settings h1 svg { width: 24px; height: 24px; }
.set-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 22px; align-items: start; }
.set-preview { position: sticky; top: 0; }
.set-form section { margin-bottom: 16px; }
.set-form h3 { margin: 0 0 7px; font-size: 13px; color: var(--muted); font-weight: 600; }
.set-form textarea { min-height: 84px; }
.set-form .row.end { justify-content: flex-end; }
.themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.themes .th { height: 46px; border-radius: 12px; position: relative; display: flex; align-items: flex-end; padding: 5px 7px; font-size: 11.5px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.6); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15); }
.themes .th.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(140,196,255,0.6); }
.ncolors { display: flex; flex-wrap: wrap; gap: 8px; }
.ncolors .nc { width: 30px; height: 30px; border-radius: 50%; background: var(--c, rgba(255,255,255,0.08)); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2); font-size: 10px; color: var(--muted); }
.ncolors .nc:not([style*="--c"]) { width: auto; padding: 0 10px; border-radius: 15px; }
.ncolors .nc.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(140,196,255,0.6); }
.acct-sec { margin-top: 22px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.08); }
@media (max-width: 760px) {
  .set-grid { grid-template-columns: 1fr; }
  .set-preview { position: static; }
  .rte-bar { gap: 2px; padding: 5px; }
  .rte-bar select { flex: 1 1 28%; min-width: 0; height: 34px; }
  .rte-bar .sep { display: none; }
  .rte-bar button { min-width: 34px; height: 34px; }
  .rte .pop:last-of-type .rte-pop { left: auto; right: -60px; }
  .rte-area { min-height: 200px; max-height: 44vh; }
}

/* ---------- chat extras ---------- */
.fbtn.danger { color: #ffb4aa; }
.msg.bot { max-width: 88%; }
.msg.bot .bubble { background: linear-gradient(160deg, rgba(120,170,255,0.16), rgba(157,140,255,0.14)); box-shadow: inset 0 0 0 1px rgba(170,200,255,0.22), inset 0 1px 0 rgba(255,255,255,0.12); line-height: 1.6; }
.msg.bot.ephemeral .bubble { opacity: 0.8; font-size: 13px; }
.botav { background: linear-gradient(135deg, #8cc4ff, #9d8cff 55%, #ff8cc6) !important; font-size: 10px !important; }
.tag.ai { background: linear-gradient(135deg, #8cc4ff, #c4b5ff); }
.bubble.md strong { color: #fff; } .bubble.md .mdh { display: inline-block; font-size: 1.05em; color: #fff; margin-top: 2px; }
.bubble.md .mdli i { font-style: normal; color: var(--accent-2); font-weight: 700; }
.bubble.md .mdq { display: inline-block; border-left: 3px solid rgba(140,196,255,0.6); padding-left: 8px; color: var(--ink-2); }
.bubble.md code { background: rgba(0,0,0,0.3); padding: 1px 5px; border-radius: 5px; font-size: 0.92em; }
.bubble.md pre { margin: 6px 0; padding: 10px 12px; background: rgba(0,0,0,0.35); border-radius: 10px; white-space: pre-wrap; font-size: 12.5px; } .bubble.md pre code { background: none; padding: 0; }
.bubble.md a { color: #9fd0ff; text-decoration: underline; }
.aispark { margin-right: 4px; background: linear-gradient(135deg, #8cc4ff, #ff8cc6); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.sysmsg.welcome { color: var(--ink-2); font-size: 13px; padding: 6px 14px; margin: 8px 0; border-radius: 999px; background: linear-gradient(90deg, rgba(140,196,255,0.08), rgba(157,140,255,0.12)); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07); }
.mention { color: #9fd0ff; font-weight: 650; background: rgba(140,196,255,0.14); border-radius: 6px; padding: 0 3px; }
.mention.me { color: #e3dcff; background: rgba(169,155,255,0.24); }
.msg.mine .mention { color: #fff; background: rgba(255,255,255,0.22); }
.msg.mentioned .bubble { box-shadow: inset 0 0 0 1.5px rgba(169,155,255,0.6), 0 0 18px rgba(169,155,255,0.18); }
.msg.flash .bubble, .msg.flash .rq { animation: flash 1.6s ease; }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 3px rgba(134,182,255,0.8); } 100% { box-shadow: none; } }
.rq { max-width: 100%; margin: 0 6px 3px; padding: 4px 10px; border-left: 3px solid rgba(140,196,255,0.6); border-radius: 4px 10px 10px 4px; background: rgba(255,255,255,0.05); font-size: 12px; color: var(--muted); cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rq b { color: var(--ink-2); margin-right: 6px; }
.rx { display: flex; gap: 4px; flex-wrap: wrap; margin: 3px 4px 0; }
.rx:empty { display: none; }
.rx button { display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 8px; border-radius: 12px; font-size: 13px; background: rgba(255,255,255,0.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); color: var(--ink-2); }
.rx button span { font-size: 11.5px; font-weight: 650; }
.rx button.on { background: rgba(90,150,255,0.25); box-shadow: inset 0 0 0 1px rgba(140,196,255,0.55); color: #fff; }
.blockedmsg .bubble { opacity: 0.6; font-size: 12px; }
.replybar { display: flex; align-items: center; gap: 8px; margin: 0 14px; padding: 6px 8px 6px 12px; border-radius: 14px 14px 4px 4px; background: rgba(140,196,255,0.1); font-size: 12.5px; color: var(--muted); flex: none; }
.replybar svg { width: 14px; height: 14px; flex: none; }
.replybar span { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.replybar b { color: var(--ink); } .replybar em { font-style: normal; margin-left: 6px; }
.replybar button { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.composer .cemoji { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); flex: none; }
.composer .cemoji:hover { background: rgba(255,255,255,0.1); color: #fff; } .composer .cemoji svg { width: 19px; height: 19px; }
.epick { position: fixed; z-index: 130; width: 308px; max-height: 240px; overflow-y: auto; padding: 8px; border-radius: 18px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; background: rgba(14,22,42,0.96) !important; box-shadow: 0 16px 40px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.1); }
.epick button { font-size: 21px; height: 36px; border-radius: 10px; } .epick button:hover { background: rgba(255,255,255,0.1); }
.mac { position: absolute; left: 8px; bottom: calc(100% + 8px); z-index: 40; min-width: 220px; padding: 5px; border-radius: 16px; display: flex; flex-direction: column; background: rgba(14,22,42,0.96) !important; box-shadow: 0 14px 34px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.1); }
.mac button { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 11px; text-align: left; font-size: 13.5px; }
.mac button.on, .mac button:hover { background: rgba(140,196,255,0.16); }
.mac .avatar { width: 24px; height: 24px; font-size: 10.5px; } .mac em { font-style: normal; font-size: 11.5px; color: var(--muted); margin-left: auto; } .mac .sdot { margin-left: auto; }
.seg button { position: relative; }
.udot { position: absolute; top: 4px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: #ff6b8a; box-shadow: 0 0 0 2px rgba(10,16,32,0.9), 0 0 8px rgba(255,107,138,0.7); }
.nbadge { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 5px; margin-right: 6px; font-size: 10.5px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #ff6b8a, #ff9f43); vertical-align: 2px; font-style: normal; }
.blockedcard { padding: 12px 16px; opacity: 0.7; }
/* polls */
.poll { margin: 10px 0 4px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,0.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); display: flex; flex-direction: column; gap: 6px; }
.poll .pq { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ink); margin-bottom: 2px; } .poll .pq svg { width: 16px; height: 16px; color: var(--accent-2); }
.popt { position: relative; overflow: hidden; display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; border-radius: 11px; text-align: left; font-size: 13.5px; color: var(--ink); background: rgba(255,255,255,0.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); }
.popt:hover { background: rgba(255,255,255,0.1); }
.popt i { position: absolute; inset: 0 auto 0 0; background: rgba(140,196,255,0.18); transition: width 0.6s var(--spring); }
.popt.top i { background: rgba(140,196,255,0.3); }
.popt.on { box-shadow: inset 0 0 0 1.5px rgba(140,196,255,0.8); }
.popt span, .popt em { position: relative; } .popt em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--muted); }
.poll .pfoot { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.pollbox { margin: 4px 0 14px; } .pollform { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,0.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); }
.pollbox .btn svg { width: 15px; height: 15px; }
.toggle.small { font-size: 13px; }
.draftnote { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 12px; border-radius: 12px; font-size: 13px; color: #cfe3ff; background: rgba(140,196,255,0.1); }
.draftnote button { margin-left: auto; font-size: 12.5px; color: #ffb4aa; }
.actions .like.bm.on { color: #ffd86b; }
/* bell + inbox */
.pill.bell { position: relative; } .pill.bell svg { width: 17px; height: 17px; }
.pill.bell .badge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #ff6b8a, #ff4d6d); box-shadow: 0 0 0 2px rgba(10,16,32,0.9); }
.inbox { max-width: 560px; margin: 0 auto; }
.ibtabs { display: flex; margin: 0 44px 14px 0; }
.ibtabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; } .ibtabs svg { width: 15px; height: 15px; }
.ibtabs em { font-style: normal; font-size: 10.5px; font-weight: 800; padding: 0 6px; border-radius: 8px; background: #ff5c7a; color: #fff; }
.ibar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; } .ibar .btn svg { width: 14px; height: 14px; }
.nrow { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; border-radius: 16px; text-align: left; color: var(--ink-2); }
.nrow:hover { background: rgba(255,255,255,0.05); }
.nrow.unread { background: rgba(140,196,255,0.08); } .nrow.unread .nt b { color: #fff; }
.nrow .avatar { width: 34px; height: 34px; font-size: 13px; }
.nrow .nt { flex: 1; min-width: 0; font-size: 13.5px; } .nrow .nt b { color: var(--ink); margin-right: 2px; }
.nrow .nt em { display: block; font-style: normal; font-size: 12.5px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin-top: 1px; }
.nrow .nmeta { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--faint); flex: none; } .nrow .nmeta svg { width: 13px; height: 13px; }
.nrow .bk { width: 20px; height: 20px; color: #ffd86b; flex: none; }
.ubadge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; font-size: 10.5px; font-weight: 800; color: #fff; background: #ff5c7a; }
.thread { display: flex; flex-direction: column; height: min(60vh, 520px); }
.thead { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.tmsgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 12px 4px; }
.dmm { display: flex; flex-direction: column; align-items: flex-start; max-width: 80%; } .dmm.mine { align-self: flex-end; align-items: flex-end; }
.dmm .bubble { background: rgba(255,255,255,0.09); } .dmm.mine .bubble { color: #fff; background: linear-gradient(180deg, #5a96ff, #3c72ea); }
.dmm .tm { font-size: 11px; color: var(--faint); margin: 2px 8px 0; }
.thread .composer { margin: 8px 0 0; padding-left: 16px; }
.lvcard { text-align: center; padding: 10px 6px; max-width: 380px; margin: 0 auto; }
.lvbig { font-size: 20px; color: var(--muted); } .lvbig b { font-size: 46px; color: var(--ink); background: linear-gradient(135deg, #8cc4ff, #b9a6ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lvbar { height: 10px; border-radius: 5px; background: rgba(255,255,255,0.08); overflow: hidden; margin: 10px 0 6px; } .lvbar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #5aa9ff, #9d8cff); }
.lvstats { display: flex; justify-content: center; gap: 28px; margin: 16px 0 18px; font-size: 12.5px; color: var(--muted); } .lvstats b { display: block; font-size: 20px; color: var(--ink); }
.lvcard .btn svg { width: 17px; height: 17px; }
.lvtag { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; color: #0b1222; background: linear-gradient(135deg, #b9d5ff, #c9bcff); vertical-align: 3px; }
.pacts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin-bottom: 6px; } .pacts .btn svg { width: 14px; height: 14px; }
.precent { margin-top: 14px; } .precent h4 { margin: 0 0 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.precent a { display: flex; flex-direction: column; padding: 7px 10px; border-radius: 12px; font-size: 13.5px; color: var(--ink); } .precent a:hover { background: rgba(255,255,255,0.05); }
.precent em { font-style: normal; font-size: 11.5px; color: var(--faint); }
.blist { display: flex; flex-wrap: wrap; gap: 6px; }
.bchip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: rgba(255,255,255,0.07); font-size: 12.5px; }
.bchip button { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; } .bchip svg { width: 12px; height: 12px; }

@media (max-width: 1180px) and (min-width: 761px) {
  body { overflow: auto; }
  .app { height: auto; min-height: 100dvh; }
  .dash { grid-template-columns: 1fr 1fr; }
  .dash > .pane { height: 68vh; }
  .stack { grid-column: 1 / -1; grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .stack .pane { height: 46vh; }
  .top .pill[data-donate] span, .top .pill.hide-m span { display: none; }
  .top .pill[data-donate], .top .pill.hide-m { width: 38px; padding: 0; justify-content: center; }
}
/* ---- v24: honeypot, consent, legal, moderator ---- */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.agree { display: flex; gap: 9px; align-items: flex-start; margin: 4px 0 14px; font-size: 13.5px; color: var(--muted, #a9b6cf); line-height: 1.45; cursor: pointer; }
.agree input { margin-top: 2px; width: 17px; height: 17px; accent-color: var(--accent, #7cb8ff); flex: none; }
.agree a, .legal-links a { color: var(--accent-2, #9fc6ff); text-decoration: underline; text-underline-offset: 2px; }
.legal-links { margin: 18px 0 0; text-align: center; }
.legal h1 { font-size: 20px; margin: 16px 0 10px; }
.legal .seg { max-width: 360px; }
.legal-text { font-size: 14px; line-height: 1.75; color: var(--text-2, #cfd8ea); white-space: normal; word-break: keep-all; }
.legal-modal { max-height: min(72vh, 640px); overflow: auto; }
.legal-modal .row { position: sticky; bottom: 0; padding-top: 10px; }
.tag.mod { background: rgba(123, 227, 168, .16); color: #8fe8b6; border-color: rgba(123, 227, 168, .35); }
.ca .modb { color: #ff9b9b; }
.mbtns [data-mrep] { color: #ffd086; }

/* ---- v25: emergency switches + file quota ---- */
.lockbar { display: flex; gap: 10px; align-items: flex-start; margin: 8px 12px; padding: 10px 12px; border-radius: 14px; background: rgba(169, 155, 255, .12); border: 1px solid rgba(169, 155, 255, .35); color: #d9d2ff; font-size: 13px; line-height: 1.45; animation: lockin .25s ease; }
.lockbar svg { width: 16px; height: 16px; flex: none; margin-top: 2px; stroke: currentColor; }
.lockbar b { display: block; color: #ece8ff; font-weight: 650; }
.lockbar span { color: #cdc4ff; }
.cform + .lockbar, .composer + .lockbar { margin-top: 0; }
.sheet .lockbar { margin: 0 0 12px; }
@keyframes lockin { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.lock-on { opacity: .55; cursor: not-allowed !important; }
form.lock-on { opacity: .7; }
.tag.lockt { display: inline-flex; gap: 4px; align-items: center; background: rgba(169, 155, 255, .16); color: #d6ccff; border-color: rgba(169, 155, 255, .35); }
.tag.lockt svg { width: 11px; height: 11px; }
.fquota { padding: 6px 14px 8px; font-size: 11.5px; color: var(--faint, #6f7b93); text-align: right; letter-spacing: .01em; opacity: .85; }
.fquota.full { color: #f0a58f; }
.bubble.md.streaming::after { content: ''; display: inline-block; width: 7px; height: 1em; margin-left: 3px; vertical-align: -2px; border-radius: 2px; background: currentColor; opacity: .55; animation: blinkc 1s steps(2) infinite; }
@keyframes blinkc { 50% { opacity: 0; } }
.modsec h3 { display: flex; align-items: center; gap: 6px; color: #8fe8b6; }
.modsec h3 svg { width: 15px; height: 15px; }
.modlist { margin: 4px 0 8px; padding-left: 18px; color: var(--text-2, #cfd8ea); line-height: 1.7; }

/* ================= v29: new features ================= */
/* text size (per device) */
html { zoom: var(--ui-zoom, 1); }
.app { height: calc(100dvh / var(--ui-zoom, 1)); }
.aa { font-size: 14px; font-weight: 800; letter-spacing: -0.02em; }
.lookpop { position: fixed; z-index: 140; width: 260px; padding: 14px; border-radius: 22px; display: flex; flex-direction: column; gap: 8px; animation: sheetUp .3s var(--spring) both; }
.lookpop b { font-size: 12.5px; color: var(--muted); font-weight: 650; }
.lookpop .seg { width: 100%; } .lookpop .seg button { flex: 1; }
.lookpop p { margin: 2px 0 0; }
/* report categories */
.rcats { display: flex; flex-wrap: wrap; gap: 6px; }
.rcats button, .subtabs button, .btools button { padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: rgba(255,255,255,0.06); box-shadow: inset 0 0 0 1px var(--line); }
.rcats button.on, .subtabs button.on, .btools button.on { color: var(--ink); background: rgba(140,196,255,0.2); box-shadow: inset 0 0 0 1px rgba(140,196,255,0.55); }
/* board tools: sort + 말머리 */
.btools { display: flex; gap: 6px; align-items: center; padding: 0 16px 8px; overflow-x: auto; scrollbar-width: none; }
.btools:empty { display: none; }
.btools .sep { width: 1px; height: 16px; background: var(--line); margin: 0 4px; flex: none; }
.btools button { flex: none; padding: 4px 11px; }
.btools .lvneed { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.pcat { display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 7px; font-size: .78em; font-weight: 700; vertical-align: 1px; color: #bfe0ff; background: rgba(90,150,255,0.18); }
.catpick { display: flex; flex-wrap: wrap; gap: 6px; }
.catpick label { cursor: pointer; } .catpick input { display: none; }
.catpick span { display: inline-block; padding: 6px 13px; border-radius: 999px; font-size: 13px; background: rgba(255,255,255,0.06); box-shadow: inset 0 0 0 1px var(--line); }
.catpick input:checked + span { background: rgba(140,196,255,0.22); box-shadow: inset 0 0 0 1px rgba(140,196,255,0.6); color: var(--ink); }
/* summary */
.aisum { margin: 4px 0 10px; }
.sumcard { padding: 12px 14px; border-radius: 16px; background: linear-gradient(135deg, rgba(157,140,255,0.16), rgba(90,150,255,0.10)); box-shadow: inset 0 0 0 1px rgba(157,140,255,0.35); }
.sumcard > b { display: block; font-size: 12.5px; color: #cfc6ff; margin-bottom: 4px; }
.sumcard .md { white-space: pre-wrap; line-height: 1.6; font-size: 14px; }
/* link preview */
.lpv { display: flex; gap: 0; margin-top: 6px; max-width: 420px; border-radius: 14px; overflow: hidden; background: rgba(255,255,255,0.06); box-shadow: inset 0 0 0 1px var(--line); transition: background .2s; }
.lpv:hover { background: rgba(255,255,255,0.1); }
.lpv img { width: 112px; min-height: 76px; object-fit: cover; flex: none; }
.lpv-t { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; min-width: 0; }
.lpv-t em { font-style: normal; font-size: 11px; color: var(--muted); }
.lpv-t b { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lpv-t span { font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.msg .lpv { margin-left: 0; } .msg.mine .lpv { margin-left: auto; }
.body .lpv { margin-top: 14px; }
/* chat pin */
.pinbar { display: flex; align-items: center; gap: 4px; margin: 0 12px 4px; padding: 4px 4px 4px 10px; border-radius: 14px; background: rgba(134, 182, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(134, 182, 255, 0.3); }
.pin-go { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; text-align: left; font-size: 13px; padding: 4px 0; }
.pin-go svg { width: 14px; height: 14px; flex: none; color: var(--accent); }
.pin-go b { flex: none; color: var(--accent-2); } .pin-go span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.pin-x { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); flex: none; } .pin-x:hover { background: rgba(255,255,255,0.1); } .pin-x svg { width: 14px; height: 14px; }
/* search */
.sfilters { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: 8px; }
.stab { margin-top: 10px; }
/* inbox activity */
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
/* settings */
.devrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.devrow > span { flex: 1; min-width: 0; display: flex; flex-direction: column; } .devrow em { font-style: normal; font-size: 12px; color: var(--muted); }
.devrow + .btn { margin-top: 10px; }
.nprefs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 13.5px; }
.ncolors .nc.lockd { opacity: .4; filter: grayscale(1); cursor: not-allowed; font-size: 10px; font-weight: 700; color: var(--ink-2); }
.ncolors .nc.rb, .rainbow { background-image: linear-gradient(90deg, #ff6b6b, #ffb36b, #ffe66b, #6bff95, #6bd5ff, #9d8cff, #ff6bd5); }
.rainbow { -webkit-background-clip: text; background-clip: text; color: transparent !important; }
.invb { margin: 2px 0 12px; padding: 10px 12px; border-radius: 14px; font-size: 13.5px; background: rgba(255, 140, 198, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 140, 198, 0.35); }
/* events */
.evhead { display: flex; align-items: center; gap: 10px; } .evhead h1 { display: flex; align-items: center; gap: 8px; margin: 0; } .evhead h1 svg { width: 22px; height: 22px; }
.evday { margin: 18px 0 8px; font-size: 13px; color: var(--muted); font-weight: 650; }
.evcard { display: flex; gap: 14px; align-items: flex-start; padding: 14px; margin-bottom: 8px; border-radius: 18px; background: rgba(255,255,255,0.05); box-shadow: inset 0 0 0 1px var(--line); }
.evcard.now { box-shadow: inset 0 0 0 1px rgba(116, 239, 192, 0.5); }
.evtime { flex: none; width: 74px; font-weight: 750; font-size: 15px; color: var(--accent); }
.evb { flex: 1; min-width: 0; } .evb > b { font-size: 15px; } .evb p { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; white-space: pre-wrap; }
.evp { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.evppl { display: flex; align-items: center; gap: 2px; margin-top: 8px; flex-wrap: wrap; } .evppl span:last-child { margin-left: 6px; font-size: 12px; color: var(--muted); }
.evact { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.evf { display: flex; flex-direction: column; gap: 8px; padding: 14px; margin: 10px 0; border-radius: 18px; background: rgba(255,255,255,0.05); box-shadow: inset 0 0 0 1px rgba(140,196,255,0.35); }
.evpast { margin-top: 18px; } .evpast summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-bottom: 8px; } .evpast .evcard { opacity: .6; }
/* banned page */
.banned { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: #04070f; color: #e8eefc; font-family: var(--font); }
.banned-box { width: min(440px, 100%); text-align: center; }
.banned-box h1 { margin: 0 0 10px; } .banned-box .why { color: #ffc2b9; } .banned-box .until { color: #93a1bd; font-size: 13.5px; }
.banned-box form { margin-top: 22px; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.banned-box label { font-size: 13px; color: #93a1bd; }
.banned-box textarea { min-height: 110px; border-radius: 14px; border: 0; padding: 12px; background: rgba(255,255,255,0.08); color: #fff; font: inherit; }
.banned-box button { height: 42px; border-radius: 999px; border: 0; font-weight: 700; color: #fff; background: linear-gradient(180deg, #5a96ff, #3c72ea); cursor: pointer; }
.ap-st { margin-top: 16px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,0.06); font-size: 13.5px; } .ap-st.accepted { background: rgba(116,239,192,0.12); } .ap-st span { color: #93a1bd; }

/* ================= light theme ================= */
:root[data-theme="light"] {
  --ink: #18223a; --ink-2: #33415f; --muted: #5d6b88; --faint: #8b97b0; --accent: #2f6fe4; --accent-2: #1d4fb8;
  --line: rgba(20, 40, 90, 0.10); --line-2: rgba(20, 40, 90, 0.18); color-scheme: light;
  --s1: rgba(255, 255, 255, 0.6); --s2: rgba(20, 40, 90, 0.06); --s3: rgba(20, 40, 90, 0.1); --well: rgba(20, 40, 90, 0.05);
  --glass-tint: rgba(255, 255, 255, 0.62); --glass-hi: rgba(255, 255, 255, 0.5);
  --lift: 0 24px 60px -28px rgba(30, 50, 110, 0.32), 0 2px 8px -4px rgba(30, 50, 110, 0.14);
}
[data-theme="light"] .glass::before { background: radial-gradient(220px circle at var(--mx, -999px) var(--my, -999px), rgba(77, 141, 255, calc(var(--rim, 0) * 0.6)), transparent 70%), linear-gradient(170deg, rgba(255,255,255,0.95), rgba(20,40,90,0.06) 40%, rgba(20,40,90,0.08)); }
[data-theme="light"] .glass::after { background: radial-gradient(480px circle at var(--mx, 50%) var(--my, 0), rgba(77, 141, 255, 0.06), transparent 60%); }
[data-theme="light"] body { background: #eef2f8; }
[data-theme="light"] .bg { background: radial-gradient(120% 80% at 50% -10%, #ffffff 0%, #edf2fb 45%, #e2e9f6 100%); }
[data-theme="light"] .bg::before { background: radial-gradient(120% 90% at 50% 40%, transparent 60%, rgba(150, 170, 210, 0.25)); } [data-theme="light"] .bg::after { opacity: 0.035; }
[data-theme="light"] .bg i { opacity: 0.45; } [data-theme="light"] .bg .motes { display: none; }
[data-theme="light"] .glass { background: linear-gradient(150deg, rgba(255,255,255,0.86) 0%, rgba(255,255,255,0.72) 50%, rgba(255,255,255,0.8) 100%);
  box-shadow: 0 24px 60px -24px rgba(30, 50, 110, 0.28), 0 8px 24px -12px rgba(30, 50, 110, 0.18), inset 0 1px 0 rgba(255,255,255,0.9), inset 0 0 0 1px rgba(20, 40, 90, 0.06); }
[data-theme="light"] .input, [data-theme="light"] textarea.input, [data-theme="light"] select.input, [data-theme="light"] .seg { background: rgba(20, 40, 90, 0.06); }
[data-theme="light"] .input:focus { background: #fff; }
[data-theme="light"] .seg .thumb { background: #fff; box-shadow: 0 2px 8px rgba(30, 50, 110, 0.18), inset 0 0 0 1px rgba(20,40,90,0.06); }
[data-theme="light"] .seg button.on, [data-theme="light"] .mtab button.on, [data-theme="light"] .nrow.unread .nt b, [data-theme="light"] .bubble.md strong, [data-theme="light"] .bubble.md .mdh, [data-theme="light"] .rte-bar button.on { color: var(--ink); }
[data-theme="light"] .pill.lang span.on { color: var(--ink); background: #fff; }
[data-theme="light"] .bubble { background: #fff; box-shadow: 0 1px 2px rgba(30, 50, 110, 0.10), inset 0 0 0 1px rgba(20, 40, 90, 0.06); }
[data-theme="light"] .msg.mine .bubble { color: #fff; background: linear-gradient(180deg, #5a96ff, #3c72ea); }
[data-theme="light"] .fcard, [data-theme="light"] .evcard, [data-theme="light"] .lpv, [data-theme="light"] .rcats button, [data-theme="light"] .subtabs button, [data-theme="light"] .btools button, [data-theme="light"] .catpick span { background: rgba(255,255,255,0.75); box-shadow: inset 0 0 0 1px rgba(20, 40, 90, 0.08); }
[data-theme="light"] .btn:not(.primary):not(.red):not(.green) { background: rgba(20, 40, 90, 0.06); }
[data-theme="light"] .pill:not(.login) { background: rgba(255,255,255,0.6); }
[data-theme="light"] .pcat { color: #1d4fb8; background: rgba(47, 111, 228, 0.12); }
[data-theme="light"] .pinbar { background: rgba(47, 111, 228, 0.08); } [data-theme="light"] .pin-go b { color: #1d4fb8; }
[data-theme="light"] .sumcard > b { color: #5b46d6; }
[data-theme="light"] .sheet-bg { background: rgba(200, 210, 230, 0.35); }
[data-theme="light"] .toast { color: var(--ink); background: rgba(255,255,255,0.95); box-shadow: 0 12px 30px rgba(30, 50, 110, 0.2), inset 0 0 0 1px rgba(20,40,90,0.08); }
[data-theme="light"] .lockbar { color: #4b3bb5; background: rgba(110, 90, 230, 0.1); } [data-theme="light"] .lockbar b { color: #33268f; } [data-theme="light"] .lockbar span { color: #4b3bb5; }
[data-theme="light"] .tag { color: #fff; background: #2f6fe4; } [data-theme="light"] .pill.donate { color: #c62f6a; } [data-theme="light"] .mention.me { color: #4b3bb5; } [data-theme="light"] .sheet, [data-theme="light"] .modal { background: linear-gradient(175deg, #ffffff, #f3f6fc); box-shadow: 0 40px 90px -30px rgba(30, 50, 110, 0.35), inset 0 0 0 1px rgba(20, 40, 90, 0.08); } [data-theme="light"] .sheet .x { background: rgba(20, 40, 90, 0.06); } [data-theme="light"] .sheet .grabber { background: rgba(20, 40, 90, 0.18); } [data-theme="light"] .sheet-bg, [data-theme="light"] .modal-bg { background: rgba(190, 200, 225, 0.45); }
[data-theme="light"] ::selection { background: rgba(47, 111, 228, 0.22); }
.fhint { margin: 0 14px 8px; padding: 8px 12px; border-radius: 12px; font-size: 12.5px; color: var(--muted); background: rgba(140,196,255,0.08); } .fhint a { color: var(--accent); text-decoration: underline; }

/* stickers */
.bubble.sticker { padding: 0; background: none !important; box-shadow: none !important; }
.bubble.sticker img { display: block; width: 140px; height: 140px; object-fit: contain; }
.spick { position: fixed; z-index: 130; width: 340px; max-width: calc(100vw - 16px); padding: 8px; border-radius: 18px; background: rgba(14,22,42,0.96) !important; box-shadow: 0 16px 40px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.1); display: flex; flex-direction: column; gap: 6px; animation: fadeIn 0.15s both; }
.spick .sgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; max-height: 260px; overflow-y: auto; }
.spick .sgrid button { aspect-ratio: 1; border-radius: 12px; padding: 4px; }
.spick .sgrid button:hover { background: rgba(255,255,255,0.1); }
.spick img { width: 100%; height: 100%; object-fit: contain; display: block; }
.spick .stabs { display: flex; gap: 4px; overflow-x: auto; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 6px; }
.spick .stabs button { flex: none; width: 38px; height: 38px; padding: 4px; border-radius: 10px; opacity: 0.6; }
.spick .stabs button.on { opacity: 1; background: rgba(255,255,255,0.12); }
@media (max-width: 600px) { .bubble.sticker img { width: 120px; height: 120px; } }

/* desktop: dialogs float in the middle, sized to what they hold */
@media (min-width: 761px) {
  .sheet-bg { align-items: center; padding: 24px; }
  .sheet .grabber { visibility: hidden; height: 0; margin: 0; }
  .sheet-body { padding-top: 30px; }
  .sheet-bg[data-kind="auth"] .sheet, .sheet-bg[data-kind="account"] .sheet, .sheet-bg[data-kind="members"] .sheet, .sheet-bg[data-kind="inbox"] .sheet, .sheet-bg[data-kind="profile"] .sheet { width: min(560px, 100%); }
}

/* top bar "more" menu (phones) */
.top .pill.more { display: none; }
.mmenu { width: 180px; }
.mmenu button { align-items: center; font-size: 14px; font-weight: 600; color: var(--ink); min-height: 44px; }
.mmenu svg { width: 17px; height: 17px; flex: none; }
.mmenu .aa { display: inline-grid; place-items: center; width: 17px; font-size: 12px; font-weight: 800; }

/* ================= phones ================= */
/* one pane at a time, a floating glass tab bar, safe areas on every edge, and the tab bar folds away while typing */
@media (max-width: 760px) {
  body { overflow: hidden; font-size: 15px; }
  .app { height: calc(var(--vvh, 100dvh) / var(--ui-zoom, 1)); min-height: 0; gap: 8px;
    padding: calc(8px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) calc(88px + env(safe-area-inset-bottom)) calc(10px + env(safe-area-inset-left)); }
  body.kbd .app { padding-bottom: 8px; }
  body.kbd .mtab, body.kbd .voicebar { display: none !important; }
  body.kbd .top { display: none; }
  /* lighter glass on phones: less blur, a bit more tint */
  .glass { --blur: 18px; --glass-tint: rgba(12, 18, 40, 0.44); }
  .pane { animation: none; --pane-r: 22px; }

  /* top bar: brand, live count, then 40px targets */
  .top { height: 54px; padding: 0 5px 0 14px; gap: 2px; }
  .top .brand { font-size: 16px; gap: 8px; margin-right: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; }
  .top .brand .logo { width: 24px; height: 24px; flex: none; }
  .top .pill { height: 40px; }
  .top .pill.icon, .top .pill.more, .top .pill[data-nick], .top .pill.donate { width: 40px; padding: 0; justify-content: center; }
  .top .pill.status, .top .pill.gear, .top .pill[data-events], .top .pill[data-look], .top .pill.lang, .top .pill.hide-m { display: none; }
  .top .pill.more { display: inline-flex; }
  .top .pill.donate span, .top .pill .nm { display: none; }
  .top .pill.members { padding: 0 11px; gap: 6px; }
  .top .pill.members .ml, .top .pill.members svg { display: none; }
  .top .pill.members .m-only { display: inline-block; }
  .top .pill[data-nick] .avatar { margin: 0; }
  .top .pill[data-nick]:not(.member) { display: none; }
  .top .pill.login { height: 36px; padding: 0 13px; font-size: 13px; gap: 5px; }
  .top .pill.login svg { display: none; }

  /* panes */
  .dash { display: block; position: relative; }
  .stack { display: contents; }
  .dash .pane { display: none; height: 100% !important; }
  body[data-pane="board"] #p-board, body[data-pane="chat"] #p-chat, body[data-pane="voice"] #p-voice, body[data-pane="files"] #p-files { display: flex; }
  .ph { padding: 12px 12px 8px 16px; min-height: 56px; }
  .ph h2 { font-size: 18px; }
  .ph2 { padding: 0 12px 8px; }
  .scroll { padding: 2px 8px 12px; }
  .gal { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .seg button { padding: 8px 14px; }
  .btools { padding: 0 12px 8px; }
  .btools button { padding: 7px 13px; }
  .fbtn { height: 38px; }
  .fcard { padding: 14px 14px 8px; }
  .msg { max-width: 86%; }
  .msgs { padding: 6px 12px 10px; }
  .composer { margin: 4px 8px 8px; }
  .composer .cattach, .composer .cemoji, .composer .send { width: 38px; height: 38px; }
  input, textarea, select, .input, .composer input, .icf .input { font-size: 16px !important; }

  /* floating tab bar */
  .mtab { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: calc(12px + env(safe-area-inset-left)); right: calc(12px + env(safe-area-inset-right)); bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 60; padding: 6px; border-radius: 28px; }
  .mtab .thumb { position: absolute; top: 6px; bottom: 6px; left: 6px; border-radius: 22px; z-index: 0; background: linear-gradient(180deg, rgba(255,255,255,0.2), rgba(255,255,255,0.08)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 4px 14px -2px rgba(0,0,0,0.3); transition: transform 0.45s var(--spring), width 0.45s var(--spring); }
  .mtab button { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0 6px; min-height: 52px; font-size: 11.5px; font-weight: 600; color: var(--muted); transition: color 0.2s, transform 0.25s var(--spring); }
  .mtab button:active { transform: scale(0.92); }
  .mtab button.on { color: #fff; }
  .mtab button svg { width: 22px; height: 22px; }
  .mtab button .dot { position: absolute; top: 6px; right: calc(50% - 17px); width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 2px rgba(10, 16, 34, 0.9); }
  .voicebar.show { display: flex; position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 61; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: 999px; font-size: 13px; max-width: calc(100vw - 24px); }
  .voicebar i { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }

  /* sheets rise from the bottom edge and leave room for the close button */
  .sheet-bg { padding: calc(8px + env(safe-area-inset-top)) 6px 0; }
  .sheet { border-radius: 26px 26px 0 0; max-height: calc(100dvh - 8px - env(safe-area-inset-top)); width: 100%; }
  .sheet-body { padding: 44px 18px calc(24px + env(safe-area-inset-bottom)); }
  .sheet-body h1 { font-size: 22px; margin-right: 0; }
  .sheet .x { top: 12px; right: 12px; width: 40px; height: 40px; }
  .modal-bg { align-items: end; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); }
  .modal { border-radius: 24px; }
  .modal .row .btn { flex: 1; height: 44px; }
  .ibtabs { margin-right: 0; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .ibtabs::-webkit-scrollbar { display: none; }
  .ibtabs button { flex: none; }
  .cols3 { grid-template-columns: 1fr; }
  .cmt.reply { margin-left: 22px; }
  .cform { grid-template-columns: 1fr; }
  /* editor toolbar stays on one scrolling line so the post button never falls off screen */
  .rte-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .rte-bar::-webkit-scrollbar { display: none; }
  .rte-bar > * { flex: none; }
  .rte-bar select { flex: none; width: auto; }
  .lpv { max-width: 100%; }
}
@media (max-width: 360px) {
  .top .brand { font-size: 0; gap: 0; }
  .composer .cemoji[data-emoji] { display: none; }
}
/* nothing drifts behind an open dialog */
body:has(.sheet-bg, .modal-bg) .bg i, body:has(.sheet-bg, .modal-bg) .bg .motes { animation-play-state: paused; }

/* ================= meadow (pixel garden along the bottom, desktop) ================= */
.meadow { position: fixed; left: 0; right: 0; bottom: 0; height: 136px; z-index: 0; pointer-events: none; }
.meadow-sky { position: fixed; left: 0; top: 0; z-index: 150; pointer-events: none; image-rendering: pixelated; image-rendering: crisp-edges; }
.meadow canvas { position: absolute; left: 0; bottom: 0; image-rendering: pixelated; image-rendering: crisp-edges; pointer-events: auto; }
body.has-meadow .app { height: calc((100dvh - 126px) / var(--ui-zoom, 1)); padding-bottom: 4px; }
.meadow-hud { position: absolute; right: 18px; bottom: 40px; border-radius: 999px; pointer-events: auto; --blur: 14px; }
.meadow-hud button { display: flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.meadow-hud button:hover { color: var(--ink); background: var(--s2); }
.meadow-hud svg { width: 13px; height: 13px; margin-left: 4px; color: var(--accent); }
.meadow-hud svg:first-child { margin-left: 0; color: var(--mint); }
.mbook { position: fixed; z-index: 140; width: 340px; padding: 14px; border-radius: 22px; animation: sheetUp 0.3s var(--spring) both; }
.mbook .mb-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.mbook .mb-h b { font-size: 15px; } .mbook .mb-h span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mb-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mb-c { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 14px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }
.mb-c canvas { width: 40px; height: 40px; image-rendering: pixelated; }
.mb-c span { font-size: 11px; font-weight: 650; color: var(--ink-2); }
.mb-c i { font-style: normal; font-size: 10px; color: #ff8fb0; min-height: 12px; letter-spacing: 1px; }
.mb-c.off span { color: var(--faint); }
.mb-items { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.mb-i { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mb-i canvas { width: 24px; height: 24px; image-rendering: pixelated; }
.mb-i b { font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mb-i.off { opacity: 0.3; }

/* ================= jelly glass ================= */
/* presses squash, releases spring back past their size and settle; things you can press puff up a little under the pointer */
@property --sx { syntax: '<number>'; inherits: false; initial-value: 1; }
.btn, .pill, .fbtn, .send, .icsend, .cattach, .cemoji, .like, .seg button, .mtab button, .sheet .x, .rx button, .popt, .gtile, .donate-opt, .meadow-hud button {
  transition: background 0.2s, color 0.2s, box-shadow 0.25s, translate 0.35s var(--ease), transform 0.7s cubic-bezier(0.2, 2.6, 0.35, 1);
}
.btn:hover, .pill:hover, .send:hover, .icsend:hover, .cattach:hover, .like:hover, .sheet .x:hover { transform: scale(1.08); animation: jello 0.75s ease-out; }
.fbtn:hover, .cemoji:hover, .rx button:hover { transform: scale(1.14); animation: jelloS 0.7s ease-out; }
.btn:active, .pill:active, .fbtn:active, .send:active, .icsend:active, .cattach:active, .cemoji:active, .like:active, .seg button:active, .mtab button:active, .sheet .x:active, .rx button:active, .popt:active, .donate-opt:active, .meadow-hud button:active {
  transform: scale(1.22, 0.7); transition-duration: 0.08s;
}
.gtile:active { transform: scale(0.96, 0.93); transition-duration: 0.09s; }
/* specular shine that sweeps across glassy buttons */
.btn, .send, .icsend { position: relative; overflow: hidden; isolation: isolate; }
.btn::after, .send::after, .icsend::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.38) 48%, rgba(255, 255, 255, 0.08) 56%, transparent 70%); transform: translateX(-130%); transition: transform 0s; }
.btn:hover::after, .send:hover::after, .icsend:hover::after { transform: translateX(130%); transition: transform 0.75s var(--ease); }
/* glossy top highlight on primary buttons and the send button, like a water drop */
.btn.primary::before, .send::before, .icsend::before { content: ''; position: absolute; left: 14%; right: 14%; top: 2px; height: 42%; border-radius: 999px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)); }
/* the segmented thumb and tab-bar thumb squash as they land */
@keyframes boing { 0% { scale: 1 1; } 18% { scale: 1.26 0.7; } 38% { scale: 0.88 1.14; } 56% { scale: 1.08 0.93; } 74% { scale: 0.97 1.03; } 100% { scale: 1 1; } }
.seg .thumb.boing, .mtab .thumb.boing { animation: boing 0.75s ease-out; }
/* liked hearts pop */
@keyframes heartpop { 0% { transform: scale(1); } 22% { transform: scale(1.8, 1.4); } 44% { transform: scale(0.7, 1.15); } 64% { transform: scale(1.2, 0.9); } 82% { transform: scale(0.95, 1.04); } 100% { transform: scale(1); } }
.fbtn.like.on svg, .like.on svg { animation: heartpop 0.6s ease-out; }
/* cards and rows float up a hair under the pointer */
.fcard, .vroom, .frow, .evcard, .nrow { transition: background 0.25s, box-shadow 0.3s, transform 0.5s cubic-bezier(0.25, 1.9, 0.4, 1); }
.fcard.lit, .vroom.lit, .evcard.lit { transform: translateY(-3px) scale(1.012); box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), inset 0 0 0 1px var(--line-2), 0 14px 30px -16px rgba(0, 0, 0, 0.6); }
.frow.lit, .nrow.lit { transform: translateX(3px); }
/* panes breathe very slightly while the pointer rests on them */
.pane { transition: transform 0.7s cubic-bezier(0.25, 1.6, 0.4, 1), box-shadow 0.4s; }
.pane.lit { transform: translateY(-1px); }
/* glass sheets and dialogs wobble shut */
@keyframes sheetOut { 0% { transform: none; } 30% { transform: translateY(-6px) scale(1.01, 0.98); opacity: 1; } 100% { opacity: 0; transform: translateY(60px) scale(0.9, 0.84); } }
.sheet-bg.out .sheet { animation: sheetOut 0.26s ease-in both; }
/* the composer swells when focused */
.composer { transition: box-shadow 0.25s, transform 0.5s cubic-bezier(0.25, 1.9, 0.4, 1); }
.composer:focus-within { transform: scale(1.012); }
.input:focus { animation: inflate 0.45s cubic-bezier(0.25, 1.9, 0.4, 1); }
@keyframes inflate { 0% { transform: scale(0.985); } 100% { transform: none; } }
html[data-motion="low"] .btn, html[data-motion="low"] .pill, html[data-motion="low"] .fbtn, html[data-motion="low"] .send, html[data-motion="low"] .fcard, html[data-motion="low"] .pane, html[data-motion="low"] .composer { transition: none !important; transform: none !important; }
html[data-motion="low"] .seg .thumb.boing, html[data-motion="low"] .mtab .thumb.boing, html[data-motion="low"] .like.on svg, html[data-motion="low"] .fbtn.like.on svg { animation: none; }
.composer .send, .composer .cattach, .composer .cemoji { transition: background 0.2s, transform 0.55s cubic-bezier(0.25, 2.1, 0.4, 1); }
.composer .send:hover, .composer .cattach:hover { transform: scale(1.08); }
.composer .send:active, .composer .cattach:active, .composer .cemoji:active { transform: scale(1.12, 0.78); transition-duration: 0.09s; }

/* v42: louder jelly */
@keyframes jello { 0% { transform: scale(1); } 22% { transform: scale(1.16, 0.86); } 42% { transform: scale(0.94, 1.1); } 60% { transform: scale(1.1, 0.95); } 78% { transform: scale(1.05, 1.08); } 100% { transform: scale(1.08); } }
@keyframes jelloS { 0% { transform: scale(1); } 25% { transform: scale(1.25, 0.82); } 50% { transform: scale(1.02, 1.2); } 75% { transform: scale(1.18, 1.08); } 100% { transform: scale(1.14); } }
/* panes, sheets and the top bar wobble from the spot you press */
.pane.boing, .sheet.boing, .modal.boing, .top.boing { animation: paneboing 0.65s ease-out; transform-origin: var(--ox, 50%) var(--oy, 50%); }
@keyframes paneboing { 0% { scale: 1 1; } 20% { scale: 1.018 0.978; } 42% { scale: 0.99 1.014; } 64% { scale: 1.006 0.995; } 100% { scale: 1 1; } }
/* toasts squash harder as they land */
@keyframes island { 0% { opacity: 0; transform: scale(0.2, 0.4); filter: blur(4px); } 35% { opacity: 1; transform: scale(1.16, 0.86); filter: none; } 55% { transform: scale(0.92, 1.1); } 72% { transform: scale(1.05, 0.96); } 88% { transform: scale(0.99, 1.01); } 100% { transform: none; } }
/* chat bubbles grow from the side they belong to */
.msg .bubble { transform-origin: left bottom; } .msg.mine .bubble { transform-origin: right bottom; }
.bubble { transition: transform 0.6s cubic-bezier(0.2, 2.4, 0.35, 1); }
.bubble:hover { transform: scale(1.04, 0.97); }
.bubble:active { transform: scale(1.1, 0.88); transition-duration: 0.08s; }
/* list rows get a springy nudge too */
.prow:active, .frow:active, .nrow:active, .mrow:active { transform: scale(0.97, 0.94); transition-duration: 0.08s; }
.prow, .frow, .nrow, .mrow { transition: background 0.25s, transform 0.6s cubic-bezier(0.2, 2.4, 0.35, 1); }
html[data-motion="low"] .pane.boing, html[data-motion="low"] .sheet.boing, html[data-motion="low"] .top.boing { animation: none; }
html[data-motion="low"] .btn:hover, html[data-motion="low"] .pill:hover, html[data-motion="low"] .fbtn:hover { animation: none; }
/* pointer effects and the garden live in real screen pixels, so they stay under the mouse at any text size */
.cursor-dot, .fxlayer, .meadow, .meadow-sky, .mbook { zoom: calc(1 / var(--ui-zoom, 1)); }

/* garden bag / decorate trays and the visitor name tag */
.meadow-hud { display: flex; gap: 2px; padding: 2px; }
.meadow-hud button { gap: 4px; }
.mtray { position: fixed; z-index: 140; padding: 10px; border-radius: 20px; zoom: calc(1 / var(--ui-zoom, 1)); animation: sheetUp 0.4s var(--spring) both; }
.mt-grid { display: grid; grid-template-columns: repeat(9, 38px); gap: 4px; }
.mt-grid.deco { grid-template-columns: repeat(5, 58px); }
.mt-i { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px 3px; border-radius: 12px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); cursor: grab; touch-action: none; }
.mt-i:hover { background: var(--s3); }
.mt-i.on { box-shadow: inset 0 0 0 1.5px var(--accent); background: rgba(134, 182, 255, 0.16); }
.mt-i canvas { width: 25px; height: 25px; image-rendering: pixelated; }
.mt-grid.deco .mt-i canvas { width: 44px; height: 48px; }
.mt-i b { font-size: 11px; font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mt-i.off { opacity: 0.32; cursor: default; }
body.m-carry, body.m-carry * { cursor: grabbing !important; }
.mtip { position: fixed; z-index: 160; transform: translateX(-50%); padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; color: #fff; background: rgba(12, 18, 40, 0.86); box-shadow: 0 6px 16px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(255,255,255,0.12); pointer-events: none; zoom: calc(1 / var(--ui-zoom, 1)); white-space: nowrap; }
.mb-c.wears { cursor: pointer; }
.mb-c.wears:hover { background: var(--s3); }

/* phones: the garden is a tab of its own, a glass pane you can swipe through */
@media (max-width: 760px) {
  .mtab { grid-template-columns: repeat(5, 1fr); }
  .meadow.m-full { display: none; }
  body[data-pane="garden"] .dash { visibility: hidden; }
  body[data-pane="garden"] .meadow.m-full { display: block; position: fixed; z-index: 2; pointer-events: auto; height: auto; border-radius: 22px; overflow: hidden;
    top: calc(8px + env(safe-area-inset-top) + 62px); bottom: calc(88px + env(safe-area-inset-bottom)); left: calc(10px + env(safe-area-inset-left)); right: calc(10px + env(safe-area-inset-right)); }
  .meadow.m-full canvas { touch-action: none; }
  .meadow.m-full .meadow-hud { top: 10px; right: 10px; bottom: auto; }
  .mswipe { position: absolute; top: 58px; left: 50%; width: 112px; height: 46px; margin-left: -56px; padding: 3px 8px; border-radius: 999px; pointer-events: none; color: #fff;
    background: rgba(255,255,255,0.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14); opacity: 0.42; transition: opacity 0.8s var(--ease); animation: mswipein 0.6s var(--ease) backwards; }
  .mswipe svg { width: 100%; height: 100%; display: block; }
  .mswipe-hand { animation: mswipehand 2.4s ease-in-out infinite; }
  .mswipe.out { opacity: 0; }
  @keyframes mswipein { from { opacity: 0; transform: translateY(-6px); } }
  @keyframes mswipehand { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-13px); } 75% { transform: translateX(13px); } }
  html[data-motion="low"] .mswipe-hand { animation: none; }
  .meadow.m-full .meadow-hud button { height: 36px; padding: 0 11px; }
  .mtray { max-width: calc(100vw - 20px); }
  .mt-grid { grid-template-columns: repeat(5, 46px); }
  .mt-grid.deco { grid-template-columns: repeat(4, 64px); }
  .mbook { width: min(340px, calc(100vw - 20px)); }
  body.kbd[data-pane="garden"] .meadow.m-full { display: none; }
}

/* phone loading gauge (removed right away on wider screens by boot.js) */
.boot { display: none; }
@media (max-width: 760px) {
  .boot { position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    background: radial-gradient(120% 80% at 50% 0%, #13214d, #0a1230 45%, #060914); transition: opacity 0.5s var(--ease); }
  .boot.out { opacity: 0; pointer-events: none; }
  .boot-logo { width: 54px; height: 54px; border-radius: 18px; position: relative; background: linear-gradient(145deg, #9cc2ff, #5b7cff 55%, #8b78ff); box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), 0 14px 34px -8px rgba(80,120,255,0.7); animation: bootbob 1.6s ease-in-out infinite; }
  .boot-logo::after { content: ''; position: absolute; inset: 16px; border-radius: 50%; background: rgba(255,255,255,0.92); }
  .boot b { font-size: 19px; font-weight: 750; letter-spacing: -0.035em; color: var(--ink); }
  .boot-bar { width: 168px; height: 7px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,0.08); box-shadow: inset 0 1px 2px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.08); }
  .boot-bar i { display: block; height: 100%; border-radius: inherit; transform-origin: left center; transform: scaleX(0.06);
    background: linear-gradient(90deg, #6fa8ff, #9d8cff); box-shadow: 0 0 12px rgba(120, 160, 255, 0.7), inset 0 1px 0 rgba(255,255,255,0.5); }
  @keyframes bootbob { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-6px) scale(1.04, 0.97); } }
}
