/* ============================================================
   Light, airy visual theme — overrides the original night theme.
   ============================================================ */

:root {
  --bg: #f5f8f2;
  --bg-deep: #eef4ee;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-solid: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #f2f7f2;
  --gold: #b3843d;
  --gold-bright: #8b6529;
  --gold-deep: #d2af6e;
  --ink: #20352e;
  --ink-soft: #3a554b;
  --muted: #70857b;
  --muted-dim: #93a59b;
  --teal: #2f8874;
  --teal-dim: #9dc9bb;
  --danger: #c15f4d;
  --line: rgba(35, 73, 61, 0.11);
  --line-strong: rgba(35, 73, 61, 0.21);
  --shadow: 0 18px 50px rgba(37, 73, 60, 0.09);
}

html {
  color-scheme: light;
  background: var(--bg);
}

body {
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(176, 222, 205, 0.35), transparent 62%),
    radial-gradient(820px 500px at 102% 2%, rgba(240, 215, 165, 0.3), transparent 62%),
    linear-gradient(180deg, #fbfcf8 0%, #f5f8f2 54%, #eef4ed 100%);
  background-attachment: fixed;
  font-size: 14px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(520px 320px at 18% 42%, rgba(255, 255, 255, 0.65), transparent 70%),
    radial-gradient(620px 400px at 88% 76%, rgba(255, 255, 255, 0.55), transparent 72%);
}

::selection {
  color: #15372d;
  background: #d6ede4;
}

:focus-visible {
  outline: 2px solid rgba(47, 136, 116, 0.5);
  outline-offset: 3px;
}

.atmosphere {
  display: none;
}

#app {
  position: relative;
  z-index: 1;
}

.page {
  width: min(1360px, calc(100% - 64px));
  padding-bottom: 58px;
}

/* ---------- top bar ---------- */

.topbar {
  min-height: 70px;
  border-bottom: 1px solid rgba(35, 73, 61, 0.09);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 30px rgba(33, 65, 54, 0.035);
  backdrop-filter: blur(18px);
}

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

.brand__text strong {
  color: #1c3a31;
}

.brand__text small {
  color: #8da096;
}

.nav-btn {
  border-radius: 8px;
  color: #61786e;
}

.nav-btn:hover {
  border-color: #d8e9e1;
  color: #1f6655;
  background: #f0f9f4;
}

.conn-state {
  color: #74897f;
}

.conn-state i {
  background: #3ba383;
  box-shadow: 0 0 8px rgba(59, 163, 131, 0.5);
}

.conn-state.is-off i {
  background: var(--danger);
  box-shadow: 0 0 8px rgba(193, 95, 77, 0.45);
}

.user-chip {
  border-color: rgba(35, 73, 61, 0.12);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(35, 70, 58, 0.05);
}

.user-chip__avatar {
  color: #26715d;
  border-color: #cce8dc;
  background: #e9f7f1;
}

.user-chip__meta strong {
  color: #3b5b50;
}

.user-chip__meta small {
  color: #a07837;
}

.icon-btn {
  border-radius: 8px;
  color: #7a9086;
}

.icon-btn:hover {
  color: #275e50;
  border-color: #d8e9e1;
  background: #f2f9f5;
}

/* ---------- buttons / fields ---------- */

