#ui-root {
    --bg: #0c1512;
    --bg-2: #0f1c18;
    --panel: #16241f;
    --panel-2: #1b2c26;
    --row: #1e332c;
    --stroke: #2c463d;
    --stroke-soft: #24382f;
    --backdrop: rgba(6, 16, 14, 0.62);
    --accent: #f1c67d;
    --accent-bright: #ffe0a0;
    --text: #f6f1e0;
    --text-2: #c7cdba;
    --muted: #8f9a86;
    --primary: #c8863c;
    --primary-hover: #dd9a44;
    --primary-press: #a96f30;
    --primary-fg: #211406;
    --danger: #c85a3c;
    --danger-hover: #d96f4f;
    --success: #6fae5f;
    --radius: 14px;
    --radius-sm: 9px;
    --radius-pill: 999px;
    color: var(--text);
    font-size: 14px;
    flex-grow: 1;
    background-color: var(--bg);
}

.panel-fill {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
}

.card {
    background-color: var(--panel);
    border-color: var(--stroke-soft);
    border-width: 1px;
    border-radius: var(--radius);
    padding: 14px;
}

.card-title {
    font-size: 12px;
    -unity-font-style: bold;
    letter-spacing: 1.3px;
    color: var(--accent);
    margin-bottom: 10px;
}

.card-hint {
    font-size: 11px;
    color: var(--muted);
}

.btn {
    border-radius: var(--radius-sm);
    border-width: 0;
    padding: 10px 18px;
    font-size: 14px;
    -unity-font-style: bold;
    -unity-text-align: middle-center;
    transition-property: background-color;
    transition-duration: 0.12s;
    transition-timing-function: ease;
}

.btn:disabled {
    opacity: 0.5;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--primary-fg);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-primary:active {
    background-color: var(--primary-press);
}

.btn-secondary {
    background-color: var(--panel-2);
    color: var(--text);
    border-color: var(--stroke);
    border-width: 1px;
}

.btn-secondary:hover {
    background-color: var(--stroke-soft);
}

.btn-secondary:active {
    background-color: var(--panel);
}

.btn-ghost {
    background-color: rgba(0, 0, 0, 0);
    color: var(--text-2);
    border-color: var(--stroke);
    border-width: 1px;
}

.btn-ghost:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

.btn-ghost:active {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-danger {
    background-color: var(--danger);
    color: #2a0f06;
}

.btn-danger:hover {
    background-color: var(--danger-hover);
}

.btn-danger:active {
    background-color: var(--danger);
}

.row {
    flex-direction: row;
    align-items: center;
    background-color: var(--panel-2);
    border-color: var(--stroke-soft);
    border-width: 1px;
    border-radius: var(--radius-sm);
    padding: 11px 12px;
    margin-bottom: 8px;
    transition-property: background-color, border-color;
    transition-duration: 0.6s;
    transition-timing-function: ease;
}

.pill {
    border-radius: var(--radius-pill);
    border-color: var(--stroke);
    border-width: 1px;
    background-color: var(--panel);
    padding: 5px 12px;
    font-size: 12px;
    -unity-font-style: bold;
    color: var(--text-2);
}

.tag {
    border-radius: var(--radius-pill);
    padding: 2px 6px;
    font-size: 10px;
    -unity-font-style: bold;
    letter-spacing: 0.6px;
    -unity-text-align: middle-center;
    color: var(--bg);
}

.chip {
    flex-direction: column;
    background-color: rgba(14, 26, 22, 0.78);
    border-color: var(--stroke);
    border-width: 1px;
    border-radius: var(--radius-sm);
    padding: 7px 14px;
}

.label-muted {
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--muted);
}

.value-mono {
    font-size: 13px;
    color: var(--text-2);
}

.value-accent {
    font-size: 16px;
    -unity-font-style: bold;
    color: var(--accent-bright);
}

.modal-overlay {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background-color: var(--backdrop);
    transition-property: opacity;
    transition-duration: 0.15s;
    transition-timing-function: ease-out;
}

.modal-window {
    width: 600px;
    max-height: 90%;
    background-color: var(--panel);
    border-color: var(--stroke);
    border-width: 1px;
    border-radius: var(--radius);
    transition-property: opacity, scale;
    transition-duration: 0.18s;
    transition-timing-function: ease-out;
}

.modal-title {
    font-size: 24px;
    -unity-font-style: bold;
    color: var(--accent-bright);
}

.modal-subtitle {
    margin-top: 3px;
    font-size: 13px;
    color: var(--text-2);
}

.modal-footer {
    flex-direction: row;
    justify-content: flex-end;
    padding: 14px 20px 18px;
}

.scroll-list {
    flex-grow: 1;
    flex-shrink: 1;
}

.empty-note {
    color: var(--text-2);
    font-size: 14px;
    -unity-text-align: middle-center;
    padding: 24px 8px;
}

.stat-tile {
    flex-grow: 1;
    flex-basis: 0;
    align-items: center;
    padding: 10px;
    border-radius: var(--radius-sm);
    border-color: var(--stroke-soft);
    border-width: 1px;
    background-color: var(--panel-2);
}

.stat-value {
    font-size: 24px;
    -unity-font-style: bold;
    color: var(--accent-bright);
}

.stat-label {
    font-size: 10px;
    letter-spacing: 0.8px;
    color: var(--muted);
}

#hud-timer-fill {
    background-color: var(--accent);
    transition-property: background-color;
    transition-duration: 0.25s;
}

#hud-timer-fill.timer-low {
    background-color: var(--danger);
}

.flash {
    background-color: rgba(241, 198, 125, 0.32);
    border-color: var(--accent);
    transition-property: background-color, border-color;
    transition-duration: 0.6s;
    transition-timing-function: ease-out;
}

.tone-info #toast-accent {
    background-color: var(--accent);
}

.tone-success #toast-accent {
    background-color: var(--success);
}

.tone-error #toast-accent {
    background-color: var(--danger);
}

.kv-row {
    flex-direction: row;
    justify-content: space-between;
    padding: 4px 0;
    transition-property: background-color, border-color;
    transition-duration: 0.6s;
    transition-timing-function: ease;
}

.kv-key {
    font-size: 12px;
    color: var(--muted);
}

.kv-value {
    font-size: 12px;
    color: var(--text-2);
}
