:root {
    color-scheme: light;
    font-family: "Segoe UI", system-ui, sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    --ink: #17343a;
    --muted: #4d666a;
    --deep: #152f35;
    --deep-raised: #20464a;
    --ground: #e4ece5;
    --paper: #f7f9f3;
    --paper-strong: #ffffff;
    --line: #b8c8be;
    --line-dark: #829a8d;
    --accent: #d4e875;
    --red: #c83f34;
    --red-soft: #f6e4df;
    --yellow: #a9790c;
    --yellow-soft: #f5eccf;
    --green: #236a4b;
    --green-soft: #e2eee4;
    --blue: #286792;
    --blue-soft: #e1edf3;
    --warning: #7a4b08;
    --warning-soft: #f5ebd1;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--ground);
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--ground);
    font-size: 15px;
    line-height: 1.45;
}

button,
input {
    font: inherit;
}

button {
    color: inherit;
}

button:focus-visible,
input:focus-visible,
summary:focus-visible {
    outline: 3px solid #8aa62d;
    outline-offset: 3px;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

button:not(:disabled) {
    cursor: pointer;
}

input {
    color: var(--ink);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    color: var(--ink);
}

.prototype-note {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 18px;
    color: #edf4e9;
    background: #10272c;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.prototype-note span:first-child {
    color: var(--accent);
    font-weight: 750;
}

.app-shell {
    min-height: calc(100vh - 34px);
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
}

.perimeter-rail {
    position: sticky;
    top: 0;
    height: calc(100vh - 0px);
    min-height: 640px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    overflow-y: auto;
    padding: 24px 18px 18px;
    color: #edf4e9;
    background: var(--deep);
}

.rail-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #f4f7ef;
    font-size: 12px;
    font-weight: 760;
    letter-spacing: 0.12em;
}

.brand-mark {
    width: 29px;
    height: 29px;
    display: grid;
    grid-template-columns: repeat(2, 8px);
    grid-template-rows: repeat(2, 8px);
    align-content: center;
    justify-content: center;
    gap: 3px;
    border: 1px solid #78918a;
}

.brand-mark i {
    display: block;
    width: 8px;
    height: 8px;
}

.mark-red {
    background: #e26a5e;
}

.mark-yellow {
    background: #e4c563;
}

.mark-green {
    background: #7fb28b;
}

.mark-blue {
    background: #78aac8;
}

.room-nav {
    display: grid;
    gap: 4px;
}

.nav-item {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 9px;
    border: 1px solid transparent;
    color: #c7d4ce;
    background: transparent;
    text-align: left;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.nav-item:hover:not(:disabled) {
    color: #ffffff;
    background: #1b3b40;
}

.nav-item.is-current {
    color: #ffffff;
    background: var(--deep-raised);
    border-color: #55746e;
}

.nav-key {
    color: #9db2a9;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.nav-item.is-current .nav-key {
    color: var(--accent);
}

.rail-label {
    color: #a9beb3;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.11em;
}

.rail-room {
    padding: 16px 0;
    border-top: 1px solid #41605d;
    border-bottom: 1px solid #41605d;
}

.rail-room h2 {
    margin: 7px 0 4px;
    color: #f5f7ef;
    font-size: 17px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.rail-room p {
    margin: 0;
    color: #bfd0c7;
    font-size: 12px;
}

.rail-code {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 13px;
    padding-top: 10px;
    border-top: 1px solid #41605d;
    color: #c8d6cd;
    font-size: 10px;
    letter-spacing: 0.08em;
}

.rail-code strong {
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.13em;
}

.rail-status {
    display: grid;
    gap: 5px;
}

.connection-line {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e6eee7;
    font-size: 12px;
    font-weight: 650;
}

.status-lamp {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #92c66c;
}

.status-lamp.is-paused {
    background: #efbf56;
}

.rail-status p {
    margin: 0;
    color: #b5c8bd;
    font-size: 11px;
}

.rail-rules {
    padding: 12px 0;
    border-top: 1px solid #41605d;
    border-bottom: 1px solid #41605d;
}

.rail-rules summary {
    color: #f0f5ee;
    cursor: pointer;
    font-size: 12px;
    font-weight: 650;
}

.rail-rules[open] summary {
    margin-bottom: 12px;
}

.rule-copy {
    color: #ccdad1;
    font-size: 11px;
    line-height: 1.55;
}

.rule-copy p {
    margin: 0 0 8px;
}

.rule-copy p:last-child {
    margin-bottom: 0;
}

.rule-copy .house-rule {
    color: #e2eeb4;
}

.rail-preview {
    display: grid;
    gap: 8px;
    margin-top: auto;
}

.quiet-button {
    width: 100%;
    min-height: 38px;
    padding: 7px 9px;
    border: 1px solid #648078;
    color: #e5eee6;
    background: transparent;
    text-align: left;
    font-size: 11px;
    transition: color 160ms ease, background-color 160ms ease;
}

.quiet-button:hover:not(:disabled) {
    color: var(--deep);
    background: #e8f0e2;
}

.rail-mark-action {
    padding-top: 15px;
    border-top: 1px solid #41605d;
}

.rail-mark-action h2 {
    margin: 0 0 8px;
    color: #f5f7ef;
    font-size: 14px;
}

.rail-mark-action p {
    margin: 0 0 7px;
    color: #d2dfd6;
    font-size: 12px;
}

.rail-mark-action .mark-source {
    color: var(--accent);
    font-size: 10px;
}

.rail-primary,
.rail-cancel {
    width: 100%;
    min-height: 38px;
    margin-top: 7px;
    padding: 7px 10px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
}

.rail-primary {
    color: #10272c;
    background: var(--accent);
}

.rail-primary:hover:not(:disabled) {
    background: #e2f29b;
}

.rail-cancel {
    color: #c7d4ce;
    background: transparent;
    border-color: #54716b;
}

.rail-cancel:hover:not(:disabled) {
    color: #ffffff;
    background: #1b3b40;
}

.work-surface {
    min-width: 0;
    padding: 32px 38px 18px;
    background: var(--ground);
}

.screen {
    width: min(100%, 1420px);
    margin: 0 auto;
}

.screen-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.screen-heading h1,
.play-heading h1 {
    margin: 0;
    color: #17343a;
    font-size: 32px;
    font-weight: 720;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.screen-heading p,
.play-heading p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.discovery-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.88fr) minmax(0, 1.12fr);
    align-items: start;
    gap: 28px;
}

.create-room,
.public-directory,
.private-join,
.room-settings,
.member-section {
    min-width: 0;
    background: var(--paper);
}

.create-room {
    padding: 24px;
    border: 1px solid var(--line);
}

.create-room h2,
.public-directory h2,
.private-join h2,
.member-section h2,
.room-settings h2,
.final-scores h2 {
    margin: 0;
    color: var(--ink);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-intro {
    margin: 6px 0 22px;
    color: var(--muted);
    font-size: 13px;
}

.field {
    display: grid;
    gap: 6px;
    color: #29484b;
    font-size: 12px;
    font-weight: 680;
}

.field + .field {
    margin-top: 17px;
}

.field em {
    margin-left: 4px;
    color: var(--muted);
    font-size: 10px;
    font-style: normal;
    font-weight: 500;
}

.text-input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #9aafa3;
    border-radius: 0;
    color: var(--ink);
    background: #ffffff;
    font-size: 14px;
}

.text-input::placeholder {
    color: #617478;
    opacity: 1;
}

.text-input:focus {
    border-color: #355e4c;
}

.field-note {
    margin: 6px 0 0;
    color: #4e6669;
    font-size: 11px;
    line-height: 1.5;
}

.visibility-field {
    margin: 20px 0 0;
    padding: 0;
    border: 0;
}

.visibility-field legend {
    margin-bottom: 8px;
    color: #29484b;
    font-size: 12px;
    font-weight: 680;
}

.visibility-options {
    display: inline-flex;
    border: 1px solid #9aafa3;
    background: #e8eee8;
}

.visibility-option {
    min-height: 38px;
    min-width: 104px;
    padding: 7px 12px;
    border: 0;
    color: #355254;
    background: transparent;
    font-size: 12px;
    font-weight: 650;
}

.visibility-option + .visibility-option {
    border-left: 1px solid #9aafa3;
}

.visibility-option:hover:not(:disabled) {
    background: #dce7dd;
}

.visibility-option.is-selected {
    color: #ffffff;
    background: #1d4a43;
}

.visibility-option:disabled {
    opacity: 0.62;
}

.primary-button {
    min-height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 16px;
    border: 1px solid #153e37;
    color: #ffffff;
    background: #1d4a43;
    font-size: 13px;
    font-weight: 720;
    transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.primary-button:hover:not(:disabled) {
    color: #ffffff;
    background: #123c35;
}

.primary-button:active:not(:disabled) {
    transform: translateY(1px);
}

.create-room > .primary-button {
    width: 100%;
    margin-top: 18px;
}

.privacy-note {
    margin: 11px 0 0;
    color: #4e6669;
    font-size: 11px;
    text-align: center;
}

.directory-column {
    display: grid;
    gap: 18px;
}

.public-directory {
    padding: 22px 24px 18px;
    border-top: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line);
}

.list-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
}

