:root {
  --bg: #0e1016;
  --bg-2: #151925;
  --card: #1a1f2d;
  --card-2: #212739;
  --line: #2b3247;
  --text: #eef1f7;
  --muted: #9aa3b8;
  --gold: #f6a623;
  --gold-2: #ffcf5a;
  --green: #3ddc84;
  --red: #ff5d6c;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 500px at 50% -150px, rgba(246, 166, 35, .16), transparent 70%),
    linear-gradient(var(--bg), var(--bg));
  color: var(--text);
  font-family: "Rubik", system-ui, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

img { image-rendering: pixelated; }

.gold { color: var(--gold); }

/* ---------------------------------------------------------------- header */

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(14, 16, 22, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }

.logo { display: block; height: 58px; width: auto; }

.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.ip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font: inherit; font-weight: 500; cursor: pointer; direction: ltr;
}
.ip:hover { border-color: var(--gold); }
.ip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #1b1200; border: 0; border-radius: 10px;
  padding: 9px 16px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, filter .12s ease;
}
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { filter: grayscale(.8) brightness(.7); cursor: not-allowed; transform: none; }
.btn.ghost { background: var(--card); color: var(--text); border: 1px solid var(--line); }
.btn.big { width: 100%; padding: 13px; font-size: 1.05rem; }

.badge {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: #1b1200; color: var(--gold-2); font-size: .8rem;
  display: inline-flex; align-items: center; justify-content: center;
}

:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }

/* ---------------------------------------------------------------- hero, player */

.hero { text-align: center; padding: 38px 0 18px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 800; }
.hero p { margin: 0; color: var(--muted); }

.player {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin: 18px 0; box-shadow: var(--shadow);
}
.avatar { width: 56px; height: 56px; border-radius: 10px; background: var(--card-2); flex: none; }
.player-form { flex: 1; min-width: 0; }
.player-form label { font-weight: 700; display: block; margin-bottom: 6px; }
.player-row { display: flex; gap: 8px; }
.player-row input {
  flex: 1; min-width: 0;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font: inherit; text-align: left;
}
.player-row input:focus { border-color: var(--gold); outline: none; }
.player.saved .player-row input { border-color: var(--green); }
.hint { margin: 6px 0 0; color: var(--muted); font-size: .88rem; }
.hint.error { color: var(--red); }

.demo {
  background: rgba(246, 166, 35, .12); border: 1px dashed var(--gold);
  color: var(--gold-2); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; font-size: .92rem;
}

/* ---------------------------------------------------------------- tabs, grid, cards */

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 18px; }
.tab {
  background: var(--card); color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 16px; font: inherit; font-weight: 500; cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"], .tab[aria-pressed="true"] { background: var(--gold); color: #1b1200; border-color: var(--gold); font-weight: 700; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; padding-bottom: 40px; }
.loading, .empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px 0; }

.card {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(246, 166, 35, .6); box-shadow: 0 12px 32px rgba(246, 166, 35, .12); }
.card-media { height: 110px; display: flex; align-items: center; justify-content: center; }
.card-media img { max-width: 100%; max-height: 110px; object-fit: contain; }
.card h3 { margin: 0; font-size: 1.15rem; }
.desc { color: var(--muted); font-size: .9rem; max-height: 9.5em; overflow: auto; }
.desc :is(p, ul) { margin: .3em 0; }
.desc ul { padding-inline-start: 1.2em; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-weight: 800; font-size: 1.2rem; color: var(--gold-2); }
.price s { color: var(--muted); font-weight: 400; font-size: .9rem; margin-inline-start: 6px; }
.sub { color: var(--muted); font-size: .8rem; font-weight: 400; }
.approx { color: var(--muted); font-size: .82rem; font-weight: 500; }
.cart-approx { margin: -6px 0 12px; text-align: left; }
.cart-approx:empty { display: none; }

/* ---------------------------------------------------------------- questions and answers */

.faq { padding: 10px 0 48px; scroll-margin-top: 90px; }
.faq h2 { font-size: 1.6rem; margin: 0 0 16px; text-align: center; }
.faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 820px; margin-inline: auto; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq-item[open] { border-color: rgba(246, 166, 35, .6); }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 14px 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--gold); font-size: 1.3rem; line-height: 1; transition: transform .15s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--gold-2); }
.faq-item p { margin: 0; padding: 0 16px 16px; color: var(--muted); }

