

:root {
  
  --bg:           #0e1014;
  --bg-elev:      #14171d;
  --bg-elev-2:    #1a1e25;
  --text:         #d0d4dc;
  --text-muted:   #8693a3;
  --text-faint:   #667186;
  --rule:         #232830;
  --rule-soft:    #181c22;
  --accent:       #6e84a0;
  --accent-hi:    #8da3bf;
  --danger:       #b66660;
  --warn:         #c2a25c;
  --qmark-target-filter: invert(1);
  --floating-control-bg: rgba(14, 16, 20, 0.85);
  --floating-control-bg-hover: rgba(14, 16, 20, 0.95);
  --shadow-strong: 0 24px 70px rgba(0,0,0,0.42);
  --panel-bg: rgba(20, 23, 29, 0.68);

  --font-sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "IBM Plex Sans", sans-serif;
  --font-mono:  ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", "Courier New", "IBM Plex Mono", monospace;
  --font-serif: Georgia, "Times New Roman", "Songti SC", "Source Han Serif SC", "Noto Serif CJK SC", "EB Garamond", serif;

  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 6px;

  --sidebar-w: 300px;
  --sidebar-right-w: 0px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg:           #f6f3ec;
  --bg-elev:      #ebe6dc;
  --bg-elev-2:    #ded7ca;
  --text:         #20242b;
  --text-muted:   #5f6875;
  --text-faint:   #707984;
  --rule:         #cdc5b8;
  --rule-soft:    #e3dbcf;
  --accent:       #60738a;
  --accent-hi:    #40566e;
  --danger:       #a34f4c;
  --warn:         #9a772e;
  --qmark-target-filter: none;
  --floating-control-bg: rgba(246, 243, 236, 0.86);
  --floating-control-bg-hover: rgba(246, 243, 236, 0.96);
  --panel-bg: rgba(235, 230, 220, 0.76);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color .15s ease, border-color .15s ease;
}
a:hover { color: var(--accent-hi); border-bottom-color: var(--accent); }
button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 1px solid var(--accent-hi);
  outline-offset: 3px;
}
::selection { background: var(--accent); color: var(--bg); }
img, svg { display: block; max-width: 100%; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
  #app.is-ready { animation: none; opacity: 1; }
  .boot-status { animation-delay: 0s; }
}

.mono  { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }
.serif { font-family: var(--font-serif); }
.faint { color: var(--text-faint); }
.muted { color: var(--text-muted); }

#onboarding {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
}
#onboarding[hidden] { display: none; }

.onboard-frame {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.step {
  display: none;
  flex-direction: column;
  gap: 18px;
  animation: stepFade .35s ease both;
}
.step.active { display: flex; }
@keyframes stepFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.step-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text-faint);
}
.step-title {
  font-size: clamp(22px, 4.2vw, 28px);
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.005em;
}

.lang-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.lang-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: transparent;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: border-color .15s ease, background .15s ease;
}
.lang-row:hover { border-color: var(--text-faint); background: var(--bg-elev); }
.lang-row.selected { border-color: var(--accent); background: var(--bg-elev); }
.lang-row .lr-name { font-size: 17px; font-weight: 500; }
.lang-row .lr-code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}
.lang-row.note {
  cursor: default;
  border-style: dashed;
  border-color: var(--rule);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
}
.lang-row.note:hover { background: transparent; border-color: var(--rule); }

.tos-frame { display: flex; flex-direction: column; gap: 14px; }
.tos-content {
  max-height: 320px;
  overflow-y: auto;
  padding: 18px 18px 22px;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--bg-elev);
  font-size: 14px;
  line-height: 1.7;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}
.tos-content::-webkit-scrollbar { width: 8px; }
.tos-content::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 4px; }
.tos-content h1 { font-size: 18px; font-weight: 500; margin: 0 0 12px; }
.tos-content h2 { font-size: 15px; font-weight: 500; margin: 18px 0 8px; color: var(--text); }
.tos-content h3 { font-size: 14px; font-weight: 500; margin: 14px 0 6px; }
.tos-content p, .tos-content ul { margin: 6px 0; color: var(--text-muted); }
.tos-content ul { padding-left: 18px; }
.tos-content li { margin: 4px 0; }
.tos-content code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 1px 6px;
  background: var(--bg-elev-2);
  border-radius: var(--r-sm);
  color: var(--text);
}
.tos-content strong { color: var(--text); font-weight: 500; }