.list-heading > span {
    color: var(--muted);
    font-size: 11px;
}

.search-field {
    margin-top: 18px;
}

.room-list,
.member-list,
.final-score-list {
    margin: 13px 0 0;
    padding: 0;
    list-style: none;
}

.room-list-row {
    min-height: 68px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 60px 58px;
    align-items: center;
    gap: 16px;
    border-top: 1px solid #d0dbd2;
}

.room-list-main {
    display: grid;
    gap: 2px;
}

.room-list-main strong {
    color: #1b3a3d;
    font-size: 14px;
}

.room-list-main span,
.room-list-seats small {
    color: var(--muted);
    font-size: 11px;
}

.room-list-seats {
    display: grid;
    justify-items: end;
    font-variant-numeric: tabular-nums;
}

.room-list-seats span {
    color: #1c4742;
    font-size: 14px;
    font-weight: 720;
}

.text-button {
    min-height: 36px;
    padding: 6px 4px;
    border: 0;
    border-bottom: 1px solid #698779;
    color: #1d5548;
    background: transparent;
    font-size: 12px;
    font-weight: 720;
    text-align: center;
    transition: color 150ms ease, border-color 150ms ease;
}

.text-button:hover:not(:disabled) {
    color: #102f2a;
    border-color: #102f2a;
}

.list-footnote {
    margin: 10px 0 0;
    color: #4e6669;
    font-size: 11px;
}

.empty-state {
    margin-top: 14px;
    padding: 22px 14px;
    border: 1px dashed #9fb4a7;
    text-align: center;
}

.empty-state h3 {
    margin: 0 0 4px;
    font-size: 14px;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.private-join {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.9fr);
    align-items: end;
    gap: 18px;
    padding: 18px 24px;
    border-top: 1px solid var(--line);
}

.private-join p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.private-join .form-error {
    grid-column: 1 / -1;
    margin: 0;
}

