/* Light theme (v0.110.0): applied when <html data-theme="light"> (see theme.js). The dark look in style.css is the default;
   this file only recolours it: warm field-office paper, dark ink, deeper brass. Maps and artwork keep their painted colours. */
:root[data-theme="light"] {
  --bg: #ece6d8; --panel: #faf7ef; --panel-2: #f1ebdd; --line: #c9bfa8; --text: #2b2a24; --muted: #6c6858;
  --accent: #8c5f1d; --accent-ink: #fffaf0; --good: #3f7a2e; --bad: #b0402c; --warn: #9a6a12; --link: #8a5418;
  --surface-raised: #fffdf7; --edge-light: rgba(60,50,30,.10); --shadow-deep: 0 10px 26px rgba(70,55,30,.16);
  --grain: none; color-scheme: light;
}
[data-theme="light"] body { background: var(--bg) !important; color: var(--text); }
[data-theme="light"] body:not(.photo-bg)::before, [data-theme="light"] body:not(.photo-bg)::after { opacity: 0 !important; }
[data-theme="light"] .sidenav, [data-theme="light"] .shell .topbar, [data-theme="light"] .topbar { background: #e3dccb !important; border-color: var(--line) !important; }
[data-theme="light"] .panel, [data-theme="light"] .modal, [data-theme="light"] .it-pop, [data-theme="light"] .store-card, [data-theme="light"] .st-card, [data-theme="light"] .st-econ,
[data-theme="light"] .st-head, [data-theme="light"] .cost-panel, [data-theme="light"] .au-row, [data-theme="light"] .au-table, [data-theme="light"] .unit-card, [data-theme="light"] .order-row,
[data-theme="light"] .alert, [data-theme="light"] .notice, [data-theme="light"] .announce, [data-theme="light"] .nav-cmd, [data-theme="light"] .base-panel, [data-theme="light"] .res,
[data-theme="light"] .mv-card, [data-theme="light"] .ov-army, [data-theme="light"] .inv-cell, [data-theme="light"] .silver-box, [data-theme="light"] .rcell, [data-theme="light"] .ship-cell,
[data-theme="light"] .cost-card, [data-theme="light"] .st-econ-item, [data-theme="light"] .warmap-hint, [data-theme="light"] .viz-tip, [data-theme="light"] .legend > span, [data-theme="light"] .check-chip {
  background: var(--panel) !important; color: var(--text); border-color: var(--line) !important; box-shadow: none; }
[data-theme="light"] .st-econ-item, [data-theme="light"] .cost-card, [data-theme="light"] .ship-cell { background: var(--panel-2) !important; }
[data-theme="light"] .st-head { background: linear-gradient(90deg, #f3ecdc, #faf7ef) !important; }
[data-theme="light"] input:not([type=checkbox]):not([type=radio]), [data-theme="light"] textarea, [data-theme="light"] select { background: #fffdf8 !important; color: var(--text) !important; border-color: #b4a88d !important; }
[data-theme="light"] select option { background: #fffdf8; color: var(--text); }
[data-theme="light"] th { background: #e6dfcf !important; color: #4a463b !important; border-color: var(--line) !important; }
[data-theme="light"] td { border-color: rgba(80,65,40,.14) !important; }
[data-theme="light"] tbody tr:nth-child(even) td { background: rgba(80,65,40,.035) !important; }
[data-theme="light"] tr:hover td { background: rgba(140,95,29,.07) !important; }
[data-theme="light"] .tbl-wrap, [data-theme="light"] .table-wrap { background: var(--panel) !important; border-color: var(--line) !important; }
[data-theme="light"] button:disabled { opacity: .45; }
[data-theme="light"] .nav a, [data-theme="light"] .sidenav a { color: #3a372e; }
[data-theme="light"] .nav a.on, [data-theme="light"] .nav a[aria-current] { background: rgba(140,95,29,.12) !important; color: var(--accent) !important; }
[data-theme="light"] .nav-title, [data-theme="light"] .muted, [data-theme="light"] .small.muted { color: var(--muted) !important; }
[data-theme="light"] h1, [data-theme="light"] h2, [data-theme="light"] h3, [data-theme="light"] h4 { color: #7a5016; }
[data-theme="light"] .res .meter, [data-theme="light"] .meter, [data-theme="light"] .stat-bar, [data-theme="light"] .cost-bar, [data-theme="light"] .nc-bar, [data-theme="light"] .cmd-bar { background: rgba(80,65,40,.14) !important; }
[data-theme="light"] .unit-img, [data-theme="light"] .unit-thumb, [data-theme="light"] .troop-pic, [data-theme="light"] .bld-photo { background: #d9d1bf !important; }
[data-theme="light"] .unit-img .chip, [data-theme="light"] .unit-pop-img .chip { background: rgba(250,247,239,.92) !important; color: var(--accent) !important; }
[data-theme="light"] .modal-back, [data-theme="light"] .it-pop-back { background: rgba(60,50,30,.35) !important; }
[data-theme="light"] .chip, [data-theme="light"] .pill { border-color: var(--line); }
[data-theme="light"] .rep-grid td.zero, [data-theme="light"] .sim-row td.zero { color: #9a957f !important; opacity: 1; }
[data-theme="light"] a { color: var(--link); }
[data-theme="light"] .toast, [data-theme="light"] #toast { background: #2b2a24 !important; color: #f6f1e4 !important; }
/* phone */
[data-theme="light"] .mobile .m-top, [data-theme="light"] .m-top, [data-theme="light"] .m-nav, [data-theme="light"] .m-drawer, [data-theme="light"] .m-res { background: #e3dccb !important; border-color: var(--line) !important; }
[data-theme="light"] .m-chip, [data-theme="light"] .m-btn { background: #faf7ef !important; border-color: var(--line) !important; color: var(--text) !important; }
[data-theme="light"] .m-nav a { color: #4a463b !important; }
[data-theme="light"] .m-nav a.on { color: var(--accent) !important; }
[data-theme="light"] .m-drawer a { color: #2b2a24 !important; }

[data-theme="light"] label, [data-theme="light"] .row > label, [data-theme="light"] .check { color: #4a463b !important; }
[data-theme="light"] .tabs button:not(.on) { background: transparent !important; color: var(--accent) !important; border-color: var(--line) !important; }
[data-theme="light"] .tabs button.on { color: var(--accent-ink) !important; }
[data-theme="light"] .os-item, [data-theme="light"] .nav-sub .os-item { background: transparent !important; color: #3a372e !important; border-color: transparent !important; box-shadow: none !important; }
[data-theme="light"] .os-item.on { background: rgba(140,95,29,.12) !important; color: var(--accent) !important; }
[data-theme="light"] .os-xy { color: var(--muted) !important; }
[data-theme="light"] .prot, [data-theme="light"] .protected { color: var(--good) !important; }
[data-theme="light"] * { text-shadow: none !important; }
[data-theme="light"] .nav a, [data-theme="light"] .nav a span, [data-theme="light"] .nav a svg, [data-theme="light"] .sidenav .mk-sub-link { color: #2f2c25 !important; opacity: 1 !important; }
[data-theme="light"] .nav a.on, [data-theme="light"] .nav a.on span, [data-theme="light"] .nav .mk-sub-link.on { color: var(--accent) !important; }
[data-theme="light"] .rate, [data-theme="light"] .res-body .rate { color: var(--muted) !important; }
[data-theme="light"] .prot-chip { color: var(--good) !important; border-color: var(--good) !important; background: rgba(63,122,46,.08) !important; }
[data-theme="light"] .st-pct, [data-theme="light"] .st-silver { filter: brightness(.62) saturate(1.3); }
[data-theme="light"] .nc-info b { color: var(--accent) !important; }
[data-theme="light"] .tabs button:not(.on) { color: var(--accent) !important; }
[data-theme="light"] .nav-sub a, [data-theme="light"] .nav-sub .os-item:not(.on) .os-name { color: #2f2c25 !important; opacity: 1 !important; }
/* spots found by the contrast scan */
[data-theme="light"] a.btn:not(.ghost) { color: var(--accent-ink) !important; }
[data-theme="light"] .solo-badge, [data-theme="light"] .nc-pic .badge { background: var(--bad) !important; color: #fffaf0 !important; }
[data-theme="light"] .unit-name, [data-theme="light"] .train-tab-text b, [data-theme="light"] .train-tab-text .small { color: var(--text) !important; }
[data-theme="light"] tr.unread td, [data-theme="light"] tr.unread td a { color: var(--accent) !important; }
[data-theme="light"] .rep-grid td.zero .n-full, [data-theme="light"] .rep-grid td.zero .n-short, [data-theme="light"] .rep-grid td.zero { color: #857f6b !important; }
/* colours used as text (resources, rarities, mission levels, map legend) are darkened to read on paper */
[data-theme="light"] .it-rarity, [data-theme="light"] .st-pct, [data-theme="light"] .st-silver, [data-theme="light"] .solo-lvl,
[data-theme="light"] .res-amt, [data-theme="light"] .pkg-tag { filter: brightness(.6) saturate(1.35); }
[data-theme="light"] .pkg-tag { filter: none; }
[data-theme="light"] .tabs .on, [data-theme="light"] .tabs a.on { color: var(--accent-ink) !important; }
[data-theme="light"] details > summary, [data-theme="light"] .cmd-help summary { color: var(--accent) !important; }
[data-theme="light"] button.ghost:hover:not(:disabled), [data-theme="light"] .btn.ghost:hover { color: var(--accent) !important; background: rgba(140,95,29,.08) !important; }
/* public pages: the archive photo washed out on paper */
[data-theme="light"] body.photo-bg::before { background: linear-gradient(180deg, rgba(236,230,216,.6) 0%, rgba(236,230,216,.88) 55%, rgba(236,230,216,.96) 100%), url(/img/bg-dday.jpg) center 35% / cover no-repeat !important; filter: sepia(.4) !important; }
[data-theme="light"] .pub-top, [data-theme="light"] .pub-foot { background: rgba(236,230,216,.95) !important; border-color: var(--line) !important; }
[data-theme="light"] .pub-brand, [data-theme="light"] .pub-nav a.on, [data-theme="light"] .pub-nav a:hover, [data-theme="light"] .faq-q summary { color: var(--accent) !important; }
[data-theme="light"] .pub-nav a, [data-theme="light"] .pub-lead, [data-theme="light"] .pub-feature p, [data-theme="light"] .faq-a, [data-theme="light"] .faq-a b, [data-theme="light"] .faq-a td,
[data-theme="light"] .pub-section, [data-theme="light"] .pub-lang select, [data-theme="light"] .photo-credit { color: var(--text) !important; }
[data-theme="light"] .pub-nav .btn.pub-cta-sm { color: var(--accent-ink) !important; }
[data-theme="light"] .pub-feature, [data-theme="light"] .pub-nation, [data-theme="light"] .pub-world, [data-theme="light"] .peek-shot, [data-theme="light"] .faq-toc a, [data-theme="light"] .faq-q,
[data-theme="light"] .login .panel, [data-theme="light"] .login .nation-card { background: rgba(250,247,239,.94) !important; border-color: var(--line) !important; color: var(--text); }
[data-theme="light"] .login .nation-card:hover, [data-theme="light"] .login .nation-card.on { background: #fffaf0 !important; border-color: var(--accent) !important; }
[data-theme="light"] .pub-lang select { background-color: #fffdf8 !important; border-color: var(--line) !important; }
[data-theme="light"] .tabs.sub-tabs .on, [data-theme="light"] .tabs.sub-tabs a.on { color: var(--accent) !important; }
[data-theme="light"] .brand, [data-theme="light"] .brand-sm { color: var(--accent) !important; }
[data-theme="light"] .m-hero, [data-theme="light"] .m-hero b, [data-theme="light"] .m-hero small, [data-theme="light"] .m-hero svg { color: var(--accent-ink) !important; }

[data-theme="light"] .st-badge { background: radial-gradient(circle at 35% 30%, #fffaf0, #ece2cc 70%) !important; box-shadow: inset 0 0 0 3px #faf7ef, inset 0 0 0 4px rgba(140,95,29,.35) !important; }
[data-theme="light"] .st-badge svg { stroke: color-mix(in srgb, var(--c) 70%, #3a2a10); }
[data-theme="light"] .theme-btn svg { color: var(--accent); }
[data-theme="light"] .hero-tag { color: var(--text) !important; }
[data-theme="light"] .hero-kicker { color: var(--accent) !important; }
[data-theme="light"] .peek-units figure { background: var(--panel) !important; border-color: var(--line) !important; color: var(--text); }
[data-theme="light"] .au-name b, [data-theme="light"] .au-info-head b, [data-theme="light"] .au-report-title > b, [data-theme="light"] .it-name, [data-theme="light"] .rep-item { filter: brightness(.6) saturate(1.35); }
/* desktop base page: the frame around the map (v0.110.1) */
[data-theme="light"] .base-wrap { background: radial-gradient(ellipse at 50% 40%, #efe8d8, #ddd4bf) !important; border-color: var(--line) !important; box-shadow: var(--shadow-deep) !important; }
/* legend chips keep their colours (green ready, red attack, …), darkened on a see-through chip */
[data-theme="light"] .legend > span { background: transparent !important; filter: brightness(.62) saturate(1.35); }
/* Command HQ (v0.110.2) */
[data-theme="light"] .adm-tile { background: linear-gradient(145deg, #fffaf0, #f1ebdd) !important; border-color: var(--line) !important; color: var(--text) !important; }
[data-theme="light"] .adm-tile-value { color: var(--accent) !important; }
[data-theme="light"] .adm-tile-label, [data-theme="light"] .adm-tile-sub, [data-theme="light"] .adm-tile small { color: var(--muted) !important; }
[data-theme="light"] .adm-tile:hover { border-color: var(--accent) !important; }
[data-theme="light"] .adm-bar-track { background: rgba(80,65,40,.14) !important; }
[data-theme="light"] .peek-unit { background: var(--panel) !important; border-color: var(--line) !important; }
[data-theme="light"] .peek-unit-name { color: var(--text) !important; }

/* v0.121.0 phone menu */
[data-theme="light"] .mobile .m-more { background: #f3eedf; }
[data-theme="light"] .mobile .m-nav button { color: #4a463b !important; }
[data-theme="light"] .mobile .m-nav button.on { color: var(--accent) !important; }

/* v0.125.0: staff stamp, darker ink on paper */
[data-theme="light"] .stampc { border-color: #a3362a; color: #a3362a; }
[data-theme="light"] .stampc.mod { border-color: #3d6690; color: #3d6690; }

/* v0.135.2: readable text in light mode. Darker ink for the theme colours, and light-only fixes for parts that use
   colours made for the dark theme (silver, tiers, mission levels, resource numbers, map legend, message bubbles). */
:root[data-theme="light"] { --muted: #5a5646; --accent: #7a5014; --good: #34681f; --bad: #a3331f; --warn: #7f560a; --link: #774812; }
[data-theme="light"] .chat-msg { background: var(--panel) !important; border-color: var(--line) !important; color: var(--text); }
[data-theme="light"] .chat-msg.mine { background: #efe5c8 !important; border-color: #cdbb8c !important; }
[data-theme="light"] .chat-meta, [data-theme="light"] .chat-receipt { color: var(--muted) !important; }
[data-theme="light"] .chat-receipt.read { color: var(--good) !important; }
[data-theme="light"] .os-cap, [data-theme="light"] .cap-chip { color: var(--accent) !important; border-color: var(--accent) !important; }
[data-theme="light"] .st-wallet b.st-silver, [data-theme="light"] .ord-extra.sv { color: #4f5661 !important; }
[data-theme="light"] .shell .topbar .res-card .rate .cap-of { color: var(--muted) !important; }
[data-theme="light"] .res-amt b, [data-theme="light"] .it-tier, [data-theme="light"] .solo-lvl, [data-theme="light"] .ov-mission, [data-theme="light"] .legend span[style*="color"] { filter: brightness(.55) saturate(1.5); }
[data-theme="light"] .st-pct { filter: brightness(.5) saturate(1.5); }
[data-theme="light"] .res-tile .res-amt b { filter: none; }
[data-theme="light"] button:disabled { opacity: .62; }
[data-theme="light"] .full-tag, [data-theme="light"] .ord-tag.ready { color: var(--accent-ink) !important; }
[data-theme="light"] .n-full { color: var(--muted) !important; }
[data-theme="light"] .m-subnav a.on, [data-theme="light"] .seg button.on { color: var(--accent-ink) !important; }
[data-theme="light"] .n-short { color: var(--muted) !important; }
