/* Slidepad — bound to the Kaching house system (Larpo): Geist, #f7f7f7 page, white cards on #e3e3e3
   hairlines, solid ink controls, whisper depth, 1200px rail. Laser coral is the one owned accent. */

@font-face { font-family: "Geist"; src: url("./vendor/geist.woff2?v=4346a7f8a7") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("./vendor/geist-mono.woff2?v=4346a7f8a7") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  --page: #f7f7f7;
  --surface: #fff;
  --hover: #f2f2f2;
  --line: #e3e3e3;
  --ink: #08090c;
  --heading: #171717;
  --text-2: #666;
  --text-3: #6f6f6f;
  --primary: #08090c;
  --primary-hover: #303030;
  --on-primary: #fff;
  --laser: #ff4d2e;
  --ok: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --role-admin: #ff4d2e;
  --role-teammate: #2563eb;
  --role-member: #c4c4c4;
  --depth: 0 8px 20px -12px rgb(8 9 12 / 0.12);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #08090c;
    --surface: #111214;
    --hover: #1a1b1e;
    --line: #232428;
    --ink: #f5f5f5;
    --heading: #fafafa;
    --text-2: #a3a3a3;
    --text-3: #8c8c8c;
    --primary: #f5f5f5;
    --primary-hover: #d9d9d9;
    --on-primary: #08090c;
    --role-member: #525252;
    --depth: 0 8px 20px -12px rgb(0 0 0 / 0.5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--page); }
body {
  color: var(--ink);
  font: 500 16px/1.4 var(--font);
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
#app { min-height: 100%; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
b { font-weight: 600; color: var(--heading); }
a { color: inherit; }
code { font: 500 0.9em var(--mono); letter-spacing: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
::selection { background: rgb(255 77 46 / 0.18); }
.icon { width: 18px; height: 18px; flex: none; }
.dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--text-3); }

/* ── Brand ─────────────────────────────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
a.brand { padding: 9px 0; margin: -9px 0; }
.logo { width: 26px; height: 26px; flex: none; }
.wordmark { font-size: 21px; font-weight: 650; letter-spacing: -0.05em; }

/* ── Controls (Kaching spec) ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border: 0; border-radius: 12px;
  font: 500 15px/1 var(--font); letter-spacing: -0.03em; white-space: nowrap; text-decoration: none;
  cursor: pointer; touch-action: manipulation; transition: background-color 150ms, transform 150ms var(--ease), opacity 150ms;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.35; pointer-events: none; }
.btn .icon { width: 17px; height: 17px; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line) inset; }
.btn-secondary:hover { background: var(--hover); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--hover); color: var(--ink); }
.btn-sm { height: 32px; padding: 0 12px; border-radius: 10px; font-size: 14px; }
.btn-lg { height: 52px; padding: 0 22px; border-radius: 14px; font-size: 18px; letter-spacing: -0.54px; }
.btn-xl { height: 64px; border-radius: 14px; font-size: 18px; letter-spacing: -0.54px; }
.btn-xl .icon { width: 22px; height: 22px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; padding: 0;
  border: 0; border-radius: 12px; background: transparent; color: var(--text-2);
  cursor: pointer; touch-action: manipulation; transition: background-color 150ms, color 150ms, transform 150ms var(--ease);
}
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--hover); color: var(--ink); }
.icon-btn:active { transform: scale(0.96); }
.icon-btn-sm { width: 32px; height: 32px; border-radius: 9px; }
.icon-btn-sm .icon { width: 16px; height: 16px; }

.link-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 0; border: 0; background: none;
  color: var(--text-2); font: 500 14px var(--font); letter-spacing: -0.02em; cursor: pointer;
}
.link-btn:hover { color: var(--ink); }

.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--hover); }
.seg-btn {
  height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent;
  color: var(--text-2); font: 500 13.5px/1 var(--font); letter-spacing: -0.02em; cursor: pointer; transition: color 150ms, background-color 150ms;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(8 9 12 / 0.08), 0 0 0 1px var(--line); }

.switch { position: relative; width: 40px; height: 24px; flex: none; padding: 0; border: 0; border-radius: 12px; background: var(--line); cursor: pointer; transition: background-color 200ms; }
.switch span { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 0.2); transition: translate 220ms var(--ease); }
.switch[aria-checked="true"] { background: var(--ink); }
.switch[aria-checked="true"] span { translate: 16px 0; }
@media (prefers-color-scheme: dark) { .switch[aria-checked="true"] span { background: var(--page); } }

.select {
  height: 32px; padding: 0 28px 0 10px; border: 0; border-radius: 9px; appearance: none; cursor: pointer;
  background: var(--hover) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f8f8f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center / 14px;
  color: var(--ink); font: 500 13.5px var(--font); letter-spacing: -0.02em;
}
.input {
  width: 100%; height: 52px; padding: 0 16px; border: 0; border-radius: 14px;
  background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset; color: var(--ink);
  font: 500 17px var(--font); letter-spacing: -0.02em; outline: none; transition: box-shadow 150ms;
}
.input:focus { box-shadow: 0 0 0 1.5px var(--ink) inset; }
.input::placeholder { color: var(--text-3); }

.avatar {
  display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%;
  background: var(--hover); color: var(--heading); font-size: 13px; font-weight: 600;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--role-member);
}
.avatar[data-role="admin"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--role-admin); }
.avatar[data-role="teammate"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--role-teammate); }

.live-tag {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 8px;
  background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); font-size: 12.5px; font-weight: 600;
}
.live-tag .dot, .status[data-state="ready"] .dot { background: var(--laser); box-shadow: 0 0 0 3px rgb(255 77 46 / 0.18); }

.qr { padding: 8px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.qr svg { display: block; width: 100%; height: auto; }
.code { font: 600 32px/1 var(--mono); letter-spacing: 0.02em; font-variant-numeric: tabular-nums; color: var(--heading); }

.dither { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 240px; image-rendering: pixelated; pointer-events: none; opacity: 0.38; mask-image: linear-gradient(transparent, #000 70%); }

/* ═══ DESKTOP · HOME ═════════════════════════════════════════════════════ */
.home { position: relative; min-height: 100vh; overflow: hidden; }
.rail {
  position: relative; z-index: 1; width: min(1200px, 100% - 48px); min-height: 100vh; margin: 0 auto;
  padding: 0 32px 200px; border-inline: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 40px; align-items: start; padding-top: 24px; }