.invite-entry {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.code-input {
    min-width: 0;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.08em;
}

.form-error {
    margin: 14px 0 0;
    padding: 9px 11px;
    color: #6d251e;
    background: #f8e4e0;
    font-size: 12px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.lobby-heading {
    align-items: center;
}

.room-state-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.state-tag {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border: 1px solid #b2c2b8;
    color: #365356;
    background: #edf2ec;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tag-public,
.tag-connected {
    color: #255942;
    background: #e5efe4;
}

.tag-private {
    color: #664c13;
    background: #f3edda;
}

.tag-paused {
    color: #67450a;
    background: #f5ebd1;
}

.inline-notice {
    margin: 0 0 18px;
    padding: 10px 12px;
    color: #214c3b;
    background: #e5efe4;
    font-size: 12px;
}

.lobby-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
    align-items: start;
    gap: 24px;
}

.member-section {
    padding: 22px 24px;
    border-top: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line);
}

.member-list {
    margin-top: 15px;
}

.member-row {
    min-height: 64px;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 11px;
    border-top: 1px solid #d0dbd2;
}

.member-initials {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid #829b8e;
    color: #1e4b41;
    background: #e8efe7;
    font-size: 10px;
    font-weight: 760;
}

.member-name {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.member-name strong {
    overflow: hidden;
    color: #193b3d;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-name span {
    color: var(--muted);
    font-size: 10px;
}

.member-state {
    font-size: 10px;
    font-weight: 700;
}

.state-online {
    color: #276448;
}

.state-offline {
    color: #815411;
}

.small-action {
    min-height: 31px;
    padding: 5px 8px;
    border: 1px solid #aab9b0;
    color: #573f20;
    background: #f4f1e8;
    font-size: 10px;
    font-weight: 700;
}

.small-action:hover:not(:disabled) {
    background: #ebe3d0;
}

.member-section > .field-note {
    margin-top: 14px;
}

.room-settings {
    padding: 22px 24px;
    border: 1px solid var(--line);
}

.room-settings h2 {
    margin-bottom: 13px;
}

.setting-line {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid #d0dbd2;
    color: #355356;
    font-size: 12px;
}

.setting-line > strong {
    color: #173c3b;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.compact-options .visibility-option {
    min-width: 84px;
    min-height: 32px;
    padding: 5px 8px;
    font-size: 10px;
}

.invite-code {
    color: #153e38;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.12em;
}

.room-settings > .field-note {
    margin: 0 0 7px;
}

.setting-note {
    margin: 10px 0 14px;
    padding-top: 12px;
    border-top: 1px solid #d0dbd2;
}

.setting-note strong {
    color: #1d4543;
    font-size: 12px;
}

.setting-note p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.start-button {
    width: 100%;
}

.room-settings > .field-note:last-child {
    text-align: center;
}

.play-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line-dark);
}

.play-heading-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 9px;
}

.preview-state-button {
    min-height: 34px;
    padding: 5px 8px;
    border: 1px solid #8fa69a;
    color: #2c5148;
    background: #edf2eb;
    font-size: 10px;
    font-weight: 680;
    transition: color 150ms ease, background-color 150ms ease;
}

.preview-state-button:hover:not(:disabled) {
    color: #193c36;
    background: #dce8da;
}

.host-label {
    color: #355356;
    font-size: 11px;
    font-weight: 650;
}

.pause-banner {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin: 17px 0 0;
    padding: 14px 16px;
    color: #533b12;
    background: var(--warning-soft);
    border: 1px solid #d7bb78;
}

.pause-symbol {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid #a57527;
    color: #67450a;
    font-size: 15px;
    font-weight: 800;
}

.pause-copy h2 {
    margin: 0;
    color: #513b17;
    font-size: 14px;
}

.pause-copy p {
    margin: 3px 0 1px;
    color: #5e4a25;
    font-size: 11px;
}

.transfer-state {
    color: #68480f;
    font-size: 10px;
    font-weight: 760;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pause-banner .text-button {
    color: #60410d;
    border-color: #a8894c;
}

.dice-register {
    margin-top: 19px;
    border-top: 1px solid #789288;
    border-bottom: 1px solid #a4b6aa;
    background: #dce8dd;
}

.register-heading {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 18px;
    border-bottom: 1px solid #afc1b5;
}

.register-heading h2 {
    margin: 0;
    color: #173c3b;
    font-size: 16px;
    font-weight: 740;
}

.register-heading p {
    margin: 2px 0 0;
    color: #496566;
    font-size: 11px;
}

.turn-stamp {
    color: #4b6864;
    font-size: 10px;
    font-weight: 760;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.1em;
}

.roll-layout {
    display: grid;
    grid-template-columns: minmax(270px, 0.78fr) minmax(0, 1.22fr);
    gap: 20px;
    padding: 18px;
}

.white-roll {
    display: grid;
    grid-template-columns: auto minmax(70px, 1fr);
    align-content: center;
    align-items: center;
    column-gap: 17px;
    row-gap: 5px;
}

.die-pair {
    display: flex;
    align-items: center;
    gap: 7px;
}

.die-face {
    width: 43px;
    height: 43px;
    display: grid;
    grid-template: repeat(3, 1fr) / repeat(3, 1fr);
    grid-template-areas:
        "a . b"
        "c d e"
        "f . g";
    align-items: center;
    justify-items: center;
    padding: 6px;
    border: 1px solid #7d9487;
    border-radius: 4px;
    background: #ffffff;
}

.die-white {
    box-shadow: 1px 2px 0 #c4d1c7;
}

.pip {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #17343a;
}

.pip-top-left {
    grid-area: a;
}

.pip-top-right {
    grid-area: b;
}

.pip-middle-left {
    grid-area: c;
}

.pip-center {
    grid-area: d;
}

.pip-middle-right {
    grid-area: e;
}

.pip-bottom-left {
    grid-area: f;
}

.pip-bottom-right {
    grid-area: g;
}

.white-total {
    display: grid;
    align-content: center;
    justify-items: start;
}

.white-total span {
    color: #45605e;
    font-size: 9px;
    font-weight: 760;
    letter-spacing: 0.09em;
}

.white-total strong {
    color: #173c3b;
    font-size: 42px;
    font-weight: 760;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.06em;
    line-height: 1;
}

.white-roll > p {
    grid-column: 1 / -1;
    margin: 2px 0 0;
    color: #496566;
    font-size: 11px;
}

.color-rolls {
    min-width: 0;
    padding-left: 18px;
    border-left: 1px solid #aec0b4;
}

.color-roll-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: #355756;
    font-size: 10px;
    font-weight: 720;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.color-roll-heading span:last-child {
    color: #5b706a;
    font-weight: 560;
}

.color-roll-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 8px;
}