.tos-gate {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.tos-flag { display: inline-flex; align-items: center; gap: 8px; }
.tos-flag::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-elev-2);
  border: 1px solid var(--rule);
}
.tos-flag.on::before { background: var(--accent); border-color: var(--accent); }
.tos-timer-track {
  flex: 1;
  height: 3px;
  background: var(--rule);
  position: relative;
  overflow: hidden;
  border-radius: 999px;
}
.tos-timer-fill {
  position: absolute; left: 0; top: 0; height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .12s linear;
}

.tos-fast-confirm {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.tos-fast-confirm input {
  margin-top: 2px;
  accent-color: var(--accent);
}
.tos-fast-confirm:has(input:disabled) {
  color: var(--text-faint);
  cursor: not-allowed;
  opacity: .72;
}
.tos-fast-confirm input:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 2px;
}

.tos-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: rgba(14, 16, 20, 0.86);
  backdrop-filter: blur(4px);
}
.tos-readonly-panel {
  position: relative;
  width: min(620px, 100%);
  max-height: 80vh;
  overflow: auto;
  padding: 28px 28px 22px;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--bg);
}
.tos-readonly-content {
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
}
.tos-overlay-close,
.subsite-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  letter-spacing: .04em;
}
.tos-overlay-close:hover,
.subsite-modal-close:hover { color: var(--text); border-color: var(--text-faint); background: var(--bg-elev-2); }

.storage-lead { color: var(--text); margin: 0; font-size: 14px; line-height: 1.7; max-width: 52ch; }
.storage-fine { font-size: 13px; color: var(--text-muted); margin: 0; line-height: 1.7; max-width: 52ch; }
.storage-deny-note {
  font-size: 13px;
  color: var(--text-faint);
  margin: 10px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--rule-soft);
  line-height: 1.7;
  max-width: 52ch;
}

.step-cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
}
.step-dots { display: flex; gap: 6px; }
.step-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--rule);
  transition: background .2s ease;
}
.step-dot.active { background: var(--text); }
.step-dot.done   { background: var(--text-faint); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { border-color: var(--text-faint); background: var(--bg-elev); }
.btn:disabled { color: var(--text-faint); cursor: not-allowed; border-color: var(--rule-soft); background: transparent; }
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: var(--bg); }
.btn-primary:disabled { background: var(--rule); color: var(--text-faint); border-color: var(--rule); }
.btn-ghost { border-color: transparent; padding: 11px 4px; }
.btn-ghost:hover { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-danger:hover { border-color: var(--danger); color: var(--danger); background: transparent; }

#app { position: relative; opacity: 0; }
#app.is-ready { animation: appFadeIn .26s ease forwards; }
#app[hidden] { display: none; }
@keyframes appFadeIn { from { opacity: 0; } to { opacity: 1; } }

.sidebar {
  position: fixed;
  top: 0;
  height: 100vh;
  background: var(--bg);
  z-index: 30;
  will-change: transform;
}
.sidebar-left {
  left: 0;
  width: var(--sidebar-w);
  border-right: 1px solid var(--rule-soft);
  transform: translateX(-100%);
}
.sidebar-right {
  right: 0;
  width: var(--sidebar-right-w);
  border-left: 1px solid var(--rule-soft);
  transform: translateX(100%);
}
.sidebar-inner {
  position: relative;
  height: 100%;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.sidebar-left .sidebar-inner { padding: 32px 28px; }
.sidebar-right .sidebar-inner { padding: 38px 22px 28px; gap: 14px; }
.sidebar-left .sidebar-inner {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sidebar-left .sidebar-inner::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.sidebar-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: var(--text-faint);
  text-transform: lowercase;
  margin: 0;
}

.sidebar-avatar-slot {
  
  width: 56px;
  height: 56px;
}

.sidebar-name {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.005em;
}
.sidebar-handle {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  margin: -16px 0 0;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 0;
  color: var(--text-muted);
  font-size: 14px;
  letter-spacing: 0.005em;
}
.nav a::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 1px;
  background: var(--rule);
  transition: background .2s ease, width .2s ease;
}
.nav a:hover { color: var(--text); }
.nav a:hover::before { background: var(--text-faint); width: 18px; }
.nav a.current { color: var(--text); }
.nav a.current::before { background: var(--accent); width: 22px; }

.sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--rule-soft);
}
.sidebar-foot button,
.sidebar-foot a {
  text-align: left;
  font-size: 12px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  border-bottom: 0;
}
.sidebar-foot button:hover,
.sidebar-foot a:hover { color: var(--text); }
.sidebar-foot .terms-attention,
.act-foot .terms-attention {
  color: var(--danger);
}
.sidebar-foot .terms-attention::after,
.act-foot .terms-attention::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 6px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
}
.lang-toggle,
.theme-toggle { width: max-content; }

