:root {
  color-scheme: dark;
  --bg: #101013;
  --surface: #1b1b20;
  --ink: #f5f3ee;
  --muted: #b6b4bf;
  --line: #393940;
  --lime: #d3ff78;
  --paper: #f5f3ee;
  --dark: #171813;
  --sans: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
body:has(.chat-shell[open]) { overflow: hidden; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 5px; }
button, input { font: inherit; }
button, a, input, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: wait; }
button, input { border-radius: 0; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--lime); outline-offset: 5px; }
::selection { background: var(--lime); color: var(--bg); }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 3000; padding: 12px 20px; color: var(--bg); background: var(--lime); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header, main, .site-footer { width: min(1240px, calc(100% - 96px)); margin-inline: auto; }
.site-header { min-height: 106px; display: flex; align-items: center; justify-content: space-between; gap: 32px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: baseline; gap: 3px; color: var(--ink); text-decoration: none; font-size: 38px; font-weight: 900; letter-spacing: -.075em; line-height: 1; }
.brand-dot { color: var(--lime); }
.header-nav { display: flex; align-items: center; gap: 30px; }
.header-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; color: #d8d6df; text-decoration: none; }
.header-nav a:hover { color: var(--lime); }
.header-nav a:last-child { padding-inline: 18px; border: 1px solid #53633e; color: var(--lime); }
.hero { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 80px; min-height: 650px; padding: 88px 0 96px; }
.hero-copy { position: relative; min-width: 0; }
.hero-copy::before { content: "+"; position: absolute; top: 15px; right: 15px; color: #373841; font: 28px var(--mono); }
.eyebrow { display: block; margin-bottom: 26px; color: var(--lime); font: 11px/1.5 var(--mono); font-weight: 600; letter-spacing: .15em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 9ch; margin-bottom: 28px; font-size: clamp(64px, 7.4vw, 104px); font-weight: 750; line-height: .99; letter-spacing: -.075em; text-wrap: balance; }
h1 .accent { color: var(--lime); }
.hero-description { max-width: 430px; margin-bottom: 27px; color: #bcc3b4; font-size: 18px; line-height: 1.65; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 30px; }
.hero-tags span { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font: 11px/1.8 var(--mono); }
.hero-tags span::before { content: "/"; color: var(--lime); }
.text-link { display: inline-flex; align-items: center; gap: 14px; min-height: 44px; color: var(--ink); font-size: 13px; text-decoration: none; }
.text-link:hover { color: var(--lime); }

.join-card { position: relative; padding: 34px 34px 0; background: var(--paper); color: var(--dark); box-shadow: 8px 8px 0 var(--lime); }
.join-card::before { content: ""; position: absolute; width: 13px; height: 13px; right: -1px; top: -1px; background: var(--bg); border-left: 1px solid var(--bg); border-bottom: 1px solid var(--bg); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 36px; }
.room-badge { display: inline-flex; align-items: center; min-height: 30px; padding: 5px 11px; background: #e0e6d6; color: #374a22; font: 12px/1.5 var(--mono); }
.small-label { color: #6d7565; font: 10px/1.4 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.join-card h2 { margin-bottom: 9px; font-size: 29px; line-height: 1.15; letter-spacing: -.045em; }
.card-description { margin-bottom: 26px; color: #636c58; font-size: 14px; line-height: 1.6; }
#join-form > label[for="nickname"] { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 650; }
.nick-input-wrap { display: flex; align-items: center; height: 58px; border: 1px solid #a9b29c; background: #fffef8; }
.nick-input-wrap:focus-within { outline: 2px solid #526d2d; outline-offset: 2px; }
.nick-symbol { flex: 0 0 38px; text-align: center; color: #85956d; font: 20px var(--mono); }
#nickname { width: 100%; min-width: 0; height: 100%; padding: 0 8px 0 0; border: 0; outline: none; background: transparent; color: var(--dark); font: 17px var(--mono); }
#nickname::placeholder { color: #9ca491; font: 15px var(--sans); }
#random-nick { flex: 0 0 48px; min-width: 44px; min-height: 44px; border: 0; border-left: 1px solid #d9dfd0; background: transparent; color: #4d6036; font-size: 23px; }
#random-nick:hover { background: #e5ecd9; }
.field-error { margin: 9px 0 0; color: #a12a20; font-size: 12px; line-height: 1.5; }
.remember-label { display: flex; align-items: center; gap: 9px; min-height: 44px; margin: 9px 0 11px; color: #68725d; font-size: 12px; cursor: pointer; }
.remember-label input { width: 15px; height: 15px; margin: 0; accent-color: #496321; }
.primary-button { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 57px; padding: 15px 21px; border: 1px solid var(--bg); background: var(--bg); color: var(--paper); font-size: 15px; font-weight: 650; transition: background .15s, color .15s; }
.primary-button:hover { background: #2b3821; border-color: #2b3821; }
.join-card button:focus-visible, .join-card a:focus-visible, .join-card input:focus-visible { outline-color: #526d2d; }
.entry-note { margin: 15px 0 26px; color: #7b836f; font-size: 11px; line-height: 1.65; }
.entry-note a { color: #4b6231; }
.nick-help { margin: 6px 0 0; color: #636c58; }
.card-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-inline: -34px; padding: 15px 34px; border-top: 1px solid #d5dbcc; color: #6d775e; font: 10px/1.7 var(--mono); }
.card-footer a { min-height: 44px; display: inline-flex; align-items: center; color: #43562c; }

.sala-strip { display: grid; grid-template-columns: 1fr 1.25fr 1.75fr auto; align-items: center; gap: 28px; padding: 27px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.strip-label { color: var(--muted); font: 10px/1.6 var(--mono); letter-spacing: .13em; text-transform: uppercase; }
.sala-strip strong { color: var(--lime); font: 25px/1.2 var(--mono); letter-spacing: -.06em; }
.sala-strip p { max-width: 300px; margin: 0; color: #b6b4bf; font-size: 13px; line-height: 1.7; }
.sala-strip a { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; color: #dce4d3; }
.about-section { padding: 100px 0 92px; }
.section-heading .eyebrow { margin-bottom: 18px; }
.section-heading h2 { max-width: 720px; margin-bottom: 40px; font-size: clamp(30px, 4vw, 48px); font-weight: 550; line-height: 1.17; letter-spacing: -.05em; text-wrap: balance; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 42px; counter-reset: principle; }
.principles article { position: relative; padding-top: 30px; border-top: 1px solid var(--line); }
.principles article::before { counter-increment: principle; content: "0" counter(principle); display: block; margin-bottom: 24px; color: #7d9263; font: 11px/1 var(--mono); }
.principles h3 { margin-bottom: 12px; font-size: 18px; font-weight: 550; letter-spacing: -.02em; }
.principles p { max-width: 330px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.faq-section { display: grid; grid-template-columns: .85fr 1.15fr; gap: 80px; padding: 70px 0 95px; border-top: 1px solid var(--line); }
.faq-section .section-heading h2 { max-width: 310px; }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary { position: relative; display: block; padding: 22px 36px 22px 0; color: #dce2d3; font-size: 14px; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; top: 20px; right: 4px; color: var(--lime); font: 22px/1.2 var(--mono); }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details[open] summary { color: var(--lime); }
.faq-list details p { margin: 0 28px 25px 0; color: var(--muted); font-size: 13px; line-height: 1.85; }
.faq-list details p a { color: #dce2d3; }
.connection-data { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 22px; }
.connection-data div { padding: 10px 14px; background: var(--surface); }
.connection-data dt { color: var(--muted); font-size: 11px; }
.connection-data dd { margin: 2px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.rules ul { margin: 0 0 22px; padding-inline-start: 22px; color: var(--muted); font-size: 14px; }
.rules li + li { margin-top: 9px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 29px 0 36px; border-top: 1px solid var(--line); }
.footer-brand { color: #b4bfaa; font: 11px/1.8 var(--mono); }
.footer-brand strong { margin-right: 15px; color: var(--ink); font: 700 22px/1 var(--sans); letter-spacing: -.06em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.footer-links a, .footer-links button { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: #b6b4bf; font-size: 11px; text-decoration: none; }
.footer-links a:hover, .footer-links button:hover { color: var(--lime); }

.chat-shell { width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: none; padding: 0; margin: 0; border: 0; color: var(--ink); background: var(--bg); }
.chat-shell[open] { display: flex; flex-direction: column; }
.chat-toolbar, .chat-content { width: min(100%, 960px); margin-inline: auto; padding-inline: clamp(14px, 4vw, 34px); }
.chat-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.chat-toolbar h2 { margin: 0; color: var(--lime); font: 25px/1.3 var(--mono); }
.chat-toolbar button, .chat-compose button { min-height: 44px; padding: 9px 16px; border: 1px solid #647653; background: var(--surface); color: var(--ink); }
.chat-toolbar button:hover, .chat-compose button:hover { color: var(--lime); border-color: var(--lime); }
.chat-content { display: flex; flex: 1; flex-direction: column; min-height: 0; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.chat-status { margin: 12px 0; color: var(--muted); font-size: 14px; }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; margin: 0; padding: 8px 12px; list-style: none; border: 1px solid var(--line); background: var(--surface); }
.chat-log li { display: grid; grid-template-columns: minmax(0, 10rem) minmax(0, 1fr); gap: 10px; padding-block: 8px; overflow-wrap: anywhere; }
.chat-log li + li { border-top: 1px solid var(--line); }
.chat-log strong { color: var(--lime); font: 600 13px/1.6 var(--mono); }
.chat-compose { margin-top: 12px; }
.chat-compose label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.chat-compose div { display: flex; gap: 8px; }
.chat-compose input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid #647653; color: var(--ink); background: var(--surface); }

@media (min-width: 1500px) {
  .hero { min-height: 700px; }
  h1 { font-size: 112px; }
}
@media (max-width: 1080px) {
  .site-header, main, .site-footer { width: calc(100% - 64px); }
  .hero { gap: 48px; }
  h1 { font-size: clamp(60px, 8vw, 90px); }
  .join-card { padding: 28px 26px 0; }
  .card-footer { margin-inline: -26px; padding-inline: 26px; }
  .sala-strip { grid-template-columns: .8fr 1.2fr 1.5fr; gap: 20px; }
  .sala-strip a { grid-column: 3; justify-self: start; margin-top: -8px; }
  .faq-section { gap: 48px; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 20px; }
  .site-header, main, .site-footer { width: calc(100% - 40px); }
  .site-header { min-height: 84px; gap: 20px; }
  .brand { font-size: 33px; }
  .header-nav { gap: 16px; }
  .header-nav a { font-size: 12px; }
  .header-nav a:first-child { display: none; }
  .header-nav a:last-child { padding-inline: 12px; }
  .hero { grid-template-columns: 1fr; gap: 46px; min-height: auto; padding: 53px 0 66px; }
  .hero-copy::before { right: 6px; top: 3px; font-size: 22px; }
  .eyebrow { margin-bottom: 22px; font-size: 10px; letter-spacing: .12em; }
  h1 { max-width: 10ch; margin-bottom: 22px; font-size: clamp(64px, 15vw, 96px); line-height: .99; }
  .hero-description { max-width: 440px; font-size: 16px; }
  .hero-tags { gap: 6px 14px; margin-bottom: 16px; }
  .hero-tags span { font-size: 10px; }
  .join-card { width: calc(100% - 6px); padding: 28px 25px 0; box-shadow: 6px 6px 0 var(--lime); }
  .card-top { margin-bottom: 27px; }
  .card-footer { margin-inline: -25px; padding-inline: 25px; }
  .sala-strip { grid-template-columns: 1fr auto; gap: 12px 20px; padding: 24px 0; }
  .sala-strip strong { font-size: 25px; }
  .sala-strip p { grid-column: 1 / -1; max-width: none; }
  .sala-strip a { grid-column: 1 / -1; margin: 0; }
  .about-section { padding: 65px 0; }
  .section-heading h2 { margin-bottom: 32px; font-size: 34px; }
  .principles { grid-template-columns: 1fr; gap: 30px; }
  .principles article { padding: 23px 0 0 40px; }
  .principles article::before { position: absolute; top: 29px; left: 0; }
  .principles p { max-width: 540px; }
  .faq-section { grid-template-columns: 1fr; gap: 0; padding: 55px 0 64px; }
  .faq-section .section-heading h2 { max-width: none; }
  .faq-list summary { padding-block: 20px; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 12px; padding-block: 26px; }
  .footer-links { gap: 4px 24px; }
  .chat-log li { grid-template-columns: minmax(0, 1fr); gap: 3px; }
}
@media (max-width: 360px) {
  .site-header, main, .site-footer { width: calc(100% - 32px); }
  h1 { font-size: 59px; }
  .join-card { padding-inline: 20px; }
  .card-footer { margin-inline: -20px; padding-inline: 20px; }
  .small-label { font-size: 9px; }
  .hero-tags { gap: 6px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.card-footer a { text-underline-offset: 3px; }
.status-section { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(24px, 6vw, 90px); padding-block: clamp(45px, 8vw, 90px); border-bottom: 1px solid var(--line); }
.status-panel { border: 1px solid var(--line); background: var(--surface); }
.status-heading { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 20px; }
.status-heading > div { flex: 1 1 16rem; min-width: 0; }
.status-heading p { margin: 0 0 6px; }
.status-heading p:first-child { color: var(--lime); }
.status-heading time, .status-note { color: var(--muted); font-size: 13px; }
.status-heading button { min-height: 44px; padding: 8px 12px; border: 1px solid var(--lime); background: transparent; color: var(--lime); font-weight: 650; }
.status-heading button:hover:enabled { background: var(--lime); color: var(--dark); }
.status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-block: 1px solid var(--line); }
.status-grid div { padding: 15px 20px; }
.status-grid div + div { border-inline-start: 1px solid var(--line); }
.status-grid dt { color: var(--muted); font-size: 13px; }
.status-grid dd { margin: 0; color: var(--ink); font: 28px/1.4 var(--mono); font-variant-numeric: tabular-nums; }
.status-note { margin: 0; padding: 12px 20px; }
.channel-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; padding: 12px 20px; border-top: 1px solid var(--line); }
.channel-row strong { color: var(--lime); }
.channel-row span:not([aria-hidden]) { flex: 1 1 12rem; font-size: 14px; }
.channel-row a { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; }
.guide-hero { padding-block: clamp(48px, 9vw, 100px) 35px; }
.guide-hero h1 { max-width: 13ch; }
.guide-hero .hero-description { margin-bottom: 0; }
.guide-grid { display: grid; grid-template-columns: minmax(10rem, .65fr) minmax(0, 2fr); gap: clamp(24px, 6vw, 100px); padding-block: 24px 72px; border-top: 1px solid var(--line); }
.guide-nav { display: flex; flex-direction: column; align-items: start; }
.guide-nav .eyebrow { margin: 12px 0 5px; }
.guide-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.guide-content section { padding: 12px 0 23px; scroll-margin-top: 22px; }
.guide-content section + section { border-top: 1px solid var(--line); }
.guide-content h2 { margin: 0 0 10px; font-size: clamp(23px, 4vw, 35px); line-height: 1.16; letter-spacing: -.045em; }
.guide-content p, .command-list dd { color: var(--muted); }
.guide-content a, .guide-content strong { color: var(--ink); }
.guide-content code { font-family: var(--mono); overflow-wrap: anywhere; }
.command-list { margin-block: 16px 0; }
.command-list div { display: grid; grid-template-columns: minmax(8rem, .8fr) minmax(0, 1.2fr); gap: 8px 20px; padding: 10px 0; border-top: 1px solid var(--line); }
.command-list dd { margin: 0; }

@media (max-width: 730px) {
  .status-section, .guide-grid { grid-template-columns: 1fr; }
  .guide-nav { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
}

@media (max-width: 460px) {
  .command-list div { grid-template-columns: 1fr; gap: 3px; }
  .guide-hero h1 { font-size: clamp(42px, 12vw, 64px); }
}