.color-red {
    --row-color: var(--red);
    --row-soft: var(--red-soft);
}

.color-yellow {
    --row-color: var(--yellow);
    --row-soft: var(--yellow-soft);
}

.color-green {
    --row-color: var(--green);
    --row-soft: var(--green-soft);
}

.color-blue {
    --row-color: var(--blue);
    --row-soft: var(--blue-soft);
}

.color-roll {
    min-height: 42px;
    display: grid;
    grid-template-columns: 9px minmax(0, 1fr) 31px 38px;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    color: #243d40;
    background: var(--row-soft);
}

.row-marker {
    width: 8px;
    height: 8px;
    display: inline-block;
    background: var(--row-color);
}

.color-red .row-marker,
.marker-red {
    transform: rotate(45deg);
}

.color-yellow .row-marker,
.marker-yellow {
    border-radius: 50%;
}

.color-green .row-marker,
.marker-green {
    border-radius: 1px;
}

.color-blue .row-marker,
.marker-blue {
    border: 2px solid var(--row-color);
    border-radius: 50%;
    background: transparent;
}

.color-name {
    overflow: hidden;
    color: #294346;
    font-size: 11px;
    font-weight: 680;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.die-mini {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid var(--row-color);
    color: var(--row-color);
    background: #fbfcf7;
    font-size: 12px;
    font-weight: 760;
    font-variant-numeric: tabular-nums;
}

.color-roll strong {
    color: #17343a;
    font-size: 17px;
    font-weight: 760;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.color-roll-note {
    margin: 8px 0 0;
    color: #4b6463;
    font-size: 10px;
}

.turn-instruction {
    min-height: 66px;
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    margin-top: 17px;
    padding: 11px 16px;
    color: #edf4e9;
    background: #1a3b3e;
}

.active-marker {
    width: 9px;
    height: 9px;
    transform: rotate(45deg);
    background: var(--accent);
}

.turn-instruction strong {
    display: block;
    color: #ffffff;
    font-size: 13px;
}

.turn-instruction p {
    margin: 2px 0 0;
    color: #c6d9ce;
    font-size: 11px;
}

.turn-connection {
    color: #d4e875;
    font-size: 10px;
    font-weight: 700;
    text-align: right;
}

.sheet-section {
    margin-top: 24px;
}

.sheet-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.sheet-heading h2 {
    margin: 0;
    color: #18373b;
    font-size: 19px;
    letter-spacing: -0.025em;
}

.sheet-heading p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.sheet-key {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #466263 !important;
    font-size: 10px !important;
}

.key-available,
.key-marked,
.key-closed {
    width: 9px;
    height: 9px;
    display: inline-block;
    border: 1px solid #71897d;
}

.key-available {
    background: #ffffff;
}

.key-marked {
    background: #d5e5d7;
    box-shadow: inset 0 0 0 2px #f7f9f3;
}

.key-closed {
    background: #a8b6ae;
}

.sheet-tabs {
    display: none;
}

.player-sheet-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.player-sheet {
    min-width: 0;
    padding: 13px 13px 10px;
    border: 1px solid #afc0b5;
    background: var(--paper);
    transition: border-color 180ms ease, background-color 180ms ease;
}

.player-sheet.is-active-player {
    border-color: #557b69;
    background: #fbfcf8;
}

.player-sheet.is-removed-player {
    background: #e9ede8;
}

.sheet-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 9px;
    border-bottom: 1px solid #d2ddd4;
}

.sheet-player {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.sheet-avatar {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid #8aa297;
    color: #1e5045;
    background: #e6eee5;
    font-size: 10px;
    font-weight: 760;
}

.sheet-player h3 {
    overflow: hidden;
    margin: 0;
    color: #16383b;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sheet-role {
    margin: 2px 0 0;
    color: #496466;
    font-size: 9px;
    font-weight: 660;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.sheet-total {
    min-width: 54px;
    display: grid;
    justify-items: end;
    line-height: 1;
}

.sheet-total strong {
    color: #1f5649;
    font-size: 23px;
    font-variant-numeric: tabular-nums;
}

.sheet-total span {
    margin-top: 4px;
    color: #526a6a;
    font-size: 9px;
}

.penalty-line {
    min-height: 31px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #4d6667;
    font-size: 9px;
}

.penalty-meter {
    display: inline-flex;
    gap: 3px;
}

.penalty-slot {
    width: 9px;
    height: 9px;
    display: inline-block;
    border: 1px solid #acbcb2;
    background: #ffffff;
}

.penalty-slot.is-used {
    border-color: #a13d30;
    background: #c84c3e;
}

.penalty-line strong {
    color: #6c3029;
    font-size: 9px;
    font-variant-numeric: tabular-nums;
}

.score-rows {
    display: grid;
    gap: 5px;
}

.score-row {
    min-width: 0;
    padding: 5px 6px 6px;
    background: var(--row-soft);
}

.row-heading {
    min-height: 18px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.row-title {
    color: #263f42;
    font-size: 9px;
    font-weight: 740;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.row-direction {
    color: #51696a;
    font-size: 8px;
    font-variant-numeric: tabular-nums;
}

.row-lock {
    margin-left: auto;
    color: #354e4d;
    font-size: 8px;
    font-weight: 760;
    letter-spacing: 0.06em;
}

.number-track {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(11, minmax(0, 1fr));
    gap: 2px;
}

.number-cell {
    position: relative;
    min-width: 0;
    min-height: 29px;
    display: grid;
    place-items: center;
    padding: 2px 0;
    border: 1px solid #b7c6bc;
    border-radius: 0;
    color: #294448;
    background: #f9fbf7;
    font-size: 10px;
    font-weight: 660;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 180ms ease;
}

.number-cell.is-available {
    border-color: var(--row-color);
    color: #15383a;
    background: #ffffff;
}

.number-cell.is-available:hover:not(:disabled) {
    background: var(--row-soft);
    transform: translateY(-1px);
}

.number-cell.is-pending {
    border-color: #173c3b;
    color: #102b2c;
    background: #d8e8af;
}

.number-cell.is-marked {
    border-color: #718b7c;
    color: #173c3a;
    background: #d7e5d8;
}

.number-cell.is-unavailable {
    border-color: #d4ddd6;
    color: #71817d;
    background: #e9efea;
}

.number-cell.is-final::after {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 3px;
    height: 3px;
    content: "";
    background: var(--row-color);
}

.cross-stamp {
    position: absolute;
    inset: 4px;
    pointer-events: none;
    animation: mark-stamp 240ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.cross-stamp::before,
.cross-stamp::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 12px;
    content: "";
    background: #245444;
}

.cross-stamp::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.cross-stamp::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.number-cell.is-pending .cross-stamp::before,
.number-cell.is-pending .cross-stamp::after {
    background: #193d35;
}

.finish-notch {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 3px;
    height: 3px;
    background: var(--row-color);
}

.row-is-locked .number-cell {
    border-color: #c3cec6;
    color: #657570;
    background: #e2e9e3;
}

.row-closed-note {
    margin: 4px 0 0;
    color: #4d6462;
    font-size: 8px;
}

.sheet-footer {
    min-height: 25px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 9px;
    margin-top: 7px;
    padding-top: 5px;
    border-top: 1px solid #d2ddd4;
    color: #506969;
    font-size: 9px;
}

.sheet-footer strong {
    color: #204c41;
    font-variant-numeric: tabular-nums;
}

.surface-footer {
    width: min(100%, 1420px);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 26px auto 0;
    padding-top: 11px;
    border-top: 1px solid #bdcbc1;
    color: #506969;
    font-size: 10px;
}

.shared-place {
    display: grid;
    grid-template-columns: 54px minmax(0, 0.9fr) minmax(220px, 1.1fr);
    align-items: center;
    gap: 18px;
    margin: 0 0 26px;
    padding: 19px 21px;
    color: #f0f4e8;
    background: #183b3e;
}

.place-seal {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid #bbd264;
    color: #e6f095;
    font-size: 24px;
    font-weight: 780;
    font-variant-numeric: tabular-nums;
}

.shared-place span {
    color: #d9e998;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.1em;
}

.shared-place h2 {
    margin: 2px 0 0;
    color: #ffffff;
    font-size: 19px;
}

.shared-place p {
    margin: 3px 0 0;
    color: #d2ded1;
    font-size: 12px;
}

.shared-place .tie-note {
    padding-left: 18px;
    border-left: 1px solid #52736a;
    color: #d7e3d7;
}

.final-scores {
    padding: 21px 24px;
    border-top: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

.final-score-list {
    margin-top: 12px;
}

.final-score-row {
    min-height: 67px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 118px 54px;
    align-items: center;
    gap: 15px;
    border-top: 1px solid #ced9d0;
}

.result-player {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-mark {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    transform: rotate(45deg);
    background: #799b62;
}

.result-player div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.result-player strong {
    color: #1c3b3d;
    font-size: 13px;
}

.result-player span {
    overflow: hidden;
    color: #536b6b;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-place {
    color: #385a4d;
    font-size: 11px;
    font-weight: 700;
    text-align: right;
}

.result-total {
    color: #173d39;
    font-size: 20px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.final-score-row.is-shared-first {
    background: #edf3e8;
}

.reopen-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 23px;
    padding: 18px 0;
    border-top: 1px solid #afc0b5;
}

.reopen-panel h2 {
    margin: 0;
    color: #18383b;
    font-size: 17px;
}

.reopen-panel p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.reopen-panel .primary-button {
    flex: 0 0 auto;
}

@keyframes mark-stamp {
    from {
        opacity: 0.25;
        transform: scale(1.35);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 1120px) {
    .app-shell {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .work-surface {
        padding-right: 24px;
        padding-left: 24px;
    }

    .discovery-layout,
    .lobby-layout {
        grid-template-columns: 1fr;
    }

    .directory-column {
        grid-template-columns: minmax(0, 1fr);
    }

    .player-sheet-grid {
        gap: 9px;
    }

    .player-sheet {
        padding-right: 9px;
        padding-left: 9px;
    }

    .number-cell {
        min-height: 27px;
        font-size: 9px;
    }
}

@media (max-width: 820px) {
    .app-shell {
        display: block;
    }

    .perimeter-rail {
        z-index: 30;
        position: sticky;
        top: 0;
        height: auto;
        min-height: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 14px;
        overflow: visible;
        padding: 10px 14px 0;
        border-bottom: 1px solid #45635b;
    }

    .rail-brand {
        min-height: 33px;
        font-size: 11px;
    }

    .brand-mark {
        width: 27px;
        height: 27px;
    }

    .room-nav {
        grid-column: 1 / -1;
        display: flex;
        gap: 3px;
        overflow-x: auto;
        padding-bottom: 9px;
        scrollbar-width: thin;
    }

    .nav-item {
        min-width: 83px;
        min-height: 36px;
        justify-content: center;
        padding: 6px 10px;
        font-size: 12px;
        white-space: nowrap;
    }

    .rail-room,
    .rail-status,
    .rail-rules,
    .rail-preview {
        display: none;
    }

    .rail-mark-action {
        position: fixed;
        z-index: 40;
        right: 0;
        bottom: 0;
        left: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: center;
        gap: 7px 11px;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        border-top: 1px solid #57766d;
        background: #152f35;
        box-shadow: 0 -4px 14px rgb(15 39 40 / 12%);
    }

    .rail-mark-action.is-status {
        display: none;
    }

    .rail-mark-action h2 {
        display: none;
    }

    .rail-mark-action p {
        grid-column: 1;
        margin: 0;
        font-size: 11px;
    }

    .rail-mark-action .mark-source {
        display: none;
    }

    .rail-primary,
    .rail-cancel {
        width: auto;
        min-width: 80px;
        min-height: 38px;
        margin: 0;
        text-align: center;
    }

    .work-surface {
        min-height: calc(100vh - 90px);
        padding: 24px 20px 142px;
    }

    .discovery-layout {
        gap: 18px;
    }

    .player-sheet-grid {
        grid-template-columns: 1fr;
    }

    .sheet-tabs {
        display: flex;
        gap: 4px;
        overflow-x: auto;
        margin: 13px 0 9px;
        padding-bottom: 4px;
        scrollbar-width: thin;
    }

    .sheet-tab {
        min-width: 124px;
        min-height: 42px;
        display: grid;
        grid-template-columns: 26px minmax(0, 1fr) auto;
        align-items: center;
        gap: 7px;
        padding: 5px 8px;
        border: 1px solid #b6c5bb;
        color: #365355;
        background: #edf2eb;
        text-align: left;
    }

    .sheet-tab.is-selected {
        border-color: #3e6e5b;
        color: #193a39;
        background: #f9fbf6;
    }

    .tab-initials {
        width: 24px;
        height: 24px;
        display: grid;
        place-items: center;
        border: 1px solid #93a99a;
        font-size: 9px;
        font-weight: 740;
    }

    .tab-name {
        overflow: hidden;
        font-size: 11px;
        font-weight: 670;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .tab-score {
        color: #255648;
        font-size: 10px;
        font-variant-numeric: tabular-nums;
    }

    .player-sheet:not(.is-selected) {
        display: none;
    }

    .player-sheet {
        padding: 13px;
    }

    .number-cell {
        min-height: 34px;
        font-size: 11px;
    }

    .dice-register {
        margin-top: 15px;
    }
}

@media (max-width: 560px) {
    .prototype-note {
        min-height: 30px;
        padding: 5px 11px;
        font-size: 9px;
        letter-spacing: 0.035em;
    }

    .prototype-note span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .perimeter-rail {
        padding-right: 10px;
        padding-left: 10px;
    }

    .rail-brand {
        gap: 8px;
        font-size: 10px;
    }

    .nav-key {
        display: none;
    }

    .nav-item {
        min-width: 67px;
        padding-right: 8px;
        padding-left: 8px;
    }

    .work-surface {
        padding: 19px 12px 148px;
    }

    .screen-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 19px;
    }

    .screen-heading h1,
    .play-heading h1 {
        font-size: 27px;
    }

    .screen-heading p,
    .play-heading p {
        font-size: 12px;
    }

    .create-room,
    .public-directory,
    .private-join,
    .member-section,
    .room-settings,
    .final-scores {
        padding: 17px 14px;
    }

    .private-join {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .invite-entry {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 7px;
    }

    .invite-entry .text-button {
        min-width: 92px;
        font-size: 10px;
    }

    .room-list-row {
        grid-template-columns: minmax(0, 1fr) 48px 42px;
        gap: 8px;
    }

    .room-list-seats span {
        font-size: 12px;
    }

    .text-button {
        font-size: 11px;
    }

    .lobby-heading {
        gap: 12px;
    }

    .room-state-tags {
        gap: 5px;
    }

    .member-section,
    .room-settings {
        padding-right: 12px;
        padding-left: 12px;
    }

    .member-row {
        grid-template-columns: 30px minmax(0, 1fr) auto;
        gap: 8px;
    }

    .member-initials {
        width: 27px;
        height: 27px;
    }

    .member-state {
        grid-column: 2;
        grid-row: 2;
        margin-top: -15px;
        font-size: 9px;
    }

    .member-row .small-action {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .setting-line {
        gap: 8px;
        font-size: 11px;
    }

    .setting-line > strong {
        font-size: 11px;
    }

    .compact-options .visibility-option {
        min-width: 67px;
        padding: 4px 6px;
        font-size: 9px;
    }

    .play-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        padding-bottom: 13px;
    }

    .play-heading-actions {
        justify-content: flex-start;
    }

    .pause-banner {
        grid-template-columns: 27px minmax(0, 1fr);
        gap: 9px;
        padding: 11px;
    }

    .pause-banner > .text-button {
        grid-column: 2;
        justify-self: start;
    }

    .pause-symbol {
        width: 24px;
        height: 24px;
    }

    .pause-copy h2 {
        font-size: 12px;
    }

    .pause-copy p {
        font-size: 10px;
    }

    .register-heading {
        min-height: 49px;
        padding: 7px 11px;
    }

    .roll-layout {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 12px;
    }

    .white-roll {
        grid-template-columns: auto minmax(70px, 1fr);
        justify-content: start;
        column-gap: 13px;
    }

    .die-face {
        width: 39px;
        height: 39px;
    }

    .white-total strong {
        font-size: 36px;
    }

    .color-rolls {
        padding: 11px 0 0;
        border-top: 1px solid #aec0b4;
        border-left: 0;
    }

    .color-roll {
        min-height: 39px;
        grid-template-columns: 8px minmax(0, 1fr) 26px 31px;
        gap: 6px;
        padding: 4px 6px;
    }

    .color-name {
        font-size: 10px;
    }

    .die-mini {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }

    .color-roll strong {
        font-size: 15px;
    }

    .turn-instruction {
        grid-template-columns: 9px minmax(0, 1fr);
        gap: 9px;
        padding: 10px 11px;
    }

    .turn-instruction p {
        font-size: 10px;
    }

    .turn-connection {
        grid-column: 2;
        text-align: left;
    }

    .sheet-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .sheet-key {
        gap: 5px;
        font-size: 9px !important;
    }

    .player-sheet {
        padding: 10px 8px 8px;
    }

    .sheet-topline {
        gap: 6px;
    }

    .sheet-avatar {
        width: 27px;
        height: 27px;
    }

    .sheet-player {
        gap: 6px;
    }

    .sheet-player h3 {
        font-size: 12px;
    }

    .sheet-total strong {
        font-size: 21px;
    }

    .score-row {
        padding: 4px 4px 5px;
    }

    .number-track {
        gap: 1px;
    }

    .number-cell {
        min-height: 34px;
        font-size: 10px;
    }

    .sheet-footer {
        font-size: 8px;
    }

    .shared-place {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 11px;
        padding: 14px 12px;
    }

    .place-seal {
        width: 38px;
        height: 38px;
        font-size: 20px;
    }

    .shared-place h2 {
        font-size: 16px;
    }

    .shared-place .tie-note {
        grid-column: 1 / -1;
        padding: 9px 0 0;
        border-top: 1px solid #52736a;
        border-left: 0;
        font-size: 11px;
    }

    .final-score-row {
        min-height: 68px;
        grid-template-columns: minmax(0, 1fr) 76px 40px;
        gap: 7px;
    }

    .result-player {
        gap: 8px;
    }

    .result-player span {
        max-width: 165px;
        font-size: 9px;
    }

    .result-place {
        font-size: 9px;
    }

    .result-total {
        font-size: 17px;
    }

    .reopen-panel {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .surface-footer {
        flex-direction: column;
        gap: 4px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.loading-surface {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    color: #edf4e9;
    background: var(--deep);
    font-variant-numeric: tabular-nums;
}

.not-found-surface {
    width: min(100% - 32px, 680px);
    min-height: 60vh;
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 12px;
    margin: 0 auto;
    padding: 32px 0;
}

.not-found-surface h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.035em;
}

.not-found-surface p {
    color: var(--muted);
}

.not-found-surface .primary-button {
    text-decoration: none;
}

.join-room {
    width: min(100%, 560px);
    margin: 10px auto 0;
}

.join-room > .primary-button {
    width: 100%;
    margin-top: 18px;
}

.rail-leave {
    width: 100%;
    margin-top: auto;
    border-color: #648078;
    color: #e5eee6;
    background: transparent;
    text-align: left;
}

.rail-leave:hover:not(:disabled) {
    color: var(--deep);
    background: #e8f0e2;
}

.roll-button {
    min-width: 160px;
    margin-top: 12px;
}

.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 4px 0 8px;
}

.kick-confirmation {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0 8px 46px;
    border-top: 1px dashed #b5c5ba;
    color: #5c4119;
    font-size: 11px;
}

.sheet-kick-confirm {
    display: grid;
    gap: 3px;
}

.sheet-tabs .sheet-tab {
    cursor: pointer;
}

.player-sheet-grid .player-sheet.is-selected {
    outline: 2px solid #577a68;
    outline-offset: 1px;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --ink: #e7eee8;
        --muted: #b2c3ba;
        --deep: #0d2025;
        --deep-raised: #17363a;
        --ground: #0b171b;
        --paper: #14262b;
        --paper-strong: #1b3035;
        --line: #31494b;
        --line-dark: #49615d;
        --accent: #d7ed83;
        --red: #f0786c;
        --red-soft: #392529;
        --yellow: #e8c65b;
        --yellow-soft: #3a3320;
        --green: #76ba93;
        --green-soft: #20382f;
        --blue: #7aaed1;
        --blue-soft: #203341;
        --warning: #f0c269;
        --warning-soft: #392e1b;
    }

    html,
    body,
    .work-surface {
        color: var(--ink);
        background: var(--ground);
    }

    h1,
    h2,
    h3,
    .screen-heading h1,
    .play-heading h1,
    .create-room h2,
    .public-directory h2,
    .private-join h2,
    .member-section h2,
    .room-settings h2,
    .final-scores h2 {
        color: var(--ink);
    }

    .screen-heading p,
    .play-heading p,
    .section-intro,
    .field-note,
    .privacy-note,
    .list-footnote,
    .room-list-main span,
    .private-join p,
    .empty-state p,
    .setting-note p,
    .setting-line,
    .sheet-heading p,
    .row-direction,
    .sheet-role,
    .surface-footer {
        color: var(--muted);
    }

    .field,
    .visibility-field legend {
        color: var(--ink);
    }

    .field em {
        color: var(--muted);
    }

    .create-room,
    .public-directory,
    .private-join,
    .room-settings,
    .member-section,
    .player-sheet {
        color: var(--ink);
        background: var(--paper);
        border-color: var(--line);
    }

    .room-list-row,
    .member-row,
    .setting-line,
    .setting-note {
        border-color: var(--line);
    }

    .room-list-main strong,
    .room-list-seats span,
    .member-name strong,
    .setting-line > strong,
    .setting-note strong,
    .sheet-heading h2,
    .sheet-player h3,
    .sheet-total strong,
    .row-title,
    .number-cell,
    .result-player strong,
    .result-total {
        color: var(--ink);
    }

    .text-input {
        color: var(--ink);
        background: #0f2025;
        border-color: #5a726d;
    }

    .text-input::placeholder {
        color: #b2c3ba;
        opacity: 1;
    }

    .text-input:focus {
        border-color: var(--accent);
    }

    .visibility-options {
        background: #0f2025;
        border-color: #5a726d;
    }

    .visibility-option {
        color: #d5e0d9;
    }

    .visibility-option + .visibility-option {
        border-color: #5a726d;
    }

    .visibility-option:hover:not(:disabled) {
        background: #27413e;
    }

    .visibility-option.is-selected {
        color: #f2f7ef;
        background: #315b4d;
    }

    .primary-button {
        color: #102421;
        background: var(--accent);
        border-color: #d7ed83;
    }

    .primary-button:hover:not(:disabled) {
        color: #0b1d1b;
        background: #e4f5a6;
    }

    .text-button {
        color: #c5e5d2;
        border-color: #82b39b;
    }

    .text-button:hover:not(:disabled) {
        color: #edf8f0;
        border-color: #edf8f0;
    }

    .state-tag,
    .tag-public,
    .tag-connected {
        color: #c7e5d2;
        background: #1c3a31;
        border-color: #436756;
    }

    .tag-private {
        color: #f4d88c;
        background: #3a3320;
        border-color: #84703b;
    }

    .tag-paused {
        color: #f4d88c;
        background: #3a2f1c;
        border-color: #8a6b33;
    }

    .inline-notice {
        color: #c7e5d2;
        background: #1c3a31;
    }

    .form-error {
        color: #ffd2cb;
        background: #462626;
    }

    .empty-state {
        border-color: #526865;
    }

    .room-settings .invite-code,
    .rail-code strong {
        color: var(--accent);
    }

    .member-initials,
    .sheet-avatar,
    .tab-initials {
        color: #d8eadf;
        background: #203a38;
        border-color: #617c70;
    }

    .state-online {
        color: #8ed5ad;
    }

    .state-offline {
        color: #f2ca73;
    }

    .small-action {
        color: #f3dcaa;
        background: #352d20;
        border-color: #7a6845;
    }

    .small-action:hover:not(:disabled) {
        background: #4b3d25;
    }

    .pause-banner {
        color: #f6dfad;
        background: #382e1c;
        border-color: #79663b;
    }

    .pause-symbol {
        color: #f6dfad;
        border-color: #a88c4d;
    }

    .pause-copy h2,
    .pause-copy p,
    .transfer-state {
        color: #f6dfad;
    }

    .dice-register {
        background: #182c2e;
        border-color: #536e65;
    }

    .register-heading,
    .color-rolls {
        border-color: #3b5552;
    }

    .register-heading h2,
    .white-total strong,
    .color-roll strong {
        color: #e7eee8;
    }

    .register-heading p,
    .turn-stamp,
    .white-roll > p,
    .white-total span,
    .color-roll-heading,
    .color-roll-note {
        color: #b8c9c0;
    }

    .die-face {
        background: #eff3ec;
        border-color: #a9b8ac;
    }

    .color-roll {
        color: #e7eee8;
        background: var(--row-soft);
    }

    .color-name {
        color: #e7eee8;
    }

    .die-mini {
        color: var(--row-color);
        background: #102025;
    }

    .turn-instruction {
        color: #edf4e9;
        background: #17363a;
    }

    .turn-instruction p {
        color: #c6d9ce;
    }

    .sheet-key {
        color: var(--muted) !important;
    }

    .key-available {
        background: #203237;
        border-color: #71877d;
    }

    .key-marked {
        background: #365443;
        border-color: #86a995;
        box-shadow: inset 0 0 0 2px #203237;
    }

    .key-closed {
        background: #455653;
        border-color: #71827b;
    }

    .player-sheet.is-active-player {
        background: #182d30;
        border-color: #7ba98e;
    }

    .player-sheet.is-removed-player {
        background: #202a2b;
    }

    .penalty-line,
    .sheet-footer {
        color: #c0d0c7;
        border-color: var(--line);
    }

    .penalty-line strong {
        color: #f0b4a8;
    }

    .penalty-slot {
        border-color: #725049;
        background: #2d2527;
    }

    .penalty-slot.is-used {
        background: #b94c43;
        border-color: #e17b6d;
    }

    .score-row {
        background: var(--row-soft);
    }

    .row-direction,
    .row-lock,
    .row-closed-note {
        color: #bac9c1;
    }

    .number-cell {
        color: #dfe9e2;
        background: #1b2e32;
        border-color: #425a57;
    }

    .number-cell.is-available {
        color: #f1f7f2;
        background: #263c3d;
        border-color: var(--row-color);
    }

    .number-cell.is-available:hover:not(:disabled) {
        background: #354d48;
    }

    .number-cell.is-pending {
        color: #11251f;
        background: var(--accent);
        border-color: #efffa8;
    }

    .number-cell.is-marked {
        color: #eef6ef;
        background: #355544;
        border-color: #79a18a;
    }

    .number-cell.is-unavailable {
        color: #9cafaa;
        background: #1c292c;
        border-color: #344649;
    }

    .cross-stamp::before,
    .cross-stamp::after {
        background: #c0e2c8;
    }

    .number-cell.is-pending .cross-stamp::before,
    .number-cell.is-pending .cross-stamp::after {
        background: #152b25;
    }

    .row-is-locked .number-cell {
        color: #a8b8b0;
        background: #263234;
        border-color: #3e4d4d;
    }

    .sheet-tab {
        color: #d5e0d9;
        background: #18292d;
        border-color: #425755;
    }

    .sheet-tab.is-selected {
        color: #f0f5ee;
        background: #203b38;
        border-color: #82aa90;
    }

    .tab-score {
        color: #c5e5d2;
    }

    .shared-place {
        color: #e4f0e8;
        background: #173b32;
        border-color: #557a69;
    }

    .shared-place h2,
    .shared-place p,
    .shared-place > div > span {
        color: #e4f0e8;
    }

    .tie-note {
        color: #d0e0d6;
        border-color: #54746a;
    }

    .final-score-row {
        border-color: var(--line);
    }

    .final-score-row.is-shared-first {
        background: #203a31;
    }

    .result-player span {
        color: var(--muted);
    }

    .result-place {
        color: #c7d4ce;
    }

    .reopen-panel {
        color: var(--ink);
        background: var(--paper);
        border-color: var(--line);
    }

    .reopen-panel p {
        color: var(--muted);
    }

    .tab-key,
    .nav-key {
        color: #b9c9c1;
    }

    .blazor-error-boundary {
        color: #ffe0d8;
        background-color: #462626;
    }
}