main.scroll { display: block; }

.landing {
  position: relative;
  height: 100vh;
  overflow: hidden;
}
.landing-stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.6vw, 16px);
  text-align: center;
  padding: clamp(32px, 6vw, 64px) 24px;
}
body.is-landed .landing {
  height: 0 !important;
  pointer-events: none;
}

.landing-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--text-faint);
  text-transform: lowercase;
}
.landing-name {
  font-size: clamp(28px, 5.5vw, 42px);
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0;
}
.landing-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--text-muted);
  margin: 0;
  max-width: 32ch;
  letter-spacing: 0.005em;
}

.landing-intro {
  max-width: clamp(28ch, 50vw, 52ch);
  margin: 2px 0 0;
}
.landing-intro p {
  font-size: clamp(12.5px, 1.4vw, 14.5px);
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0 0 6px;
  text-align: center;
}
.landing-intro p:first-child { color: var(--text); }
.landing-intro p:last-child  { margin-bottom: 0; }

.contact-list.landing-contacts {
  align-items: center;
  font-family: var(--font-mono);
  font-size: clamp(11.5px, 1.3vw, 13px);
  letter-spacing: 0.01em;
  gap: 5px;
  margin: 2px 0 0;
}
.contact-list.landing-contacts .contact-row {
  flex-wrap: nowrap;
  white-space: nowrap;
}

.landing-hint {
  margin-top: clamp(10px, 2vw, 20px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 4px 0;
}
.landing-hint:hover { color: var(--text-muted); }
.landing-hint::before,
.landing-hint::after {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--rule);
}

.backing-board {
  position: relative;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.025), rgba(0,0,0,0.05)),
    var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.018),
    inset 0 0 22px rgba(0,0,0,0.25);
  flex-shrink: 0;
}
.landing-board {
  
  width: min(clamp(220px, 28vw, 320px), 38vh);
  aspect-ratio: 1 / 1;
  height: auto;
}
.sidebar-board {
  
  width: 200px;
  height: 200px;
  align-self: center;
}

.act {
  padding-top: clamp(60px, 10vw, 120px);
  padding-right: calc(var(--sidebar-right-w) + clamp(20px, 4vw, 48px));
  padding-bottom: clamp(48px, 8vw, 80px);
  padding-left: calc(var(--sidebar-w) + clamp(24px, 5vw, 60px));
  max-width: 100%;
  scroll-margin-top: 60px;
}
.act-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text-faint);
  text-transform: lowercase;
  margin-bottom: 14px;
}
.act-h {
  font-size: clamp(22px, 4.5vw, 32px);
  font-weight: 500;
  margin: 0 0 clamp(20px, 3vw, 32px);
  letter-spacing: -0.01em;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
}
.contact-list .contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  min-width: 0;
}
.contact-list .contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--text-faint);
  flex-shrink: 0;
  transition: color .15s ease;
}
.contact-list .contact-icon svg { width: 100%; height: 100%; overflow: visible; }
.contact-list .contact-row:hover .contact-icon { color: var(--text-muted); }
.contact-list .contact-val {
  color: var(--text-muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  display: grid;
  gap: 1px;
}
.contact-list .contact-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.contact-list .contact-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contact-list .contact-val a {
  color: var(--text-muted);
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-bottom-color .15s ease;
}
.contact-list .contact-val a:hover {
  color: var(--text);
  border-bottom-color: var(--rule);
}

.mystery-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-muted);
  margin: -8px 0 28px;
  letter-spacing: 0.01em;
  max-width: 52ch;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 14px;
  align-items: stretch;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100%;
  padding: 22px 26px 24px;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: transparent;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--text-faint); background: var(--bg-elev); }