.head { margin-bottom: 24px; }
.head h1 { color: var(--heading); font-size: 36px; line-height: 1.2; font-weight: 600; letter-spacing: -0.06em; }
.head .sub { margin-top: 6px; max-width: 46ch; color: var(--text-2); font-size: 16px; letter-spacing: -0.03em; }

.deck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 28px 20px; }
.deck { min-width: 0; }
.deck-thumb {
  position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 10; padding: 0; overflow: hidden;
  border: 0; border-radius: 16px; background: var(--hover); box-shadow: 0 0 0 1px var(--line); cursor: pointer;
  transition: box-shadow 200ms, transform 200ms var(--ease);
}
.deck-thumb img { display: block; max-width: 100%; max-height: 100%; }
.deck-thumb img:not([src]) { visibility: hidden; }
.deck-thumb:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--line), var(--depth); }
.deck[data-live="true"] .deck-thumb { box-shadow: 0 0 0 1.5px var(--ink); }
.deck-thumb .live-tag { position: absolute; top: 10px; left: 10px; }
.deck-meta { display: flex; align-items: center; gap: 4px; padding-top: 10px; }
.deck-text { flex: 1; min-width: 0; }
.deck-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--heading); font-size: 16px; font-weight: 600; letter-spacing: -0.03em; }
.deck-sub { color: var(--text-3); font-size: 13.5px; }
.deck-actions { display: flex; opacity: 0; transition: opacity 150ms; }
.deck:hover .deck-actions, .deck:focus-within .deck-actions { opacity: 1; }
.deck-add {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  aspect-ratio: 16 / 10; border: 1px dashed var(--line); border-radius: 16px; background: transparent;
  color: var(--text-2); font: 500 14.5px var(--font); letter-spacing: -0.02em; cursor: pointer; transition: background-color 150ms, border-color 150ms, color 150ms;
}
.deck-add:hover { background: var(--surface); border-color: var(--text-3); color: var(--ink); }
.deck-add-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--primary); color: var(--on-primary); }

.side { position: sticky; top: 24px; display: grid; gap: 16px; }
.card { padding: 20px; border-radius: 20px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--depth); }
.card h2 { color: var(--heading); font-size: 19px; line-height: 1.25; font-weight: 600; letter-spacing: -0.04em; }

