:root { color-scheme:dark; font:16px/1.55 "Leelawadee UI",Tahoma,sans-serif; color:#f2f6ff; background:#101722; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; min-height:100vh; background:radial-gradient(ellipse at 12% 30%,#193846,transparent 60%); }
.shell { width:min(1120px,calc(100% - 32px)); margin:auto; }
header { background:#11151e; border-bottom:1px solid #344454; }
header .shell,.tools { display:flex; align-items:center; gap:12px; }
header .shell { min-height:66px; }
.mark { padding:3px 10px; border-radius:6px; background:#86dfff; color:#102331; font-weight:bold; }
b,.shop-label,#count { color:#86dfff; }
.shop-label { margin-left:auto; }
main { padding-block:40px; }
h1 { font-size:clamp(2rem,4vw,3rem); margin:0 0 16px; }
h2 { margin:0 0 16px; font-size:1.1rem; }
#status:empty,dl:empty { display:none; }
#count { font-size:.85rem; }
form,section { padding:20px; border:1px solid #354758; background:#191f2c; border-radius:9px; }
label { display:block; margin-bottom:8px; font-weight:bold; }
input,button { font:inherit; border:1px solid #48596c; border-radius:6px; padding:8px 12px; }
input { min-width:0; flex:1; background:#111923; color:#fff; }
button { cursor:pointer; font-weight:bold; color:#082332; background:#86dfff; }
.quiet { background:#202b3a; color:#eef6fc; }
.register { margin-top:16px; }
#catalog-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.pack-card { position:relative; isolation:isolate; display:flex; align-items:flex-end; padding:0; overflow:hidden; border:2px solid transparent; border-radius:14px; aspect-ratio:0.82; color:#21283c; background:linear-gradient(#354261 0%,#accef2 50%,#f8fbff 78%); }
.pack-card img { position:absolute; inset:0; z-index:-1; width:100%; height:100%; object-fit:fill; }
.pack-card[aria-pressed=true] { border-color:#8de7ff; box-shadow:0 0 0 2px #147c99; }
.pack-card:hover { border-color:#b4e7ff; }
.pack-detail { width:100%; display:grid; gap:2px; padding:12px 9px 8px; background:linear-gradient(transparent,#f9fbff 25%); line-height:1.3; }
.pack-detail small { color:#683186; font-size:.78rem; }
.pack-offer { display:block; margin-top:4px; padding:5px 4px; border-radius:20px; background:#30364b; color:white; font-variant-numeric:tabular-nums; }
.pack-offer del { font-size:.72em; color:#c1c7d6; }
.pack-discount { position:absolute; top:8px; left:8px; background:#7137aa; color:white; border-radius:12px; padding:2px 8px; font-size:.78rem; }
@media(max-width:800px) { #catalog-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:600px) { #catalog-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; } .pack-detail { font-size:.86rem; } }
.table-scroll { overflow-x:auto; }
table { width:100%; border-collapse:collapse; text-align:start; white-space:nowrap; }
th,td { text-align:start; padding:10px 12px; border-bottom:1px solid #354758; }
th { color:#bdccda; font-size:.86rem; }
td:nth-child(2) { font-variant-numeric:tabular-nums; }
th:last-child,td:last-child { text-align:end; }
tbody tr:hover,tbody tr:focus-within { background:#1d3140; }
.record-name { background:transparent; color:#86dfff; border:0; padding:6px 0; text-align:start; }
.record-name:hover { text-decoration:underline; }
dialog { width:min(570px,calc(100% - 24px)); max-height:85vh; overflow:auto; padding:22px; color:inherit; background:#191f2c; border:1px solid #48596c; border-radius:10px; }
dialog::backdrop { background:#080e18c9; }
.dialog-head { display:flex; gap:16px; align-items:center; justify-content:space-between; }
.dialog-head h2 { margin:0; overflow-wrap:anywhere; }
#dialog-status:empty { display:none; }
#json { padding:14px; border-radius:6px; background:#101722; white-space:pre-wrap; overflow-wrap:anywhere; }
small,dt,p { color:#bdccda; }
dl { display:grid; grid-template-columns:auto 1fr; margin:0; gap:0 16px; }
dt,dd { padding-block:7px; border-bottom:1px solid #364150; }
dd { margin:0; overflow-wrap:anywhere; white-space:pre-wrap; }
:focus-visible { outline:2px solid #86dfff; outline-offset:3px; }
@media(max-width:700px) { .tools { flex-wrap:wrap; } input { flex-basis:100%; } .register { padding:12px; } th,td { padding:8px; } }

#shop-nav { display:flex; gap:20px; margin-bottom:20px; border-bottom:1px solid #354758; }
#shop-nav a { padding:6px 0 9px; color:#bdccda; text-decoration:none; }
#shop-nav a[aria-current] { color:#86dfff; border-bottom:2px solid currentColor; }
#settings-forms { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.history-tools { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.history-tools h2,.history-stage p { margin:0; }
#history-rows tr { cursor:pointer; }
#history-body dl { margin:18px 0; }
.history-stage { border-left:3px solid #527387; padding:2px 0 2px 14px; margin:18px 0 6px; }
.history-stage h3 { font-size:1rem; margin:0 0 5px; color:#90defa; }
.history-stage ul { padding:0; margin:0; list-style:none; }
.history-stage li { display:grid; gap:2px; margin-bottom:6px; }
#history-body .export-values { grid-template-columns:auto minmax(0,1fr); margin:4px 0 10px; }
.export-values a { color:#90defa; overflow-wrap:anywhere; }
#history-message:empty { display:none; }
.settings-note,.direction-help { margin:0 0 20px; }
.connection { min-width:0; }
.session-panel { margin-bottom:16px; }
.session-panel p { margin:0 0 10px; }
.session-panel a { color:#86dfff; }
.session-panel small { display:block; margin-top:6px; }
.connection h2 { margin-bottom:2px; }
.connection label { margin-bottom:15px; }
.connection input,.connection select { display:block; width:100%; margin-top:5px; }
.connection select { padding:9px 12px; border:1px solid #48596c; border-radius:6px; font:inherit; background:#111923; color:#fff; }
.connection small { font-weight:400; }
#quote-lookup a { color:#86dfff; }
#recipient-details { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1fr); gap:12px; margin-top:16px; }
#quote-lookup label { margin-bottom:0; }
#recipient-status:empty { display:none; }
@media(max-width:600px) { #recipient-details { grid-template-columns:1fr; } }
.settings-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.save-row { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-top:8px; }
.save-row output { font-size:.9rem; }
@media(max-width:700px) { #settings-forms { grid-template-columns:1fr; } }