.card-link {
  cursor: pointer;
  border-bottom: 1px solid var(--rule);
}
.card-link:hover {
  border-color: var(--accent);
  background: var(--bg-elev);
}
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}
.card-title {
  font-size: 19px;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.005em;
}
.card-subtitle {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  margin: 2px 0 12px;
  letter-spacing: 0.04em;
}
.card-status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.card-status.wip    { color: var(--warn);   border-color: rgba(194, 162, 92, 0.35); }
.card-status.alpha  { color: var(--accent-hi); border-color: rgba(141, 163, 191, 0.35); }
.card-status.stable { color: #88a98c; border-color: rgba(136, 169, 140, 0.35); }
.card-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
  max-width: 64ch;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
}
.card-action {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--rule-soft);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.card-action:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(255,255,255,0.018);
}
.card-action[target="_blank"]::after,
.credit-note a[target="_blank"]::after {
  content: '↗';
  display: inline-block;
  margin-left: 6px;
  color: var(--text-faint);
  font-size: 0.9em;
  transform: translateY(-1px);
}

.credits-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.credits-list li {
  display: grid;
  grid-template-columns: minmax(0, max-content) 1fr;
  gap: 18px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 14px;
}
.credits-list .credit-name { white-space: nowrap; }
.credits-list li:first-child { border-top: 1px solid var(--rule-soft); }
.credit-name { color: var(--text); font-weight: 500; }
.credit-note { color: var(--text-faint); font-size: 13px; }
.credit-note a { color: var(--text-muted); border-bottom-color: var(--rule); }

.act-foot {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--rule-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}
.act-foot a, .act-foot button {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  background: none; border: 0; padding: 0; cursor: pointer;
  border-bottom: 0;
}
.act-foot a:hover, .act-foot button:hover { color: var(--text); }
.act-foot .dot { color: var(--rule); margin: 0 6px; }

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

.avatar-frame {
  
  position: fixed;
  top: 0; left: 0;
  width:  608px;
  height: 608px;
  z-index: 60;
  will-change: transform;
  pointer-events: none;
  clip-path: circle(50% at 50% 50%);
  transition: clip-path .72s cubic-bezier(.55,.06,.68,.19);
}

.avatar-frame.released {
  
}
.avatar-stage {
  position: relative;
  width: 100%;
  height: 100%;
}
.mask-fill {
  position: absolute;
  inset: 0;
  background: #f4efe6;
  border-radius: 50%;
  z-index: 1;
  
  transform-origin: center top;
  transition: transform .72s cubic-bezier(.55,.06,.68,.19), opacity .5s ease .18s;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.04);
}

.mask-fill.restoring {
  transition: opacity .45s ease;
}
.circle-clip {
  position: absolute;
  inset: 0;
  border-radius: 0;
  overflow: visible;
  z-index: 2;
}

.qmark {
  position: absolute;
  transform-origin: center center;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}
.qmark { opacity: 0; }
.qmark.is-decoded { opacity: 1; }
.qmark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  transition: filter .6s ease;
}

body.physics-arming .qmark img,
body.physics-on     .qmark img { filter: var(--qmark-target-filter); }
body.physics-on {
  overflow-x: hidden;
  overscroll-behavior: none;
}

.qmark.phy {
  position: fixed !important;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  z-index: 9000;
  contain: layout paint;
  max-width: 90vw;
  max-height: 90vh;
  
}
.qmark.phy.dragging { cursor: grabbing; }
.avatar-cluster {
  position: absolute;
  inset: 0;
  display: block;
}
.glyph {
  position: absolute;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text);
  user-select: none;
  line-height: 1;
  transform-origin: center;
}
.glyph.dim { color: var(--text-faint); }
.glyph.hi  { color: var(--accent-hi); }

.screw {
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #20242b;
  border: 1px solid #11141a;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  padding: 0;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  z-index: 2;
  
  pointer-events: none;
  opacity: 0.35;
  transition: opacity .35s ease, transform .25s ease;
}
body.is-landed .screw {
  pointer-events: auto;
  opacity: 1;
}
.screw::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 6px;
  height: 1px;
  background: var(--text-faint);
  transform: translate(-50%, -50%) rotate(35deg);
}
.screw:hover::after { background: var(--text-muted); }
.screw.tl { top: -3px;    left: -3px; }
.screw.tr { top: -3px;    right: -3px; }
.screw.bl { bottom: -3px; left: -3px; }
.screw.br { bottom: -3px; right: -3px; }

.screw.loosening { transform: scale(1.15); }
.screw.loosening::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0.6;
  animation: screwRing .8s linear forwards;
}
@keyframes screwRing {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1);   opacity: 0.6; }
}

body.is-landed .screw:hover {
  background: #272c36;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 0 6px rgba(110,132,160,0.25);
  transform: scale(1.08);
}

