/* Tokens and app chrome shared by every player-facing page.
   Type system: Lora for display, Newsreader for reading text, Inter for UI,
   Geist Mono for labels, JetBrains Mono for numbers. Mukta and Yatra One carry Devanagari. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; src: url(/assets/fonts/inter-latin.woff2) format("woff2"); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 400 700; src: url(/assets/fonts/lora-latin.woff2) format("woff2"); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lora"; font-style: italic; font-weight: 400 700; src: url(/assets/fonts/lora-latin-italic.woff2) format("woff2"); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; src: url(/assets/fonts/newsreader-latin.woff2) format("woff2"); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 200 800; src: url(/assets/fonts/newsreader-latin-italic.woff2) format("woff2"); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; src: url(/assets/fonts/geist-mono-latin.woff2) format("woff2"); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; src: url(/assets/fonts/jetbrains-mono-latin.woff2) format("woff2"); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Serif Devanagari"; font-style: normal; font-weight: 400 800; src: url(/assets/fonts/noto-serif-devanagari.woff2) format("woff2"); font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "Mukta"; font-weight: 400; src: url(/assets/fonts/mukta-devanagari-400.woff2) format("woff2"); font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A8E0-A8FF; }
@font-face { font-family: "Mukta"; font-weight: 600; src: url(/assets/fonts/mukta-devanagari-600.woff2) format("woff2"); font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A8E0-A8FF; }
@font-face { font-family: "Mukta"; font-weight: 700; src: url(/assets/fonts/mukta-devanagari-700.woff2) format("woff2"); font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A8E0-A8FF; }
@font-face { font-family: "Yatra One"; font-weight: 400; src: url(/assets/fonts/yatra-one-devanagari.woff2) format("woff2"); font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A8E0-A8FF; }

:root {
	color-scheme: light;
	--page: #FAF8F4;
	--tile: #FFFFFF;
	--fill: #F2EFE9;
	--line: #EAE6DE;
	--dim: #D8D3CA;
	--muted: #6E6A64;
	--soft: #45413C;
	--ink: #1C1917;
	/* "deep" surfaces: the dark cards, tab bar and badges. They stay dark in both themes. */
	--deep: #1C1917;
	--deep-line: #3A3633;
	--on-ink: #F7F5F1;
	--on-ink-muted: #B5AFA6;
	--red: #D71921;
	--red-text: #B8161D;   /* small text, where the mark red is too light on white */
	--red-soft: #FDE9E7;
	--red-glow: rgba(215, 25, 33, .26);
	--on-red: #FFFFFF;
	--green: #4CC38A;
	--green-text: #17663F;
	--green-soft: #E6F6EE;
	--gold: #E8C468;
	--gold-text: #7A5A08;
	--gold-soft: #FBF1D6;
	--amber: #F0A202;
	--blue: #3F5BB5;
	--blue-soft: #E4E9F7;
	--dots: rgba(28, 25, 23, .11);
	--bunting: url(/assets/bunting.svg);

	--body: Inter, Mukta, system-ui, -apple-system, "Segoe UI", sans-serif;
	--display: Lora, "Yatra One", Mukta, Georgia, serif;
	--reading: Newsreader, Mukta, Georgia, serif;
	--mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, Mukta, monospace;
	--num: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

	--gap: 10px;
	--radius: 20px;
	--tabbar-height: 76px;
	--ease: cubic-bezier(.2, .8, .2, 1);
	--shadow-sm: 0 1px 2px rgba(28, 25, 23, .06), 0 0 0 1px rgba(28, 25, 23, .05);
	--shadow-md: 0 8px 22px rgba(28, 25, 23, .09), 0 0 0 1px rgba(28, 25, 23, .05);
	--shadow-lg: 0 14px 36px rgba(28, 25, 23, .2);
	--focus-ring: rgba(28, 25, 23, .08);
}