html { scroll-behavior: smooth; }

/* ---------------------------------------------------------------- cart */

.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 30; }
.cart {
  position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 40;
  width: min(400px, 100%); background: var(--bg-2); border-inline-start: 1px solid var(--line);
  display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--line); }
.cart-head h2 { margin: 0; font-size: 1.2rem; }
.icon-btn { background: none; border: 0; color: var(--muted); font-size: 1.2rem; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.icon-btn:hover { color: var(--text); background: var(--card); }
.cart-items { flex: 1; overflow: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.cart-row { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.cart-row img { width: 48px; height: 32px; object-fit: contain; flex: none; }
.cart-row .name { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qty { display: inline-flex; align-items: center; gap: 4px; }
.qty button { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); cursor: pointer; font: inherit; }
.qty span { min-width: 20px; text-align: center; }
.cart-foot { border-top: 1px solid var(--line); padding: 16px; }
.total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; font-size: 1.1rem; }
.total strong { color: var(--gold-2); font-size: 1.35rem; }

/* ---------------------------------------------------------------- modal, toast, footer */

.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(0, 0, 0, .6); padding: 16px; }
.modal-card { background: var(--card); border: 1px solid var(--gold); border-radius: var(--radius); padding: 24px; max-width: 420px; text-align: center; box-shadow: var(--shadow); }
.modal-card h2 { margin-top: 0; color: var(--gold-2); }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60;
  background: var(--card-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 16px; box-shadow: var(--shadow); max-width: calc(100% - 32px);
}
.toast.error { border-color: var(--red); }

.foot { margin-top: auto; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; text-align: center; padding: 18px 0; }


/* ================================================================ site pages (v10) */

/* ---------------------------------------------------------------- navigation */

.top-row { flex-wrap: nowrap; }
.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: 8px; flex: 1; }
.nav a {
  color: var(--muted); text-decoration: none; font-weight: 500;
  padding: 8px 12px; border-radius: 10px; white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--card); }
.nav a[aria-current="page"] { color: var(--gold-2); background: rgba(246, 166, 35, .1); }
.nav-toggle { display: none; font-size: 1.4rem; }

.link { color: var(--gold-2); text-decoration: none; font-weight: 500; }
.link:hover { text-decoration: underline; }

.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot-row p { margin: 0; }
.foot-nav { display: flex; gap: 14px; }
.foot-nav a { color: var(--muted); text-decoration: none; }
.foot-nav a:hover { color: var(--gold-2); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.center { text-align: center; }

/* ---------------------------------------------------------------- main page */

.home-hero { text-align: center; padding: 42px 0 26px; }
.home-logo { width: min(460px, 86%); height: auto; filter: drop-shadow(0 12px 40px rgba(246, 166, 35, .25)); }
.home-tagline { color: var(--muted); font-size: 1.1rem; margin: 10px 0 14px; }
.online {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  background: rgba(61, 220, 132, .1); border: 1px solid rgba(61, 220, 132, .35); color: var(--green);
  border-radius: 999px; padding: 6px 14px; font-weight: 500;
}

.join { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; max-width: 820px; margin: 8px auto 0; }
.join-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-align: start; }
.join-label { color: var(--muted); font-size: .88rem; margin-bottom: 8px; }
.join-pair { display: flex; gap: 8px; }
.join-value {
  flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font: inherit; font-weight: 700; cursor: pointer; direction: ltr; width: 100%;
}
.join-value:hover { border-color: var(--gold); }
.join-value.port { flex: 0 0 auto; width: auto; direction: rtl; }
.join-copy { color: var(--gold-2); font-size: .8rem; font-weight: 500; }