.screw.removed {
  animation: screwOut .55s cubic-bezier(.4,.7,.4,1) forwards;
  pointer-events: none;
}
@keyframes screwOut {
  to {
    transform: rotate(540deg) translate(14px, 14px) scale(0.4);
    opacity: 0;
  }
}

.mobile-contacts-block { display: none; }
.mobile-contacts-block .act-eyebrow { margin-bottom: 12px; }
.mobile-contacts-block .contact-list { gap: 8px; }

@media (max-width: 1100px) {
  .act {
    padding-right: calc(var(--sidebar-right-w) + clamp(16px, 3vw, 28px));
    padding-left:  calc(var(--sidebar-w)       + clamp(20px, 3.5vw, 36px));
  }
}

@media (max-width: 900px) {
  .sidebar-right { display: none; }
  .mobile-contacts-block { display: none; }
  .act { padding-right: clamp(20px, 4vw, 40px); }
}

@media (max-width: 760px) {
  :root { --sidebar-w: 0px; }
  .act {
    padding-top: clamp(80px, 18vw, 110px);
    padding-right: clamp(20px, 5vw, 40px);
    padding-bottom: clamp(40px, 8vw, 64px);
    padding-left: clamp(20px, 5vw, 40px);
  }
  .sidebar-left {
    width: 100%;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--rule-soft);
    transform: translateY(-100%);
  }
  body.is-landed .sidebar-left { transform: translateY(0); }
  .sidebar-left .sidebar-inner {
    flex-direction: row;
    align-items: center;
    padding: 12px 18px;
    gap: 14px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .sidebar-left .sidebar-inner::-webkit-scrollbar { display: none; }
  .sidebar-board { width: 32px; height: 32px; }
  .sidebar-board .screw { width: 9px; height: 9px; }
  .sidebar-name { font-size: 14px; white-space: nowrap; }
  .sidebar-handle { display: none; }
  .nav {
    flex-direction: row;
    margin: 0 0 0 auto;
    gap: 14px;
    flex: 0 0 auto;
  }
  .nav a::before { display: none; }
  .nav a { padding: 4px 0; }
  .sidebar-foot {
    display: flex;
    flex-direction: row;
    margin-left: 12px;
    padding-top: 0;
    border-top: 0;
    gap: 12px;
    flex: 0 0 auto;
  }
  .sidebar-foot button:not(.lang-toggle):not(.theme-toggle):not(.terms-attention) { display: none; }

  .landing-stage { gap: 10px; padding: 32px 20px; }
  .step-title    { font-size: clamp(20px, 5vw, 24px); }
}

@media (max-width: 480px) {
  .credits-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .credit-note { font-size: 12.5px; }
}

.hitbox-btn {
  position: fixed;
  z-index: 65;
  transform: translate(-50%, -50%);
  padding: 8px 18px;
  background: var(--floating-control-bg);
  border: 1px solid var(--rule);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.hitbox-btn:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--floating-control-bg-hover);
}
.hitbox-btn.on {
  color: var(--bg);
  background: var(--accent-hi);
  border-color: var(--accent-hi);
}

.phys-extra-btn {
  font-size: 8.5px;
  padding: 5px 12px;
  letter-spacing: 0.18em;
  opacity: 0.7;
}
.phys-extra-btn:hover { opacity: 1; }

.debug-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 8999;
  display: none;
}
body.debug-on .debug-canvas { display: block; }

.sidebar-board {
  transition: background .8s ease, border-color .8s ease, box-shadow .8s ease;
}
body.physics-on .sidebar-board {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.physics-panel[hidden] { display: none !important; }
.physics-panel {
  position: relative;
  width: 100%;
  z-index: 45;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.018), rgba(0,0,0,0.045)),
    var(--panel-bg);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule-soft);
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.018);
  overflow: hidden;
  animation: physicsPlaqueIn .42s ease both;
}
@keyframes physicsPlaqueIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.physics-panel::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: var(--accent);
  opacity: .55;
}
.physics-panel-head {
  border-bottom: 1px solid var(--rule-soft);
}
.physics-panel-toggle {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px 10px 14px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-align: left;
}
.physics-panel-toggle:hover { color: var(--text); background: rgba(255,255,255,0.018); }
.physics-panel-title-wrap {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.physics-panel-kicker {
  color: var(--text-faint);
  font-size: 8.5px;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}
.physics-panel-title {
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.07em;
  line-height: 1.25;
}
.physics-panel-caret {
  color: var(--text-faint);
  font-size: 14px;
  letter-spacing: 0;
  flex: 0 0 auto;
}

.physics-panel-body {
  padding: 11px 12px 12px 14px;
  overflow: auto;
  max-height: min(42vh, 430px);
}
.physics-panel.collapsed .physics-panel-body { display: none; }

.physics-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 10px;
}
.physics-btn,
.physics-mini-btn {
  min-height: 29px;
  padding: 6px 8px;
  border: 1px solid var(--rule-soft);
  border-radius: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: left;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.physics-btn:hover,
.physics-mini-btn:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(255,255,255,0.022);
}
.physics-btn.on {
  color: var(--bg);
  background: var(--accent-hi);
  border-color: var(--accent-hi);
}

