@charset "UTF-8";
/* Tower Chase 2: dark sunset theme matching the game (docs/design.md). */
:root {
	color-scheme: dark;
	--bg: #17131f;
	--bg-2: #221a2b;
	--panel: rgba(255, 255, 255, 0.06);
	--panel-strong: rgba(255, 255, 255, 0.1);
	--line: rgba(255, 255, 255, 0.13);
	--text: #fbf6f1;
	--muted: #b9adb8;
	--accent: #ff9947;
	--accent-top: #ffb854;
	--accent-bottom: #f56b38;
	--focus: #ffd29a;
	--radius: 1.2rem;
	font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
	margin: 0;
	min-height: 100vh;
	background: radial-gradient(120% 70% at 20% 0%, #4a2a3a 0%, transparent 60%), linear-gradient(180deg, #2a1d33 0%, var(--bg) 42%);
	background-color: var(--bg);
	color: var(--text);
	font-size: 1rem;
	line-height: 1.55;
	padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
a { color: var(--accent-top); text-underline-offset: .22em; }
a:hover { color: #fff; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: .4rem; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin-bottom: 0; }
h3 { font-size: 1.2rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 20; background: var(--accent); color: #2b1405; padding: .75rem 1rem; border-radius: .6rem; font-weight: 800; }
.skip-link:focus { top: 1rem; }

.hero { overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-inner { max-width: 1040px; margin: auto; display: grid; grid-template-columns: 1.25fr 1fr; gap: 2.5rem; align-items: end; padding: 3rem 2rem 0; }
.hero-copy { padding-bottom: 3rem; }
.brand { display: block; max-width: 460px; }
.intro { font-size: 1.15rem; margin: 1.4rem 0 0; color: var(--muted); max-width: 32rem; }
.store-links { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.store-links a { display: block; border-radius: .7rem; transition: transform .15s, box-shadow .15s; }
.store-links a:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .35); }
.store-links img { height: 48px; width: auto; }
.gameplay { max-height: 520px; width: auto; justify-self: center; border-radius: 1.6rem 1.6rem 0 0; box-shadow: 0 -10px 60px rgba(255, 140, 60, .18); }

.app-header { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1.2rem; background: rgba(23, 19, 31, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.app-header a { color: var(--text); font-weight: 800; text-decoration: none; letter-spacing: .02em; }
.close-button { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: .45rem 1rem; font-size: .95rem; }

.page { max-width: 1000px; margin: 0 auto; padding: 2.2rem 1.5rem 3rem; }
.notice { text-align: center; padding-top: 5rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .75rem; font-weight: 800; color: var(--accent); margin-bottom: .55rem; }
.muted, .unit { color: var(--muted); }
.unit { font-size: .875rem; white-space: nowrap; }

.message { border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1.5rem; border: 1px solid rgba(255, 120, 100, .45); background: rgba(217, 56, 51, .18); }
.message p { margin: 0; }

.score-card { background: var(--panel); border: 1px solid var(--line); border-radius: 1.6rem; padding: 1.8rem; margin-bottom: 2.5rem; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.score-card h1 strong { font-size: 1.35em; background: linear-gradient(180deg, var(--accent-top), var(--accent-bottom)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.score-card h1 span { color: var(--muted); font-weight: 600; }
.score-form { display: grid; gap: 1rem; max-width: 30rem; margin-top: 1.4rem; }
.field { display: grid; gap: .4rem; }
label { font-weight: 700; }
input { width: 100%; padding: .85rem 1rem; border-radius: .9rem; border: 1px solid var(--line); background: rgba(0, 0, 0, .28); color: var(--text); min-height: 48px; }
input:focus { border-color: var(--accent); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: .8rem 1.6rem; border: 0; border-radius: 1rem; background: linear-gradient(180deg, var(--accent-top), var(--accent-bottom)); color: #fff; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; cursor: pointer; box-shadow: 0 8px 24px rgba(245, 107, 56, .35); }
.button:hover { color: #fff; filter: brightness(1.06); }
.button:disabled { opacity: .7; cursor: progress; }
.form-note { font-size: .9rem; color: var(--muted); margin: 0; }
.share-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; margin-top: 1.2rem; }
.share-status { margin: .8rem 0 0; color: var(--muted); min-height: 1.5em; }

.city-lead { position: relative; overflow: hidden; margin-bottom: 2.5rem; padding: 1.6rem 1.8rem; border-radius: 1.6rem; border: 1px solid rgba(255, 184, 84, .35); background: radial-gradient(120% 140% at 100% 0%, rgba(255, 153, 71, .28), transparent 60%), var(--panel); }
.city-lead .eyebrow { margin-bottom: .2rem; }
.city-name { margin: 0; font-size: clamp(2rem, 6vw, 3.2rem); font-weight: 900; line-height: 1.05; letter-spacing: -.03em; overflow-wrap: anywhere; }
.city-detail { margin: .4rem 0 0; color: var(--muted); }
.city-detail strong { color: var(--text); font-size: 1.15em; }
.city-chasers { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin: 1rem 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .95rem; }
.city-chasers li::before { content: "#" counter(list-item) " "; font-weight: 800; }
.city-chasers b { color: var(--text); font-variant-numeric: tabular-nums; }
.optional { font-weight: 500; color: var(--muted); font-size: .85em; margin-left: .3rem; }
.player-city { display: block; color: var(--muted); font-size: .85rem; font-weight: 500; overflow-wrap: anywhere; }
.boards { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; margin: 0 -1.5rem 1.6rem; padding: .2rem 1.5rem; -webkit-overflow-scrolling: touch; }
.boards::-webkit-scrollbar { display: none; }
.boards a { flex: none; padding: .55rem 1rem; border-radius: 999px; background: var(--panel); color: var(--muted); font-weight: 800; font-size: .92rem; text-decoration: none; white-space: nowrap; }
.boards a:hover { color: var(--text); background: var(--panel-strong); }
.boards a[aria-current="page"] { background: linear-gradient(180deg, var(--accent-top), var(--accent-bottom)); color: #2b1405; }
.yesterday { color: var(--muted); margin: -.4rem 0 1rem; }
.challenge-card h1 strong { display: inline-block; }
.challenge-card h1 span { font-size: .6em; }
.challenge-result { font-size: 1.1rem; margin: .8rem 0 0; }
.challenge-card .store-links { margin-top: 1rem; }
.section-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 1.2rem; }
.leaderboard table { width: 100%; border-collapse: separate; border-spacing: 0 .4rem; font-variant-numeric: tabular-nums; }
.leaderboard th, .leaderboard td { text-align: left; padding: .8rem .9rem; }
.leaderboard thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding-top: 0; padding-bottom: .2rem; }
.leaderboard tbody tr { background: var(--panel); }
.leaderboard tbody tr > *:first-child { border-radius: .9rem 0 0 .9rem; }
.leaderboard tbody tr > *:last-child { border-radius: 0 .9rem .9rem 0; }
.leaderboard tbody th a { color: var(--text); text-decoration: none; font-weight: 750; overflow-wrap: anywhere; }
.leaderboard tbody th a:hover { color: var(--accent-top); text-decoration: underline; }
.leaderboard .rank { width: 3.2rem; color: var(--muted); font-weight: 800; }
.leaderboard tbody tr:nth-child(1) .rank { color: #ffd166; }
.leaderboard tbody tr:nth-child(2) .rank { color: #d9dee8; }
.leaderboard tbody tr:nth-child(3) .rank { color: #e0a36f; }
.leaderboard .number { text-align: right; }
.leaderboard .floors { font-weight: 900; font-size: 1.15rem; }
.leaderboard .date { color: var(--muted); white-space: nowrap; }
.leaderboard tr.highlight { background: rgba(255, 153, 71, .22); outline: 1px solid rgba(255, 184, 84, .55); }
.empty { text-align: center; padding: 3rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius); }
.empty p { color: var(--muted); margin: 0; }

.prose { max-width: 46rem; }
.prose h2 { margin: 2rem 0 .7rem; font-size: 1.35rem; }
.prose p { color: #e6dde3; }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; max-width: 1000px; margin: 0 auto; padding: 1.5rem 1.5rem 2.5rem; color: var(--muted); border-top: 1px solid var(--line); font-size: .92rem; }
.footer nav { display: flex; gap: 1.2rem; }

.in-app .page { padding-top: 1.4rem; }

@media (max-width: 720px) {
	.hero-inner { grid-template-columns: 1fr; padding: 2rem 1rem 0; gap: 1.5rem; }
	.hero-copy { padding-bottom: 0; }
	.gameplay { max-height: 380px; }
	.page { padding: 1.5rem 1rem 2.5rem; }
	.store-links img { height: 42px; }
	.boards { margin-left: -1rem; margin-right: -1rem; padding-left: 1rem; padding-right: 1rem; }
	.city-lead { padding: 1.3rem; }
	.score-card { padding: 1.3rem; }
	.leaderboard .date { display: none; }
	.leaderboard th, .leaderboard td { padding: .7rem .6rem; }
	.leaderboard .rank { width: 2.4rem; }
	.city-lead { position: relative; overflow: hidden; margin-bottom: 2.5rem; padding: 1.6rem 1.8rem; border-radius: 1.6rem; border: 1px solid rgba(255, 184, 84, .35); background: radial-gradient(120% 140% at 100% 0%, rgba(255, 153, 71, .28), transparent 60%), var(--panel); }
.city-lead .eyebrow { margin-bottom: .2rem; }
.city-name { margin: 0; font-size: clamp(2rem, 6vw, 3.2rem); font-weight: 900; line-height: 1.05; letter-spacing: -.03em; overflow-wrap: anywhere; }
.city-detail { margin: .4rem 0 0; color: var(--muted); }
.city-detail strong { color: var(--text); font-size: 1.15em; }
.city-chasers { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin: 1rem 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .95rem; }
.city-chasers li::before { content: "#" counter(list-item) " "; font-weight: 800; }
.city-chasers b { color: var(--text); font-variant-numeric: tabular-nums; }
.optional { font-weight: 500; color: var(--muted); font-size: .85em; margin-left: .3rem; }
.player-city { display: block; color: var(--muted); font-size: .85rem; font-weight: 500; overflow-wrap: anywhere; }
.section-heading { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}