.hub { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 16px 0 34px; }
.hub-card {
  position: relative; display: flex; flex-direction: column; gap: 14px; min-height: 230px;
  padding: 22px; border-radius: 18px; text-decoration: none; color: var(--text);
  background: linear-gradient(160deg, var(--card-2), var(--card));
  border: 1px solid var(--line); overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.hub-card::before {
  content: ""; position: absolute; inset: auto -40% -60% auto; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--accent, rgba(246, 166, 35, .22)), transparent);
  pointer-events: none;
}
.hub-card.store { --accent: rgba(246, 166, 35, .28); }
.hub-card.apply { --accent: rgba(246, 166, 35, .22); }
.hub-card.news { --accent: rgba(246, 166, 35, .22); }
.hub-card:hover { transform: translateY(-4px); border-color: rgba(246, 166, 35, .6); box-shadow: 0 16px 40px rgba(0, 0, 0, .4); }
.hub-icon { width: 76px; height: 76px; flex: none; display: grid; place-items: center; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--line); }
.hub-icon img { width: 52px; height: 52px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, .45)); }
.hub-icon.emoji { font-size: 2.4rem; }
.hub-text { display: flex; flex-direction: column; gap: 6px; }
.hub-title { font-size: 1.4rem; font-weight: 800; }
.hub-desc { color: var(--muted); }
.hub-go { margin-top: auto; color: var(--gold-2); font-size: 1.4rem; font-weight: 800; transition: transform .18s ease; }
.hub-card:hover .hub-go { transform: translateX(-6px); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-title { margin: 0 0 14px; font-size: 1.45rem; }
.section-head h2 { margin: 0; font-size: 1.45rem; }
.latest { padding-bottom: 46px; }

/* ---------------------------------------------------------------- news */

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.news-list { display: flex; flex-direction: column; gap: 16px; max-width: 820px; margin: 0 auto; padding-bottom: 46px; }
.news-card {
  display: flex; flex-direction: column; gap: 10px; color: var(--text); text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  scroll-margin-top: 100px; transition: border-color .15s ease, transform .15s ease;
}
a.news-card:hover { border-color: rgba(246, 166, 35, .6); transform: translateY(-2px); }
.news-card.pinned { border-color: rgba(246, 166, 35, .45); }
.news-card.highlight { box-shadow: 0 0 0 2px var(--gold); }
.news-image { width: 100%; max-height: 320px; object-fit: cover; border-radius: 10px; image-rendering: auto; }
.news-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.news-date { color: var(--muted); font-size: .85rem; }
.news-title { margin: 0; font-size: 1.25rem; }
h2.news-title { font-size: 1.5rem; }
.news-excerpt { margin: 0; color: var(--muted); font-size: .95rem; }
.news-card .btn { align-self: flex-start; }
.prose p { margin: 0 0 .8em; }
.prose p:last-child { margin-bottom: 0; }
.news-body { color: #d6dbe7; }

.chip {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 10px;
  font-size: .8rem; font-weight: 700; background: rgba(246, 166, 35, .14); color: var(--gold-2); white-space: nowrap;
}
.chip.pin { background: rgba(255, 255, 255, .08); color: var(--text); }
.chip.open, .chip.status-accepted { background: rgba(61, 220, 132, .14); color: var(--green); }
.chip.shut, .chip.status-rejected { background: rgba(255, 93, 108, .14); color: var(--red); }
.chip.status-review { background: rgba(90, 160, 255, .16); color: #8ebcff; }
.chip.status-pending { background: rgba(246, 166, 35, .14); color: var(--gold-2); }

/* ---------------------------------------------------------------- staff applications */

.notice {
  background: rgba(255, 93, 108, .1); border: 1px solid rgba(255, 93, 108, .4); color: #ffb3bb;
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; text-align: center;
}
.positions { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 26px; }
.position-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
}
.position-card h3 { margin: 0; font-size: 1.25rem; }
.position-card .btn { margin-top: auto; width: 100%; }
.position-card .hint { margin: 0; }
.position-card.closed { opacity: .7; }
.position-icon {
  width: 64px; height: 64px; display: grid; place-items: center; font-size: 2rem;
  border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line);
}
.position-icon img { width: 44px; height: 44px; image-rendering: pixelated; filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, .45)); }
#form-title { display: flex; align-items: center; gap: 12px; }
#form-title .position-icon { width: 48px; height: 48px; border-radius: 10px; }
#form-title .position-icon img { width: 34px; height: 34px; }
.position-desc { margin: 0; color: var(--muted); font-size: .92rem; }