.physics-advanced {
  border-top: 1px solid var(--rule-soft);
  padding-top: 8px;
}
.physics-advanced summary {
  cursor: pointer;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.physics-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.physics-field {
  display: grid;
  gap: 3px;
}
.physics-field-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}
.physics-field output {
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.physics-field input[type="range"] {
  width: 100%;
  accent-color: var(--accent-hi);
}
.physics-checks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
}
.physics-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.physics-checks input { accent-color: var(--accent-hi); }

.physics-storage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--rule-soft);
}
.physics-mini-btn {
  text-align: center;
  min-height: 28px;
}
.physics-panel-hint,
.physics-panel-status {
  margin: 8px 0 0;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.5;
}
.physics-panel-status:empty { display: none; }

body.physics-arming .hitbox-btn,
body.physics-on .hitbox-btn {
  display: none !important;
}

@media (max-width: 760px) {
  .physics-panel {
    position: fixed;
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    width: auto;
    max-height: 72vh;
    z-index: 9100;
    border: 1px solid var(--rule);
    border-radius: var(--r-md);
    background: var(--floating-control-bg-hover);
    box-shadow: 0 18px 50px rgba(0,0,0,0.35);
    backdrop-filter: blur(10px);
  }
  .physics-panel::before {
    left: 12px;
    right: 12px;
    top: 0;
    bottom: auto;
    width: auto;
    height: 1px;
  }
  .physics-panel-body {
    max-height: calc(72vh - 47px);
  }
  .physics-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .physics-btn {
    min-height: 38px;
    text-align: center;
    font-size: 9.5px;
    letter-spacing: 0.08em;
  }
  .physics-mini-btn {
    min-height: 36px;
    font-size: 9.5px;
    letter-spacing: 0.08em;
  }
}

.sidebar-brand-link {
  display: block;
  width: max-content;
  color: inherit;
  text-decoration: none;
  border-bottom: 0;
}

.screw.is-static {
  cursor: default;
  pointer-events: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.shared-static-avatar {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.static-qmark img {
  filter: none;
}

html, body,
.sidebar, .sidebar-inner, .backing-board, .card, .card-action,
.tos-content, .subsite-modal-panel, .physics-panel,
.physics-btn, .physics-mini-btn, .lang-row,
.contact-list .contact-icon, .contact-list .contact-val,
.nav a, .sidebar-foot button, .sidebar-name-link {
  transition-property: background-color, color, border-color, box-shadow, opacity, transform, filter;
  transition-duration: .28s;
  transition-timing-function: ease;
}

.tos-read-unit {
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
  transition: text-decoration-color .18s ease, color .18s ease;
}
.tos-read-unit.is-read {
  color: var(--text);
  text-decoration-color: currentColor;
}
.tos-content.is-reading,
.subsite-terms-body {
  scroll-behavior: auto;
}

.sidebar-name-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 0;
}
.sidebar-name-link:hover { color: var(--accent-hi); }
.sidebar-board[aria-hidden="true"] { cursor: default; }
.sidebar-single .sidebar-inner {
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: none;       
  -ms-overflow-style: none;    
  overscroll-behavior: contain;
}
.sidebar-single .sidebar-inner::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;               
}
.sidebar-contacts-slot {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--rule-soft);
}
.sidebar-contacts-slot .contact-list { gap: 9px; }
.shared-avatar-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  pointer-events: none;
  user-select: none;
}

