:root {
  color-scheme: dark;
  --bg: #111313;
  --panel: #181b1a;
  --raised: #1d211e;
  --line: #2d342d;
  --text: #f3f5ef;
  --muted: #a4ada2;
  --accent: #d7fa9a;
  --accent-ink: #1d2b11;
  --error: #ffaba2;
  --radius: 12px;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .43; }
h1, h2, h3, p { margin: 0; }
.topbar { border-bottom: 1px solid var(--line); }
.top-inner, .shell, .footer { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.top-inner { display: flex; min-height: 72px; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: inline-flex; gap: 0; align-items: center; font-weight: 850; font-size: 1.48rem; letter-spacing: -.06em; white-space: nowrap; }
.brand-period { color: var(--accent); }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); margin-right: 10px; }
.brand-mark i { width: 10px; height: 14px; border-radius: 2px; border: 1.5px solid var(--accent-ink); transform: rotate(17deg); box-shadow: -3px 1px 0 -1px var(--accent), -4px 2px 0 -1px var(--accent-ink); }
.account, .account-name { display: flex; align-items: center; gap: 13px; font-size: .88rem; }
.account-name { gap: 8px; }
#avatar { width: 29px; height: 29px; display: grid; place-items: center; background: #303c25; color: var(--accent); border: 1px solid #425338; border-radius: 50%; font-size: .78rem; }
.quiet { color: var(--muted); background: transparent; padding: 8px 0 8px 12px; border: 0; border-left: 1px solid var(--line); }
.quiet:hover { color: var(--text); }
.shell { flex: 1; padding-block: 36px 62px; }
.footer { min-height: 68px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
.loading { padding: 64px 0; color: var(--muted); text-align: center; }
.eyebrow { color: var(--accent); display: flex; align-items: center; gap: 9px; font-size: .78rem; font-weight: 750; letter-spacing: .14em; }
.diamond { width: 7px; height: 7px; background: var(--accent); flex: 0 0 7px; transform: rotate(45deg); }
.login-layout { display: grid; grid-template-columns: 1.13fr 1fr; max-width: 965px; min-height: 525px; margin: clamp(5px, 5vh, 60px) auto 0; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--panel); }
.login-panel { padding: clamp(28px, 4vw, 62px); align-self: center; }
.login-panel h1 { margin-top: 17px; font-size: clamp(2.35rem, 4.65vw, 4.25rem); letter-spacing: -.075em; line-height: .98; font-weight: 810; }
.login-panel h1 em { color: var(--accent); font-style: normal; }
.login-panel > p { color: var(--muted); margin-top: 22px; max-width: 29ch; }
.login-panel form { margin-top: 32px; }
label { font-size: .9rem; font-weight: 670; }
input { color: var(--text); background: #111612; border: 1px solid #404a3e; border-radius: 8px; min-width: 0; }
input::placeholder { color: var(--muted); opacity: 1; }
#name { display: block; width: 100%; margin-top: 8px; padding: 12px 14px; }
.primary { display: block; width: 100%; border: 1px solid transparent; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 800; padding: 12px 16px; }
.primary:hover:not(:disabled) { background: #e6ffc0; }
#login-form .primary { margin-top: 13px; }
.error { color: var(--error); margin-top: 9px; font-size: .86rem; }
.error:empty { display: none; }
.login-art, .hero-art { position: relative; overflow: hidden; isolation: isolate; background: radial-gradient(ellipse at 42% 45%, #64714a, #253826 38%, #1b241c 68%, #151819 91%); }
.login-art::before, .hero-art::before { content: ""; z-index: -1; position: absolute; inset: 0; background: repeating-linear-gradient(130deg, transparent 0 44px, #b8d99814 45px, transparent 46px 86px); mask-image: radial-gradient(ellipse at center, #000, transparent 81%); }
.login-art p { position: absolute; bottom: 24px; left: 28px; color: #e8efd9; letter-spacing: .11em; font-size: .75rem; text-transform: uppercase; }
.login-art p span { padding-inline: 5px; color: var(--accent); }
.orbit { position: absolute; z-index: -1; top: 50%; left: 49%; border: 1px solid #c8ee8f43; transform: translate(-50%, -50%) rotate(-24deg); border-radius: 50%; width: 96%; height: 66%; }
.orbit-two { width: 80%; height: 48%; border-color: #e6feaa3b; transform: translate(-50%, -50%) rotate(28deg); }
.card-art { position: absolute; object-fit: cover; width: 39%; height: auto; max-width: 220px; border: 1px solid #84927280; border-radius: 5.2%; box-shadow: 0 20px 34px #060b07aa, 0 2px 6px #000b; }
.card-art.back { left: 49%; top: 48%; transform: translate(-18%, -50%) rotate(15deg); filter: brightness(.81) saturate(.86); }
.card-art.front { left: 45%; top: 49%; transform: translate(-62%, -50%) rotate(-12deg); }
.spark { position: absolute; right: 12%; top: 18%; width: 24px; height: 24px; background: var(--accent); clip-path: polygon(50% 0,58% 42%,100% 50%,58% 58%,50% 100%,42% 58%,0 50%,42% 42%); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.secondary { display: inline-flex; align-items: center; gap: 9px; border-radius: 8px; color: var(--text); padding: 8px 13px; border: 1px solid #394138; font-size: .83rem; font-weight: 600; background: var(--panel); }
.secondary:hover { border-color: var(--accent); }
.link-icon { width: 16px; height: 13px; position: relative; transform: rotate(-36deg); }
.link-icon::before, .link-icon::after { content: ""; width: 9px; height: 6px; border: 1px solid currentColor; border-radius: 4px; position: absolute; top: 3px; }
.link-icon::before { left: 0; } .link-icon::after { right: 0; }
.deck-hero { position: relative; isolation: isolate; overflow: hidden; min-height: 291px; border: 1px solid #394536; border-radius: 15px; background: linear-gradient(113deg, #1d2a20, #172018 60%, #1f2c20); display: grid; grid-template-columns: 60% 40%; }
.deck-info { padding: 30px clamp(22px, 4vw, 46px); z-index: 1; align-self: center; }
.domains { display: flex; gap: 7px; }
.domains span { font-size: .74rem; font-weight: 750; border-radius: 99px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; }
.domains span::before { width: 6px; height: 6px; border-radius: 2px; background: currentColor; transform: rotate(45deg); content: ""; }
.domains .calm { color: #aef0c2; background: #263f2b; }
.domains .body { color: #ffcf9c; background: #483923; }
.deck-info h1 { margin: 10px 0 1px; font-size: clamp(3rem, 7vw, 5.65rem); line-height: .97; letter-spacing: -.064em; word-spacing: .035em; font-weight: 850; }
.deck-info p { margin-top: 11px; color: #c0cdbb; }
.deck-info p span { padding-inline: 3px; }
.deck-info p a { text-decoration: underline; text-underline-offset: .18em; }
.hero-art { position: absolute; inset: 0 0 0 49%; z-index: -1; mask-image: linear-gradient(to right, transparent, #000 29%); }
.hero-art .card-art { width: 33%; max-width: 172px; }
.hero-art .card-art.back { left: 60%; }
.hero-art .card-art.front { left: 58%; }
.hero-art .orbit { left: 65%; }
.progress-label { display: flex; justify-content: space-between; gap: 12px; max-width: 370px; margin-top: 28px; color: #c4cfbd; font-size: .87rem; }
.progress-label strong { color: var(--text); }
#progress-percent { color: var(--accent); font-weight: 720; }
progress { display: block; width: min(100%, 370px); height: 7px; border: 0; margin-top: 8px; appearance: none; border-radius: 99px; overflow: hidden; background: #3a4836; color: var(--accent); }
progress::-webkit-progress-bar { background: #3a4836; border-radius: 99px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 99px; }
.inventory { margin-top: 41px; }
.list-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.list-head h2 { font-size: 1.95rem; line-height: 1.05; letter-spacing: -.051em; }
.list-head p { color: var(--muted); margin-top: 8px; font-size: .79rem; }
.list-head p a { text-decoration: underline; text-underline-offset: .16em; }
.search { position: relative; flex: 0 1 270px; display: block; }
.search input { width: 100%; padding: 10px 14px 10px 40px; background: var(--panel); border-color: #384037; }
.search-icon { width: 13px; height: 13px; border: 1.5px solid var(--muted); position: absolute; left: 15px; top: 14px; border-radius: 50%; pointer-events: none; }
.search-icon::after { content: ""; width: 5px; height: 1.5px; background: var(--muted); position: absolute; transform: rotate(45deg); left: 9px; top: 10px; }
.filters { margin-top: 21px; padding-bottom: 12px; display: flex; gap: 7px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.filters button { border: 1px solid transparent; border-radius: 7px; padding: 8px 11px; color: var(--muted); background: transparent; font-size: .87rem; font-weight: 670; }
.filters button:hover { color: var(--text); background: var(--raised); }
.filters button[aria-pressed="true"] { color: var(--accent); border-color: #425337; background: #252f20; }
.filters strong { font-size: .75rem; font-variant-numeric: tabular-nums; margin-left: 4px; }
.card-group { margin-top: 17px; }
.group-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 1px 8px; }
.group-head h3 { font-size: 1.02rem; font-weight: 720; }
.group-head span { font-size: .83rem; color: var(--muted); }
.card-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; margin: 0; padding: 0; list-style: none; }
.card-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) minmax(72px, .28fr) minmax(112px, .34fr) 100px; gap: 15px; align-items: center; padding: 11px 15px; }
.card-row + .card-row { border-top: 1px solid var(--line); }
.card-row:hover { background: var(--raised); }
.thumb { display: block; border-radius: 4px; object-fit: cover; width: 46px; height: 64px; background: #283126; }
.card-name, .remaining, .price { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.27; }
.card-name strong { font-size: 1rem; text-wrap: pretty; }
.card-code, .remaining span, .price span, .pledgers { color: var(--muted); font-size: .76rem; margin-top: 4px; }
.card-code { letter-spacing: .055em; }
.pledgers { color: #bfd9ad; }
.price strong, .remaining strong { font-size: .91rem; font-variant-numeric: tabular-nums; }
.price:hover strong { text-decoration: underline; }
.covered { color: var(--accent); }
.claim-button { justify-self: stretch; background: #2b3825; border: 1px solid #425738; border-radius: 7px; padding: 7px 8px; color: var(--accent); font-size: .85rem; font-weight: 750; }
.claim-button:hover:not(:disabled) { color: var(--accent-ink); background: var(--accent); }
.empty { padding: 42px 12px; text-align: center; color: var(--muted); }
.notice { position: fixed; z-index: 2; bottom: 20px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 28px); border: 1px solid #516546; border-radius: 9px; background: #202c20; padding: 11px 16px; box-shadow: 0 8px 30px #0006; }
dialog { width: min(440px, calc(100% - 28px)); padding: 22px; border: 1px solid #485743; border-radius: 15px; background: #1a201b; color: var(--text); }
dialog::backdrop { background: #090c0acb; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.icon-button { border: 1px solid var(--line); color: var(--muted); background: transparent; font-size: 1.28rem; line-height: 1; border-radius: 7px; width: 36px; height: 36px; }
.icon-button:hover { color: var(--text); }
.claim-card { display: flex; align-items: center; gap: 12px; margin: 15px 0 16px; }
.claim-card img { object-fit: cover; border-radius: 5px; }
.claim-card h2 { font-size: 1.32rem; line-height: 1.18; letter-spacing: -.025em; }
.claim-card p { color: var(--muted); font-size: .88rem; margin-top: 6px; }
.stepper { display: grid; grid-template-columns: 42px 1fr 42px; gap: 6px; max-width: 172px; margin-top: 6px; }
.stepper input { text-align: center; padding: 6px 2px; appearance: textfield; }
.stepper input::-webkit-inner-spin-button { appearance: none; }
.stepper button { border: 1px solid #425738; border-radius: 8px; background: #2b3825; color: var(--accent); font-size: 1.3rem; }
.dialog-head + .claim-card ~ .primary { margin-top: 18px; }

@media (max-width: 760px) {
  .top-inner, .shell, .footer { width: calc(100% - 32px); }
  .top-inner { min-height: 61px; }
  .shell { padding-block: 24px 44px; }
  .login-layout { grid-template-columns: 1fr; max-width: 475px; margin-top: 4px; }
  .login-art { min-height: 265px; grid-row: 2; }
  .login-art .card-art { max-width: 126px; }
  .login-art p { bottom: 14px; left: 16px; }
  .login-panel { padding: 26px; }
  .login-panel h1 { font-size: clamp(2.55rem, 8vw, 3.8rem); }
  .login-panel form { margin-top: 23px; }
  .deck-hero { grid-template-columns: 71% 29%; min-height: 247px; }
  .hero-art { left: 47%; }
  .hero-art .card-art { width: 48%; }
  .inventory { margin-top: 28px; }
  .card-row { gap: 8px 11px; grid-template-columns: 40px minmax(0, 1fr) 64px 83px 82px; padding: 9px; }
  .thumb { width: 39px; height: 55px; }
  .card-name strong { font-size: .93rem; }
}

@media (max-width: 500px) {
  .top-inner, .shell, .footer { width: calc(100% - 24px); }
  .account-name, .account { gap: 5px; }
  .account #avatar { display: none; }
  .deck-hero { grid-template-columns: 100%; }
  .deck-info { padding: 22px 15px 20px; }
  .deck-info h1 { font-size: clamp(2.6rem, 11vw, 3.8rem); }
  .deck-info p { font-size: .86rem; max-width: 70%; }
  .hero-art { left: 50%; bottom: 25px; mask-image: linear-gradient(to right, transparent, #000 36%); }
  .hero-art .card-art { width: 48%; opacity: .84; }
  .progress-label, progress { max-width: 100%; }
  .list-head { display: grid; gap: 12px; }
  .list-head p { margin-top: 5px; }
  .filters { margin-top: 10px; gap: 2px; padding-bottom: 8px; }
  .filters button { font-size: .78rem; padding: 7px 7px; }
  .card-row { grid-template-columns: 39px minmax(0, 1fr) minmax(65px, auto) auto; gap: 4px 9px; }
  .thumb { grid-row: span 2; align-self: start; }
  .card-name { grid-column: span 2; }
  .remaining { grid-column: 2; grid-row: 2; flex-direction: row; align-items: baseline; gap: 4px; }
  .remaining strong, .price strong { font-size: .8rem; }
  .remaining span, .price span { font-size: .69rem; }
  .price { grid-column: 3; grid-row: 2; }
  .claim-button { grid-column: 4; grid-row: 1 / span 2; font-size: .75rem; padding: 6px 7px; }
}
