:root {
  --bg: #0f1218; --bg2: #161b24; --card: #1b212c; --card2: #222a37; --line: #2c3545; --text: #dfe6f0; --muted: #8a96a8;
  --accent: #4ea1ff; --accent2: #2f7de0; --good: #58d68d; --bad: #ec7063; --warn: #f5b041; --beige: #d8c8a0;
  --radius: 10px; font-size: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
h2 { margin: 0 0 8px; font-size: 1.35rem; } h3 { margin: 14px 0 8px; font-size: 1.05rem; color: #c9d6ea; } h4 { margin: 12px 0 6px; color: var(--muted); font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; }
.muted { color: var(--muted); } .small { font-size: .85em; } .pos { color: var(--good); } .neg { color: var(--bad); } .hidden { display: none !important; }
.mt { margin-top: 10px; } .nowrap { white-space: nowrap; } .grow { flex: 1; } .num { text-align: right; font-variant-numeric: tabular-nums; }

/* header */
#topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px 16px; background: linear-gradient(180deg, #171d28, #131821); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 240px; }
#hdr-name { font-weight: 700; font-size: 1.1rem; }
#hdr-sub { font-size: .82rem; }
#hdr-stats { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.pill { display: flex; gap: 6px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: .82rem; }
.pill span { color: var(--muted); } .pill.good b { color: var(--good); } .pill.bad b { color: var(--bad); } .pill.warn { border-color: var(--warn); }
.hdr-actions { display: flex; gap: 8px; }
#tabs { display: flex; gap: 2px; padding: 0 12px; background: var(--bg2); border-bottom: 1px solid var(--line); overflow-x: auto; position: sticky; top: 62px; z-index: 19; }
#tabs button { background: none; border: none; border-bottom: 3px solid transparent; border-radius: 0; color: var(--muted); padding: 11px 14px; font-weight: 600; }
#tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
#tabs button:hover { color: var(--text); background: none; }
main { padding: 16px; max-width: 1500px; margin: 0 auto; }

/* controls */
button { background: var(--card2); color: var(--text); border: 1px solid var(--line); border-radius: 7px; padding: 6px 11px; cursor: pointer; font: inherit; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: var(--accent2); border-color: var(--accent2); color: #fff; font-weight: 600; }
button.primary:hover:not(:disabled) { background: var(--accent); }
button.danger { background: #7b2a2a; border-color: #9b3a3a; color: #fff; }
button.ghost { background: transparent; }
button.big { padding: 9px 18px; font-size: 1rem; }
button.icon { font-size: 1.2rem; padding: 6px 10px; }
button small { color: inherit; opacity: .75; }
input, select, textarea { background: #10151d; color: var(--text); border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; font: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
input[type=color] { padding: 0; width: 38px; height: 30px; }
input[type=range] { flex: 1; }
textarea { width: 100%; resize: vertical; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.row.end { justify-content: flex-end; margin-top: 14px; }

/* layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; }
.card.mini { padding: 10px; margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .grid2.tight { gap: 10px; margin: 8px 0; }
.minigrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
@media (max-width: 1000px) { .grid2, .cities, .dip { grid-template-columns: 1fr !important; } }
.statgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin: 8px 0 12px; }
.statgrid > div { background: var(--card2); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; }
.statgrid span { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.statgrid b { font-size: 1.15rem; margin: 2px 0; } .statgrid small { color: var(--muted); }

table { border-collapse: collapse; width: 100%; }
.tbl th { text-align: left; color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; border-bottom: 1px solid var(--line); padding: 6px; }
.tbl td { border-bottom: 1px solid #232b38; padding: 6px; vertical-align: middle; }
.tbl tr.dim { opacity: .5; } .tbl tr.me { background: rgba(78,161,255,.08); }
.kv td { padding: 4px 6px; border-bottom: 1px solid #232b38; } .kv td:first-child { color: var(--muted); width: 38%; }
.kv tr.total td { font-weight: 700; border-top: 1px solid var(--line); }
.bar { height: 8px; background: #10151d; border-radius: 4px; overflow: hidden; margin: 3px 0; }
.bar > div { height: 100%; background: var(--accent); }
.bar.res-me > div { background: var(--good); } .bar.res-en > div { background: var(--bad); }
.swatch { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; border: 1px solid rgba(255,255,255,.25); margin-right: 3px; }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: #2c3545; color: #cfd8e6; letter-spacing: .03em; }
.tag.ally { background: #1e5d3a; } .tag.nap { background: #27466e; } .tag.war { background: #7b2a2a; } .tag.busy { background: #5c4420; } .tag.beige { background: var(--beige); color: #333; }
.badge { background: var(--accent2); color: #fff; border-radius: 999px; padding: 0 6px; font-size: .72rem; margin-left: 4px; } .badge.red { background: var(--bad); }
.op { font-size: .8rem; font-weight: 600; } .op.good { color: var(--good); } .op.okay { color: #a9dfbf; } .op.neutral { color: var(--muted); } .op.bad { color: var(--warn); } .op.hostile { color: var(--bad); }
.alert { background: rgba(236,112,99,.12); border: 1px solid rgba(236,112,99,.4); padding: 8px 10px; border-radius: 8px; margin: 8px 0; }
.flag { border-radius: 3px; vertical-align: middle; } .flag-img { border-radius: 3px; object-fit: cover; vertical-align: middle; }
.nlink { color: var(--text); } .nlink:hover b { color: var(--accent); }
.spark { vertical-align: middle; }

/* nation */
.nation-hero { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 10px; }
.bigflag svg, .bigflag img { box-shadow: 0 2px 10px rgba(0,0,0,.4); }
.motto { font-style: italic; color: #c8b98a; margin: 4px 0; }
.bio { white-space: pre-wrap; background: var(--card2); padding: 8px 10px; border-radius: 8px; margin-top: 8px; }

/* cities */
.cities { display: grid; grid-template-columns: 260px 1fr; gap: 14px; align-items: start; }
.citylist { position: sticky; top: 120px; }
.citycard { padding: 8px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; margin-bottom: 4px; }
.citycard:hover { background: var(--card2); } .citycard.sel { border-color: var(--accent); background: var(--card2); }

/* war */
.card.war { border-left: 4px solid var(--bad); }
.warhead { margin-bottom: 6px; }
.warflags { color: var(--warn); margin: 4px 0; }
.actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
ul.log { list-style: none; padding: 0; margin: 6px 0; max-height: 260px; overflow: auto; } ul.log li { padding: 4px 0; border-bottom: 1px solid #232b38; font-size: .88rem; }

/* diplomacy */
.dip { display: grid; grid-template-columns: 300px 1fr; gap: 14px; align-items: start; }
.diplist { max-height: calc(100vh - 150px); overflow: auto; padding: 8px; }
.dipitem { padding: 8px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; margin-bottom: 3px; }
.dipitem:hover { background: var(--card2); } .dipitem.sel { border-color: var(--accent); background: var(--card2); }
.diphead { display: flex; gap: 14px; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.llmchip { font-size: .75rem; padding: 3px 8px; border-radius: 999px; background: #2c3545; color: var(--muted); white-space: nowrap; }
.llmchip.on { background: #1e4f7a; color: #d6ebff; }
.thread { height: 380px; overflow-y: auto; padding: 10px 2px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 80%; padding: 8px 12px; border-radius: 10px; background: var(--card2); }
.msg.player { align-self: flex-end; background: #1f3f63; }
.msg.ai { align-self: flex-start; }
.msg.sys { align-self: center; background: none; color: var(--muted); font-size: .82rem; text-align: center; max-width: 95%; }
.msg .meta { font-size: .72rem; color: var(--muted); margin-bottom: 3px; }
.msg .body { white-space: pre-wrap; }
.msg .prop { margin-top: 4px; font-size: .82rem; color: #c8b98a; }
.llmtag { color: #8fc8ff; font-weight: 700; }
.dec-accept { color: var(--good); } .dec-reject { color: var(--bad); } .dec-counter { color: var(--warn); }
.offer { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: rgba(245,176,65,.08); border: 1px solid rgba(245,176,65,.35); border-radius: 8px; padding: 8px 10px; margin: 6px 0; }
.composer { border-top: 1px solid var(--line); padding-top: 10px; }
.bundle { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 4px; margin: 4px 0 8px; }
.bundle label { display: flex; align-items: center; gap: 4px; font-size: .85rem; } .bundle input { width: 100%; padding: 4px 6px; }

/* news */
ul.news { list-style: none; padding: 0; margin: 8px 0; }
ul.news li { padding: 6px 8px; border-bottom: 1px solid #232b38; }
ul.news li.imp { background: rgba(78,161,255,.06); }
ul.news .turn { display: inline-block; min-width: 44px; color: var(--muted); font-variant-numeric: tabular-nums; }
ul.news .cat { display: inline-block; min-width: 76px; font-size: .7rem; text-transform: uppercase; color: var(--muted); }
ul.news li.cat-war .cat { color: var(--bad); } ul.news li.cat-diplomacy .cat { color: var(--accent); } ul.news li.cat-economy .cat { color: var(--good); }

/* modals */
.modal-bg { position: fixed; inset: 0; background: rgba(5,8,12,.75); z-index: 100; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 30px 10px; }
.modal { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; width: min(640px, 100%); box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.modal.wide { width: min(1000px, 100%); }
.modal-x { position: absolute; top: 10px; right: 10px; background: none; border: none; font-size: 1.1rem; }
fieldset { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 12px; padding: 10px 12px; }
legend { color: var(--accent); font-weight: 700; padding: 0 6px; }
.form fieldset, fieldset.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 12px; }
.form label, fieldset.form label { display: flex; flex-direction: column; gap: 3px; font-size: .85rem; color: var(--muted); }
.form label.wide, fieldset.form label.wide { grid-column: 1 / -1; }
.form label.check, fieldset.form label.check { flex-direction: row; align-items: center; gap: 8px; grid-column: 1 / -1; color: var(--text); }
.form input, .form select, .form textarea { color: var(--text); }
.hint { font-size: .75rem; color: #6f7c90; }
.cd { color: var(--warn); font-size: .75rem; }
.flagbuilder { grid-column: 1 / -1; display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.flagctl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; flex: 1; }
.flagctl span { display: flex; gap: 4px; }
.filebtn { position: relative; overflow: hidden; display: inline-block; background: var(--card2); border: 1px solid var(--line); border-radius: 7px; padding: 6px 11px; cursor: pointer; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* toasts */
#toasts { position: fixed; bottom: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.toast { background: var(--card2); border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.4); opacity: 0; transform: translateY(10px); transition: all .25s; }
.toast.show { opacity: 1; transform: none; }
.toast.good { border-left-color: var(--good); } .toast.bad { border-left-color: var(--bad); } .toast.info { border-left-color: var(--warn); }

/* ===== round 2: world map ===== */
.mapview { display: grid; grid-template-columns: 1fr 320px; gap: 14px; align-items: start; }
@media (max-width: 1100px) { .mapview { grid-template-columns: 1fr; } }
.mapcard { padding: 10px; }
.mapside .card { margin-bottom: 12px; }
.mapwrap { position: relative; width: 100%; aspect-ratio: 2 / 1; background: #0b2440; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; user-select: none; cursor: grab; touch-action: none; }
.mapwrap.dragging { cursor: grabbing; }
.mapwrap.pick { cursor: crosshair; }
.worldmap { width: 100%; height: 100%; display: block; }
.worldmap .sea { fill: #0d2a4a; }
.worldmap .grat { stroke: #ffffff10; fill: none; }
.worldmap .land { stroke: #0b1a2a; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-width: .6; }
.worldmap .land.dim { opacity: .35; }
.worldmap .land.hl { stroke: #f1c40f; stroke-width: 1; }
.worldmap .mk { cursor: pointer; }
.worldmap .mk:hover circle { stroke: #fff; }
.worldmap .mklabel { fill: #f1f4f8; paint-order: stroke; stroke: #0b1420; stroke-width: 3px; stroke-linejoin: round; font-weight: 600; pointer-events: none; vector-effect: non-scaling-stroke; }
.worldmap .cltext { fill: #fff; font-weight: 800; paint-order: stroke; stroke: #000a; stroke-width: 2px; pointer-events: none; }
.worldmap .wline { fill: none; stroke: #ff4d4d; stroke-dasharray: 6 3; opacity: .85; vector-effect: non-scaling-stroke; }
.worldmap .wline.mine { stroke: #ff2020; opacity: 1; }
.worldmap .tline { fill: none; opacity: .65; vector-effect: non-scaling-stroke; }
.worldmap .clink { stroke: #ffffff55; stroke-dasharray: 2 2; fill: none; }
.worldmap .spleg { stroke: #ffffffaa; }
.mapctl { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; gap: 4px; }
.mapctl button { width: 30px; height: 30px; padding: 0; font-size: 1rem; background: #1b212cdd; }
.maptip { position: absolute; pointer-events: none; z-index: 5; background: #10151dee; border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; font-size: .82rem; max-width: 280px; box-shadow: 0 4px 14px #0008; }
.maplegend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .8rem; margin-top: 8px; color: var(--muted); }
.maplegend span { display: inline-flex; align-items: center; gap: 5px; }
.maplegend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 1px solid #000; }
.maplegend i.ln { width: 18px; height: 0; border: none; border-top: 2px dashed #ff4d4d; border-radius: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.checks label { display: inline-flex; gap: 5px; align-items: center; font-size: .85rem; }
.selpanel .actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pickmap { width: 100%; max-width: 760px; margin: 6px 0; }
.pickmap.big { max-width: 100%; }
/* treaty web */
.twlayout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .twlayout { grid-template-columns: 1fr; } }
.treatyweb { display: flex; flex-direction: column; gap: 8px; }
.twsvg { width: 100%; height: auto; min-height: 360px; background: #10151d; border: 1px solid var(--line); border-radius: 8px; }
.twsvg .twlabel { fill: #e6edf6; font-size: 11px; font-weight: 600; paint-order: stroke; stroke: #10151d; stroke-width: 3px; }
.twsvg .twsub { fill: var(--muted); font-size: 9px; }
.twsvg .twnode { cursor: pointer; }
.treatytypes { font-size: .82rem; }
.treatytypes div { margin: 3px 0; }
.tdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.tag.treaty { color: #fff; }
/* alliance & bank */
.aflag, .bigflag { border-radius: 4px; border: 1px solid var(--line); object-fit: cover; }
.portrait { border-radius: 8px; border: 1px solid var(--line); object-fit: cover; background: #222a37; }
.fgroup { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 6px 0; }
.fgroup label { display: flex; flex-direction: column; gap: 3px; font-size: .82rem; color: var(--muted); }
.frow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 5px 0; }
.log { max-height: 220px; overflow: auto; font-size: .82rem; }
.log div { padding: 3px 0; border-bottom: 1px solid #ffffff08; }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: .72rem; line-height: 18px; text-align: center; }
/* generation boxes / unit art */
.genbox { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.genbox input { flex: 1; min-width: 0; }
button.gen { background: linear-gradient(135deg, #7d4ee0, #c04ea0); border-color: #a05ad0; color: #fff; white-space: nowrap; }
button.gen:disabled { opacity: .6; cursor: wait; }
.artgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.artcard { background: var(--card2); border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.artcard .artimg { width: 96px; height: 96px; border-radius: 6px; border: 1px solid var(--line); background: #10151d; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; object-fit: cover; }
.form .wide, fieldset.form .wide { grid-column: 1 / -1; }

.mapside label:not(.check) { display: flex; flex-direction: column; gap: 3px; font-size: .82rem; color: var(--muted); margin-bottom: 6px; }
.mapside select, .mapside input:not([type=checkbox]) { width: 100%; }
.selpanel select { max-width: 100%; }
.mapside .row { display: flex; gap: 6px; }

/* ---------- Round 3: political quiz & ideology ---------- */
.ideo { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 700; padding: 1px 8px 1px 6px; border-radius: 999px; background: color-mix(in srgb, var(--ic) 22%, transparent); border: 1px solid color-mix(in srgb, var(--ic) 60%, transparent); color: #eef3fa; white-space: nowrap; }
.ideo i { width: 9px; height: 9px; border-radius: 50%; background: var(--ic); display: inline-block; }
.ideo.none { --ic: #6b7380; color: var(--muted); font-weight: 600; }
.ideobig { font-size: 2rem; font-weight: 800; color: var(--ic); text-shadow: 0 0 18px color-mix(in srgb, var(--ic) 45%, transparent); }
.compass { background: #121821; border: 1px solid var(--line); border-radius: 8px; display: block; }
.modal.quizmodal { width: min(1080px, 100%); }
.qz { display: grid; grid-template-columns: 1fr 230px; gap: 16px; align-items: start; }
.qz-list { max-height: 64vh; overflow-y: auto; padding-right: 6px; }
.qz-q { background: var(--card2); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 8px; padding: 9px 12px; margin-bottom: 8px; }
.qz-q.done { border-left-color: var(--accent); }
.qz-h { margin-bottom: 2px; } .qz-text { margin-bottom: 6px; color: #c9d6ea; }
.qz-opts { display: flex; flex-direction: column; gap: 3px; }
.qz-opts label { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; cursor: pointer; padding: 2px 4px; border-radius: 5px; }
.qz-opts label:hover { background: #ffffff0d; }
.qz-opts input { margin-top: 3px; }
.qz-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 8px; }
.qz-btns { display: flex; flex-direction: column; gap: 6px; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.qz-side .bar { height: 6px; background: var(--card2); border-radius: 3px; overflow: hidden; margin-bottom: 3px; }
.qz-result { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.warnbox, .ideowarn { background: #3a2a14; border: 1px solid var(--warn); color: #f8d9a0; border-radius: 7px; padding: 6px 10px; }
.ideowarn { margin: 4px 0; flex-basis: 100%; }
.ideoblock { max-width: 280px; margin-top: 3px; }
.ideorow { gap: 10px; } .ideoedit { flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
details.laws summary { cursor: pointer; color: var(--accent); font-size: .82rem; margin-top: 4px; }
.pill.info { border-color: var(--accent); } .pill.info b { color: var(--accent); }
@media (max-width: 820px) { .qz { grid-template-columns: 1fr; } .qz-side { position: static; order: -1; } }

/* ===== Round 4 ===== */
#tabs button { padding: 11px 10px; }
.tiny { font-size: .72rem; } button.tiny { padding: 1px 6px; font-size: .72rem; min-height: 0; }
.chip { display: inline-block; font-size: .72rem; padding: 1px 7px; border-radius: 999px; background: #2c3545; margin: 1px 0; white-space: nowrap; }
.chip.ok { background: #1e5d3a; color: #d8f5e3; } .chip.no { background: #5a2a2a; color: #f6d6d6; }
.tag.proj { background: #3b3360; margin: 2px 0; }
/* projects */
.projtbl td { vertical-align: top; } .projtbl td:first-child { width: 38%; }
.projtbl tr.built td { background: rgba(46,204,113,.06); } .projtbl tr.dim td:first-child b { color: var(--muted); }
/* timer pill */
.pill.timer b { font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: center; }
.pill.timer small { color: var(--warn); font-size: .7rem; } .pill.timer.good { border-color: var(--good); }
.pill.timer button { padding: 0 6px; border-radius: 999px; }
/* baseball */
.roster td { padding: 3px 5px; } .roster input.bbname { width: 130px; padding: 2px 5px; font-size: .8rem; }
.trainbtns { opacity: .35; } tr:hover .trainbtns { opacity: 1; }
.tbl tr.me td { background: rgba(93,173,226,.12); font-weight: 600; }
.tbl tr.warnrow td { background: rgba(236,112,99,.10); }
.news li.imp { color: var(--text); font-weight: 600; }
/* newspaper */
.paper { background: #f3ecdc; color: #231f1a; border-radius: 6px; padding: 18px 24px 22px; margin-bottom: 16px; font-family: Georgia, 'Times New Roman', serif; box-shadow: 0 6px 24px #0007; }
.paper .muted { color: #6d6457; }
.paper button { background: #e2d7c0; color: #231f1a; border-color: #b9ab90; } .paper button:disabled { opacity: .45; }
.masthead { text-align: center; border-bottom: 3px double #231f1a; padding-bottom: 6px; margin-bottom: 12px; }
.mh-title { font-family: 'Old English Text MT', 'UnifrakturMaguntia', Georgia, serif; font-size: 2.6rem; font-weight: 700; letter-spacing: .02em; line-height: 1.1; }
.mh-meta { display: flex; justify-content: space-between; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid #231f1a; padding-bottom: 3px; margin-bottom: 4px; gap: 10px; flex-wrap: wrap; }
.mh-sub { font-style: italic; margin: 6px 0 10px; }
.mh-nav { margin-top: 4px; display: flex; justify-content: center; gap: 8px; align-items: center; }
.paper .lead h1 { font-size: 2.1rem; line-height: 1.15; margin: 4px 0 8px; text-align: center; }
.paper .lead p { font-size: 1.05rem; text-align: center; font-style: italic; margin: 0 auto 12px; max-width: 900px; border-bottom: 1px solid #231f1a; padding-bottom: 12px; }
.papercols { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: 20px; }
.papercols .articles { column-count: 2; column-gap: 22px; column-rule: 1px solid #c8bca4; }
.papercols article { break-inside: avoid; margin-bottom: 14px; }
.papercols article h3 { font-size: 1.15rem; margin: 2px 0 4px; line-height: 1.2; }
.papercols article p { margin: 0; text-align: justify; hyphens: auto; font-size: .93rem; line-height: 1.42; }
.kicker { font-family: system-ui, sans-serif; font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; color: #8a2b1a; font-weight: 700; }
.editorial { border-top: 1px solid #231f1a; padding-top: 6px; }
.papercols aside .box { border: 1px solid #231f1a; padding: 8px 10px; margin-bottom: 10px; }
.papercols aside h4 { margin: 0 0 6px; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid #231f1a; }
.papercols blockquote { margin: 0 0 8px; font-style: italic; font-size: .88rem; } .papercols cite { display: block; text-align: right; font-size: .78rem; font-style: normal; }
.papercols aside a, .paper a { color: #233f7a; }
@media (max-width: 1000px) { .papercols { grid-template-columns: 1fr; } .papercols .articles { column-count: 1; } }
.forum { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.forum .post { background: var(--card2); border-left: 3px solid var(--accent); border-radius: 6px; padding: 8px 10px; }
.forum .ptitle { font-weight: 700; } .forum .pbody { margin-top: 4px; font-size: .88rem; }
.evrow { padding: 4px 0; border-bottom: 1px solid #232b38; }
/* map: coalition / alliance-war / raid lines */
.worldmap .wline.coal { stroke: #ff9f1a; stroke-dasharray: none; opacity: .95; }
.worldmap .wline.alw { stroke: #c76bff; stroke-dasharray: 8 3; }
.worldmap .wline.raid { stroke: #ffd24d; stroke-dasharray: 2 3; opacity: .7; }
.maplegend i.ln.coal { border-top: 3px solid #ff9f1a; } .maplegend i.ln.alw { border-top: 2px dashed #c76bff; } .maplegend i.ln.raid { border-top: 2px dotted #ffd24d; }
.coalnote { color: #ff9f1a; font-weight: 600; }
.formgrid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.formgrid label { display: flex; flex-direction: column; gap: 3px; font-size: .82rem; color: var(--muted); }
.formgrid label.wide { grid-column: 1 / -1; }
.mapwrap > .maplegend { position: absolute; left: 8px; right: 8px; bottom: 8px; margin: 0; background: #10151dd9; padding: 5px 9px; border-radius: 6px; pointer-events: none; }
.paper h1, .paper h2, .paper h3, .paper h4, .paper b { color: #231f1a; }
.paper .papercols article h3 { color: #1a1612; }

/* ---- round 5: war screen ---- */
.battlereport { border: 1px solid var(--line, #334); border-radius: 8px; padding: 6px 10px; margin: 6px 0; background: rgba(127,127,127,.06); }
.battlereport.mine { border-left: 4px solid var(--good, #3a8); }
.battlereport.theirs { border-left: 4px solid var(--bad, #c44); }
.tier { display: inline-block; padding: 0 6px; border-radius: 6px; font-size: .78em; font-weight: 600; line-height: 1.5; }
.tier.it { background: #1f7a3a; color: #fff; } .tier.ms { background: #4b8f2f; color: #fff; }
.tier.pv { background: #a8861c; color: #fff; } .tier.uf { background: #a33; color: #fff; }
.card.outcome { border-left: 4px solid var(--muted, #888); }
.card.outcome.won { border-left-color: #1f7a3a; background: rgba(31,122,58,.08); }
.card.outcome.lost { border-left-color: #a33; background: rgba(170,51,51,.08); }
.card.outcome h3 { margin: 0 0 4px; }
.warflags { line-height: 1.5; }
.onboard ol { margin: 6px 0 0 18px; padding: 0; } .onboard li { margin: 3px 0; } .onboard li.done { opacity: .6; text-decoration: line-through; }