/* Dark: near-black surfaces, soft ink, the brand red lifted so it holds on black. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		color-scheme: dark;
		--page: #0E0E0E; --tile: #161616; --fill: #1F1F1F; --line: #262626; --dim: #3A3A3A;
		--muted: #8C8C8C; --soft: #C9C9C9; --ink: #F2F2F2;
		--deep: #1D1D1D; --deep-line: #2E2E2E; --on-ink: #F2F2F2; --on-ink-muted: #8C8C8C;
		--red: #F0434B; --red-text: #FF7A80; --red-soft: #2C1416; --red-glow: rgba(240, 67, 75, .3); --on-red: #FFFFFF;
		--green: #5BC992; --green-text: #A6E3C3; --green-soft: #142019;
		--gold: #E8D6A8; --gold-text: #E8D6A8; --gold-soft: #28241A; --amber: #F2B13A;
		--blue: #AABBD4; --blue-soft: #1B2029;
		--dots: rgba(242, 242, 242, .09);
		--bunting: url(/assets/bunting-dark.svg);
		--shadow-sm: 0 0 0 1px rgba(255, 255, 255, .06);
		--shadow-md: 0 10px 28px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .09);
		--shadow-lg: 0 16px 40px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .06);
		--focus-ring: rgba(242, 242, 242, .1);
	}
}
:root[data-theme="dark"] {
	color-scheme: dark;
	--page: #0E0E0E; --tile: #161616; --fill: #1F1F1F; --line: #262626; --dim: #3A3A3A;
	--muted: #8C8C8C; --soft: #C9C9C9; --ink: #F2F2F2;
	--deep: #1D1D1D; --deep-line: #2E2E2E; --on-ink: #F2F2F2; --on-ink-muted: #8C8C8C;
	--red: #F0434B; --red-text: #FF7A80; --red-soft: #2C1416; --red-glow: rgba(240, 67, 75, .3); --on-red: #FFFFFF;
	--green: #5BC992; --green-text: #A6E3C3; --green-soft: #142019;
	--gold: #E8D6A8; --gold-text: #E8D6A8; --gold-soft: #28241A; --amber: #F2B13A;
	--blue: #AABBD4; --blue-soft: #1B2029;
	--dots: rgba(242, 242, 242, .09);
	--bunting: url(/assets/bunting-dark.svg);
	--shadow-sm: 0 0 0 1px rgba(255, 255, 255, .06);
	--shadow-md: 0 10px 28px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .09);
	--shadow-lg: 0 16px 40px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .06);
	--focus-ring: rgba(242, 242, 242, .1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--page); color: var(--ink); }
body { font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: "cv11", "ss01"; }
html.theme-anim, html.theme-anim * { transition: background-color .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease), fill .35s var(--ease) !important; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
::selection { background: var(--red-glow); }

/* Wordmark: a single pennant and a red full stop. */
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font: 600 24px/1 var(--display); letter-spacing: -.02em; text-decoration: none; }
.brand::before { content: ""; flex: none; width: .66em; height: .66em; background: var(--red); clip-path: polygon(0 0, 100% 0, 50% 100%); transition: transform .3s var(--ease); }
.brand:hover::before { transform: rotate(-12deg); }
.brand::after { content: "."; margin-left: -8px; color: var(--red); }
.tile { background: var(--tile); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.label { color: var(--muted); font: 400 12px/1.5 var(--mono); letter-spacing: .01em; text-transform: lowercase; }

/* Theme switch. theme.js wires every [data-theme-toggle]; pages without one get a floating copy. */
.theme-toggle { position: relative; flex: none; display: inline-grid; place-items: center; width: 38px; height: 38px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 50%; background: var(--tile); color: var(--ink); box-shadow: var(--shadow-sm); cursor: pointer; touch-action: manipulation; transition: transform .25s var(--ease), box-shadow .2s var(--ease); }
.theme-toggle:hover:not(:disabled) { transform: rotate(-14deg); box-shadow: var(--shadow-md); }
.theme-toggle svg { grid-area: 1 / 1; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: opacity .3s var(--ease), transform .45s var(--ease); }
.theme-toggle .t-sun { opacity: 0; transform: rotate(-90deg) scale(.5); }
:root[data-theme="dark"] .theme-toggle .t-sun { opacity: 1; transform: none; }
:root[data-theme="dark"] .theme-toggle .t-moon { opacity: 0; transform: rotate(90deg) scale(.5); }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .theme-toggle .t-sun { opacity: 1; transform: none; }
	:root:not([data-theme="light"]) .theme-toggle .t-moon { opacity: 0; transform: rotate(90deg) scale(.5); }
}
.theme-toggle.fab { position: fixed; top: calc(40px + env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); z-index: 30; }

.tabbar { position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 20; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; max-width: 420px; margin-inline: auto; padding: 7px; border-radius: 30px; background: var(--deep); box-shadow: var(--shadow-lg); }
.tabbar a, .tabbar button { display: flex; align-items: center; justify-content: center; gap: 6px; width: auto; min-height: 44px; margin: 0; padding: 4px; border: 0; border-radius: 999px; background: transparent; color: var(--on-ink-muted); font: 600 13px/1 var(--body); text-decoration: none; cursor: pointer; touch-action: manipulation; transition: color .2s, background .2s; }
.tabbar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar [aria-current="page"] { background: var(--red); color: var(--on-red); }
.tabbar :focus-visible { outline-color: var(--on-ink); }
@media (prefers-reduced-motion: reduce) {
	html.theme-anim, html.theme-anim * { transition: none !important; }
	.theme-toggle, .theme-toggle svg { transition: none; }
}