.physics-panel {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  z-index: 9100;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--floating-control-bg-hover);
  box-shadow: 0 18px 54px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.025);
  backdrop-filter: blur(12px);
  overflow: hidden;
  pointer-events: auto;
  touch-action: manipulation;
}
.physics-panel::before { display: none; }
.physics-panel-head {
  position: sticky;
  top: 0;
  z-index: 2;
  flex: 0 0 auto;
  background: var(--floating-control-bg-hover);
  border-bottom: 1px solid var(--rule-soft);
}
.physics-panel-toggle { min-height: 52px; padding: 12px 14px; }
.physics-panel-body {
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding: 13px 14px 14px;
  -webkit-overflow-scrolling: touch;
}
.physics-panel.collapsed { width: min(320px, calc(100vw - 32px)); }
.physics-panel.collapsed .physics-panel-body { display: none; }
.physics-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.physics-btn, .physics-mini-btn {
  min-height: 38px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
  line-height: 1.25;
}
.physics-fields { gap: 10px; }
.physics-field input[type="range"] { min-height: 28px; }
.physics-checks label { min-height: 28px; }
.physics-storage { gap: 8px; }

.subsite-contact-panel {
  max-width: 520px;
  border: 1px solid var(--rule-soft);
  border-radius: var(--r-md);
  padding: 18px;
  background: var(--bg-elev);
}
.subsite-step-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.card-action:disabled,
.btn:disabled {
  cursor: not-allowed;
  opacity: .45;
}

@media (max-width: 760px) {
  .sidebar-left .sidebar-inner { overflow-y: hidden; }
  .physics-panel {
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    width: auto;
    max-height: min(82dvh, 680px);
    border-radius: var(--r-md);
  }
  .physics-panel-body { max-height: calc(82dvh - 54px); }
  .physics-actions, .physics-storage { grid-template-columns: 1fr; }
  .physics-btn, .physics-mini-btn { min-height: 42px; }
}

.physics-panel-drag {
  height: 12px;
  flex: 0 0 auto;
  cursor: grab;
  touch-action: none;
  background: linear-gradient(to bottom, transparent 0 4px, var(--rule) 4px 5px, transparent 5px 100%);
  opacity: .72;
}
.physics-panel-drag:hover,
.physics-panel-drag:focus-visible {
  opacity: 1;
  background: linear-gradient(to bottom, transparent 0 4px, var(--accent-hi) 4px 5px, transparent 5px 100%);
}
.physics-panel.is-dragging {
  transition: none !important;
  user-select: none;
}
.physics-panel.is-dragging .physics-panel-drag { cursor: grabbing; }

.subsite-gate-dots {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
}
.subsite-gate-dots .step-dot {
  display: block;
  position: static;
}
.subsite-lang-list { margin-top: 2px; }
.subsite-modal[data-gate="true"] .subsite-modal-close { display: none; }
.subsite-modal[data-gate="true"] .subsite-modal-panel { max-width: min(640px, 100%); }
.subsite-terms-body.is-reading { scroll-behavior: auto; }

@media (max-width: 760px) {
  .physics-panel-drag { height: 18px; }
  .subsite-modal[data-gate="true"] .subsite-modal-panel { width: 100%; }
}

.build-stamp {
  margin-top: 10px;
  font-size: 10px;
  line-height: 1.35;
  color: var(--text-faint);
  letter-spacing: .02em;
  user-select: text;
}
.build-stamp::before { content: "版本 "; }

.single-sidebar-chrome .sidebar-right,
.sidebar-right:empty { display: none; }
.single-sidebar-chrome .act {
  padding-right: clamp(20px, 4vw, 48px);
}
.sidebar-left,
.sidebar-right {
  transition-property: background-color, color, border-color, box-shadow, opacity, filter;
}
.mobile-contacts-block,
.landing-contacts,
.sidebar-single .sidebar-contacts-slot {
  display: grid;
}
.sidebar-single .contact-list .contact-val {
  white-space: normal;
}

body.subsite-gate-open {
  overflow: hidden;
}
.subsite-modal[data-gate="true"] {
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  background: var(--bg);
  backdrop-filter: none;
}
.subsite-modal[data-gate="true"] .subsite-modal-panel {
  width: 100%;
  max-width: 560px;
  max-height: none;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  outline: 0;
}
.subsite-modal[data-gate="true"] .subsite-step-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text-faint);
  text-transform: lowercase;
  margin-bottom: 14px;
}
.subsite-modal[data-gate="true"] #subsiteTermsTitle {
  font-size: clamp(22px, 4.2vw, 28px);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 18px;
  letter-spacing: -0.005em;
}
.subsite-modal[data-gate="true"] .subsite-terms-body {
  max-height: 320px;
  overflow-y: auto;
  padding: 18px 18px 22px;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--bg-elev);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}
