:root {
    --th-bg: #0c1a1f;
    --th-bg2: #122830;
    --th-panel: #163038;
    --th-gold: #f0c14b;
    --th-gold-dim: #c9a227;
    --th-teal: #2dd4bf;
    --th-teal-dim: #14b8a6;
    --th-text: #ecfdf5;
    --th-muted: #94a3b8;
    --th-danger: #f87171;
    --th-hot: #fb923c;
    --th-warm: #facc15;
    --th-cold: #38bdf8;
    --th-radius: 14px;
    --th-font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body.th-body {
    margin: 0;
    font-family: var(--th-font);
    background: linear-gradient(165deg, #071015 0%, var(--th-bg) 40%, #0a2028 100%);
    color: var(--th-text);
    min-height: 100vh;
}

.th-app { max-width: 1200px; margin: 0 auto; padding: 0.75rem 1rem 2rem; }

.th-breadcrumb {
    font-size: 0.85rem;
    color: var(--th-muted);
    margin-bottom: 0.75rem;
}
.th-breadcrumb a { color: var(--th-teal); text-decoration: none; }
.th-breadcrumb a:hover { text-decoration: underline; }

.th-hero { text-align: center; margin-bottom: 1.25rem; }
.th-hero-tagline {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--th-teal);
}
.th-hero h1 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.5rem, 4vw, 2.1rem);
    background: linear-gradient(90deg, var(--th-gold), var(--th-teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.th-hero p { margin: 0; color: var(--th-muted); max-width: 640px; margin-inline: auto; line-height: 1.5; font-size: 0.95rem; }

.th-screen { display: none; animation: thFade 0.35s ease; }
.th-screen.is-active { display: block; }
@keyframes thFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.th-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.th-menu-card {
    background: var(--th-panel);
    border: 1px solid rgba(45, 212, 191, 0.15);
    border-radius: var(--th-radius);
    padding: 1.25rem;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
    text-align: left;
}
.th-menu-card:hover {
    transform: translateY(-2px);
    border-color: rgba(240, 193, 75, 0.45);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.th-menu-card__icon { font-size: 2rem; margin-bottom: 0.5rem; }
.th-menu-card h2 { margin: 0 0 0.35rem; font-size: 1.1rem; color: var(--th-gold); }
.th-menu-card p { margin: 0; font-size: 0.88rem; color: var(--th-muted); line-height: 1.45; }

.th-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    border: none;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s, transform 0.1s;
}
.th-btn:active { transform: scale(0.97); }
.th-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.th-btn--gold { background: linear-gradient(135deg, var(--th-gold), var(--th-gold-dim)); color: #1a1200; }
.th-btn--teal { background: linear-gradient(135deg, var(--th-teal), var(--th-teal-dim)); color: #042f2e; }
.th-btn--ghost { background: transparent; color: var(--th-teal); border: 1px solid rgba(45, 212, 191, 0.35); }
.th-btn--danger { background: var(--th-danger); color: #450a0a; }
.th-btn--lg { padding: 0.75rem 1.5rem; font-size: 1.05rem; }

.th-panel {
    background: var(--th-panel);
    border: 1px solid rgba(45, 212, 191, 0.12);
    border-radius: var(--th-radius);
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
}

.th-form-row { margin-bottom: 0.75rem; }
.th-form-row label { display: block; font-size: 0.82rem; color: var(--th-muted); margin-bottom: 0.25rem; }
.th-label-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
}
.th-label-row span:first-child { font-size: 0.82rem; color: var(--th-muted); }
.th-tip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.05rem;
    height: 1.05rem;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.12);
    color: var(--th-muted);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    cursor: help;
    flex-shrink: 0;
}
.th-tip-btn:hover, .th-tip-btn:focus {
    color: var(--th-gold);
    border-color: var(--th-gold-dim);
    outline: none;
}
.th-form-row input, .th-form-row select, .th-form-row textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: var(--th-bg2);
    color: var(--th-text);
    font: inherit;
}
.th-form-row textarea { min-height: 72px; resize: vertical; }
.th-inline-units { display: flex; gap: 0.5rem; align-items: center; }
.th-inline-units input[type="number"] { flex: 1; min-width: 0; }
.th-inline-units select { width: auto; min-width: 6.5rem; }
.th-field-hint { font-size: 0.78rem; color: var(--th-muted); margin: 0.35rem 0 0; line-height: 1.35; }

.th-hunt-list { list-style: none; padding: 0; margin: 0; }
.th-hunt-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 0.92rem;
}
.th-hunt-list li:last-child { border-bottom: none; }

