/* Luckydeck admin tools: the game's own old-style look (navy title strips, bevelled buttons, pale
   panels on a soft blue ground), laid out for work: a fixed sidebar, dense tables, clear states. */
:root { --navy: #1b2a66; --ink: #0d1740; --line: #8fa3d0; --pale: #eef3fb; --ground: #cfe0f4; --gold: #ffd84a; --orange: #ff9a1a; --bad: #c0281a; --ok: #1f7a3a; --text: #1b2a44; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 13px/1.5 Tahoma, "Leelawadee UI", "Noto Sans Thai", system-ui, sans-serif; color: var(--text); background: var(--ground) repeating-linear-gradient(45deg, rgba(255,255,255,.22) 0 12px, transparent 12px 24px); }
button, input, select { font: inherit; color: inherit; }
h1, h2, p { margin: 0; }

/* buttons: glossy and bevelled, like the game's */
button { height: 30px; padding: 0 16px; font-weight: bold; color: #5a2400; background: linear-gradient(#fff6b0 0, #ffd84a 50%, #ffb81f 51%, #ff9a1a 100%); border: 1px solid #7a3d00; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.7), 1px 2px 0 rgba(27,42,102,.3); cursor: pointer; white-space: nowrap; transition: filter .12s, transform .06s; }
button:hover { filter: brightness(1.07); }
button:active { transform: translate(1px, 1px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); }
button.plain { color: var(--navy); background: linear-gradient(#fbfdff 0, #e3ebf8 50%, #c9d6ee 51%, #bccbe6 100%); border-color: #4a5f96; }
button.danger { color: #fff; background: linear-gradient(#f08a7c 0, #d9483a 50%, #c0281a 51%, #a51d10 100%); border-color: #6a0f06; }
button.small { height: 24px; padding: 0 10px; font-size: 12px; }
button:disabled { filter: grayscale(.85) opacity(.65); cursor: default; }
input, select { height: 30px; padding: 0 8px; background: #fff; border: 1px solid var(--line); border-top: 2px solid var(--navy); border-left: 2px solid var(--navy); border-radius: 2px; outline: none; transition: box-shadow .12s; }
input:focus, select:focus { box-shadow: 0 0 0 3px rgba(255,154,26,.45); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--orange); }
input[type=number] { width: 110px; }
input.wide { width: 100%; min-width: 220px; }
input.bad { border-color: var(--bad); background: #fff0ee; }
input.search { width: 320px; max-width: 100%; }

/* windows */
.win { margin-bottom: 16px; background: var(--pale); border: 1px solid var(--ink); border-radius: 4px; box-shadow: 3px 3px 0 rgba(27,42,102,.28); overflow: hidden; }
.win-title { padding: 5px 12px; font-weight: bold; letter-spacing: .5px; color: #fff; background: linear-gradient(#3a55b8, var(--navy)); border-bottom: 2px solid var(--ink); text-shadow: 0 1px 0 var(--ink); }
.win-body { padding: 12px; }
.note { margin-top: 6px; font-size: 12px; color: #55638f; }
.error { color: var(--bad); font-weight: bold; }
.done { color: var(--ok); font-weight: bold; }
.grow { flex: 1; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; margin-top: 10px; }
.bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0; }

/* sign in */
.login-page { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; }
.login-page .logo { width: 340px; max-width: 80%; filter: drop-shadow(0 4px 0 rgba(27,42,102,.25)); animation: drop .5s cubic-bezier(.2, 1.4, .4, 1); }
.win.login { width: 360px; max-width: 100%; animation: rise .35s ease-out; }
.win.login .win-body { display: flex; flex-direction: column; gap: 10px; }

/* shell: sidebar and content */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100%; }
aside { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 14px 10px; color: #fff; background: linear-gradient(180deg, #24388a, var(--ink)); border-right: 3px solid var(--ink); overflow-y: auto; }
aside .logo { width: 100%; padding: 0 12px; filter: drop-shadow(0 3px 0 rgba(0,0,0,.35)); }
aside .tag { align-self: center; margin-bottom: 8px; padding: 1px 12px; font-size: 11px; font-weight: bold; letter-spacing: 3px; color: var(--ink); background: var(--gold); border-radius: 9px; }
aside nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
button.nav { height: 36px; display: flex; align-items: center; gap: 10px; padding: 0 12px; font-weight: bold; text-align: left; color: #dbe6ff; background: transparent; border: 1px solid transparent; box-shadow: none; border-radius: 5px; }
button.nav i { width: 22px; font-style: normal; text-align: center; }
button.nav:hover { background: rgba(255,255,255,.1); filter: none; }
button.nav.on { color: #5a2400; background: linear-gradient(#fff6b0, #ffb81f); border-color: #7a3d00; box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); }
aside .who { display: flex; align-items: center; gap: 8px; padding: 10px 6px 0; border-top: 1px solid rgba(255,255,255,.2); }
aside .who b { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.content { min-width: 0; }
.content header { position: sticky; top: 0; z-index: 3; padding: 12px 22px; background: rgba(238,243,251,.94); border-bottom: 2px solid var(--navy); backdrop-filter: blur(4px); }
.content h1 { font-size: 19px; color: var(--navy); }
main { padding: 18px 22px 40px; max-width: 1500px; }
main.enter { animation: rise .28s ease-out; }
.loading { padding: 40px; text-align: center; color: #55638f; animation: pulse 1s ease-in-out infinite alternate; }

/* numbers at a glance */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--ink); border-radius: 4px; box-shadow: 3px 3px 0 rgba(27,42,102,.25); transition: transform .12s; }
.stat:hover { transform: translateY(-2px); }
.stat i { font-size: 26px; font-style: normal; }
.stat span { display: block; font-size: 12px; color: #55638f; }
.stat b { font-size: 24px; color: var(--navy); line-height: 1.1; }

/* tables */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--navy); }
table.grid { width: 100%; border-collapse: collapse; }
.grid th { position: sticky; top: 0; padding: 7px 10px; font-size: 12px; text-align: left; white-space: nowrap; color: var(--navy); background: linear-gradient(#f4f8ff, #dbe6f8); border-bottom: 2px solid var(--navy); user-select: none; }
.grid th.sortable { cursor: pointer; }
.grid th.sortable:hover { background: #fff3b8; }
.grid th.asc::after { content: " ▲"; color: var(--orange); }
.grid th.desc::after { content: " ▼"; color: var(--orange); }
.grid td { padding: 6px 10px; border-bottom: 1px solid #d5ddef; vertical-align: middle; }
.grid tbody tr:nth-child(even) { background: #f6f9ff; }
.grid tbody tr:hover { background: #fff8d6; }
.grid tr.clickable { cursor: pointer; }
.grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
.grid td.empty { padding: 26px; text-align: center; color: #8a94ad; }
.grid.edit td { padding: 4px 6px; }
.grid.edit input:not([type=checkbox]):not([type=number]) { width: 100%; min-width: 96px; }
.side .grid.edit input:not([type=checkbox]):not([type=number]) { min-width: 60px; }
.side .grid.edit input[type=number] { width: 52px; }
.side .grid.edit td, .side .grid.edit th { padding: 4px 3px; }
.grid code { font: 11px/1.4 ui-monospace, Menlo, monospace; color: #44507a; overflow-wrap: anywhere; }
.with-thumb { display: flex; align-items: center; gap: 8px; }
.thumb { width: 36px; height: 48px; object-fit: contain; flex: none; background: #e3ebf8; border: 1px solid var(--line); border-radius: 3px; transition: transform .15s; }
.thumb:hover { transform: scale(2.6); position: relative; z-index: 5; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.pager { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: #55638f; flex-wrap: wrap; }
.pager b { padding: 0 8px; color: var(--navy); }
.savebar { position: sticky; top: 53px; z-index: 2; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 8px 12px; background: #fffbe6; border: 1px solid #c98a1a; border-radius: 4px; box-shadow: 2px 2px 0 rgba(27,42,102,.2); }

/* people and labels */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none; font-weight: bold; color: #fff; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--navy); text-shadow: 0 1px 0 rgba(0,0,0,.35); }
.avatar.vip { box-shadow: 0 0 0 2px var(--gold), 0 0 8px var(--gold); }
.avatar.banned { filter: grayscale(1); }
.person { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.chip { display: inline-block; margin: 1px 3px 1px 0; padding: 1px 9px; font-size: 11px; font-weight: bold; white-space: nowrap; color: var(--navy); background: #e3ebf8; border: 1px solid var(--line); border-radius: 10px; }
.chip.ok { color: #145c28; background: #dff5e3; border-color: #7cc48c; }
.chip.bad { color: #fff; background: var(--bad); border-color: #6a0f06; }
.chip.gm { color: #fff; background: #7a3fc0; border-color: #3f1a70; }
.chip.vip { color: #5a2400; background: var(--gold); border-color: #7a3d00; }
.chips { display: flex; flex-wrap: wrap; }
.profile { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; padding: 14px 18px; background: #fff; border: 1px solid var(--ink); border-radius: 4px; box-shadow: 3px 3px 0 rgba(27,42,102,.25); }
.profile .avatar { width: 68px; height: 68px; font-size: 30px; color: #fff; }
.profile h2 { font-size: 20px; color: var(--navy); }
.profile span { color: #55638f; }
.two { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
table.facts { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); }
.facts th { width: 190px; padding: 5px 10px; font-weight: normal; text-align: left; color: #55638f; border-bottom: 1px solid #d5ddef; }
.facts td { padding: 5px 10px; font-weight: bold; border-bottom: 1px solid #d5ddef; overflow-wrap: anywhere; }

/* map editor */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.editor canvas { width: 100%; aspect-ratio: 1; display: block; background: #7cc463; border: 1px solid var(--ink); border-radius: 4px; box-shadow: 3px 3px 0 rgba(27,42,102,.28); cursor: crosshair; touch-action: none; }
.side { display: flex; flex-direction: column; gap: 12px; }
.card { padding: 12px; background: var(--pale); border: 1px solid var(--ink); border-radius: 4px; box-shadow: 3px 3px 0 rgba(27,42,102,.25); }
.card h2, .bar h2 { margin-bottom: 8px; font-size: 14px; color: var(--navy); }

/* announcement preview: as it appears in the game */
.announce-preview { margin: 12px 0; padding: 8px 20px; text-align: center; background: linear-gradient(90deg, rgba(13,23,64,.2), #0d1740 18%, #0d1740 82%, rgba(13,23,64,.2)); border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); }
.announce-preview b { margin-right: 8px; color: #ff6a4a; letter-spacing: 1px; }
.announce-preview p { display: inline; font-size: 17px; font-weight: bold; color: #ffd84a; text-shadow: 0 0 6px rgba(255,190,40,.7); overflow-wrap: anywhere; }

/* confirmation window and toasts */
.veil { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(13,23,64,.55); animation: fade .15s ease-out; }
.win.modal { width: 440px; max-width: 100%; margin: 0; animation: drop .25s cubic-bezier(.2, 1.4, .4, 1); }
.win.modal .win-body { display: flex; flex-direction: column; gap: 10px; }
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { padding: 9px 16px; font-weight: bold; color: #fff; background: var(--ok); border: 1px solid #0c4a1c; border-radius: 5px; box-shadow: 3px 3px 0 rgba(13,23,64,.35); animation: slide .25s ease-out; transition: opacity .35s, transform .35s; }
.toast.bad { background: var(--bad); border-color: #6a0f06; }
.toast.out { opacity: 0; transform: translateX(30px); }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes drop { from { opacity: 0; transform: translateY(-16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes slide { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { from { opacity: .45; } to { opacity: 1; } }
@media (max-width: 1000px) { .shell { grid-template-columns: 1fr; } aside { position: static; height: auto; } aside nav { flex-direction: row; flex-wrap: wrap; } .two, .editor { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* reward lists and coupon effects */
.win.modal.wide { width: min(680px, 94vw); }
.reward-rows { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; margin-bottom: 10px; overflow-y: auto; }
.reward-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: #fff; border: 1px solid #b9c3e6; border-radius: 3px; animation: row-in .18s ease-out; }
.reward-row .grow { flex: 1; min-width: 0; }
.reward-row input[type=number] { width: 96px; }
.reward-button { display: flex; align-items: center; gap: 8px; width: 168px; text-align: left; }
.reward-button span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: normal; }
.reward-button b { color: var(--navy); }
.effect { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.effect input[type=number] { width: 54px; }
.effect select { width: 88px; }
@keyframes row-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* title effects */
.title-stage { display: flex; align-items: center; justify-content: center; min-width: 150px; height: 40px; padding: 0 8px; background: linear-gradient(180deg, #6fb44f, #4f9a3a); border: 1px solid #1b2a66; border-radius: 3px; overflow: hidden; }
.title-sample { white-space: nowrap; color: #fff; text-shadow: -1px 0 #2a1630, 1px 0 #2a1630, 0 -1px #2a1630, 0 1px #2a1630, 0 2px 2px rgba(0,0,0,.5); }

/* day-to-day pages: players, guilds, economy, audit log, announcements, gifts, server */
a.link { font-weight: bold; color: var(--navy); text-decoration: none; border-bottom: 1px dotted var(--navy); }
a.link:hover { color: #b85a00; border-bottom-color: #b85a00; }
.chip.live { color: #fff; background: #1f9a4a; border-color: #0c4a1c; }
.stat small { display: block; margin-top: 2px; font-size: 11px; color: #55638f; }
.stat b { overflow-wrap: anywhere; }
.four { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
label.field { align-items: center; }
label.field > span { flex: none; color: #44507a; }
label.field > small { flex-basis: 100%; font-size: 11px; color: #55638f; }
label.field select, label.field input[type=text], label.field input[type=search] { min-width: 180px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin-bottom: 10px; padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 3px; }
.filters label.field { justify-content: flex-start; }
.schedule { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 12px; padding: 8px 12px; background: #fff; border: 1px dashed var(--line); border-radius: 3px; }
.schedule label.field { justify-content: flex-start; }
.schedule input[type=number] { width: 72px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.timer { margin-bottom: 8px; padding: 8px 10px; background: #fff; border: 1px solid var(--line); border-radius: 3px; }
.timer .row + .row { margin-top: 6px; }
.timer input[type=number] { width: 64px; }
.diff { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.diff i { font-style: normal; font-weight: bold; color: var(--orange); }
.diff .was { color: #8a3a2a; text-decoration: line-through; text-decoration-color: rgba(138,58,42,.45); }
.diff .now { color: #145c28; font-weight: bold; }
h2.sub { margin: 14px 0 6px; font-size: 13px; color: var(--navy); }
h2.sub:first-child { margin-top: 0; }
.gift-list { min-width: 0; overflow-wrap: anywhere; }
.win-body > .row + .row, .win-body > .row + input.wide, .win-body > input.wide + .row { margin-top: 8px; }
.with-thumb > span { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
span.thumb { display: inline-block; }
.facts td .link { font-weight: bold; }


/* eyes and mouths */
.face-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.face-card { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 8px; background: #fff; border: 2px solid #c9d4ee; border-radius: 6px; text-align: center; }
.face-card.free { border-color: #f0a020; background: #fff8e6; }
.face-card.plain { opacity: .8; }
.face-card img { width: 72px; height: 72px; object-fit: contain; background: #f6dcc4; border-radius: 6px; }
.face-card input[type=text] { width: 100%; text-align: center; }
.face-card .face-free { display: flex; align-items: center; gap: 5px; font-weight: 700; cursor: pointer; }


/* eyes and mouths: placing them on the head (admin-face-layout.js) */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.face-layout { display: grid; grid-template-columns: minmax(280px, 440px) minmax(0, 1fr); gap: 16px; align-items: start; }
.face-layout .fl-preview { position: sticky; top: 112px; }
.fl-stage { background: #bfe3f7; border: 1px solid var(--ink); border-radius: 4px; overflow: hidden; }
.fl-canvas { display: block; width: 100%; aspect-ratio: 1; outline: none; }
.fl-stage .error { margin: 0; padding: 16px; }
.fl-portrait { width: 200px; height: 200px; margin: 4px auto 10px; border-radius: 50%; overflow: hidden; border: 5px solid #3b4252; background: #bfe3f7; }
.fl-portrait-canvas { display: block; width: 100%; height: 100%; outline: none; }
.fl-views { margin-top: 8px; }
.fl-pick { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.fl-pick label { display: flex; align-items: center; gap: 8px; font-weight: bold; color: var(--navy); }
.fl-pick select { min-width: 220px; }
.fl-group { padding: 8px 10px; background: #fff; border: 1px solid var(--line); border-radius: 3px; }
.fl-group + .fl-group { margin-top: 10px; }
.fl-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; color: var(--navy); }
.fl-row { display: grid; grid-template-columns: minmax(130px, 220px) minmax(90px, 1fr) 84px 34px; align-items: center; gap: 8px; padding: 2px 0; }
.fl-row > span { color: #44507a; }
.fl-row input[type=range] { width: 100%; height: 22px; padding: 0; border: 0; background: none; accent-color: var(--orange); }
.fl-row input[type=number] { width: 100%; text-align: right; }
.fl-row > i { font-style: normal; font-size: 12px; color: #55638f; }
.fl-lock { display: flex; justify-content: flex-start; align-items: center; gap: 6px; margin-top: 10px; font-weight: bold; color: var(--navy); cursor: pointer; }
.fl-sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; margin-top: 8px; }
.fl-sides[hidden] { display: none; }
.fl-sides .fl-group + .fl-group { margin-top: 0; }
@media (max-width: 980px) { .face-layout { grid-template-columns: 1fr; } .face-layout .fl-preview { position: static; } }

/* ---- print workshop (admin-garments.js) ---- */
.print-bench { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr); gap: 12px; align-items: start; margin-bottom: 12px; }
.print-stage { position: sticky; top: 110px; background: #fff; border: 2px solid #c9d4ee; border-radius: 6px; padding: 8px; }
.print-canvas { display: block; width: 100%; aspect-ratio: 4 / 5; border-radius: 4px; background: #8aa6cc; touch-action: none; outline: none; }
.print-views { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.kit-field { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 8px; margin-bottom: 6px; }
.kit-field input[type=color] { width: 64px; height: 30px; padding: 0; }
.print-layer { border: 1px solid #c9d4ee; border-radius: 6px; padding: 8px; margin-bottom: 8px; background: #f8faff; }
.print-layer-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.print-layer-head img { width: 36px; height: 36px; object-fit: contain; background: #dfe6f5; border-radius: 4px; }
.print-slider { display: grid; grid-template-columns: 70px 1fr 76px; align-items: center; gap: 8px; margin: 3px 0; }
.print-slider input[type=number] { width: 100%; }
.kit-upload { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.print-library { display: flex; flex-wrap: wrap; gap: 8px; }
button.print-thumb { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; width: 104px; height: auto; min-height: 104px; padding: 6px; background: #fff; border: 2px solid #c9d4ee; border-radius: 6px; box-shadow: none; cursor: pointer; font-size: 12px; font-weight: normal; line-height: 1.25; color: var(--navy); white-space: normal; text-align: center; }
.print-thumb > span { width: 100%; }
button.print-thumb:hover { border-color: #f0a020; filter: none; }
.print-thumb img { width: 64px; height: 64px; object-fit: contain; background: #dfe6f5; border-radius: 4px; }
button.print-thumb.new { justify-content: center; font-weight: 700; font-size: 14px; background: linear-gradient(#fff6b0, #ffd84a); border-color: #c98a1a; color: #5a2400; }
.print-swatch { width: 64px; height: 40px; border-radius: 4px; border: 1px solid rgba(0,0,0,.2); }
.print-made { margin-bottom: 12px; }
.print-bases { margin-bottom: 12px; }
.print-layer.chosen { border-color: #f0a020; background: #fffbea; box-shadow: 0 0 0 2px rgba(240,160,32,.35); }
.print-add { margin-bottom: 8px; }
.print-words { border-top: 1px dashed #c9d4ee; padding-top: 6px; margin-bottom: 6px; }
.print-words-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.print-words-row select { min-width: 140px; }
.print-bold { display: flex; align-items: center; gap: 4px; height: 30px; }
.print-words-badge { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 4px; background: #1d2a4a; color: #fff; font-weight: 700; font-size: 20px; }
@media (max-width: 900px) { .print-bench { grid-template-columns: 1fr; } .print-stage { position: static; } }

/* ---- game servers (admin-servers.js) ---- */
.sv-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; align-items: stretch; }
.sv-list > button { align-self: flex-start; }
.sv-card { background: #fff; border: 2px solid #c9d4ee; border-radius: 6px; padding: 10px 12px; }
.sv-card.open { border-color: #3fae16; }
.sv-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sv-body { display: grid; grid-template-columns: minmax(260px, 1fr) 380px; gap: 14px; }
.sv-open { display: flex; align-items: center; justify-content: flex-start; gap: 6px; font-weight: 700; margin-top: 4px; cursor: pointer; }
.sv-open input { width: auto; flex: none; }
.sv-look { max-width: 380px; }
.sv-preview { aspect-ratio: 16 / 10; border: 1px solid #1b2a66; border-radius: 4px; background: #dfe6f5 center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: #56618a; font-size: 12px; text-align: center; padding: 8px; }
.sv-picker { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sv-thumb { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 92px; padding: 4px; background: #fff; border: 2px solid #c9d4ee; border-radius: 6px; cursor: pointer; font-size: 11px; color: inherit; }
.sv-thumb img { width: 80px; height: 50px; object-fit: cover; border-radius: 3px; }
.sv-thumb.none { justify-content: center; min-height: 50px; }
.sv-thumb.on { border-color: #f0a020; background: #fff8e6; }
@media (max-width: 900px) { .sv-body { grid-template-columns: 1fr; } }

/* ---- menu groups ---- */
.nav-group { display: block; margin: 10px 12px 2px; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: #9fb4ea; text-transform: uppercase; }
aside nav { overflow-y: auto; }

/* ---- website settings ---- */
.site-hint { margin: -2px 0 10px 158px; }
.site-thumb { object-fit: contain !important; background: #dfe6f5; }
.kit-field textarea { width: 100%; resize: vertical; font: inherit; }

/* ---- community moderation ---- */
.cm-card { background: #fff; border: 2px solid #c9d4ee; border-radius: 6px; padding: 10px 12px; margin-bottom: 10px; }
.cm-card h3 { margin: 0 0 4px; font-size: 15px; overflow-wrap: anywhere; }
.cm-body { margin: 6px 0; padding: 8px; background: #f8faff; border: 1px solid #dfe6f5; border-radius: 4px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto; font-size: 13px; }
.cm-picture { display: block; max-width: 480px; max-height: 320px; margin: 6px 0; border: 1px solid #1b2a66; }
.cm-comment { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; border-top: 1px dotted #c9d4ee; font-size: 12px; }
.cm-comment p { margin: 0; flex: 1; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---- effects (admin-effects.js) and title styles (admin-titles.js) ---- */
.fx-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch; }
.fx-list > .row { flex-basis: 100%; margin-top: 4px; }
.fx-chip { display: grid; grid-template-columns: auto 1fr; column-gap: 6px; align-items: center; height: auto; min-width: 150px; padding: 5px 10px; text-align: left; color: var(--navy); background: #fff; border: 2px solid #c9d4ee; border-radius: 6px; }
.fx-chip i { grid-row: span 2; font-style: normal; font-size: 20px; color: #8a3fd6; }
.fx-chip.circle i { color: #d99a00; }
.fx-chip.card i { color: #e05a2a; }
.fx-card-preview { display: flex; gap: 14px; align-items: flex-start; margin-top: 10px; padding: 12px; background: #1c2133; border-radius: 6px; color: #e8ecf8; }
.fx-card-preview[hidden] { display: none; }
.fx-card-preview .note { color: #b8c2de; }
.fx-card-preview select { max-width: 100%; }
.fx-card-flat { flex: none; padding: 26px 22px 18px; }
.fx-card-flat img { width: 120px; height: auto; }
.card-fx-row { align-items: center; gap: 14px; margin: 2px 0 4px 158px; padding: 14px 18px; background: #1c2133; border-radius: 6px; }
.card-fx-row .note { color: #c9d1ea; }
.card-fx-flat img { width: 72px; height: auto; }
.fx-chip small { font-size: 11px; font-weight: normal; color: #55638f; }
.fx-chip.on { border-color: #f0a020; background: #fff8e6; }
.fx-hint { margin: -2px 0 8px 158px; }
.fx-layers { display: grid; gap: 8px; margin-bottom: 8px; }
.fx-layer { padding: 6px 8px; background: #f4f7fd; border: 1px solid #c9d4ee; border-radius: 4px; }
.fx-layer-head { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.fx-thumb { width: 96px; height: 52px; padding: 2px; background: #2a2f45; border: 1px solid #8fa3d0; border-radius: 4px; color: #fff; }
.fx-thumb img { width: 100%; height: 100%; object-fit: contain; }
.fx-font-sample { display: inline-block; padding: 2px 10px; font-size: 22px; font-weight: bold; background: #2a2f45; border-radius: 4px; }
.fx-shelf { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.fx-shelf figure { margin: 0; width: 92px; text-align: center; font-size: 11px; overflow-wrap: anywhere; }
.fx-shelf img { width: 92px; height: 56px; object-fit: contain; background: #2a2f45; border-radius: 4px; }
.fx-fonts { display: grid; gap: 4px; margin: 6px 0 10px; }
.fx-fonts > div { display: flex; gap: 10px; align-items: baseline; }
.fx-font-line { font-size: 20px; }
.ts-body { display: grid; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 4px 18px; }
.ts-stage { min-width: 190px; min-height: 40px; height: auto; padding: 6px 10px; }
.sv-card.ts-special { border-color: #e0a400; background: #fffbea; }
.ts-cards { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ts-card { display: inline-flex; align-items: center; gap: 2px; }
.ts-shelf { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.ts-shelf figure { margin: 0; padding: 6px; text-align: center; font-size: 11px; background: linear-gradient(180deg, #6fb44f, #4f9a3a); border: 1px solid #1b2a66; border-radius: 4px; color: #fff; }
.ts-shelf img { display: block; height: 40px; max-width: 200px; margin: 0 auto 3px; object-fit: contain; }
@media (max-width: 900px) { .ts-body { grid-template-columns: 1fr; } }
.ts-pick { height: 48px; max-width: 100%; object-fit: contain; background: #5aa343; border-radius: 3px; }

/* ---- windows with a ✕, the picture picker, and the chip of a chosen item or card (admin-kit.js) ---- */
.win-title.with-x { display: flex; align-items: center; gap: 10px; }
.win-title.with-x span { flex: 1; }
.win-title .x { height: 22px; padding: 0 8px; font-size: 12px; color: #fff; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.45); box-shadow: none; text-shadow: none; }
.win.modal.picker { width: min(980px, 96vw); }
.win.modal.picker .win-body, .win.modal.form .win-body, .win.modal.detail .win-body { max-height: calc(100vh - 110px); overflow-y: auto; }
.win.modal.picker .bar { position: sticky; top: -12px; z-index: 1; margin: -12px -12px 0; padding: 10px 12px; background: var(--pale); border-bottom: 1px solid var(--line); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
.pick-card { height: auto; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px; font-weight: normal; text-align: center; color: var(--text); background: #fff; border: 2px solid #c9d4ee; border-radius: 6px; box-shadow: none; text-shadow: none; cursor: pointer; }
.pick-card:hover { border-color: var(--orange); filter: none; transform: translateY(-1px); }
.pick-card.on { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,154,26,.4); }
.pick-card b { max-width: 100%; font-size: 12px; line-height: 1.25; color: var(--navy); }
.pick-card code { max-width: 100%; font: 10px/1.3 ui-monospace, Menlo, monospace; color: #6b7699; }
/* a line cut with "…"; over its card a long one scrolls round (rollingText in admin-kit.js) */
.roll { display: block; width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.roll .roll-words { white-space: nowrap; }
.roll.rolling { text-overflow: clip; }
.roll.rolling .roll-words { display: inline-block; animation: roll-round var(--roll-time, 6s) linear infinite; }
.roll.rolling .roll-words::after { content: attr(data-text); padding-left: 32px; }
@keyframes roll-round { from { transform: translateX(0); } to { transform: translateX(var(--roll)); } }
.pick-card small { font-size: 11px; font-weight: bold; color: #8a4b00; }
.pick-art { display: block; width: 72px; height: 84px; object-fit: contain; flex: none; background: #e3ebf8; border-radius: 4px; }
.pick-art.big { width: 120px; height: 140px; border: 1px solid var(--line); }
/* item grades, the same colours as the game's bag slots */
.pick-card.g-common, .thing.g-common { background: linear-gradient(160deg, #f4f5f8, #dfe3ea); border-color: #8c93a3; }
.pick-card.g-uncommon, .thing.g-uncommon { background: linear-gradient(160deg, #f1ffed, #b9e6ae); border-color: #3f9a35; }
.pick-card.g-rare, .thing.g-rare { background: linear-gradient(160deg, #eef7ff, #a9d0f7); border-color: #2a6fc4; }
.pick-card.g-epic, .thing.g-epic { background: linear-gradient(160deg, #f8efff, #d3b0f6); border-color: #7a35c9; }
.pick-card.g-legendary, .thing.g-legendary { background: linear-gradient(160deg, #fff8df, #ffd28a); border-color: #d27a00; }
.pick-card.g-mythic, .thing.g-mythic { background: linear-gradient(135deg, #ffe6ee, #ffb0c2 45%, #d8bcff 75%, #bfeaff); border-color: #c2185b; }
.pick-card.card, .thing.card { background: #fffdf2; border-color: #c9a64a; }
.thing.title, .pick-card .title-sample { padding: 3px 8px; background: linear-gradient(180deg, #5f8fd0, #3c5fa8); border-color: #1b2a66; }      /* a free title, on the blue of the game's sky */
.thing { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 2px 8px 2px 3px; font-size: 12px; vertical-align: middle; background: #fff; border: 1px solid var(--line); border-radius: 5px; }
.thing b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--navy); }
.thing small { font-size: 11px; color: #8a4b00; white-space: nowrap; }
.thing i { font-style: normal; font-weight: bold; color: #b85a00; white-space: nowrap; }
.thing-art { display: inline-block; width: 24px; height: 30px; object-fit: contain; flex: none; background: rgba(255,255,255,.6); border-radius: 3px; }
.thing.gone, .gone { color: #8a94ad; }
.thing.gone { background: #eef0f5; border: 1px dashed #aab2c8; }
.thing.gone code { color: #8a94ad; }
.thing.money { padding: 3px 9px; font-weight: bold; color: #145c28; background: #dff5e3; border-color: #7cc48c; }
.thing.money.coin { color: #5a2400; background: #fff1b8; border-color: #c98a1a; }
.things { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
button.thing-field { height: auto; min-height: 38px; display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 3px 10px 3px 4px; text-align: left; }
button.thing-field .change { font-size: 11px; font-weight: bold; color: #b85a00; white-space: nowrap; }
.reward-row .thing-field { flex: 1; min-width: 0; }
.reward-row select { max-width: 190px; }
.effect .thing-field { min-height: 30px; }
.effect:has(.thing-field) { flex-wrap: wrap; white-space: normal; }

/* ---- forms for items, cards and mall goods (admin-forms.js) ---- */
.win.modal.form { width: min(720px, 96vw); }
.form-fields .kit-field { grid-template-columns: 170px minmax(0, 1fr); align-items: start; margin: 0 0 8px; }
.form-fields .kit-field > span:first-child { padding-top: 6px; font-weight: bold; color: #44507a; }
.form-fields .kit-field > input[type=text], .form-fields .kit-field > textarea, .form-fields .kit-field > select, .form-fields .kit-field > span > input[type=text] { width: 100%; }
.form-fields textarea { padding: 6px 8px; font: inherit; color: inherit; background: #fff; border: 1px solid var(--line); border-top: 2px solid var(--navy); border-left: 2px solid var(--navy); border-radius: 2px; resize: vertical; }
.form-fields .kit-field > input[type=checkbox] { justify-self: start; margin-top: 6px; }
.form-fields .effect { flex-wrap: wrap; white-space: normal; }
.form-fields .effect select { width: auto; }
.form-fields .effect input[type=number] { width: 80px; }
.form-hint { margin: -4px 0 10px 178px; }
.form-error:empty { display: none; }
.form-error { padding: 8px 10px; background: #fff0ee; border: 1px solid var(--bad); border-radius: 3px; }
.art-field { display: flex; gap: 12px; align-items: flex-start; }
.art-field > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.art-field .row input[type=text] { flex: 1; min-width: 120px; }
.art-preview { width: 96px; height: 112px; object-fit: contain; flex: none; background: #e3ebf8 repeating-conic-gradient(#d5ddef 0% 25%, #eef3fb 0% 50%) 50% / 16px 16px; border: 1px solid var(--navy); border-radius: 4px; }
td.row-actions { white-space: nowrap; }
td.row-actions button + button { margin-left: 4px; }

/* ---- trades and purchases in full (admin-history.js) ---- */
.note.lead { margin: 0 0 10px; font-size: 13px; }
.win.modal.detail { width: min(860px, 96vw); }
.trade-sides { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: start; }
.trade-arrow { align-self: center; font-size: 26px; font-weight: bold; color: var(--orange); }
.trade-side { padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.trade-who { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid #d5ddef; }
.trade-who .note { margin: 0; }
.trade-cards { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; }
.trade-card { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; background: #fffdf2; border: 1px solid #c9a64a; border-radius: 4px; }
.trade-card .pick-art { width: 42px; height: 56px; }
.trade-card > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.trade-card b { color: var(--navy); overflow-wrap: anywhere; }
.trade-card code { font: 10px/1.3 ui-monospace, Menlo, monospace; color: #6b7699; }
.trade-card small { font-weight: bold; color: #8a4b00; }
.trade-card > i { font-style: normal; font-size: 16px; font-weight: bold; color: #b85a00; }
.trade-card.gone { background: #eef0f5; border: 1px dashed #aab2c8; }
.trade-card.gone b, .trade-card.gone small { color: #8a94ad; }
.purchase-head { display: flex; gap: 14px; align-items: flex-start; }
.purchase-head h2 { font-size: 18px; color: var(--navy); }
.purchase-head h2.gone { color: #8a94ad; }
@media (max-width: 760px) { .trade-sides { grid-template-columns: 1fr; } .trade-arrow { justify-self: center; transform: rotate(90deg); } }

/* ---- economy (admin-economy.js) ---- */
.eco-bigs { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin-bottom: 16px; }
.eco-big { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; background: #fff; border: 1px solid var(--ink); border-top: 5px solid var(--navy); border-radius: 4px; box-shadow: 3px 3px 0 rgba(27,42,102,.25); }
.eco-label { font-weight: bold; color: #44507a; }
.eco-big b { font-size: 30px; line-height: 1.1; color: var(--navy); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.eco-big i { margin-left: 6px; font-style: normal; font-weight: bold; color: #55638f; }
.eco-big p { margin-top: 4px; font-size: 12px; color: #55638f; }
.eco-change { align-self: flex-start; padding: 1px 9px; font-size: 12px; font-weight: bold; color: var(--navy); background: #e3ebf8; border-radius: 9px; }
.eco-change.up { color: #145c28; background: #dff5e3; }
.eco-change.down { color: #8a1c10; background: #fde3df; }
.eco-lead { margin: 0 0 10px; color: #44507a; }
.eco-figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.eco-fig { display: flex; flex-direction: column; padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.eco-fig span { font-size: 12px; color: #55638f; }
.eco-fig b { font-size: 18px; color: var(--navy); font-variant-numeric: tabular-nums; }
.eco-fig small { font-size: 11px; color: #55638f; }
.eco-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 12px; }
.eco-chart { padding: 10px 12px 6px; background: #fff; border: 1px solid var(--line); border-radius: 4px; min-width: 0; }
.eco-chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; color: var(--navy); }
.eco-chart-head .note { margin: 0; }
.eco-bars { display: flex; align-items: stretch; gap: 2px; height: 130px; }
.eco-bar { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.eco-bar:hover { background: #fff8d6; }
.eco-up { flex: 1; display: flex; align-items: flex-end; border-bottom: 1px solid #8fa3d0; }
.eco-down { flex: 1; display: flex; align-items: flex-start; }
.eco-bar s { display: block; width: 100%; text-decoration: none; border-radius: 2px 2px 0 0; background: #3a6fd0; }
.eco-bars.both .eco-bar s.up { background: #2f9a52; }
.eco-bar s.down { background: #cf4a3a; border-radius: 0 0 2px 2px; }
.eco-bar.running s { opacity: .5; }
.eco-bar small { height: 16px; font-size: 9px; line-height: 16px; text-align: center; white-space: nowrap; color: #55638f; overflow: visible; }
.eco-details { margin-top: 10px; }
.eco-details summary { margin-bottom: 8px; font-weight: bold; color: var(--navy); cursor: pointer; }
.eco-share { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.eco-share u { display: block; width: 70px; height: 9px; text-decoration: none; background: #e3ebf8; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.eco-share s { display: block; height: 100%; background: var(--orange); }

/* Character menu, 3D part fits: rows of the editor that are switched off for the part picked. */
.fl-pick label[hidden], .fl-lock[hidden], .fl-group[hidden] { display: none; }

/* ---- maps page (admin-maps.js): help line, kind sketches ---- */
.map-help { margin: 0 0 10px; padding: 7px 12px; font-weight: bold; color: var(--navy); background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--navy); border-radius: 3px; }
.map-help.placing { color: #5a2400; background: #fff1b8; border-color: #c98a1a; border-left-color: var(--orange); }
.kind-sketch { border: 1px solid rgba(27,42,68,.35); }
button.kind-field { height: auto; display: flex; align-items: center; gap: 10px; width: 100%; padding: 4px 10px 4px 4px; margin-bottom: 6px; text-align: left; }
button.kind-field .kind-sketch { width: 48px; height: 56px; }
button.kind-field > span { display: flex; flex-direction: column; min-width: 0; }
button.kind-field > span:nth-child(2) { flex: 1; }
button.kind-field code { font: 10px/1.3 ui-monospace, Menlo, monospace; font-weight: normal; color: #6b7699; }
button.kind-field .change { font-size: 11px; color: #b85a00; }
.card.add-card { border-top: 5px solid var(--orange); }
.editor canvas:focus { outline: none; }

/* story quests page: one table row per quest, in the order players see them */
.pfa-list { display: flex; flex-direction: column; gap: 10px; }
.pfa-list > button { align-self: flex-start; }
.sq-step { flex: none; display: inline-block; width: 24px; height: 24px; line-height: 24px; text-align: center; color: #fff; background: var(--navy); border-radius: 50%; }
.sq-order { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.sq-order button { padding: 0 4px; line-height: 1.2; }
.sq-table td { vertical-align: top; }
.sq-table td:nth-child(3) input { min-width: 90px; width: 96px; }
.sq-table td:nth-child(4) { min-width: 176px; }
.sq-title { display: flex; flex-direction: column; gap: 2px; }
.sq-desc { max-width: 180px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
.sq-condition { display: inline-flex; gap: 4px; align-items: center; }
.sq-condition select { max-width: 160px; }
.sq-table .sq-goal, .form .sq-goal { width: 64px; }
.sq-after { max-width: 170px; }
.form .sq-condition select, .form .sq-after { max-width: 100%; }
.sq-target { max-width: 170px; }
.sq-coords { display: inline-flex; align-items: center; gap: 3px; margin-left: 4px; font-size: 11px; }
.sq-coords[hidden] { display: none; }
.sq-coord { width: 58px; }
.sq-coord-label { width: 90px; }
.sq-table tr.sq-off td { background: #eceef3; }
.sq-table tr.sq-off td:not(:nth-child(2)):not(:last-child) { opacity: .5; }
.sq-table tr.sq-off .sq-title input { color: #8a90a6; text-decoration: line-through; }
.sq-table tr.sq-bad td { background: #ffe9e6; }
.sq-table tr.sq-bad td:first-child { box-shadow: inset 4px 0 0 #d23a2a; }
.sq-problems { margin: 0 0 10px; padding: 8px 12px; background: #fff7e6; border: 1px solid #f0c27a; border-radius: 6px; }
.sq-problems ul { margin: 4px 0 0; padding-left: 20px; }
.sq-problems li.error { color: #c0281a; }
.sq-problems li.warn { color: #8a5a00; }
.sq-text { display: flex; flex-direction: column; gap: 2px; }
.sq-text > span { align-self: flex-end; font-size: 11px; }

/* profile frames page: the fields beside a live sample of the panel */
.pfa-body { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.2fr); gap: 16px; }
.pfa-sample { display: flex; justify-content: center; padding: 22px 16px; background: linear-gradient(180deg, #7fb6e8, #6aa35a); border: 1px solid #c9d4ee; border-radius: 6px; }
.pfa-art { width: 80px; height: 22px; object-fit: contain; background: #dfe7f5; }
@media (max-width: 900px) { .pfa-body { grid-template-columns: 1fr; } }
.pfa-opacity { margin-top: 4px; padding-top: 6px; border-top: 1px dashed #c9d4ee; }
.pfa-opacity .fl-row { grid-template-columns: 150px minmax(80px, 1fr) 64px 18px; }
.pick-card small { max-width: 100%; overflow-wrap: anywhere; line-height: 1.3; }
.thing.money.exp { color: #1b2a66; background: #dfe9ff; border-color: #8fa3d0; }
/* the 3D picture of a map object, where its sketch used to be (maps page) */
.pick-art.kind-thumb { background: linear-gradient(#dcecfa, #b9d8ae); border: 1px solid rgba(27,42,68,.35); }
button.kind-field .kind-thumb { width: 48px; height: 56px; }
/* the fit tab: the buttons that put drag handles on the part, and the part's item icon */
.fl-grips { margin-top: 8px; align-items: center; gap: 6px; color: var(--navy); }
.fl-grips button.fl-on { color: #5a2400; background: linear-gradient(#fff6b0, #ffb81f); border-color: #7a3d00; }
.fl-iconbox { display: flex; gap: 12px; align-items: flex-start; }
.fl-iconbox[hidden] { display: none; }
.fl-icon { flex: none; width: 96px; height: 96px; object-fit: contain; border: 1px solid var(--line); border-radius: 4px; background: repeating-conic-gradient(#e9edf5 0% 25%, #fff 0% 50%) 0 0 / 16px 16px; }

/* parts of a page that follow the running game by themselves */
.live-mark { display: inline-block; margin-left: 8px; padding: 1px 7px; font-size: 11px; font-weight: bold; color: #0d7a2c; background: #e3f8e6; border: 1px solid #9bd8a5; border-radius: 10px; animation: live-pulse 1.6s ease-in-out infinite; }
@keyframes live-pulse { 50% { opacity: .55; } }

/* the sample of a title of its own, in the item editor */
.title-sample { display: inline-flex; align-items: center; padding: 3px 12px; background: #1b2540; border-radius: 6px; }
.title-sample .tag { text-shadow: 0 1px 0 #000, 0 0 3px #000; color: #fff; }
.effect { flex-wrap: wrap; }

/* top-ups: the slip picture and the checker's raw answer on a top-up's page */
img.topup-slip { display: block; max-width: 100%; max-height: 720px; margin: 0 auto; object-fit: contain; background: #fff; border: 1px solid var(--line); cursor: zoom-in; }
pre.topup-json { max-height: 360px; overflow: auto; margin: 8px 0 0; padding: 8px; font: 11px/1.45 ui-monospace, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; background: #fff; border: 1px solid var(--line); }

/* the server page: the maintenance count down, a big steel-grey clock */
.countdown-box { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 4px 0 10px; padding: 10px; background: linear-gradient(180deg, #5b646e, #2c333a 55%, #1d2228); border: 1px solid #0b0e12; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(190,205,220,.35); color: #cfd6dd; }
.countdown-box span, .countdown-box small { font-size: 12px; }
.countdown-clock { font: bold 38px/1.1 Tahoma, sans-serif; letter-spacing: 2px; font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 2px 0 #07090c, 0 0 10px rgba(170,205,240,.6); }
.topup-ppqr { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-top: 8px; }
.topup-ppqr img { width: 200px; height: 200px; image-rendering: pixelated; border: 1px solid #8fa3d0; background: #fff; }
.topup-ppqr > div { flex: 1; min-width: 200px; }
code.topup-payload { display: block; overflow-wrap: anywhere; font-size: 11px; }

/* money core v1: the NPC sell prices by card tier (market page) and the money ledger (economy page) */
.tier-prices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tier-price { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.tier-price small { font-size: 11px; color: #55638f; }
.eco-pos { color: #1f7a3a; }
.eco-neg { color: #b0281c; }

/* ---------------------------------------------------------------- card maker (admin-card-maker.js) */
.win.modal.card-maker { width: min(820px, 96vw); }
.win.modal.card-maker .win-body { max-height: calc(100vh - 110px); overflow-y: auto; }
.card-maker .maker { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.card-maker .maker-preview { flex: 0 0 auto; text-align: center; }
.card-maker .maker-canvas { width: 300px; height: 400px; cursor: grab; touch-action: none; background: repeating-conic-gradient(#e9e9ef 0 25%, #fff 0 50%) 0 0 / 16px 16px; border-radius: 8px; }
.card-maker .maker-canvas:active { cursor: grabbing; }
.card-maker .maker-controls { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.card-maker .maker-frames { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.card-maker button.maker-frame { min-width: 0; height: auto; white-space: normal; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; background: #f6f6fa; border: 2px solid transparent; color: inherit; }
.card-maker button.maker-frame img { width: 100%; max-width: 60px; aspect-ratio: 3 / 4; object-fit: contain; }
.card-maker button.maker-frame span { font-size: 12px; }
.card-maker button.maker-frame.chosen { border-color: #f0a500; background: #fff6dc; }
.card-maker input[type=range] { flex: 1 1 auto; }

/* ---------------------------------------------------------------- starting hot keys (admin-hotbar.js) */
.hotbar-keys { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 10px; }

/* ---------------------------------------------------------------- whispers (admin-whispers.js) */
.whisper-search { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 12px; }
.whisper-search .kit-field { grid-template-columns: 1fr; gap: 3px; margin: 0; }
.whisper-search .kit-field > span { font-weight: bold; color: #44507a; }
.whisper-search .kit-field > input { width: 100%; box-sizing: border-box; }
.whisper-text { white-space: pre-wrap; word-break: break-word; }
.whisper-warning { margin: 0 0 10px; padding: 8px 12px; color: #6a3a00; background: #fff4d6; border: 1px solid #e0a400; border-radius: 4px; }

/* materials and crafting (admin-crafting.js) */
.craft-icon { width: 28px; height: 28px; object-fit: contain; vertical-align: middle; }
.craft-recipe { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; padding: 8px 10px; border: 1px solid #d4dbe8; border-radius: 6px; background: #fafcff; }
.craft-inputs { display: flex; flex-direction: column; gap: 4px; }

/* the discount of a mall good (admin-forms.js saleBox): its choices, its window in Thai time, and the final price as a preview */
.sale-box { display: flex; flex-direction: column; gap: 4px; }
.sale-box input[type="number"] { width: 90px; }
.sale-preview { margin: 0; font-weight: bold; color: #145c28; }
.sale-preview.bad { color: var(--bad); }

/* the daily login page (admin-attendance.js): the 28 days as a calendar of seven columns */
.att-admin-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.att-admin-day { display: flex; flex-direction: column; gap: 4px; padding: 6px; background: #fff; border: 1px solid #d6dcda; border-top: 3px solid #9aa3a6; border-radius: 4px; min-width: 0; }
.att-admin-day.big { border-top-color: #2f8f4e; background: #f2f8f4; }
.att-admin-day .things { flex-wrap: wrap; }

/* the gacha page (admin-gacha.js) */
.gacha-admin-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 12px; }
.gacha-admin-form .kit-field { grid-template-columns: 1fr; gap: 2px; margin: 0; }
.gacha-admin-form .kit-field.wide { grid-column: span 2; }
.gacha-look { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 16px; align-items: start; }
.gacha-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.gacha-swatch { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; }
.gacha-swatch input[type=color] { width: 44px; height: 32px; padding: 0; border: 1px solid #c4cacc; border-radius: 4px; background: none; cursor: pointer; }
.gacha-sketch { width: 140px; height: auto; background: #f3f6f4; border: 1px solid #d6dcda; border-radius: 6px; padding: 6px; }
.gacha-prizes input[type=number] { width: 90px; }
.gacha-prizes td.num { font-weight: bold; text-align: right; }
.gacha-prizes tr.gacha-tier-rare td:first-child { box-shadow: inset 4px 0 #2f8f4e; }
.gacha-prizes tr.gacha-tier-epic td:first-child { box-shadow: inset 4px 0 #3f6fd1; }
.gacha-prizes tr.gacha-tier-legend td:first-child { box-shadow: inset 4px 0 #c98a12; }