.subsite-modal[data-gate="true"] .subsite-gate-dots {
  margin: 0 0 18px;
}
.subsite-modal[data-gate="true"] .subsite-terms-actions {
  position: static;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin: 18px 0 0;
  padding-top: 0;
  background: transparent;
}

@media (max-width: 760px) {
  .sidebar-single .sidebar-contacts-slot {
    display: flex;
    align-items: center;
    padding-top: 0;
    border-top: 0;
    flex: 0 0 auto;
  }
  .sidebar-single .sidebar-contacts-slot .sidebar-eyebrow { display: none; }
  .sidebar-single .sidebar-contacts-slot .contact-list {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .sidebar-single .contact-label { display: none; }
  .sidebar-single .contact-value {
    max-width: 120px;
  }
  .subsite-modal[data-gate="true"] {
    padding: max(36px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  }
  .subsite-modal[data-gate="true"] .subsite-terms-body {
    max-height: 52dvh;
  }
}

.funding-progress-list {
  display: grid;
  gap: 14px;
}
.funding-progress {
  padding: 18px;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--bg-elev);
}
.funding-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.funding-track {
  position: relative;
  height: 4px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--rule-soft);
}
.funding-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

body.utility-page {
  min-height: 100vh;
}

.utility-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 20px;
}

.utility-state {
  width: min(720px, 100%);
  padding-top: 0;
  padding-bottom: 0;
}

.utility-log {
  min-height: 120px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--bg-elev);
  color: var(--text-muted);
  white-space: pre-wrap;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.contact-val {
  min-width: 0;
  flex: 1 1 auto;
}
.contact-copy {
  appearance: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font: 11px/1 var(--font-mono);
  padding: 5px 8px;
  cursor: pointer;
  flex: 0 0 auto;
}
.contact-copy:hover,
.contact-copy:focus-visible {
  color: var(--text);
  border-color: var(--accent);
}

@media (max-width: 760px) {
  .sidebar-left .sidebar-inner {
    padding: 10px 14px;
    gap: 10px;
    overflow: hidden;
  }
  .sidebar-board {
    width: 28px;
    height: 28px;
  }
  .sidebar-board .shared-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  .sidebar-name {
    font-size: 13px;
    max-width: 34vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nav {
    gap: 10px;
  }
  .nav a {
    font-size: 12.5px;
    white-space: nowrap;
  }
  .sidebar-contacts-slot {
    display: none;
  }
  .sidebar-foot {
    margin-left: auto;
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .nav {
    max-width: 46vw;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a {
    display: inline-flex;
    flex: 0 0 auto;
  }
  .sidebar-foot button {
    font-size: 12px;
    padding-inline: 8px;
  }
}

.noscript-fallback {
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 22px;
  color: var(--text);
}
.noscript-fallback h1 {
  margin: 0;
  font-size: clamp(32px, 8vw, 72px);
  font-weight: 500;
}
.noscript-fallback p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}
.noscript-fallback a {
  color: var(--accent-hi);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.boot-status {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--text-muted);
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  animation: bootStatusReveal .01s linear 1s forwards;
}
.boot-status.is-error {
  opacity: 1;
  visibility: visible;
  animation: none;
}
.boot-status[hidden] { display: none; }
@keyframes bootStatusReveal { to { opacity: 1; visibility: visible; } }
body.xdb-modal-open { overflow: hidden; touch-action: none; }
.temporary-mode-notice {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 1200;
  max-width: min(560px, calc(100vw - 32px));
  padding: 10px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--bg-elev);
  color: var(--text);
  box-shadow: var(--shadow-strong);
}
.xdb-storage-notice {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 70;
  width: min(360px, calc(100vw - 36px));
  padding: 13px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
  color: var(--text-muted);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(10px);
}
.xdb-storage-notice p {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.6;
}
.xdb-storage-notice-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.xdb-storage-notice button {
  padding: 6px 9px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 12px;
}
.xdb-storage-notice button:hover {
  border-color: var(--text-faint);
  color: var(--text);
  background: var(--bg-elev-2);
}
.xdb-storage-notice-clear { color: var(--danger) !important; }
@media (max-width: 760px) {
  .xdb-storage-notice {
    right: 12px;
    bottom: 12px;
    width: min(360px, calc(100vw - 24px));
  }
}
