/* teningur.is — the dark Senate look of the Roman game: near-black ground, gold, Georgia. */
:root {
    --tg-bg: #0e0c09;
    --tg-bar: #231e14;
    --tg-panel: rgba(10, 8, 4, 0.88);
    --tg-gold: #ffd700;
    --tg-text: #fdf5e6;
    --tg-soft: #c8a86b;
    --tg-muted: #8b7355;
    --tg-line: #5a4a20;
    --tg-line-dark: #3a3010;
    --tg-rust: #8b4513;
    --tg-frame: 4px;      /* the pie's gold frame — the user's own setting (14 Nov 2026) */
    --tg-red: 0.3;        /* red wash over the Alea slice */
    --tg-blue: 0.45;      /* blue wash over the new game's slice */
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--tg-bg); color: var(--tg-text); font-family: Georgia, serif; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--tg-soft); }
a:hover { color: var(--tg-gold); }

/* ── header ── */
.tg-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
             padding: 10px 22px; background: var(--tg-bar); border-bottom: 1px solid #6b4400; }
.tg-brand { display: flex; align-items: center; gap: 10px; color: var(--tg-gold); font-size: 1.25em; letter-spacing: 0.14em;
            text-decoration: none; text-shadow: 0 0 14px rgba(255, 215, 0, 0.3); }
