/* Tokens from design-for-ai palette.mjs (seed 255, muted, complementary). Amber means "online" and is used for nothing else. */
:root {
  color-scheme: light dark;
  --bg: #fcfdfd;
  --surface: #f8f9fa;
  --line: #ced3d9;
  --text: #2c2e31;
  --text-2: #5f6469;
  --accent: #6088bd;
  --accent-hover: #5076a7;
  --on-accent: #080e16;
  --accent-tint: #e8f1fe;
  --accent-text: #4e6583;
  --lit: #d4b181;
  --unlit: #e5e8ec;
  --hover: #e5e8ec;
  --live: #b0473f;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121313;
    --surface: #19191a;
    --line: #383c41;
    --text: #e5e8ec;
    --text-2: #b3b8be;
    --accent-hover: #739bce;
    --accent-tint: #1c232c;
    --accent-text: #a0badb;
    --unlit: #282a2d;
    --hover: #282a2d;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 "IBM Plex Sans KR", sans-serif;
  word-break: keep-all;
}
main { max-width: 34rem; margin: 0 auto; padding: clamp(2.5rem, 10vh, 6rem) 1rem 3rem; }

h1 {
  font: 700 clamp(2.25rem, 9vw, 3.5rem)/1.15 "Gowun Batang", serif;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
}
#login h1, #denied h1 { font-size: clamp(1.75rem, 6vw, 2.25rem); }
p { margin: 0 0 1.5rem; }
.quiet { color: var(--text-2); }

/* Guild header: the server name is the one loud thing on the page. */
.guild { margin-bottom: 2.5rem; }
#presence { color: var(--text-2); margin-bottom: 0.625rem; }
#presence strong { color: var(--text); font-weight: 600; }
.meter { height: 6px; border-radius: 3px; background: var(--unlit); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--lit); }

/* The member pass: the only bordered surface. */
.pass {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 2rem;
}
.pass img { border-radius: 50%; flex: none; }
.who { font-weight: 600; font-size: 1.125rem; margin: 0 0 0.5rem; }
.pass .quiet { margin: 0; font-size: 0.9375rem; }
#roles { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.375rem; }
#roles li { font-size: 0.875rem; padding: 0.125rem 0.625rem; border-radius: 6px; background: var(--accent-tint); color: var(--accent-text); }

.button {
  display: inline-block;
  padding: 0.75rem 1.375rem;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: var(--accent-hover); }
button.text {
  background: none;
  border: 0;
  padding: 0.25rem 0;
  font: inherit;
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
button.text:hover { color: var(--text); }
/* Layout: channel sidebar on the left, like the Discord client. Stacks under the content on phones. */
.defs { position: absolute; }
.app.with-side { display: grid; grid-template-columns: 15rem minmax(0, 1fr); min-height: 100vh; }
.with-side main { margin: 0; padding-left: clamp(1.5rem, 5vw, 4rem); }
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 0 0.5rem 1.5rem;
}
.side-head {
  position: sticky;
  top: 0;
  margin: 0 -0.5rem 0.5rem;
  padding: 0.875rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
/* Icon is exactly one text line tall so it sits level with the name. */
.side-head img { display: block; width: 1.5rem; height: 1.5rem; border-radius: 0.375rem; object-fit: cover; flex: none; }
.move-status { margin: 0.5rem 0.5rem 0; font-size: 0.875rem; color: var(--text-2); }
.ch[aria-current] { background: var(--accent-tint); color: var(--accent-text); font-weight: 600; }
.cat h2 { font-size: 0.75rem; font-weight: 600; color: var(--text-2); margin: 1rem 0.5rem 0.25rem; }
.chs, .vus { list-style: none; margin: 0; padding: 0; }
.ch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3125rem 0.5rem;
  border-radius: 6px;
  color: var(--text-2);
  text-decoration: none;
}
.ch:hover { background: var(--hover); color: var(--text); }
.ch-name, .vu-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ic { width: 1.125rem; height: 1.125rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vus { padding: 0.125rem 0 0.25rem 1.75rem; }
.vu { display: flex; align-items: center; gap: 0.5rem; padding: 0.1875rem 0.5rem; font-size: 0.875rem; color: var(--text-2); }
.vu img { width: 24px; height: 24px; border-radius: 50%; flex: none; background: var(--unlit); }
.vu-name { flex: 1; }
.vu .ic { width: 0.9375rem; height: 0.9375rem; color: var(--text-2); }
.live { font-size: 0.6875rem; font-weight: 600; padding: 0 0.3125rem; border-radius: 4px; background: var(--live); color: #fff; }

@media (max-width: 720px) {
  .app.with-side { display: flex; flex-direction: column; }
  .with-side main { padding-left: 1rem; }
  .sidebar { order: 2; position: static; height: auto; border-right: 0; border-top: 1px solid var(--line); }
  .side-head { position: static; }
}

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