.join-card { display: grid; grid-template-columns: 184px 1fr; gap: 20px; align-items: center; padding: 22px; }
.join-copy { display: grid; gap: 10px; min-width: 0; align-content: center; }
.join-copy p { color: var(--text-2); font-size: 14.5px; }
.join-copy b { font-weight: 500; overflow-wrap: anywhere; }
.join-code { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-radius: 14px; background: var(--hover); }
.join-code span { color: var(--text-2); font-size: 14.5px; }
.join-code .code { font-size: 44px; white-space: nowrap; }
.status { display: flex; align-items: center; gap: 8px; }
.status[data-state="connecting"] .dot, .status[data-state="reconnecting"] .dot { background: var(--warn); }
.status[data-state="error"] { color: var(--danger) !important; }
.status[data-state="error"] .dot { background: var(--danger); }
.note { grid-column: 1 / -1; padding: 10px 12px; border-radius: 12px; background: var(--hover); color: var(--text-2); font-size: 13px; }

.card-head { display: flex; align-items: center; justify-content: space-between; margin: -6px -8px 8px 0; }
.count { margin-left: 4px; color: var(--text-3); font-weight: 500; }
.settings { display: grid; margin-bottom: 12px; padding: 4px 14px; border-radius: 14px; background: var(--hover); }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.setting + .setting { border-top: 1px solid var(--line); }
.setting-name { color: var(--heading); font-size: 14.5px; }
.settings .seg { background: var(--surface); }
.settings .seg-btn[aria-checked="true"] { background: var(--hover); box-shadow: none; }
.settings .link-btn { border-top: 1px solid var(--line); padding: 12px 0; font-size: 13.5px; color: var(--text-3); }
.settings .link-btn:hover { color: var(--danger); }

.people { display: grid; gap: 2px; margin: 0 -8px; }
.person { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 8px; border-radius: 12px; }
.person:hover { background: var(--hover); }
.person-text { flex: 1; min-width: 0; }
.person-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--heading); font-size: 15.5px; font-weight: 600; letter-spacing: -0.03em; }
.person-sub { color: var(--text-3); font-size: 14px; }
.person[data-online="false"] { opacity: 0.5; }
.person[data-pending="true"] { background: rgb(255 77 46 / 0.07); }
.person .select { background-color: transparent; }
.person:hover .select { background-color: var(--surface); }
.person-remove { opacity: 0; }
.person:hover .person-remove, .person:focus-within .person-remove { opacity: 1; }
.people-empty { display: grid; gap: 2px; padding: 10px 8px 6px; color: var(--text-3); font-size: 14px; }

@media (max-width: 1000px) {
  .home-grid { grid-template-columns: 1fr; }
  .side { position: static; grid-row: 1; }
}
@media (max-width: 767px) {
  .rail { width: 100%; border: 0; padding: 0 16px 200px; }
  .nav .btn, .card-head .icon-btn { height: 44px; min-width: 44px; }
}