.tg-die { width: 26px; height: 26px; border: 2px solid var(--tg-gold); border-radius: 6px; position: relative; flex: none; }
.tg-die i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--tg-gold); }
.tg-die i:nth-child(1) { left: 4px; top: 4px; }
.tg-die i:nth-child(2) { left: 9px; top: 9px; }
.tg-die i:nth-child(3) { left: 14px; top: 14px; }
.tg-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tg-link { color: var(--tg-soft); text-decoration: none; font-size: 0.86em; padding: 6px 10px; border-radius: 4px; }
.tg-link:hover, .tg-link.on { color: var(--tg-gold); }
.tg-lang { display: inline-flex; border: 1px solid var(--tg-line); border-radius: 4px; overflow: hidden; font-size: 0.74em; }
.tg-lang a { padding: 5px 8px; color: var(--tg-muted); text-decoration: none; letter-spacing: 0.06em; }
.tg-lang a.on { background: #2a2000; color: var(--tg-gold); }
.tg-btn { display: inline-block; font-family: Georgia, serif; font-size: 0.86em; color: var(--tg-text); text-decoration: none; cursor: pointer;
          padding: 6px 13px; background: transparent; border: 1px solid var(--tg-rust); border-radius: 4px; }
.tg-btn:hover { border-color: var(--tg-gold); color: var(--tg-gold); }
.tg-btn.primary { background: var(--tg-rust); border-color: var(--tg-gold); color: var(--tg-text); }
.tg-btn.primary:hover { background: #a0522d; color: #fff; }
.tg-btn:disabled { background: #333; color: #777; border-color: #555; cursor: not-allowed; }

/* ── page body ── */
.tg-main { flex: 1; width: 100%; max-width: 780px; margin: 0 auto; padding: 22px 16px 40px; }
.tg-main.wide { max-width: 1500px; }
.tg-footer { text-align: center; color: var(--tg-muted); font-size: 0.75em; padding: 14px; border-top: 1px solid var(--tg-line-dark); }
h1 { color: var(--tg-gold); font-size: 1.35em; letter-spacing: 0.08em; font-weight: normal; margin: 0 0 14px; }
h2 { color: var(--tg-soft); font-size: 1.05em; font-weight: normal; border-bottom: 1px solid var(--tg-line-dark); padding-bottom: 6px; margin: 26px 0 10px; }
p { line-height: 1.6; }
.tg-tagline { color: var(--tg-muted); font-style: italic; letter-spacing: 0.08em; text-align: center; margin: 0 0 6px; }
.tg-center { text-align: center; }
.tg-muted { color: var(--tg-muted); }
.tg-small { font-size: 0.85em; }

/* ── cards and forms ── */
.tg-card { background: var(--tg-panel); border: 1px solid var(--tg-line); border-radius: 8px; padding: 22px 26px; margin: 0 auto 18px; }
.tg-card.narrow { max-width: 400px; }
.tg-card h2:first-child, .tg-card h1:first-child { margin-top: 0; }
.tg-tabs { display: flex; gap: 6px; margin: 0 auto 12px; max-width: 400px; }
.tg-tab { flex: 1; text-align: center; padding: 8px 6px; font-family: Georgia, serif; font-size: 0.88em; cursor: pointer;
          background: #16120c; color: var(--tg-soft); border: 1px solid var(--tg-line); border-radius: 5px; }
.tg-tab.on { background: #2a2000; color: var(--tg-gold); border-color: var(--tg-gold); }
.tg-panel { display: none; }
.tg-panel.on { display: block; }
.tg-field { margin-bottom: 13px; }
.tg-field label { display: block; color: #a08060; font-size: 0.76em; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 5px; }
.tg-field input[type=text], .tg-field input[type=email], .tg-field input[type=password], .tg-field input[type=tel], .tg-field input[type=date], .tg-field select {
    width: 100%; padding: 9px 12px; background: #0d0b08; border: 1px solid #5a3010; border-radius: 4px; color: var(--tg-text);
    font-family: Georgia, serif; font-size: 0.95em; outline: none; }
.tg-field input:focus, .tg-field select:focus { border-color: var(--tg-gold); }
.tg-field input[readonly] { color: var(--tg-muted); }
.tg-field .hint { color: var(--tg-muted); font-size: 0.76em; margin-top: 4px; }
.req { color: #ff6b6b; margin-left: 4px; font-size: 1.15em; line-height: 1; }
.tg-reqnote { margin: 2px 0 12px; }
.tg-field.bad input, .tg-field.bad select { border-color: #ff6b6b; }
.tg-field select option { background: #0d0b08; color: #fdf5e6; }
.tg-check { display: flex; align-items: center; gap: 8px; color: var(--tg-soft); font-size: 0.86em; margin: 4px 0 12px; }
.tg-check input { accent-color: var(--tg-gold); width: 16px; height: 16px; }
.tg-submit { width: 100%; padding: 10px; font-size: 0.95em; font-weight: bold; }
.tg-msg { margin-top: 10px; font-size: 0.86em; text-align: center; min-height: 1.2em; }
.tg-msg.error { color: #ff7070; }
.tg-msg.success { color: #81c784; }
.tg-textlink { display: block; text-align: center; margin-top: 14px; color: #a08060; font-size: 0.84em; text-decoration: none; background: none; border: none; font-family: Georgia, serif; cursor: pointer; width: 100%; }
.tg-textlink:hover { color: var(--tg-gold); }
.tg-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .tg-grid2 { grid-template-columns: 1fr; } }

/* ── the pie ── */
.tg-pie { width: min(100%, 540px); height: auto; display: block; margin: 0 auto; overflow: visible; }
.tg-slice { transition: transform 0.18s ease, filter 0.18s ease; }
a.tg-slice { cursor: pointer; }
.tg-slice .frame { fill: none; stroke: var(--tg-gold); stroke-width: var(--tg-frame); stroke-linejoin: round; }
.tg-slice .shade { fill: #000; opacity: 0.22; }
.tg-slice .tint-red { fill: #a01414; opacity: var(--tg-red); }
.tg-slice .tint-blue { fill: #173a7a; opacity: var(--tg-blue); }
.tg-slice text { font-family: Georgia, serif; text-anchor: middle; fill: var(--tg-text); letter-spacing: 0.1em;
                 paint-order: stroke; stroke: rgba(0, 0, 0, 0.78); stroke-width: 5px; stroke-linejoin: round; }
.tg-slice text.soon { font-size: 15px; fill: var(--tg-gold); letter-spacing: 0.06em; stroke-width: 0; }
#tg-s-alea { transform: translate(6px, -3.5px); }
#tg-s-new { transform: translate(0, 7px); }
#tg-s-med { transform: translate(-6px, -3.5px); }
a#tg-s-alea:hover, a#tg-s-alea:focus-visible { transform: translate(14px, -8px); filter: brightness(1.18); }
a#tg-s-new:hover, a#tg-s-new:focus-visible { transform: translate(0, 16px); filter: brightness(1.18); }
a#tg-s-med:hover, a#tg-s-med:focus-visible { transform: translate(-14px, -8px); filter: brightness(1.18); }
.tg-slice:focus { outline: none; }
.tg-inline { background: none; border: none; padding: 0; color: var(--tg-soft); font: inherit; font-size: 0.92em; text-decoration: underline; cursor: pointer; }
.tg-inline:hover { color: var(--tg-gold); }
.tg-under { text-align: center; line-height: 1.9; color: var(--tg-soft); font-size: 0.9em; margin-top: 14px; }
@media (prefers-reduced-motion: reduce) { .tg-slice { transition: none; } }

/* ── admin (after the Roman game's admin_style.php) ── */
.tg-dash { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.tg-dash h1 { margin: 0 8px 0 0; white-space: nowrap; }
.tg-stat { background: #2c2922; border: 1px solid #5a4400; border-radius: 6px; padding: 5px 12px; white-space: nowrap; }
.tg-stat .num { font-size: 1.15em; font-weight: bold; color: var(--tg-gold); margin-right: 6px; }
.tg-stat .label { font-size: 0.68em; color: #cfc4a8; text-transform: uppercase; letter-spacing: 0.04em; }
.tg-hbtn { display: inline-flex; align-items: center; gap: 5px; background: #2c2922; border: 1px solid #5a4400; border-radius: 6px;
           padding: 5px 12px; color: var(--tg-gold); text-decoration: none; font-size: 0.85em; white-space: nowrap; }
.tg-hbtn:hover, .tg-hbtn.on { border-color: var(--tg-gold); background: #2a2000; }
.tg-search { background: #15130f; border: 1px solid #6a6450; color: var(--tg-text); padding: 6px 10px; border-radius: 4px;
             font-family: Georgia, serif; font-size: 0.88em; width: 300px; max-width: 100%; margin-bottom: 8px; }
.tg-search:focus { outline: none; border-color: var(--tg-gold); }
.tg-scroll { max-height: 68vh; overflow: auto; border: 1px solid #4a463c; border-radius: 6px; }
.tg-scroll thead th { position: sticky; top: 0; background: #211e18; z-index: 1; }
table.tg-table { width: 100%; border-collapse: collapse; font-size: 0.86em; }
.tg-table th { text-align: left; color: var(--tg-gold); padding: 8px 10px; border-bottom: 2px solid #5a4400; font-size: 0.82em;
               text-transform: uppercase; letter-spacing: 0.04em; font-weight: normal; white-space: nowrap; }
.tg-table td { padding: 7px 10px; border-bottom: 1px solid #4a463c; vertical-align: top; }
.tg-table tr:hover td { background: #2e2b24; }
.tg-table.compact { font-size: 0.8em; }
.tg-table.compact th, .tg-table.compact td { padding: 4px 8px; }
.tg-table .muted, .muted { color: #a09880; }
.tg-badge { color: var(--tg-gold); font-size: 0.85em; font-weight: bold; }
.tg-badge.ok { color: #81c784; }
.tg-badge.off { color: #888; }
.tg-badge.bad { color: #ef9a9a; }
.tg-mini { background: #222; border: 1px solid #555; color: #aaa; padding: 3px 9px; border-radius: 4px; cursor: pointer;
           font-family: Georgia, serif; font-size: 0.8em; white-space: nowrap; }
.tg-mini:hover { border-color: var(--tg-gold); color: var(--tg-gold); }
.tg-mini:disabled { opacity: 0.5; cursor: default; }
.tg-gamebox { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; white-space: nowrap; color: var(--tg-soft); }
.tg-gamebox input { accent-color: var(--tg-gold); width: 15px; height: 15px; cursor: pointer; }
.tg-none { display: none; color: #a09880; text-align: center; padding: 16px; font-style: italic; }
.tg-back { color: #c0a870; text-decoration: none; font-size: 0.85em; }
.tg-modal-back { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.65); align-items: flex-start; justify-content: center;
                 z-index: 100; overflow-y: auto; padding: 30px 12px; }
.tg-modal-back.on { display: flex; }
.tg-modal { background: #1a1200; border: 1px solid #8b6000; border-radius: 8px; padding: 20px 24px; width: 520px; max-width: 100%; }
.tg-modal h3 { color: var(--tg-gold); margin: 0 0 14px; font-weight: normal; letter-spacing: 0.05em; }
.tg-modal .row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }
.tg-paidrow { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; align-items: end; margin-bottom: 6px; }
.tg-paidrow .gname { color: var(--tg-soft); font-size: 0.86em; padding-bottom: 9px; }
.tg-ev { padding: 2px 8px; border-radius: 10px; font-size: 0.8em; background: #2c2922; color: #cfc4a8; white-space: nowrap; }
.tg-ev.good { background: #0f1f0f; color: #81c784; }
.tg-ev.warn { background: #2a1a00; color: #ffb74d; }
.tg-ev.bad { background: #1f0a0a; color: #ef9a9a; }
pre.tg-report { background: #15130f; border: 1px solid #4a463c; border-radius: 6px; padding: 12px; overflow: auto; font-size: 0.8em; color: #ddd0b0; white-space: pre-wrap; }