.btn {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.btn--primary {
  color: #fff;
  border-color: #2c7d6a;
  background: linear-gradient(135deg, #3d9984 0%, #2f8874 50%, #276b5b 100%);
  box-shadow: 0 10px 24px rgba(45, 128, 108, 0.19), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn--primary:hover:not(:disabled) {
  box-shadow: 0 14px 30px rgba(45, 128, 108, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn--outline {
  color: #256a59;
  border-color: #bfe0d4;
  background: rgba(255, 255, 255, 0.82);
}

.btn--outline:hover:not(:disabled) {
  color: #1b594a;
  border-color: #91c9b8;
  background: #eff9f4;
}

.btn--ghost {
  color: #48645a;
  border-color: rgba(35, 73, 61, 0.13);
  background: #fff;
}

.btn--ghost:hover:not(:disabled) {
  color: #1d5e4f;
  border-color: #bfe0d4;
  background: #f3faf6;
}

.btn--danger {
  color: #a94e3e;
  border-color: rgba(193, 95, 77, 0.24);
  background: #fffafa;
}

.btn--danger:hover:not(:disabled) {
  border-color: rgba(193, 95, 77, 0.45);
  background: #fff3f0;
}

.btn--loading::after {
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
}

.btn--ghost.btn--loading::after,
.btn--outline.btn--loading::after,
.btn--danger.btn--loading::after {
  border-color: rgba(35, 73, 61, 0.2);
  border-top-color: #2f8874;
}

.field > label,
.field-label {
  color: #81958b;
}

.input,
.select,
.textarea {
  color: var(--ink);
  border-color: rgba(35, 73, 61, 0.14);
  border-radius: 8px;
  background: #fbfdfb;
  box-shadow: inset 0 1px 2px rgba(36, 70, 59, 0.025);
}

.input::placeholder,
.textarea::placeholder {
  color: #a2b2a9;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(47, 136, 116, 0.55);
  box-shadow: 0 0 0 3px rgba(47, 136, 116, 0.1);
  background: #fff;
}

.select {
  background-image:
    linear-gradient(45deg, transparent 50%, #9b7b44 50%),
    linear-gradient(135deg, #9b7b44 50%, transparent 50%);
}

.search-field svg {
  color: #97a89e;
}

/* ---------- boot ---------- */

.boot-splash {
  color: #71877c;
}

.boot-sigil {
  color: #a77836;
  border-color: #dbe9e1;
  background: #fff;
  box-shadow: 0 15px 50px rgba(44, 86, 71, 0.1);
}

/* ---------- login ---------- */

.login-page {
  background: transparent;
}

.login-brand__note {
  color: #99aba1;
}

.login-title {
  color: #17362d;
  text-shadow: none;
}

.login-title span {
  background: linear-gradient(100deg, #286f5c 8%, #3d9b83 55%, #b3843d 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

.eyebrow {
  color: #aa7d37;
}

.eyebrow::before {
  background: linear-gradient(90deg, transparent, #c49b5a);
}

.login-subtitle {
  color: #71867c;
}

.login-mark {
  border-color: rgba(35, 73, 61, 0.12);
  background: rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  box-shadow: 0 5px 16px rgba(38, 73, 61, 0.045);
}

.login-mark strong {
  color: #2d6656;
}

.login-mark small {
  color: #9aada3;
}

.login-quote {
  color: #7c9086;
  border-left-color: #b9d9cc;
}

.login-card {
  padding: 38px 35px 30px;
  border-color: rgba(35, 73, 61, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 26px 80px rgba(34, 70, 58, 0.12), inset 0 1px 0 #fff;
  backdrop-filter: blur(20px);
}

.login-card::before {
  border-color: rgba(179, 132, 61, 0.55);
}

.login-card::after {
  border-color: rgba(47, 136, 116, 0.4);
}

.login-card__head h2 {
  color: #1b3a31;
}

.login-card__head p {
  color: #73887d;
}

.uid-field span {
  color: #a77a34;
}

.uid-field input {
  color: #1d5e4e;
}

.login-error {
  color: var(--danger);
}

.login-divider {
  color: #a0b0a7;
}

.login-perk {
  color: #70867b;
}

.login-perk svg {
  color: #3b917a;
}

.login-card__foot {
  color: #93a49b;
}

.login-card__foot b {
  color: #9b7334;
}

.login-footer {
  color: #95a69d;
}

/* ---------- dashboard ---------- */

.hero-title {
  color: #152f28;
}

.hero-title .gold {
  color: transparent;
  background: linear-gradient(105deg, #28725f 4%, #4a9c85 48%, #b68a42 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-lede {
  color: #73877d;
}

.hero-meta {
  color: #8da097;
}

.hero-meta i {
  background: #c9a363;
}

.orrery-wrap::before {
  background: radial-gradient(circle, rgba(150, 207, 189, 0.22), transparent 65%);
}

.orrery {
  border-color: rgba(68, 123, 102, 0.15);
  background:
    radial-gradient(circle at 50% 50%, rgba(183, 224, 210, 0.18), transparent 58%),
    repeating-conic-gradient(from 0deg, rgba(179, 132, 61, 0.13) 0deg 0.5deg, transparent 0.5deg 15deg);
}

.orrery::before,
.orrery::after {
  border-color: rgba(68, 123, 102, 0.2);
}

.orrery::after {
  border-color: rgba(179, 132, 61, 0.24);
}

.orrery-ring {
  border-color: rgba(68, 123, 102, 0.16);
}

.orrery-ring--inner {
  border-color: rgba(179, 132, 61, 0.24);
}

.orrery-ring--inner::before,
.orrery-ring--inner::after {
  background: #b3843d;
  box-shadow: 0 0 12px rgba(179, 132, 61, 0.3);
}

.orrery-core {
  border-color: rgba(179, 132, 61, 0.35);
  background: radial-gradient(circle, #ffffff, #f1f8f4 72%);
  box-shadow:
    0 0 0 8px rgba(255, 255, 255, 0.55),
    0 16px 40px rgba(53, 111, 92, 0.12),
    inset 0 0 25px rgba(124, 188, 168, 0.08);
}

.orrery-core::before {
  border-color: rgba(65, 132, 111, 0.25);
}

.orrery-core strong {
  color: #286b5a;
}

.orrery-core small {
  color: #93a69b;
}

.orbit-node::before {
  border-color: #b3843d;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.65), 0 4px 12px rgba(131, 99, 48, 0.18);
}

.orbit-node strong {
  color: #436158;
}

.orbit-node small {
  color: #98aaa0;
}

.orbit-node.p2::before,
.orbit-node.p4::before {
  border-color: #38927c;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.65), 0 4px 12px rgba(56, 146, 124, 0.18);
}

.orbit-float {
  border-color: rgba(35, 73, 61, 0.12);
  background: rgba(255, 255, 255, 0.88);
  color: #73877d;
  box-shadow: 0 10px 25px rgba(39, 77, 64, 0.075);
}

.orbit-float svg {
  color: #a97c38;
}

.orrery-caption {
  color: #9aaca2;
}

.dash-card {
  min-height: 198px;
  border-color: rgba(35, 73, 61, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 12px 34px rgba(36, 73, 60, 0.055);
  backdrop-filter: none;
}

.dash-card:hover {
  border-color: #b8dccc;
  background: #fff;
  box-shadow: 0 18px 40px rgba(36, 76, 62, 0.09);
  transform: translateY(-3px);
}

.dash-card::after {
  border-color: rgba(58, 128, 106, 0.1);
}

.dash-card__icon {
  color: #347e6a;
  border-color: #d2e9df;
  background: #eef9f4;
}

.dash-card__index {
  color: #a0b0a7;
}

.dash-card h3 {
  color: #213b33;
}

.dash-card p {
  color: #74887d;
}

.big-number {
  color: #276b59;
}

.big-number small {
  color: #91a29a;
}

.mini-progress {
  background: #ecf2ed;
}

.mini-progress i {
  background: linear-gradient(90deg, #74bea8, #2f8874);
}

.card-link {
  color: #a07432;
}

.rule-mini span {
  color: #4f685e;
}

.rule-mini b {
  border-color: #cfe4da;
  color: #3c846f;
  background: #f3faf6;
}

.dash-footer {
  color: #93a49b;
  border-top-color: rgba(35, 73, 61, 0.08);
}

.dash-footer span svg {
  color: #8ba297;
}

/* ---------- room ---------- */

.room-heading h1 {
  color: #1a352d;
}

.room-heading h1 em {
  color: #27735f;
}

.room-heading__meta {
  color: #7b8f84;
}

.room-code-chip {
  color: #226450;
  border-color: #cfe7dc;
  background: #eef9f4;
}

.room-code-chip button {
  color: #5f8b7b;
  background: #e1f3eb;
}

.room-code-chip button:hover {
  color: #1f5f4e;
}

.live-status i {
  background: #39a383;
  box-shadow: 0 0 8px rgba(57, 163, 131, 0.45);
}

.live-status.is-waiting i {
  background: #c59a51;
  box-shadow: 0 0 8px rgba(197, 154, 81, 0.4);
}

.live-status.is-paused i {
  background: #c15f4d;
  box-shadow: 0 0 8px rgba(193, 95, 77, 0.4);
}

.timer-panel {
  border-color: rgba(35, 73, 61, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 42px rgba(36, 73, 60, 0.075), inset 0 1px 0 #fff;
  backdrop-filter: blur(10px);
}

.timer-panel::before {
  background: linear-gradient(90deg, #2f8874, #d3b16c);
}

.round-block {
  border-right-color: rgba(35, 73, 61, 0.1);
}

.round-block span,
.timer-main__head,
.total-block span,
.total-block small {
  color: #93a49b;
}

.round-block strong {
  color: #256c59;
}

.timer-main__head span:last-child {
  color: #a17936;
}

.clock {
  color: #1e3930;
}

.timer-progress {
  background: #eaf1eb;
}

.timer-progress i {
  background: linear-gradient(90deg, #8ac7b6, #d3b16c);
}

.total-block {
  border-left-color: rgba(35, 73, 61, 0.1);
}

.total-block strong {
  color: #526b60;
}

.timer-state-block strong {
  color: #2f8874;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.timer-state-block small {
  color: #a0b0a7;
}

.modal-body .rule-mini {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.modal-body .rule-mini span {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #536b60;
  font-size: 11px;
}

.modal-body .rule-mini b {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 1px solid #d2e7dd;
  border-radius: 50%;
  color: #347f6b;
  background: #f3faf6;
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 400;
}

.command-bar {
  border-color: rgba(35, 73, 61, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 24px rgba(36, 73, 60, 0.045);
  backdrop-filter: blur(10px);
}

.command-copy__icon {
  color: #a77b36;
  border-color: #e7dcc3;
  background: #fdfaf1;
}

.command-copy strong {
  color: #2d493f;
}

.command-copy small {
  color: #91a29a;
}

.command-divider {
  background: rgba(35, 73, 61, 0.1);
}

.guest-note {
  border-color: rgba(35, 73, 61, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
  color: #71857b;
}

.guest-note b {
  color: #315b4e;
}

.guest-note svg {
  color: #b3843d;
}

.ban-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border: 1px solid rgba(35, 73, 61, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 20px rgba(36, 73, 60, 0.035);
}

.ban-bar__copy {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.ban-bar__kicker {
  display: grid;
  place-items: center;
  width: 34px;
  height: 28px;
  border: 1px solid #efd4cc;
  border-radius: 5px;
  color: #a45b4b;
  background: #fff6f3;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.ban-bar__copy strong {
  display: block;
  color: #355247;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
}

.ban-bar__copy small {
  display: block;
  margin-top: 2px;
  color: #98a9a0;
  font-size: 9px;
}

.ban-bar__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.ban-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 2px 9px 2px 4px;
  border: 1px solid #efd8d1;
  border-radius: 18px;
  color: #945748;
  background: #fff8f6;
  font-size: 11px;
  font-weight: 500;
}

.ban-chip__seat {
  padding: 1px 4px;
  border-radius: 5px;
  color: #a15d4d;
  background: #f7e7e1;
  font-family: var(--font-display);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ban-chip__avatar {
  width: 27px;
  height: 27px;
  border: 1px solid #fff;
  filter: grayscale(0.85);
}

.ban-empty {
  color: #9cada3;
  font-size: 10px;
}

.seat-card {
  min-height: 292px;
  border-color: rgba(35, 73, 61, 0.1);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(36, 73, 60, 0.055);
  backdrop-filter: none;
}

.seat-card::before {
  background: linear-gradient(90deg, transparent, rgba(47, 136, 116, 0.4), transparent);
}

.seat-card.is-mine {
  border-color: #a9d7c7;
  box-shadow: 0 14px 36px rgba(47, 136, 116, 0.09), 0 0 0 1px rgba(47, 136, 116, 0.11);
}

.seat-card.is-drawn {
  background: #fff;
}

.seat-card.is-empty {
  border-color: #d4e4dc;
  background: rgba(255, 255, 255, 0.58);
}

.seat-card__head {
  border-bottom-color: rgba(35, 73, 61, 0.08);
  background: linear-gradient(180deg, #ffffff, #fcfefc);
}

.seat-index span {
  color: #b3843d;
}

.seat-index small {
  color: #9bada3;
}

.seat-player strong {
  color: #29453c;
}

.seat-player small {
  color: #97a99f;
}

.role-badge {
  border-color: #ead8b4;
  color: #946b2d;
  background: #fdf8ec;
}

.role-badge--me {
  border-color: #c8e5da;
  color: #2c806b;
  background: #f0faf6;
}

.seat-kick {
  color: #9aaba2;
}

.seat-kick:hover {
  color: var(--danger);
  border-color: rgba(193, 95, 77, 0.24);
  background: #fff6f4;
}

.character-pane {
  border-right-color: rgba(35, 73, 61, 0.08);
  background:
    radial-gradient(circle at 24% 48%, color-mix(in srgb, var(--el, #d8c8a2) 10%, transparent), transparent 60%),
    linear-gradient(135deg, #fbfdfb, #f4faf6);
}

.event-pane {
  background: #fff;
}

.slot-label {
  color: #9aaca2;
}

.character-info h2 {
  color: #1f3a31;
}

.character-info h2.is-placeholder {
  color: #a0b0a7;
}

.stars {
  color: #b3843d;
}

.stars .dim {
  color: rgba(179, 132, 61, 0.25);
}

.char-reroll,
.event-reroll {
  color: #80958b;
  border-color: rgba(35, 73, 61, 0.12);
  background: rgba(255, 255, 255, 0.92);
}

.char-reroll:hover,
.event-reroll:hover {
  color: #286e5b;
  border-color: #bfe0d4;
  background: #f1faf6;
}

.event-title-row h3 {
  color: #223d34;
}

.event-title-row h3.is-placeholder {
  color: #a2b3aa;
}

.event-value {
  color: #28715e;
}

.event-value small {
  color: #578977;
}

.event-desc,
.event-placeholder {
  color: #74887e;
}

.status-bar {
  border-top-color: rgba(35, 73, 61, 0.08);
}

.status-bar__label {
  color: #a0b0a7;
}

.tag--permanent {
  color: #936b2d;
  border-color: #ead9b4;
  background: #fdf8ec;
}

.tag--temporary {
  color: #2b806b;
  border-color: #c8e5da;
  background: #effaf5;
}

.tag__remove {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-left: 1px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: inherit;
  background: rgba(147, 107, 45, 0.12);
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.tag__remove:hover {
  color: #fff;
  background: #a45b4b;
}

.tag-empty {
  color: #9fb0a7;
}

.empty-seat__seat {
  color: rgba(47, 136, 116, 0.14);
}

.empty-seat h3 {
  color: #617a6f;
}

.empty-seat p {
  color: #9aaca2;
}

.empty-seat__hint {
  color: #9c7130;
  border-color: #eadcbe;
  background: #fdfaf1;
}

.room-bottom {
  border-color: rgba(35, 73, 61, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
  color: #75897f;
}

.room-bottom__left svg {
  color: #a57a38;
}

.room-bottom__legend {
  color: #91a49a;
}

.legend-dot--permanent {
  background: #b3843d;
  box-shadow: none;
}

.legend-dot--temporary {
  background: #3d9a82;
  box-shadow: none;
}

/* ---------- character portraits ---------- */

.character-portrait {
  position: relative;
  flex: 0 0 auto;
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  padding: 3px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--el) 45%, #fff);
  background: linear-gradient(145deg, #fff, color-mix(in srgb, var(--el) 10%, #fff));
  box-shadow: 0 9px 22px color-mix(in srgb, var(--el) 17%, transparent);
}

.character-portrait__avatar {
  width: 100%;
  height: 100%;
  border: 0;
  box-shadow: none;
}

.character-portrait__fallback {
  color: var(--el);
  font-family: var(--font-display);
  font-size: 26px;
}

.character-portrait__element {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  border: 2px solid #fff;
  background: var(--el);
  font-family: var(--font-display);
  font-size: 10px;
  box-shadow: 0 3px 8px rgba(30, 60, 50, 0.15);
}

.character-avatar {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: color-mix(in srgb, var(--el) 12%, #fff);
  color: var(--el);
}

.character-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  transform: scale(1.12);
}

.character-avatar__fallback {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1;
}

/* ---------- character library ---------- */

.char-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 9px;
}

.char-tile {
  flex-direction: row;
  align-items: center;
  gap: 11px;
  min-height: 78px;
  padding: 10px 11px;
  border: 1px solid rgba(35, 73, 61, 0.1);
  border-radius: 12px;
  color: #4a6359;
  background: #fff;
  box-shadow: 0 4px 14px rgba(36, 72, 59, 0.035);
}

.char-tile::before {
  display: none;
}

.char-tile:hover {
  border-color: #bfe0d4;
  background: #f8fcf9;
  box-shadow: 0 8px 20px rgba(36, 76, 62, 0.07);
}

.char-tile.is-owned {
  border-color: #b9dfd3;
  background: linear-gradient(135deg, #f4fbf7, #fff);
  box-shadow: 0 5px 16px rgba(47, 136, 116, 0.06);
}

.char-tile__portrait {
  position: relative;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
}

.char-tile__portrait .character-avatar {
  width: 54px;
  height: 54px;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(34, 68, 56, 0.12);
}

.char-tile:not(.is-owned) .character-avatar {
  filter: grayscale(0.7) opacity(0.58);
}

.char-tile.is-owned .character-avatar {
  filter: none;
}

.char-tile__portrait .char-check {
  position: absolute;
  right: -3px;
  bottom: -2px;
  z-index: 2;
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 50%;
  color: transparent;
  background: #eef3ef;
  box-shadow: 0 2px 6px rgba(34, 66, 55, 0.12);
}

.char-tile.is-owned .char-check {
  color: #fff;
  border-color: #fff;
  background: #2f8874;
}

.char-tile__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 6px;
}

.char-name {
  color: #29463c;
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.35;
}

.char-tile.is-owned .char-name {
  color: #1d5f4d;
}

.char-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.char-element {
  width: 18px;
  height: 18px;
  border: 1px solid color-mix(in srgb, var(--el) 35%, #fff);
  color: var(--el);
  background: color-mix(in srgb, var(--el) 9%, #fff);
  font-size: 9px;
}

.char-rarity {
  color: #b3843d;
  font-size: 8px;
}

.char-tile.is-owned .char-rarity {
  color: #b3843d;
}

.char-tile .char-name,
.char-tile .char-rarity {
  text-shadow: none;
}

.library-toolbar {
  gap: 8px;
}

.library-summary {
  margin-bottom: 12px;
}

.library-count {
  color: #7e9187;
}

.library-count strong {
  color: #276b59;
}

.library-count em {
  color: #99aaa1;
}

.library-hint {
  color: #9aaca2;
}

.element-filter {
  margin-bottom: 13px;
}

.element-pill {
  height: 30px;
  padding: 0 11px;
  border-color: rgba(35, 73, 61, 0.11);
  border-radius: 8px;
  color: #70857b;
  background: #fff;
}

.element-pill:hover {
  color: #265e4f;
  border-color: #c3e0d6;
}

.element-pill.is-active {
  color: #1f6351;
  border-color: #a9d5c7;
  background: #eef9f4;
}

.library-footer,
.sticky-actions {
  border-top-color: rgba(35, 73, 61, 0.09);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), #fff 35%);
}

/* ---------- modals ---------- */

.modal-layer {
  background: rgba(35, 55, 47, 0.3);
  backdrop-filter: blur(9px);
}

.modal-panel {
  border-color: rgba(35, 73, 61, 0.13);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 32px 90px rgba(28, 58, 47, 0.22), inset 0 1px 0 #fff;
}

.modal-head {
  border-bottom-color: rgba(35, 73, 61, 0.09);
}

.modal-head::before {
  background: linear-gradient(90deg, #2f8874, #d1ae68);
}

.modal-kicker {
  color: #a77b36;
}

.modal-head h2 {
  color: #1e3a31;
}

.modal-head p {
  color: #7a8e83;
}

.modal-close {
  color: #869b90;
  border-color: rgba(35, 73, 61, 0.12);
  background: #f8fbf8;
}

.modal-close:hover {
  color: #285e50;
  border-color: #c3e0d6;
  background: #eff9f4;
}

.modal-body {
  scrollbar-color: #c8ddd3 transparent;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #d0e2d9;
}

.modal-note {
  color: #637d70;
  border-color: #d4eae0;
  background: #f2faf6;
}

.modal-note svg {
  color: #338970;
}

.modal-note--gold {
  color: #836d45;
  border-color: #ebdec4;
  background: #fdfaf2;
}

.modal-note--gold svg {
  color: #a77c39;
}

.form-hint {
  color: #95a69c;
}

.form-error {
  color: #a94e3e;
  border-color: #efcfc8;
  background: #fff7f5;
}

.code-block {
  color: #355a4c;
  border-color: #deebe5;
  background: #f5f9f6;
}

.empty-state {
  color: #9aaca2;
}

.empty-state svg {
  color: #b78b45;
  opacity: 0.7;
}

.empty-state h3 {
  color: #526c61;
}

.confirm-copy {
  color: #4b655b;
}

.confirm-copy b {
  color: #245f4e;
}

/* ---------- event library ---------- */

.event-count {
  color: #94a69c;
}

.event-count b {
  color: #2f7f6b;
}

.event-row {
  border-color: rgba(35, 73, 61, 0.09);
  border-radius: 10px;
  background: #fff;
}

.event-row:hover {
  border-color: #bfe0d4;
  background: #f8fcf9;
}

.event-row__title h3 {
  color: #2b473d;
}

.event-row__value {
  color: #2d7d69;
  border-color: #cbe6dc;
  background: #f0faf6;
}

.event-row__desc {
  color: #74887e;
}

.event-row__actions .icon-btn {
  color: #8a9e93;
}

.event-row__actions .icon-btn:hover {
  color: #286e5b;
  background: #f0faf6;
}

.tag-editor__empty {
  color: #98aaa0;
  border-color: #dce9e2;
}

.tag-editor__remove {
  color: #9aaba2;
  border-color: rgba(193, 95, 77, 0.18);
  background: #fffafa;
}

.random-insert {
  border-color: #dfeae4;
  background: #fbfdfb;
}

.random-insert__copy .form-hint {
  color: #8ea198;
}

/* ---------- create / join ---------- */

.round-option span {
  border-color: rgba(35, 73, 61, 0.12);
  border-radius: 9px;
  color: #72877c;
  background: #fff;
}

.round-option span b {
  color: #35554a;
}

.round-option span small {
  color: #98aaa0;
}

.round-option input:checked + span {
  border-color: #a9d5c7;
  color: #1f6653;
  background: #eef9f4;
  box-shadow: inset 0 0 0 1px rgba(47, 136, 116, 0.08);
}

.round-option input:checked + span b {
  color: #1f6653;
}

.join-preview {
  border-color: rgba(35, 73, 61, 0.1);
  background: #f8fbf8;
}

.join-preview__head {
  color: #74887e;
}

.join-preview__head b {
  color: #2c7561;
}

.seat-choice {
  border-color: rgba(35, 73, 61, 0.12);
  border-radius: 9px;
  color: #71867b;
  background: #fff;
}

.seat-choice strong {
  color: #2b6f5d;
}

.seat-choice small {
  color: #97a99f;
}

.seat-choice:hover:not(:disabled) {
  border-color: #afd8ca;
  background: #f5fbf8;
}

.seat-choice.is-selected {
  border-color: #8ac7b6;
  background: #eaf8f3;
  box-shadow: inset 0 0 0 1px rgba(47, 136, 116, 0.09);
}

.radio-card {
  border-color: rgba(35, 73, 61, 0.11);
  border-radius: 9px;
  color: #6f8479;
  background: #fff;
}

.radio-card:has(input:checked) {
  border-color: #a9d5c7;
  color: #2a5e50;
  background: #f0faf6;
}

.radio-card small {
  color: #98a9a0;
}

.file-drop {
  border-color: #d7e7df;
  background: #fbfdfb;
  color: #768b80;
}

/* ---------- guide / misc ---------- */

.guide-step {
  border-bottom-color: rgba(35, 73, 61, 0.08);
}

.guide-step > b {
  border-color: #d2e7dd;
  color: #347f6b;
  background: #f3faf6;
}

.guide-step h3 {
  color: #315146;
}

.guide-step p {
  color: #74887e;
}

.micro-label {
  color: #9aaba2;
}

/* ---------- draw overlay ---------- */

.draw-overlay {
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.96), rgba(244, 249, 245, 0.97) 68%);
  backdrop-filter: blur(12px);
}

.draw-sigil {
  border-color: rgba(47, 136, 116, 0.25);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 25px 80px rgba(47, 117, 96, 0.14), inset 0 0 50px rgba(173, 220, 204, 0.14);
}

.draw-sigil::before {
  border-color: rgba(179, 132, 61, 0.42);
}

.draw-sigil::after {
  border-color: rgba(47, 136, 116, 0.24);
}

.draw-sigil span {
  color: #2d7966;
  text-shadow: 0 0 24px rgba(47, 136, 116, 0.2);
}

.draw-overlay h2 {
  color: #24483d;
}

.draw-overlay p {
  color: #7e9287;
}

.draw-overlay__line {
  background: linear-gradient(90deg, transparent, #b3843d, transparent);
}

/* ---------- toasts ---------- */

.toast {
  color: #345649;
  border-color: #cde7dd;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 16px 45px rgba(29, 60, 48, 0.16);
}

.toast svg {
  color: #2f8b75;
}

.toast.is-error {
  border-color: #efcfc8;
}

.toast.is-error svg {
  color: #b75545;
}

.toast.is-warning {
  border-color: #ebdec4;
}

.toast.is-warning svg {
  color: #a97b35;
}

/* ---------- responsive tweaks ---------- */

@media (max-width: 1140px) {
  .page {
    width: min(100% - 44px, 1100px);
  }
}

@media (max-width: 980px) {
  .login-shell {
    max-width: 580px;
  }

  .login-card {
    box-shadow: 0 22px 65px rgba(34, 70, 58, 0.11);
  }
}

@media (max-width: 760px) {
  .page {
    width: calc(100% - 28px);
  }

  .topbar {
    background: rgba(255, 255, 255, 0.9);
  }

  .user-chip {
    background: #fff;
  }

  .login-card {
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(34, 70, 58, 0.1);
  }

  .timer-panel,
  .seat-card,
  .dash-card {
    box-shadow: 0 8px 24px rgba(36, 73, 60, 0.05);
  }

  .ban-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .char-grid {
    grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
  }
}

@media (max-width: 430px) {
  .char-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .char-tile {
    min-height: 68px;
    gap: 8px;
    padding: 8px;
  }

  .char-tile__portrait,
  .char-tile__portrait .character-avatar {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .char-name {
    font-size: 14px;
  }

  .char-rarity {
    font-size: 8px;
  }
}

/* ---------- history modal ---------- */

.history-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: #71867b;
  font-size: 11.5px;
}

.history-toolbar b {
  color: #276b59;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
}

.history-loading {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: #8fa198;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.history-round {
  overflow: hidden;
  border: 1px solid rgba(35, 73, 61, 0.1);
  border-radius: 13px;
  background: #fff;
}

.history-round__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(35, 73, 61, 0.08);
  background: linear-gradient(180deg, #fbfdfb, #f6faf7);
}

.history-round__head > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.history-round__num {
  color: #a77b36;
  font-size: 9px;
  letter-spacing: 0.16em;
}

.history-round__head strong {
  color: #2a473d;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}

.history-round__head time {
  color: #99aaa1;
  font-size: 10px;
}

.history-seats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.history-seat {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(35, 73, 61, 0.09);
  border-radius: 9px;
  background: #fbfdfb;
}

.history-seat__head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
}

.history-seat__pos {
  color: #b3843d;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
}

.history-seat__uid {
  overflow: hidden;
  color: #99aaa1;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-reroll {
  margin-left: auto;
  padding: 1px 6px;
  border: 1px solid #ead9b4;
  border-radius: 8px;
  color: #9a722f;
  background: #fdf8ec;
  font-size: 8px;
}

.history-seat__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-char {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.history-char__avatar {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 2px solid #fff;
  box-shadow: 0 3px 10px rgba(34, 68, 56, 0.12);
}

.history-char strong {
  display: block;
  overflow: hidden;
  color: #254239;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-char small {
  display: block;
  margin-top: 2px;
  color: #96a89e;
  font-size: 9px;
}

.history-char__empty {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px dashed #d7e5dd;
  border-radius: 50%;
  color: #a5b4ab;
}

.history-event {
  min-width: 0;
  padding-top: 8px;
  border-top: 1px solid rgba(35, 73, 61, 0.08);
}

.history-event__label {
  display: block;
  margin-bottom: 2px;
  color: #9aaca2;
  font-size: 8px;
  letter-spacing: 0.14em;
}

.history-event strong {
  display: block;
  color: #2a473d;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
}

.history-event p {
  display: -webkit-box;
  overflow: hidden;
  margin: 3px 0 0;
  color: #74887e;
  font-size: 10.5px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.history-event .tags {
  margin-top: 6px;
}

/* ---------- readability pass ---------- */

body {
  font-size: 15px;
}

.eyebrow {
  font-size: 10px;
}

.brand__text strong {
  font-size: 19px;
}

.brand__text small {
  font-size: 9px;
}

.nav-btn {
  font-size: 13px;
}

.conn-state {
  font-size: 11px;
}

.user-chip__meta strong {
  font-size: 12px;
}

.user-chip__meta small {
  font-size: 9px;
}

.btn {
  font-size: 13.5px;
}

.btn--small {
  font-size: 12px;
}

.field > label,
.field-label {
  font-size: 11px;
}

.input,
.select,
.textarea {
  font-size: 14px;
}

.form-hint {
  font-size: 10.5px;
}

.form-error {
  font-size: 11.5px;
}

.hero-lede {
  font-size: 14px;
}

.hero-meta {
  font-size: 11px;
}

.login-subtitle {
  font-size: 15px;
}

.login-mark strong {
  font-size: 17px;
}

.login-mark small {
  font-size: 9px;
}

.login-card__head p {
  font-size: 13px;
}

.login-perk {
  font-size: 12px;
}

.login-divider {
  font-size: 9px;
}

.login-card__foot {
  font-size: 11px;
}

.login-footer {
  font-size: 10px;
}

.login-error {
  font-size: 12px;
}

.dash-card h3 {
  font-size: 21px;
}

.dash-card p {
  font-size: 12px;
}

.dash-card__index {
  font-size: 9.5px;
}

.big-number small {
  font-size: 11px;
}

.card-link {
  font-size: 11.5px;
}

.rule-mini span,
.modal-body .rule-mini span {
  font-size: 11.5px;
}

.dash-footer {
  font-size: 10.5px;
}

.room-heading__meta {
  font-size: 11px;
}

.room-code-chip {
  font-size: 14px;
}

.round-block span,
.round-block small {
  font-size: 9px;
}

.round-block strong {
  font-size: 52px;
}

.timer-main__head {
  font-size: 10px;
}

.clock {
  font-size: 36px;
}

.total-block span,
.total-block small {
  font-size: 9px;
}

.total-block strong {
  font-size: 14px;
}

.timer-state-block strong {
  font-size: 13px;
}

.command-copy strong {
  font-size: 14px;
}

.command-copy small {
  font-size: 10px;
}

.guest-note {
  font-size: 12px;
}

.ban-bar__copy strong {
  font-size: 14px;
}

.ban-bar__copy small {
  font-size: 10px;
}

.ban-chip {
  font-size: 11.5px;
}

.ban-empty {
  font-size: 10.5px;
}

.seat-index small {
  font-size: 8.5px;
}

.seat-player strong {
  font-size: 13px;
}

.seat-player small {
  font-size: 10px;
}

.role-badge {
  height: 18px;
  font-size: 8.5px;
}

.slot-label,
.character-info .slot-label,
.event-info .slot-label {
  font-size: 8.5px;
}

.character-info h2 {
  font-size: 28px;
}

.stars {
  font-size: 10px;
}

.event-title-row h3 {
  font-size: 20px;
  font-weight: 700;
}

.event-title-row h3.is-placeholder {
  font-size: 17px;
}

.event-value {
  font-size: 26px;
}

.event-value small {
  font-size: 10px;
}

.event-desc,
.event-placeholder {
  font-size: 11.5px;
}

.event-reroll {
  font-size: 9.5px;
}

.status-bar__label {
  font-size: 8px;
}

.tag {
  height: 22px;
  padding: 0 8px;
  font-size: 9.5px;
}

.tag-empty {
  font-size: 9px;
}

.empty-seat h3 {
  font-size: 18px;
}

.empty-seat p {
  font-size: 11px;
}

.empty-seat__hint {
  font-size: 10px;
}

.room-bottom {
  font-size: 11px;
}

.room-bottom__legend,
.legend-item {
  font-size: 10px;
}

.modal-kicker {
  font-size: 9.5px;
}

.modal-head h2 {
  font-size: 27px;
}

.modal-head p {
  font-size: 12px;
}

.modal-body {
  font-size: 14px;
}

.modal-note {
  font-size: 11.5px;
}

.modal-close {
  font-size: 14px;
}

.library-count {
  font-size: 11px;
}

.library-count strong {
  font-size: 22px;
}

.library-hint {
  font-size: 10.5px;
}

.element-pill {
  height: 32px;
  font-size: 10.5px;
}

.char-name {
  font-size: 15px;
  font-weight: 600;
}

.char-rarity {
  font-size: 9px;
}

.char-element {
  font-size: 10px;
}

.event-count {
  font-size: 10.5px;
}

.event-row__title h3 {
  font-size: 17.5px;
  font-weight: 700;
}

.event-row__value {
  font-size: 9.5px;
}

.event-row__desc {
  font-size: 12px;
}

.event-row__tags .tag {
  font-size: 9.5px;
}

.tag-editor__empty {
  font-size: 10px;
}

.code-block {
  font-size: 11.5px;
}

.file-drop {
  font-size: 11px;
}

.radio-card strong {
  font-size: 11px;
}

.radio-card small {
  font-size: 9px;
}

.seat-choice small {
  font-size: 9px;
}

.join-placeholder {
  font-size: 10px;
}

.guide-step h3 {
  font-size: 15px;
}

.guide-step p {
  font-size: 11.5px;
}

.confirm-copy {
  font-size: 13px;
}

.toast {
  font-size: 12px;
}

.draw-overlay h2 {
  font-size: 27px;
}

.draw-overlay p {
  font-size: 11px;
}

@media (max-width: 760px) {
  .topbar .brand__text strong {
    font-size: 15px;
  }

  .timer-main__head {
    font-size: 9.5px;
  }

  .clock {
    font-size: 30px;
  }

  .round-block strong {
    font-size: 42px;
  }

  .event-title-row h3 {
    font-size: 18px;
  }

  .ban-bar__copy small {
    font-size: 9.5px;
  }
}

@media (max-width: 760px) {
  .history-seats {
    grid-template-columns: 1fr;
  }

  .history-round__head strong {
    font-size: 15px;
  }
}

@media (max-width: 430px) {
  .char-name {
    font-size: 13.5px;
  }

  .tag {
    font-size: 9px;
  }

  .topbar {
    padding: 0 8px;
  }

  .brand__text strong {
    font-size: 13.5px;
  }

  .nav-btn {
    width: 29px;
    height: 32px;
  }

  .user-chip {
    width: 31px;
    height: 31px;
  }

  .user-chip__avatar {
    width: 24px;
    height: 24px;
  }

  .icon-btn {
    width: 30px;
    height: 32px;
  }
}