.th-play-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 900px) {
    .th-play-layout { grid-template-columns: 1fr 340px; }
}

.th-map-wrap {
    position: relative;
    border-radius: var(--th-radius);
    overflow: hidden;
    border: 1px solid rgba(45, 212, 191, 0.2);
    min-height: 280px;
}
.th-geo-wrap {
    position: relative;
    z-index: 5;
    margin-bottom: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--th-radius);
    border: 1px solid rgba(45, 212, 191, 0.25);
    background: rgba(15, 23, 42, 0.55);
}
.th-geo-label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--th-gold); margin-bottom: 0.4rem; }
.th-geo-row { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: stretch; }
.th-geo-input {
    flex: 1 1 12rem;
    min-width: 0;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.85);
    color: #e2e8f0;
    font-size: 0.92rem;
}
.th-geo-input:focus { outline: 2px solid var(--th-teal); border-color: var(--th-teal); }
.th-geo-details { margin-top: 0.45rem; font-size: 0.82rem; color: var(--th-muted); }
.th-geo-details summary { cursor: pointer; color: #cbd5e1; font-weight: 600; }
.th-geo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem 0.65rem; margin-top: 0.5rem; }
@media (max-width: 540px) { .th-geo-grid { grid-template-columns: 1fr; } }
.th-geo-hint { margin: 0.35rem 0 0 !important; font-size: 0.76rem !important; line-height: 1.4; }
.th-geo-status { margin: 0.25rem 0 0; font-size: 0.76rem; min-height: 1.1em; }
.th-geo-results {
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    top: 100%;
    margin-top: 4px;
    max-height: min(40vh, 280px);
    overflow-y: auto;
    background: #0f172a;
    border: 1px solid rgba(45, 212, 191, 0.35);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    z-index: 20;
}
.th-geo-hit {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.55rem 0.7rem;
    border: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    background: transparent;
    color: #e2e8f0;
    font-size: 0.82rem;
    line-height: 1.35;
    cursor: pointer;
    font-family: inherit;
}
.th-geo-hit:last-child { border-bottom: 0; }
.th-geo-hit:hover, .th-geo-hit:focus { background: rgba(45, 212, 191, 0.12); outline: none; }
.th-geo-hit small { display: block; color: var(--th-muted); font-size: 0.72rem; margin-top: 0.15rem; }
.th-geo-empty { padding: 0.55rem 0.7rem; font-size: 0.8rem; color: var(--th-muted); }
#th-map-play, #th-map-editor, #th-map-nature { height: min(52vh, 420px); width: 100%; background: #0f172a; }

.th-hud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.th-hud-pill {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(240, 193, 75, 0.25);
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
}
.th-hud-pill span { color: var(--th-gold); }

.th-clue-card h2 { margin: 0 0 0.5rem; font-size: 1.05rem; color: var(--th-gold); }
.th-clue-text {
    font-size: 1rem;
    line-height: 1.55;
    margin: 0 0 1rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    border-left: 3px solid var(--th-teal);
}

.th-compass-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0.75rem 0 1rem;
}
.th-compass {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #1e3a4a, #0a1520);
    border: 3px solid var(--th-gold-dim);
    position: relative;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.4);
}
.th-compass-needle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 52px;
    margin: -52px 0 0 -2px;
    transform-origin: 50% 100%;
    transition: transform 0.25s ease-out;
}
.th-compass-needle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 28px solid var(--th-gold);
}
.th-compass-needle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 22px solid #64748b;
}
.th-compass-label { font-size: 0.78rem; color: var(--th-muted); margin-top: 0.5rem; text-align: center; }