/* ═══ DESKTOP · PRESENT ══════════════════════════════════════════════════ */
.present { position: fixed; inset: 0; z-index: 10; overflow: hidden; background: #000; color: #f5f5f5; }
.app.idle .present { cursor: none; }
.stage { position: absolute; inset: 0; display: grid; place-items: center; }
.slide-canvas { display: block; }
.laser {
  position: absolute; left: 0; top: 0; z-index: 30; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, #fff 0 16%, var(--laser) 28% 56%, transparent 72%);
  box-shadow: 0 0 16px 5px rgb(255 77 46 / 0.55), 0 0 56px 16px rgb(255 77 46 / 0.2);
  opacity: 0; transition: opacity 240ms ease; will-change: transform;
}
.laser.on { opacity: 1; transition-duration: 60ms; }
.present-bar {
  position: absolute; left: 50%; bottom: 20px; z-index: 20; translate: -50% 0;
  display: flex; align-items: center; gap: 2px; height: 52px; padding: 0 6px; border-radius: 16px;
  background: rgb(24 24 27 / 0.78); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), 0 8px 20px -12px rgb(0 0 0 / 0.5);
  transition: opacity 400ms ease, translate 400ms var(--ease);
}
.app.idle .present-bar { opacity: 0; translate: -50% 10px; pointer-events: none; }
.bar-btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 11px; background: transparent; color: #a3a3a3; cursor: pointer; transition: background-color 150ms, color 150ms; }
.bar-btn:hover { background: rgb(255 255 255 / 0.08); color: #fff; }
.bar-sep { width: 1px; height: 20px; margin: 0 6px; background: rgb(255 255 255 / 0.12); }
.counter { min-width: 64px; text-align: center; font: 500 14px var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.join-float {
  position: absolute; top: 24px; right: 24px; z-index: 25; display: flex; align-items: center; gap: 28px; padding: 20px 36px 20px 20px;
  border-radius: 20px; background: #fff; color: #08090c; box-shadow: 0 8px 20px -12px rgb(0 0 0 / 0.4); animation: rise 300ms var(--ease);
}
.join-float .qr { width: 240px; box-shadow: none; padding: 0; }
.join-float-title { font-size: 24px; font-weight: 600; letter-spacing: -0.04em; }
.join-float-sub { margin: 4px 0 14px; color: #666; font-size: 16px; }
.join-float-sub b { color: #171717; font-weight: 500; }
.join-float .code { color: #08090c; font-size: 52px; }

/* Dialog, drop, toast */
.scrim { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 24px; background: rgb(8 9 12 / 0.4); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade 200ms ease; }
.dialog { width: min(420px, 100%); padding: 24px; border-radius: 22px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 24px 48px -24px rgb(8 9 12 / 0.35); animation: rise 320ms var(--ease); }
.dialog h2 { color: var(--heading); font-size: 20px; font-weight: 600; letter-spacing: -0.05em; }
.dialog p { margin-top: 6px; color: var(--text-2); }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; translate: 0 8px; } }
@keyframes pulse { 50% { opacity: 0.35; } }

.drop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgb(247 247 247 / 0.9); pointer-events: none; }
@media (prefers-color-scheme: dark) { .drop { background: rgb(8 9 12 / 0.9); } }
.drop-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 100%; border: 1.5px dashed var(--text-3); border-radius: 28px; color: var(--heading); font-size: 22px; font-weight: 600; letter-spacing: -0.05em; }
.drop-inner .icon { width: 30px; height: 30px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; translate: -50% 12px; max-width: min(480px, calc(100% - 32px));
  padding: 12px 16px; border-radius: 14px; background: var(--primary); color: var(--on-primary); font-size: 14.5px;
  opacity: 0; pointer-events: none; transition: opacity 200ms ease, translate 300ms var(--ease);
}
.toast.show { opacity: 1; translate: -50% 0; }
.app[data-view="present"] ~ .toast, .app[data-view="present"] .toast { bottom: 88px; }

/* ═══ PHONE ══════════════════════════════════════════════════════════════ */
.join, .remote {
  position: fixed; inset: 0; display: flex; flex-direction: column; overflow: hidden;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: var(--page); overscroll-behavior: none;
}
.join-top { position: relative; z-index: 1; height: 44px; display: flex; align-items: center; }
.join-body { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding-bottom: 12vh; }
.join h1 { color: var(--heading); font-size: 32px; line-height: 1.15; font-weight: 600; letter-spacing: -0.06em; }
.lede { color: var(--text-2); font-size: 16px; letter-spacing: -0.03em; }
.join-form { display: grid; gap: 10px; margin-top: 14px; }
.code-input {
  width: 100%; height: 76px; padding: 0 16px; border: 0; border-radius: 16px; outline: none;
  background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset; color: var(--heading);
  font: 600 38px/1 var(--mono); letter-spacing: 0.06em; text-align: center; font-variant-numeric: tabular-nums; caret-color: var(--laser);
  transition: box-shadow 150ms;
}
.code-input::placeholder { color: var(--line); }
.code-input:focus { box-shadow: 0 0 0 1.5px var(--ink) inset; }
.join-form .btn-lg { margin-top: 4px; }
.join-error { min-height: 1.4em; color: var(--danger); font-size: 14px; }
.join-switch { position: relative; z-index: 1; align-self: center; padding: 12px; color: var(--text-3); font-size: 14px; text-decoration: none; }
.join .dither { height: 30vh; }

.remote { gap: 12px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.r-top { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.r-heading { flex: 1; min-width: 0; }
.r-deck { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--heading); font-size: 19px; font-weight: 600; letter-spacing: -0.04em; }
.r-sub { display: flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 15px; font-variant-numeric: tabular-nums; }
.remote[data-state="live"] .r-sub .dot { background: var(--ok); }
.remote:not([data-state="live"]) .r-sub .dot { background: var(--warn); animation: pulse 1s ease-in-out infinite; }

.r-slide {
  position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; touch-action: none;
  border-radius: 16px; background: var(--hover); box-shadow: 0 0 0 1px var(--line);
}
.r-slide img { display: block; max-width: 100%; max-height: 100%; transition: opacity 200ms; -webkit-user-drag: none; }
.r-slide img:not([src]) { visibility: hidden; }
.r-slide img.stale { opacity: 0.5; }
.remote[data-drive="true"] .r-slide { box-shadow: 0 0 0 1px var(--line), var(--depth); }
.r-slide.pointing { box-shadow: 0 0 0 1.5px var(--laser); }
.r-pointer {
  position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; pointer-events: none;
  background: var(--laser); box-shadow: 0 0 0 4px rgb(255 77 46 / 0.25), 0 0 14px rgb(255 77 46 / 0.6); opacity: 0; transition: opacity 150ms;
}
.r-slide.pointing .r-pointer { opacity: 1; }
.r-hint { display: none; margin-top: -4px; color: var(--text-3); font-size: 13px; text-align: center; }
.remote[data-drive="true"] .r-hint { display: block; }

.r-notes { flex: 1; min-height: 0; display: flex; flex-direction: column; border-radius: 20px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.r-notes-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 0 18px; color: var(--text-3); font-size: 13.5px; }
.r-notes-tools { display: flex; }
.r-notes-text {
  --note-size: 18px; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 18px 18px;
  color: var(--heading); font-size: var(--note-size); line-height: 1.5; letter-spacing: -0.02em; white-space: pre-wrap; user-select: text; -webkit-user-select: text;
}
.r-notes-text.empty { color: var(--text-3); font-size: 15px; }

.r-nav { display: none; grid-template-columns: 1fr 1.5fr; gap: 10px; }
.remote[data-drive="true"] .r-nav { display: grid; }
.remote:not([data-state="live"]) .r-nav { opacity: 0.35; pointer-events: none; }

.r-overlay { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 32px; background: rgb(247 247 247 / 0.86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
@media (prefers-color-scheme: dark) { .r-overlay { background: rgb(8 9 12 / 0.86); } }
.r-overlay-card { display: grid; gap: 6px; max-width: 280px; color: var(--text-2); font-size: 15.5px; text-align: center; text-wrap: balance; }
.overlay-title { color: var(--heading); font-size: 22px; font-weight: 600; letter-spacing: -0.05em; }

.sheet-scrim { position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; background: rgb(8 9 12 / 0.35); animation: fade 200ms ease; }
.sheet { width: 100%; max-height: 88dvh; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); border-radius: 24px 24px 0 0; background: var(--surface); box-shadow: 0 -1px 0 var(--line); animation: up 320ms var(--ease); }
@keyframes up { from { translate: 0 32px; opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 4px 20px; }
.sheet-head h2 { color: var(--heading); font-size: 18px; font-weight: 600; letter-spacing: -0.04em; }
.sheet-body { display: grid; gap: 24px; padding: 8px 20px 20px; overflow-y: auto; }
.sheet-section { display: grid; gap: 10px; }
#adminSections { display: grid; gap: 24px; }
#adminSections:empty { display: none; }
.sheet-section h3 { color: var(--text-3); font-size: 13.5px; font-weight: 500; }
.field-row { display: flex; align-items: center; gap: 10px; }
.field-row .input { height: 48px; }
.role-tag { flex: none; padding: 6px 10px; border-radius: 9px; background: var(--hover); color: var(--text-2); font-size: 13px; font-weight: 600; }
.list { display: grid; margin: 0 -8px; }
.list-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px; border: 0; border-radius: 14px; background: transparent; color: var(--ink); font: inherit; text-align: left; }
button.list-row { cursor: pointer; }
button.list-row:active { background: var(--hover); }
.list-row[aria-current="true"] { background: var(--hover); }
.list-row[data-online="false"] { opacity: 0.5; }
.list-text { flex: 1; min-width: 0; display: grid; }
.list-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--heading); font-size: 15.5px; font-weight: 600; letter-spacing: -0.03em; }
.list-sub { color: var(--text-3); font-size: 13.5px; }
.sheet .setting + .setting { border-top: 1px solid var(--line); }
.leave { justify-self: center; color: var(--danger); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
