/* Toywars Legend — the rounded theme applied to every page other than home, log in and sign up.
   Loaded after theme.css. Each page keeps its own <style> block for layout; these rules only
   change the surface: rounded corners, the two-tone panel, pill tags and buttons, Mitr headings.
   Everything hangs off body.tw-theme, and a page's own rule still wins where both are equally specific. */

/* ===== shared building blocks (site.css) ===== */
.tw-theme .h2{font-family:'Mitr','Kanit',sans-serif;font-weight:500}
.tw-theme .card{border-radius:26px;background:var(--th-panel);box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}
.tw-theme .panel{border-radius:24px;background:var(--th-panel);box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}
.tw-theme .stat{border-radius:18px;background:var(--th-panel)}
.tw-theme .tag,.tw-theme .badge{border-radius:999px}
.tw-theme .btn-cta.sm{padding:11px 26px}
/* ---- dropdowns (<select>) ----
   Closed: the same box as a text input, with the theme's own chevron instead of the browser arrow.
   Open: in browsers that allow it (Chrome / Edge 135 and later) the list is a rounded dark panel
   like the language menu; other browsers show their built-in list, switched to its dark colours. */
.tw-theme select{color-scheme:dark}
.tw-theme select option,.tw-theme select optgroup{background:#1b1838;color:#eef0f4}
.tw-theme select.input{border-radius:16px;cursor:pointer;appearance:none;-webkit-appearance:none;padding-right:44px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2212%22 height=%2212%22 viewBox=%220 0 12 12%22%3E%3Cpath d=%22M2.5 4.5l3.5 3.5 3.5-3.5%22 fill=%22none%22 stroke=%22%23a4a2b8%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 16px center}
.tw-theme select.input:hover{border-color:rgba(255,255,255,.26)}
.tw-theme select.input:disabled{opacity:.55;cursor:default}
@supports (appearance:base-select){
  /* "body" in front so this also wins over a page that sets appearance on its own select */
  body.tw-theme select,body.tw-theme select::picker(select){appearance:base-select}
  .tw-theme select::picker-icon{display:none}
  body.tw-theme select{display:inline-flex;align-items:center}
  .tw-theme select::picker(select){margin:8px 0;padding:6px;border-radius:18px;background:rgba(28,25,56,.98);
    border:1px solid rgba(255,255,255,.1);box-shadow:0 20px 44px rgba(0,0,0,.5);
    scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.18) transparent}
  .tw-theme select option{padding:10px 14px;border-radius:12px;background:transparent;color:#b8bac4;
    font-family:'Kanit',sans-serif;font-size:14px;font-weight:400;cursor:pointer;transition:background .14s,color .14s}
  .tw-theme select option:hover,.tw-theme select option:focus-visible{background:rgba(255,255,255,.07);color:#fff;outline:none}
  .tw-theme select option:checked{color:#F2912A;background:rgba(242,145,42,.1);font-weight:500}
  .tw-theme select option::checkmark{display:none}
  .tw-theme select option:disabled{opacity:.45;cursor:default}
  .tw-theme select optgroup{padding:8px 6px 4px;background:transparent;color:#7c7a92;font-size:12px;font-weight:400}
}
/* page numbers on every player page: round buttons, the current one filled orange (the fish book quests' pager,
   .fq-pager in fish.html and .ms-pager in missions.html, look the same) */
.tw-theme .pager{gap:6px;align-items:center}
.tw-theme .pager button{min-width:38px;height:38px;padding:0 10px;border-radius:999px;font-family:'Kanit',sans-serif;font-size:14px;font-weight:400;
  color:#a4a2b8;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.08);cursor:pointer;transition:color .15s,border-color .15s}
.tw-theme .pager button:hover:not(:disabled){color:#fff;border-color:rgba(255,255,255,.22)}
.tw-theme .pager button{box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}
/* the current page: the raised orange of the site's main buttons (light top edge, darker bottom edge) */
.tw-theme .pager button.cur{font-weight:500;color:var(--th-ink);border-color:#F7A03A;background:var(--th-grad);opacity:1;cursor:default;
  box-shadow:inset 0 2px 0 rgba(255,255,255,.4),inset 0 -3px 0 rgba(150,50,0,.35)}
.tw-theme .pager button:disabled:not(.cur){opacity:.35;cursor:default}
.tw-theme .pager .gap{align-self:center;padding:0 2px}
/* headings inside panels */
.tw-theme .ac-sec h2,.tw-theme .ac-info h2,.tw-theme .ai-panel h2,.tw-theme .tu-panel h2,.tw-theme .c-panel-head h2,.tw-theme .rd-hist h2,
.tw-theme .rd-ok h2,.tw-theme .ms-sec h2,.tw-theme .fb-sec h2,.tw-theme .dl-how h2,.tw-theme .fb-title,.tw-theme .dl-name,
.tw-theme .ai-name,.tw-theme .ac-name,.tw-theme .cv-name,.tw-theme .dl-title,.tw-theme .art-title,.tw-theme .nw-title{font-family:'Mitr','Kanit',sans-serif}

/* ===== account / account info ===== */
.tw-theme .ac-panel,.tw-theme .ai-panel{border-radius:26px;background:var(--th-panel);box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}
.tw-theme .ai-hero,.tw-theme .cv-hero{border-radius:26px;box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}
.tw-theme .ac-grade,.tw-theme .ai-grade{border-radius:999px;padding:4px 13px}
.tw-theme .ac-av-gear,.tw-theme .cc-emb-gear{border-color:#1a1736}
.tw-theme .pw-open{border-radius:999px}

/* ===== top up ===== */
.tw-theme .tu-panel{border-radius:26px;background:var(--th-panel);box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}
.tw-theme .pkg{border-radius:18px;overflow:hidden;transition:border-color .2s ease,background-color .2s ease,transform .22s var(--th-spring)}
.tw-theme .pkg:hover{transform:translateY(-3px)}
.tw-theme .pkg-tag{top:10px;right:10px;border-radius:999px}
.tw-theme .ps-tier{border-radius:18px}
.tw-theme .qr-wrap img{border-radius:16px}
.tw-theme .slip-drop{border-radius:18px}
.tw-theme .slip-drop img{border-radius:12px}

/* ===== redeem ===== */
.tw-theme .rd-card{border-radius:26px;background:var(--th-panel);box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}
.tw-theme .rd-ok-mark{border-radius:50%}

/* ===== daily missions ===== */
.tw-theme .ms-note,.tw-theme .ms-sum,.tw-theme .st-count,.tw-theme .fb-note{border-radius:22px;background:var(--th-panel);box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}
.tw-theme .ms-card,.tw-theme .pool,.tw-theme .st-track{border-radius:22px;box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}
.tw-theme .ms-card:not(.done),.tw-theme .pool,.tw-theme .st-track{background:var(--th-panel)}
.tw-theme .ms-sum-bar,.tw-theme .ms-bar,.tw-theme .st-meter,.tw-theme .ms-sum-bar i,.tw-theme .ms-bar i,.tw-theme .st-meter i{border-radius:999px}
.tw-theme .ms-sum-tag,.tw-theme .ms-tag,.tw-theme .st-badge{border-radius:999px}
.tw-theme .ms-tag{padding:3px 10px}
.tw-theme .cal-d{border-radius:10px}
.tw-theme .ms-empty{border-radius:22px}
.tw-theme .ms-tip code{border-radius:7px}
.tw-theme .rw.pt .dot{border-radius:2px}

/* ===== fish book ===== */
.tw-theme .fb-card{border-radius:22px;background:var(--th-panel);box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}
.tw-theme .fb-frame{border-radius:16px}
.tw-theme .fb-pill,.tw-theme .fb-chip{border-radius:999px}
.tw-theme .fb-chip{padding:7px 15px;transition:border-color .15s,transform .2s var(--th-spring)}
.tw-theme .fb-chip:hover{transform:translateY(-2px)}
.tw-theme .fb-chip.on{color:var(--th-ink);border-color:#F7A03A;background:var(--th-grad);font-weight:500}
.tw-theme .fb-tile{border-radius:16px}

/* ===== news list / news post ===== */
.tw-theme .nw-tabs{display:inline-flex;gap:4px;max-width:100%;padding:5px;margin-bottom:16px;border-bottom:none;border-radius:999px;
  background:#171430;border:1px solid rgba(255,255,255,.07);box-shadow:inset 0 1px 0 rgba(255,255,255,.04)}
.tw-theme .nw-tabs button{font-size:14px;padding:9px 18px;margin:0;border:1px solid transparent;border-radius:999px;color:#a4a2b8;transition:none}
.tw-theme .nw-tabs button:hover{color:#fff;background:rgba(255,255,255,.09)}
.tw-theme .nw-tabs button.on,.tw-theme .nw-tabs button.on:hover{font-weight:500;color:var(--th-ink);border-color:#F7A03A;background:var(--th-grad);
  box-shadow:inset 0 2px 0 rgba(255,255,255,.4),inset 0 -3px 0 rgba(150,50,0,.35)}
.tw-theme .nw-cover{border-radius:18px}
.tw-theme .art-card{border-radius:30px;background:var(--th-panel);box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 30px 60px rgba(5,3,14,.4)}
.tw-theme .art-cover{border-radius:18px}
.tw-theme .art-body img{border-radius:12px}
.tw-theme .art-body blockquote{border-radius:0 12px 12px 0}

/* ===== pre-register ===== */
.tw-theme .pr-card{border-radius:26px;background:var(--th-panel);box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}
.tw-theme .pr-done{border-radius:999px}
.tw-theme .pr-track,.tw-theme .pr-fill{border-radius:999px}
.tw-theme .pr-ms{border-radius:20px;background:var(--th-panel)}

/* ===== download page ===== */
.tw-theme .dl-opt{border-radius:26px;background:var(--th-panel);box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}
.tw-theme .dl-tag{border-radius:999px;padding:4px 12px}
.tw-theme .dl-points li::before{border-radius:50%}
.tw-theme .dl-soon{border-radius:999px}
.tw-theme .dl-step-box{border-radius:22px;background:var(--th-panel)}

/* ===== discord link (its card is the framed auth card, filled in directly) ===== */
.tw-theme .auth-box.dl-box{padding:clamp(28px,4vw,44px) clamp(22px,4vw,40px);border-radius:30px;background:var(--th-panel);
  border:1px solid rgba(255,255,255,.08);box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 40px 80px rgba(5,3,14,.5)}
.tw-theme .dl-mark{border-radius:24px;box-shadow:inset 0 3px 0 rgba(255,255,255,.4),inset 0 -4px 0 rgba(150,50,0,.35)}
.tw-theme .dl-pair{border-radius:20px;background:#120f26}
.tw-theme .dl-warn{border-radius:14px}

/* ===== clans ===== */
.tw-theme .c-panel{border-radius:26px;background:var(--th-panel);box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}
.tw-theme .clan-emb-frame{border-radius:16px}
.tw-theme .role,.tw-theme .clan-tabs .count{border-radius:999px}
.tw-theme .emb-grid button{border-radius:12px}
.tw-theme .cl-mine{border-radius:18px;background:var(--th-panel)}
.tw-theme .cl-box{border-radius:16px;overflow:hidden;background:#120f26;box-shadow:inset 0 2px 4px rgba(0,0,0,.2)}

/* ===== staff pages (admin, items, logs, devices, missions, park) ===== */
.tw-theme .a-card,.tw-theme .dv-card,.tw-theme .am-card,.tw-theme .lg-panel,.tw-theme .set-card,.tw-theme .banner-card{border-radius:22px;
  background:var(--th-panel);box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}
.tw-theme .a-menu,.tw-theme .au-json,.tw-theme .in-board,.tw-theme .preview,.tw-theme .win,.tw-theme .bitem,.tw-theme .pw-box,
.tw-theme .tsum,.tw-theme .crit,.tw-theme .cl-card,.tw-theme .dev{border-radius:16px}
.tw-theme .dv-input{border-radius:12px}
.tw-theme .dv-btn,.tw-theme .dv-ban,.tw-theme .pill,.tw-theme .slotpill,.tw-theme .chip,.tw-theme .days label{border-radius:999px}
.tw-theme .am-card .btn,.tw-theme .preview .btn,.tw-theme button.btn{border-radius:999px}
.tw-theme .pics button,.tw-theme .i-pager button{border-radius:12px}
.tw-theme .ck.ck-editor__editable_inline{border-radius:0 0 16px 16px}

/* ===== boxes that were still square (theme audit, Nov 2026) ===== */
/* match logs (players see this page too) */
.tw-theme .l-card{border-radius:22px;overflow:hidden;background:var(--th-panel);box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}
/* segmented filters (logs, admin, devices, item list): a pill track like the news tabs */
.tw-theme .l-seg,.tw-theme .a-seg,.tw-theme .seg{gap:2px;padding:4px;border-radius:999px;background:#171430;border-color:rgba(255,255,255,.08);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);max-width:100%;overflow-x:auto;scrollbar-width:none}
.tw-theme .l-seg button,.tw-theme .a-seg button,.tw-theme .seg button{flex:none;border-radius:999px;white-space:nowrap}
.tw-theme .l-seg button + button,.tw-theme .a-seg button + button,.tw-theme .seg button + button{border-left:none}
.tw-theme .l-seg button,.tw-theme .a-seg button{height:36px}
.tw-theme .l-seg button:hover:not(.on),.tw-theme .a-seg button:hover:not(.on),.tw-theme .seg button:hover:not(.on){background:rgba(255,255,255,.07)}
/* item list (staff) */
.tw-theme .i-card{border-radius:22px;background:var(--th-panel);box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}
.tw-theme .icon,.tw-theme .set-ic,.tw-theme .banner-thumb,.tw-theme .png-prev{border-radius:12px}
.tw-theme .id{border-radius:12px}
/* admin: download status, image drops, notes */
.tw-theme .st-dl{border-radius:16px;overflow:hidden}
.tw-theme .img-drop{border-radius:16px;overflow:hidden}
.tw-theme .img-drop .swap,.tw-theme .clear{border-radius:999px}
.tw-theme .ft-msg,.tw-theme .ls-warn{border-radius:0 12px 12px 0}

/* ===== staff pages: buttons and switches in the theme (PARK, missions, devices, item list) =====
   These pages define their own flat .btn / .dv-btn / .tgl; here they take the same look as
   .btn-cta, .btn-ghost and the switches on the admin panel. */
/* main action: the raised orange "toy" button */
.tw-theme .btn:not(.ghost):not(.danger),.tw-theme .dv-btn:not(.ghost){font-family:'Kanit',sans-serif;font-weight:500;
  color:var(--th-ink);background:var(--th-grad);border:1px solid #F7A03A;border-radius:999px;
  box-shadow:inset 0 2px 0 rgba(255,255,255,.4),inset 0 -3px 0 rgba(150,50,0,.35);
  transition:transform .2s var(--th-spring),box-shadow .2s,opacity .2s}
.tw-theme .btn.mini:not(.ghost):not(.danger),.tw-theme .dv-btn.mini:not(.ghost){box-shadow:inset 0 1px 0 rgba(255,255,255,.4),inset 0 -2px 0 rgba(150,50,0,.35)}
.tw-theme .btn:not(.ghost):not(.danger):hover:not(:disabled),.tw-theme .dv-btn:not(.ghost):hover:not(:disabled){transform:translateY(-2px)}
.tw-theme .btn:not(.ghost):not(.danger):active:not(:disabled),.tw-theme .dv-btn:not(.ghost):active:not(:disabled){transform:translateY(1px)}
/* secondary: the same as .btn-ghost */
.tw-theme .btn.ghost,.tw-theme .dv-btn.ghost{background:#171430;border-color:rgba(255,255,255,.12);border-radius:999px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);transition:border-color .16s,background-color .16s,color .16s}
.tw-theme .btn.ghost:hover:not(:disabled),.tw-theme .dv-btn.ghost:hover:not(:disabled){background:#1c1938;border-color:rgba(255,255,255,.34);color:#fff}
.tw-theme .btn.danger{border-radius:999px;transition:border-color .16s,background-color .16s}
.tw-theme .btn.danger:hover:not(:disabled){border-color:#ff8a7a;background:rgba(255,138,122,.08)}

/* on/off switch: a rounded track with a round knob. On stays quiet (soft orange track, orange knob),
   so a switch never looks like a button; the pages' own rules set those colours. */
.tw-theme .tgl{border-radius:999px}
.tw-theme .tgl::after{border-radius:50%}

/* segmented filters: the chosen one is a soft orange pill, as on the admin panel */
.tw-theme .seg button.on,.tw-theme .l-seg button.on{color:#FFB15C;background:rgba(242,145,42,.14);font-weight:400}

@media (prefers-reduced-motion: reduce){
  .tw-theme .btn:hover,.tw-theme .btn:active,.tw-theme .dv-btn:hover,.tw-theme .dv-btn:active{transform:none !important}
}