.th-warmth {
    height: 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    overflow: hidden;
    margin: 0.5rem 0 0.75rem;
}
.th-warmth-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease, background 0.4s;
    width: 10%;
    background: var(--th-cold);
}
.th-warmth-bar.is-warm { background: var(--th-warm); width: 45%; }
.th-warmth-bar.is-hot { background: var(--th-hot); width: 75%; }
.th-warmth-bar.is-arrived { background: linear-gradient(90deg, #22c55e, #ef4444); width: 100%; }
.th-heat-meter {
    margin: 0.75rem 0 1rem;
    text-align: center;
}
.th-heat-meter-title {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    color: var(--th-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.th-heat-compass {
    position: relative;
    width: 168px;
    height: 168px;
    margin: 0 auto;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 45%, #1a3040, #0a1520);
    border: 2px solid rgba(240, 193, 75, 0.35);
    box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.45), 0 4px 18px rgba(0, 0, 0, 0.35);
}
.th-heat-compass canvas {
    display: block;
    width: 168px;
    height: 168px;
    border-radius: 50%;
}
.th-heat-compass-n {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--th-muted);
    pointer-events: none;
}
.th-heat-trend {
    margin: 0.45rem 0 0;
    font-size: 0.82rem;
    color: var(--th-teal);
    min-height: 1.2em;
}
.th-heat-trend.is-cold { color: var(--th-cold); }
.th-heat-trend.is-hot { color: #ef4444; }
.th-player-accuracy {
    pointer-events: none;
}

.th-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }

.th-toast {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--th-panel);
    border: 1px solid var(--th-gold);
    color: var(--th-text);
    padding: 0.65rem 1.1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    z-index: 9999;
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    pointer-events: none;
    max-width: 90vw;
    text-align: center;
}
.th-toast.is-show { transform: translateX(-50%) translateY(0); opacity: 1; }

.th-celebrate {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 8000;
    padding: 1rem;
}
.th-celebrate.is-show { display: flex; }
.th-celebrate-box {
    background: linear-gradient(145deg, var(--th-panel), var(--th-bg2));
    border: 2px solid var(--th-gold);
    border-radius: var(--th-radius);
    padding: 1.5rem 2rem;
    text-align: center;
    max-width: 360px;
    animation: thPop 0.4s ease;
}
@keyframes thPop { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.th-celebrate-box h2 { color: var(--th-gold); margin: 0 0 0.5rem; font-size: 1.4rem; }

.th-editor-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 960px) {
    .th-editor-layout { grid-template-columns: 1fr 320px; }
}

.th-cp-list { list-style: none; padding: 0; margin: 0; max-height: 320px; overflow-y: auto; }
.th-cp-item {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 0.45rem 0.55rem;
    margin-bottom: 0.35rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    font-size: 0.88rem;
    border: 1px solid transparent;
    transition: border-color 0.15s, background 0.15s;
}
.th-cp-drag-handle {
    flex-shrink: 0;
    width: 1rem;
    align-self: center;
    cursor: grab;
    color: var(--th-muted, #64748b);
    font-size: 0.85rem;
    line-height: 1;
    letter-spacing: -0.12em;
    user-select: none;
    padding: 0.15rem 0;
    touch-action: none;
}
.th-cp-drag-handle:active { cursor: grabbing; }
.th-cp-item-actions {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex-shrink: 0;
    margin-left: 0.15rem;
}
.th-cp-reorder-btn {
    appearance: none;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.55);
    color: var(--th-muted, #94a3b8);
    border-radius: 4px;
    width: 1.5rem;
    height: 1.15rem;
    font-size: 0.55rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.th-cp-reorder-btn:hover:not(:disabled) {
    border-color: var(--th-teal, #2dd4bf);
    color: var(--th-teal, #2dd4bf);
}
.th-cp-reorder-btn:disabled {
    opacity: 0.25;
    cursor: default;
}
.th-cp-item.is-dragging { opacity: 0.45; }
.th-cp-item.is-drag-over {
    border-color: var(--th-teal, #2dd4bf);
    background: rgba(45, 212, 191, 0.08);
}
.th-cp-item-body { flex: 1; min-width: 0; cursor: pointer; }
.th-cp-item-num {
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: rgba(100,116,139,0.35);
    color: var(--th-muted, #94a3b8);
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.th-cp-item.is-selected .th-cp-item-num {
    background: var(--th-gold, #f0c14b);
    color: #000;
}
.th-cp-item-body strong { display: block; font-size: 0.92rem; }
.th-cp-item.is-selected { border-color: var(--th-gold); background: rgba(240, 193, 75, 0.08); }
.th-cp-item.is-needs:not(.is-selected) { border-color: rgba(249, 115, 22, 0.45); }
.th-cp-needs-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    color: #f97316;
    background: rgba(249, 115, 22, 0.12);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    margin: 0.15rem 0 0.1rem;
}
.th-cp-item small { color: var(--th-muted); display: block; margin-top: 0.1rem; font-size: 0.75rem; }

.th-leaderboard { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.th-leaderboard th, .th-leaderboard td { padding: 0.45rem 0.5rem; text-align: left; border-bottom: 1px solid rgba(148, 163, 184, 0.12); }
.th-leaderboard tr:nth-child(1) td { color: var(--th-gold); font-weight: 700; }

.th-error { color: var(--th-danger); font-size: 0.88rem; margin: 0.5rem 0; }
.th-muted { color: var(--th-muted); font-size: 0.85rem; }

.th-auth-banner {
    background: rgba(45, 212, 191, 0.08);
    border: 1px solid rgba(45, 212, 191, 0.2);
    border-radius: var(--th-radius);
    padding: 0.65rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    justify-content: space-between;
}
.th-auth-banner a { color: var(--th-teal); }

.th-vis-badge {
    display: inline-block;
    font-size: 0.72rem;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}
.th-vis-badge--visible { background: rgba(45, 212, 191, 0.2); color: var(--th-teal); }
.th-vis-badge--hidden { background: rgba(148, 163, 184, 0.2); color: var(--th-muted); }
.th-vis-badge--direction { background: rgba(56, 189, 248, 0.2); color: var(--th-cold); }
.th-vis-badge--zone { background: rgba(250, 204, 21, 0.2); color: var(--th-warm); }

.th-gps-status {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 500;
    background: rgba(0, 0, 0, 0.65);
    color: var(--th-text);
    font-size: 0.75rem;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
}

.th-timer {
    text-align: center;
    margin: 0.5rem 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--th-gold);
    font-variant-numeric: tabular-nums;
}
.th-timer.is-urgent { color: var(--th-danger); animation: thPulse 1s infinite; }
@keyframes thPulse { 50% { opacity: 0.65; } }

.th-decision-list { display: flex; flex-direction: column; gap: 0.5rem; margin: 0.75rem 0; }
.th-decision-btn {
    text-align: left;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(240, 193, 75, 0.35);
    background: rgba(0, 0, 0, 0.25);
    color: var(--th-text);
    font: inherit;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.th-decision-btn:hover { border-color: var(--th-gold); background: rgba(240, 193, 75, 0.08); }
.th-decision-btn small { display: block; color: var(--th-muted); margin-top: 0.25rem; font-size: 0.82rem; }

.th-live-board {
    margin-top: 0.75rem;
    max-height: 160px;
    overflow-y: auto;
    font-size: 0.82rem;
}
.th-live-board li {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.th-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    padding: 1rem;
}
.th-modal-overlay.is-show { display: flex; }
.th-modal {
    background: var(--th-panel);
    border: 2px solid var(--th-gold);
    border-radius: var(--th-radius);
    padding: 1.25rem;
    max-width: 420px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
}
.th-modal h2 { margin: 0 0 0.75rem; color: var(--th-gold); font-size: 1.1rem; }

.th-editor-advanced {
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
}
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

.th-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.65rem;
    margin-top: 0.75rem;
}
.th-template-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.85rem;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: var(--th-radius);
    color: inherit;
    cursor: pointer;
    text-align: left;
    font: inherit;
}
.th-template-card:hover { border-color: var(--th-gold); }
.th-template-card span { font-size: 1.6rem; }
.th-template-card strong { font-size: 0.92rem; color: var(--th-gold); }
.th-template-card small { color: var(--th-muted); font-size: 0.78rem; line-height: 1.35; }
.th-template-detail {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(240, 193, 75, 0.25);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.45);
    min-height: 5.5rem;
    line-height: 1.45;
}
.th-template-detail p { margin: 0.35rem 0; }
.th-locked-hint { margin: -0.35rem 0 0.65rem; font-size: 0.82rem; color: var(--th-teal); }

.th-photo-wrap { margin: 0.75rem 0; }
.th-photo-preview img {
    max-width: 100%;
    max-height: 140px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    margin-bottom: 0.5rem;
}

.th-stamps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
    margin: 1rem 0 0.5rem;
}
.th-stamp {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(240, 193, 75, 0.15);
    border: 2px dashed var(--th-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    title: attr(data-title);
}
.th-achievements {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: center;
    margin: 0.5rem 0;
}
.th-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: rgba(45, 212, 191, 0.15);
    border: 1px solid var(--th-teal);
    color: var(--th-teal);
}
.th-decision-row {
    display: grid;
    gap: 0.35rem;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
}
.th-finish-pb { color: var(--th-teal); font-weight: 600; }
.th-finish-rank { color: var(--th-gold); font-weight: 600; margin: 0.35rem 0; }
.th-challenge-banner {
    padding: 0.75rem 0.9rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    background: rgba(240, 193, 75, 0.12);
    border: 1px solid rgba(240, 193, 75, 0.45);
    color: var(--th-gold);
    font-size: 0.92rem;
    line-height: 1.45;
}
.th-finish-poster-wrap {
    margin: 1rem auto 0.5rem;
    max-width: 280px;
}
.th-finish-poster {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.th-n-checklist { max-height: 52vh; overflow-y: auto; }
.th-n-category { margin-bottom: 0.85rem; }
.th-n-category h3 { margin: 0 0 0.4rem; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--th-teal); }
.th-n-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.35rem;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.th-n-item:hover { border-color: var(--th-gold); }
.th-n-item.is-found { border-color: var(--th-teal); background: rgba(45, 212, 191, 0.08); }
.th-n-item.is-required:not(.is-found) { border-color: rgba(240, 193, 75, 0.55); }
.th-spot-choice {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0.5rem 0 0.75rem;
}
.th-spot-panel details summary { list-style: none; }
.th-spot-panel details summary::-webkit-details-marker { display: none; }
.th-hint-panel {
    padding: 0.65rem 0.75rem;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
}
.th-hint-unlocked {
    margin: 0;
    padding: 0 0 0 1rem;
    font-size: 0.85rem;
    color: var(--th-muted);
    line-height: 1.45;
}
.th-hint-unlocked li { margin-bottom: 0.25rem; }
.th-hint-editor-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.35rem;
    align-items: center;
    margin-bottom: 0.35rem;
}
.th-hint-editor-row input[type="number"] { width: 4.5rem; }

.th-waypoints-mini {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    font-size: 0.82rem;
    color: var(--th-muted, #94a3b8);
    max-height: 6rem;
    overflow-y: auto;
}
.th-waypoints-mini li { margin: 0.2rem 0; }
.th-waypoints-mini li.is-current { color: var(--th-teal, #2dd4bf); font-weight: 600; }
.th-resume-qr-wrap img { max-width: 100%; height: auto; }

.th-challenge-timers {
    margin: 0.35rem 0 0.75rem;
    font-size: 0.85rem;
    color: var(--th-teal, #2dd4bf);
    line-height: 1.45;
}
.th-challenge-timers p { margin: 0.2rem 0; }
.th-n-item__emoji { font-size: 1.35rem; flex-shrink: 0; }
.th-n-item__body { flex: 1; min-width: 0; }
.th-n-item__body strong { display: block; font-size: 0.92rem; }
.th-n-item__body small { color: var(--th-muted); font-size: 0.78rem; }
.th-n-rarity {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.1rem 0.4rem;
    margin: 0.15rem 0 0.2rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--rarity-color) 18%, transparent);
    color: var(--rarity-color);
    border: 1px solid color-mix(in srgb, var(--rarity-color) 35%, transparent);
}
.th-n-item__badge { font-size: 0.72rem; color: var(--th-teal); white-space: nowrap; }