.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow); scroll-margin-top: 100px;
}
.panel h2 { margin: 0 0 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head h2 { margin: 0; }

.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.field.wide { grid-column: 1 / -1; }
.field label, .decide label { font-weight: 700; }
.field .hint { margin: 0; }
input[type="text"], input[type="number"], input[type="url"], input[type="password"], input[type="search"], select, textarea {
  width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; font: inherit;
}
textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); outline: none; }
[aria-invalid="true"] { border-color: var(--red) !important; }
.req { color: var(--red); font-weight: 700; }
.field-error { color: var(--red); margin: 4px 0 0; font-size: .88rem; }
.form-error { color: #ffb3bb; background: rgba(255, 93, 108, .1); border: 1px solid rgba(255, 93, 108, .4); border-radius: 10px; padding: 10px 12px; }
.check { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--gold); flex: none; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.done { text-align: center; }
.done-icon { font-size: 2.6rem; }
.code {
  display: inline-block; margin: 8px 0; padding: 12px 22px; border-radius: 12px; cursor: pointer;
  background: var(--bg-2); color: var(--gold-2); border: 1px dashed var(--gold);
  font: 800 1.6rem/1 ui-monospace, monospace; letter-spacing: .12em; direction: ltr;
}

.status-check { margin-bottom: 46px; }
.status-row { display: flex; gap: 8px; max-width: 460px; }
.status-row input { direction: ltr; text-transform: uppercase; letter-spacing: .08em; }
.status-result {
  margin-top: 12px; display: flex; flex-direction: column; gap: 4px;
  border-radius: 10px; padding: 12px 14px; background: var(--bg-2); border: 1px solid var(--line);
}
.status-result .hint { margin: 0; }
.status-result.accepted { border-color: rgba(61, 220, 132, .5); }
.status-result.rejected { border-color: rgba(255, 93, 108, .5); }
.status-result.review { border-color: rgba(90, 160, 255, .5); }
.status-result.pending { border-color: rgba(246, 166, 35, .5); }

/* ---------------------------------------------------------------- admin */

.admin-main { padding: 24px 0 46px; }
.admin-user { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.auth { max-width: 460px; margin: 30px auto; }
.auth h1 { margin-top: 0; }
.auth .field { margin-bottom: 12px; }
code { background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar select, .toolbar input { width: auto; min-width: 180px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.table { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: grid; grid-template-columns: minmax(120px, 1.2fr) 2fr auto auto; align-items: center; gap: 12px;
  width: 100%; text-align: start; font: inherit; color: var(--text); cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
}
.row:hover { border-color: rgba(246, 166, 35, .6); }
.row.static { cursor: default; }
.row-main { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub, .row-date { color: var(--muted); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer {
  position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 40; width: min(560px, 100%);
  background: var(--bg-2); border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.drawer-body { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.answer h3 { margin: 0 0 6px; font-size: .95rem; color: var(--gold-2); }
.answer p { overflow-wrap: anywhere; }
.other { display: flex; align-items: center; gap: 8px; margin: 4px 0; color: var(--muted); }
.decide { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.editor { max-width: 640px; width: 100%; text-align: start; max-height: calc(100vh - 32px); overflow: auto; }
.editor .field { margin-bottom: 10px; }
.editor-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.switch { display: flex; align-items: center; gap: 10px; margin: 8px 0; cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--gold); }
.switches { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; margin-bottom: 12px; }
.btn.danger { background: rgba(255, 93, 108, .15); color: #ffb3bb; border: 1px solid rgba(255, 93, 108, .5); }
.btn.small { padding: 6px 12px; font-size: .88rem; }

/* ---------------------------------------------------------------- narrow screens */

@media (max-width: 900px) {
  .hub { grid-template-columns: 1fr; }
  .hub-card { min-height: 0; flex-direction: row; align-items: center; }
  .hub-go { margin: 0 auto 0 0; }
  .nav-toggle { display: inline-flex; margin-inline-start: auto; }
  .top-row { position: relative; }
  .nav {
    display: none; position: absolute; inset-inline: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px; margin: 0; padding: 8px 16px 14px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .nav-open .nav { display: flex; }
  .row { grid-template-columns: 1fr auto; }
  .row-sub { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 640px) {
  .top-row { flex-wrap: wrap; }
  .top-actions { width: 100%; justify-content: center; }
  .join-pair { flex-direction: column; }
  .join-value.port { width: 100%; }
  .status-row { flex-direction: column; }
  .toolbar select, .toolbar input { width: 100%; }
  .hub-card { padding: 16px; }
  .hub-icon { width: 60px; height: 60px; }
  .hub-icon img { width: 48px; height: 48px; }
}

[hidden] { display: none !important; }

@media (max-width: 640px) {
  .top-row { flex-wrap: wrap; justify-content: center; }
  .logo { height: 46px; }
  .player { flex-direction: column; align-items: stretch; text-align: center; }
  .avatar { align-self: center; }
  .faq { scroll-margin-top: 140px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
