/* Shared layout and components. Colors and fonts come from the theme (themes/<name>/theme.css).
   The defaults below are a plain fallback in case a theme leaves something out. */
:root {
  --text: #1F2430; --text-soft: #5B6170; --dark: #1F2430; --dark-rgb: 31, 36, 48; --on-dark: #FFFFFF;
  --page: #F6F6F4; --header: #ECEBE7; --tint: #ECEBE7; --input: #FFFFFF; --surface: #FFFFFF;
  --star: #F2B705; --star-rgb: 242, 183, 5; --star-soft: #FCEFC2; --star-card: #FFFBEA; --star-shadow: #C99500; --star-shadow-rgb: 201, 149, 0; --star-line: #EBCB6B;
  --accent: #E58FA8; --accent-mid: #F2BFCD; --accent-soft: #FBE6EC; --secondary: #DCEFE8; --secondary-hover: #C9E6DB;
  --line: #E2E1DC; --line-strong: #CFCEC8; --focus: #3B5BDB; --photo-bg: #F6F6F4; --shadow-rgb: 31, 36, 48;
  --sale: #B4235A; --sale-soft: #FFD9E5; --sale-text: #8E1846; --gift: #A3305E;
  --looted-bg: #F3F3F1; --looted-line: #DDDCD7; --looted-text: #6B6F7A;
  --font-display: system-ui, sans-serif; --font-body: system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
[data-art]:empty { display: none; }
/* Hide the page for the moment it takes to load the theme's words and art. */
html.theme-loading body { visibility: hidden; }


body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  font-variant-ligatures: none;
}

a { color: var(--text); }
a:hover { color: var(--focus); }
input, select, button { font-family: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.pixel { font-family: var(--font-display); }
.wrap { max-width: 1320px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
@media (max-width: 480px) { .wrap { padding-left: 16px; padding-right: 16px; } }

/* hide number spinners */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Header ---------- */
.hero { position: relative; background: var(--header); overflow: hidden; }
.hero-sky { position: absolute; top: -18px; right: 0; }
.hero-sky > svg { display: block; }
.hero-inner { position: relative; padding-top: 20px; padding-bottom: 0; }

.hero-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.event-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 3px 10px; background: var(--text); color: var(--on-dark);
  border-radius: 8px; font-family: var(--font-display); font-size: 14px; font-weight: 600; letter-spacing: 0.06em;
}
.stats { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; font-weight: 800; }
.stat {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px;
  background: var(--surface); border: 2px solid var(--text); border-radius: 999px;
}
.stat-gold { background: var(--star-soft); }

h1 {
  margin: 10px 0 0;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1;
}

.dialog {
  position: relative; margin-top: 18px; max-width: 600px;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--surface);
  border: 3px solid var(--text); border-radius: 16px; box-shadow: 4px 4px 0 var(--text);
}
.dialog p { margin: 0; font-weight: 500; font-size: 14px; }
.dialog-portrait { flex: none; width: 46px; height: 46px; }
.dialog-portrait > svg { display: block; width: 100%; height: 100%; }
.dialog-name {
  position: absolute; top: -13px; left: 16px; padding: 0 8px;
  background: var(--accent); border: 2px solid var(--text); border-radius: 7px;
  font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
}
.dialog-caret { position: absolute; right: 12px; bottom: 8px; animation: caret 1s steps(2, end) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.hero-inner { z-index: 1; }
/* The hills tuck up behind the dialog so there's no empty band of sky. */
.hero-scene {
  display: block; position: relative; width: 100%; aspect-ratio: 1200 / 178; min-height: 90px;
  margin-top: clamp(-96px, -7vw, -24px); margin-bottom: -1px; pointer-events: none;
}
.hero-scene > svg { display: block; width: 100%; height: 100%; }

/* ---------- Shared bits ---------- */
.panel {
  background: var(--surface); border: 3px solid var(--text); border-radius: 16px;
  box-shadow: 4px 4px 0 var(--text); padding: 18px;
}

.text-input {
  min-height: 40px; width: 100%; padding: 0 12px;
  border: 2px solid var(--text); border-radius: 10px; background: var(--input); font-size: 15px;
}

.btn {
  min-height: 40px; padding: 0 14px; border: 2px solid var(--text); border-radius: 10px;
  box-shadow: 3px 3px 0 var(--text); font-size: 14px; font-weight: 800; cursor: pointer;
}
.btn:active { transform: translate(3px, 3px); box-shadow: none; }
.btn-mint { background: var(--secondary); }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 36px; padding: 0 12px; border: 2px solid var(--text); border-radius: 10px;
  background: var(--surface); box-shadow: 2px 2px 0 var(--text);
  font-size: 13.5px; font-weight: 800; cursor: pointer;
}
.chip-pill { border-radius: 999px; background: var(--accent-soft); }
.chip[aria-pressed="true"] {
  background: var(--text); color: var(--on-dark); box-shadow: none; transform: translate(2px, 2px);
}

/* ---------- Gift planner ---------- */
.planner-wrap { padding-top: 18px; padding-bottom: 4px; }
.planner { display: flex; flex-wrap: wrap; gap: 20px; }
.planner-left { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.planner-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.quest-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px;
  background: var(--secondary); border: 2px solid var(--text); border-radius: 7px;
  font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
}
.planner-title { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.1; }

.mascot-row { display: flex; align-items: flex-end; gap: 14px; }
.mascot-col { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mascot { position: relative; width: 64px; height: 64px; animation: bob 1.2s steps(2, end) infinite; }
.mascot > * { display: none; }
.mascot[data-mood="idle"] .m-idle,
.mascot[data-mood="happy"] .m-happy,
.mascot[data-mood="sad"] .m-sad { display: block; }
.mascot > span > svg { display: block; width: 64px; height: 64px; overflow: visible; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
/* A theme without mascot art just shows the speech bubble. */
.no-mascot .bubble-tail { display: none; }
.mascot-name {
  padding: 0 7px; background: var(--dark); color: var(--on-dark); border-radius: 6px;
  font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
}

.bubble {
  flex: 1; min-width: 0; position: relative; margin-bottom: 16px; padding: 10px 12px;
  background: var(--surface); border: 3px solid var(--text); border-radius: 12px; box-shadow: 3px 3px 0 var(--text);
}
.bubble p { margin: 0; font-family: var(--font-display); font-size: 15px; font-weight: 500; line-height: 1.35; }
.bubble-tail { position: absolute; left: -16px; bottom: 8px; }
.bubble-tail path { fill: var(--surface); stroke: var(--text); }
.bubble-tail rect { fill: var(--surface); }

.planner-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field-label { font-size: 15px; font-weight: 700; }
.optional { font-family: var(--font-body); font-size: 12px; font-weight: 500; }
.money-input {
  display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px;
  border: 2px solid var(--text); border-radius: 10px; background: var(--input);
}
.money-input span { font-size: 16px; font-weight: 800; }
.money-input input { flex: 1; min-width: 0; min-height: 36px; border: 0; background: transparent; font-size: 16px; font-weight: 800; }
.money-input:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.money-input input:focus-visible { outline: none; }
#gp-count { font-size: 16px; font-weight: 800; }

.planner-right {
  flex: 999 1 360px; min-width: 0; padding: 12px 14px; background: var(--input);
  border: 2px dashed var(--text); border-radius: 12px; display: flex; flex-direction: column; gap: 8px;
}
.plan-empty { margin: auto; text-align: center; padding: 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.plan-empty svg { width: 32px; height: 32px; }
.plan-empty-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.plan-empty-sub { font-size: 13px; color: var(--text-soft); margin: 0; }
.plan-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.plan-head strong { font-family: var(--font-display); font-size: 17px; }
.plan-head span { font-size: 13px; font-weight: 800; }
.plan-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; }
.plan-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px;
  background: var(--surface); border: 2px solid var(--text); border-radius: 10px;
}
.plan-dot { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--tint); border: 2px solid var(--text); display: flex; align-items: center; justify-content: center; }
.plan-dot svg { width: 12px; height: 12px; }
.plan-dot.is-gold { background: var(--star); }
.plan-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.plan-name a, .plan-name > span:first-child { font-weight: 800; font-size: 14px; line-height: 1.25; text-decoration: none; }
.plan-name a:hover { text-decoration: underline; }
.plan-meta { font-size: 12px; color: var(--text-soft); font-weight: 500; }
.plan-price { font-size: 15px; font-weight: 800; white-space: nowrap; }
.plan-totals { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; font-weight: 800; }
.plan-total { padding: 3px 10px; background: var(--text); color: var(--on-dark); border-radius: 999px; }
.plan-left { padding: 1px 10px; background: var(--surface); border: 2px solid var(--text); border-radius: 999px; }
.plan-note { margin: 0; padding: 6px 10px; background: var(--star-soft); border: 2px solid var(--text); border-radius: 8px; font-size: 13px; font-weight: 600; }

/* ---------- Shop layout ---------- */
.shop { padding-top: 18px; padding-bottom: 48px; display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.filters { flex: 1 1 230px; max-width: 100%; display: flex; flex-direction: column; gap: 14px; padding: 16px; }
@media (min-width: 900px) {
  .filters {
    position: sticky; top: 12px;
    max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain;
  }
}
.filter-group { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.filter-title { padding: 0; font-size: 15px; font-weight: 700; }
.price-title { display: flex; align-items: center; gap: 6px; }

.star-toggle {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px;
  border-radius: 10px; background: var(--star-soft); border: 2px solid var(--text); font-weight: 800; font-size: 14px; cursor: pointer;
}
.star-toggle svg { flex: none; width: 16px; height: 16px; }
input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--text); flex: none; }

.vendor { display: flex; align-items: center; gap: 10px; min-height: 32px; cursor: pointer; }
.vendor-name { flex: 1; font-weight: 600; font-size: 14px; }
.vendor-count { min-width: 22px; text-align: center; padding: 0 8px; border-radius: 999px; background: var(--tint); font-size: 12px; font-weight: 800; }

.results { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.results-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.count { font-size: 15px; font-weight: 800; }
.sort { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.sort select {
  min-height: 38px; padding: 0 10px; border: 2px solid var(--text); border-radius: 10px;
  background: var(--surface); font-size: 14px; font-weight: 700;
}

.status {
  padding: 32px 20px; text-align: center; background: var(--surface);
  border: 3px dashed var(--text); border-radius: 16px;
}
.status-title { font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.status p { margin: 6px 0 0; }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 22px 18px; padding-top: 8px; }

.card {
  position: relative; display: flex; flex-direction: column; padding: 8px;
  background: var(--surface); border: 3px solid var(--text); border-radius: 14px; box-shadow: 4px 4px 0 var(--text);
}
.card.is-legendary { background: var(--star-card); box-shadow: 4px 4px 0 var(--star-shadow); }

.star-badge {
  position: absolute; top: -12px; right: -10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%;
  background: var(--star); border: 3px solid var(--text); display: flex; align-items: center; justify-content: center;
}
.star-badge svg { width: 18px; height: 18px; }

.photo {
  position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden;
  background: var(--surface); border: 2px solid var(--text);
}
.photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.photo-empty {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: var(--page); color: var(--text-soft); font-size: 12px; font-weight: 700;
}
.photo-empty svg { width: 28px; height: 28px; }

/* details popover */
.info { position: absolute; top: 14px; left: 14px; z-index: 3; }
.info-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--text); background: var(--surface);
  box-shadow: 2px 2px 0 var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
.info-btn svg { width: 16px; height: 16px; }
.info-btn[aria-expanded="true"] { background: var(--text); color: var(--on-dark); box-shadow: none; transform: translate(2px, 2px); }
.details {
  display: none; position: absolute; top: 40px; left: 0; width: min(240px, 70vw); padding: 10px 12px;
  background: var(--surface); border: 3px solid var(--text); border-radius: 12px; box-shadow: 3px 3px 0 var(--text);
}
.info.is-open .details { display: block; }
@media (hover: hover) { .info:hover .details, .info:focus-within .details { display: block; } }
.details-title { font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: 0.05em; margin-bottom: 4px; }
.details dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 13px; }
.details dt { font-weight: 800; }
.details dd { margin: 0; overflow-wrap: anywhere; }

.card-body { padding: 8px 2px 0; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.tag { padding: 0 6px; border-radius: 5px; border: 2px solid var(--text); background: var(--tint); }
.tag-legend { background: var(--star); }
.tag-vendor-on-gold { background: var(--surface); }
.tag-type { background: var(--accent-soft); border-radius: 999px; }
.tag-qty { background: var(--secondary); }
.card h2 { margin: 0; font-size: 14.5px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.card-foot { margin-top: auto; padding-top: 4px; display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.price { font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.view {
  display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 12px;
  border: 2px solid var(--text); border-radius: 10px; background: var(--secondary); box-shadow: 2px 2px 0 var(--text);
  font-size: 14px; font-weight: 800; text-decoration: none; color: var(--text);
}
.view svg { width: 12px; height: 12px; }
.view:hover { color: var(--text); background: var(--secondary-hover); }
.view:active { transform: translate(2px, 2px); box-shadow: none; }

.footer { padding: 0 24px 32px; text-align: center; font-size: 14px; color: var(--text-soft); }

@media (prefers-reduced-motion: reduce) {
  .mascot, .dialog-caret { animation: none; }
}

/* ---------- Looting ---------- */
.mode-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px;
  border: 2px dashed var(--text); border-radius: 999px; font-size: 13px; font-weight: 800;
}
.mode-badge[hidden] { display: none; }
.mode-badge.is-shield { background: var(--secondary); }
.mode-badge.is-test { background: var(--accent-soft); }

.card-actions { display: flex; gap: 6px; }
.loot-btn {
  display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 10px;
  border: 2px solid var(--text); border-radius: 10px; background: var(--star-soft); box-shadow: 2px 2px 0 var(--text);
  font-size: 14px; font-weight: 800; cursor: pointer; color: var(--text);
}
.loot-btn:hover { background: var(--star); }
.loot-btn:active { transform: translate(2px, 2px); box-shadow: none; }

.tag-looted { background: var(--text); color: var(--on-dark); }
.card.is-looted { background: var(--looted-bg); box-shadow: 4px 4px 0 var(--looted-line); border-color: var(--looted-line); }
.card.is-looted .photo img,
.card.is-looted .star-badge { filter: grayscale(1); opacity: 0.55; }
.card.is-looted h2,
.card.is-looted .price { color: var(--looted-text); }
.card.is-looted .price { text-decoration: line-through; }
.looted-stamp {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-12deg);
  padding: 2px 12px; border: 3px solid var(--text); border-radius: 8px; background: var(--surface);
  font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: 0.08em; color: var(--text);
  box-shadow: 3px 3px 0 var(--text);
}
.looted-note { margin: 2px 0 0; font-size: 12.5px; font-weight: 700; color: var(--looted-text); }

.plan-hint { margin: 0; font-size: 12.5px; color: var(--text-soft); font-weight: 600; }

.loot-dialog {
  width: min(400px, calc(100vw - 32px)); padding: 20px; color: var(--text);
  border: 3px solid var(--text); border-radius: 16px; box-shadow: 5px 5px 0 var(--text); background: var(--surface);
}
.loot-dialog::backdrop { background: rgba(var(--shadow-rgb), 0.45); }
.loot-dialog form { display: flex; flex-direction: column; gap: 10px; }
.loot-head { display: flex; align-items: center; gap: 10px; }
.loot-head h2 { margin: 0; font-size: 22px; }
.loot-item { margin: 0; font-weight: 800; font-size: 16px; }
.loot-copy { margin: 0; font-size: 13.5px; color: var(--text-soft); }
.loot-qty-row { display: grid; grid-template-columns: 1fr 80px; align-items: center; gap: 4px 10px; font-weight: 700; font-size: 14px; }
.loot-qty-row[hidden] { display: none; }
.loot-qty-row input { text-align: center; font-weight: 800; }
.loot-left { grid-column: 1 / -1; font-size: 12.5px; font-weight: 600; color: var(--text-soft); }
.loot-error { margin: 0; padding: 6px 10px; background: var(--accent-soft); border: 2px solid var(--text); border-radius: 8px; font-size: 13px; font-weight: 600; }
.loot-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.btn-plain { background: var(--surface); }
.btn-gold { background: var(--star); }
.btn:disabled { opacity: 0.6; cursor: progress; }

.toast {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 50;
  width: max-content; max-width: calc(100vw - 32px);
  display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px;
  background: var(--dark); color: var(--on-dark); border-radius: 14px; box-shadow: 4px 4px 0 var(--star-shadow);
  font-size: 14px; font-weight: 700;
}
.toast[hidden] { display: none; }
.toast-text { flex: 1; min-width: 0; }
.toast-undo {
  min-height: 34px; padding: 0 12px; border: 2px solid var(--on-dark); border-radius: 9px;
  background: transparent; color: var(--on-dark); font-weight: 800; cursor: pointer;
}
.toast-undo:hover { background: var(--on-dark); color: var(--dark); }
.toast-close { width: 34px; height: 34px; border: 0; background: transparent; color: var(--on-dark); font-size: 20px; cursor: pointer; }

@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .card { padding: 6px; }
  .card-actions { flex-wrap: wrap; width: 100%; }
  .card-actions > * { flex: 1 1 auto; justify-content: center; }
  .price { font-size: 17px; }
  .star-badge { width: 30px; height: 30px; top: -10px; right: -8px; }
  .info { top: 10px; left: 10px; }
  .info-btn { width: 30px; height: 30px; }
}

/* ---------- Soft theme: hairline outlines and soft shadows (overrides the chunky defaults above) ---------- */
.panel, .dialog, .bubble { border: 1.5px solid var(--line); box-shadow: 0 6px 18px rgba(var(--shadow-rgb), 0.08); border-radius: 18px; }
.card { border: 1.5px solid var(--line); box-shadow: 0 4px 14px rgba(var(--shadow-rgb), 0.07); border-radius: 16px; padding: 10px; transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(var(--shadow-rgb), 0.12); }
.card.is-legendary { border-color: var(--star-line); box-shadow: 0 4px 14px rgba(var(--star-shadow-rgb), 0.16); }
.grid { gap: 26px 22px; }
.photo { border: 0; background: var(--photo-bg); }
.chip, .view, .loot-btn, .btn { border: 1.5px solid var(--text); box-shadow: none; }
.chip { border-color: var(--line-strong); }
.chip[aria-pressed="true"] { transform: none; border-color: var(--text); }
.info-btn { border: 1.5px solid var(--line-strong); box-shadow: 0 2px 6px rgba(var(--shadow-rgb),.12); }
.tag { border: 0; padding: 1px 7px; }
.tag-vendor-on-gold { background: var(--surface); }
.stat, .quest-tag, .dialog-name { border-width: 1.5px; }
.text-input, .money-input, .sort select, .star-toggle { border: 1.5px solid var(--line-strong); }
.plan-row { border: 1px solid var(--line); }
.planner-right { border: 1.5px dashed var(--line-strong); }
.star-badge { border-width: 2px; box-shadow: 0 2px 6px rgba(var(--shadow-rgb),.18); }
.bubble-tail path { stroke: var(--line); stroke-width: 1.5; }
.card.is-looted { border-color: var(--looted-line); box-shadow: none; background: var(--looted-bg); }
.card.is-looted:hover { transform: none; box-shadow: none; }
.looted-stamp { border-width: 2px; box-shadow: 0 3px 8px rgba(var(--shadow-rgb), 0.15); }
.loot-dialog { border: 1.5px solid var(--line); box-shadow: 0 18px 40px rgba(var(--shadow-rgb), 0.22); }
.toast { box-shadow: 0 10px 28px rgba(var(--dark-rgb), 0.3); }
.chip:hover, .loot-btn:hover, .view:hover { filter: brightness(0.97); }
.btn:active, .view:active, .loot-btn:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) { .card, .card:hover { transition: none; transform: none; } }
.details { border: 1.5px solid var(--line); box-shadow: 0 8px 20px rgba(var(--shadow-rgb), 0.14); }

/* ---------- Loot animation ---------- */
.loot-ghost { will-change: transform; }
.loot-ghost:hover { transform: none; }
.loot-bag {
  position: fixed; left: calc(50% - 48px); bottom: 28px; z-index: 59; width: 96px; height: 96px;
  filter: drop-shadow(0 8px 12px rgba(var(--shadow-rgb), 0.25)); pointer-events: none; transform-origin: 50% 100%;
}
.loot-bag svg { display: block; }
.loot-plus {
  position: absolute; left: 50%; top: -6px; padding: 0 8px; border-radius: 8px;
  background: var(--star); border: 2px solid var(--text); color: var(--text);
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
}

/* ---------- Info button hint ---------- */
.inline-i {
  display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin: 0 1px;
  border-radius: 50%; border: 1.5px solid var(--text); background: var(--surface);
  font-size: 11px; font-weight: 800; line-height: 1; vertical-align: -3px;
}
.info.has-hint .info-btn { animation: info-pulse 1.4s ease-out 0.6s 3; }
@keyframes info-pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--star-rgb), 0.95); }
  100% { box-shadow: 0 0 0 14px rgba(var(--star-rgb), 0); }
}
.info-hint {
  position: absolute; left: 44px; top: 3px; display: flex; align-items: center; gap: 2px;
  padding: 3px 3px 3px 10px; border-radius: 10px; background: var(--dark); color: var(--on-dark);
  font-family: var(--font-display); font-size: 12.5px; white-space: nowrap;
  box-shadow: 0 6px 16px rgba(var(--dark-rgb), 0.25); animation: hint-in 0.35s ease-out 0.4s both;
}
.info-hint::before {
  content: ''; position: absolute; left: -4px; top: 50%; width: 9px; height: 9px;
  background: var(--dark); transform: translateY(-50%) rotate(45deg);
}
.info-hint button {
  width: 26px; height: 26px; border: 0; border-radius: 7px; background: transparent; color: var(--on-dark);
  font-size: 17px; line-height: 1; cursor: pointer;
}
.info-hint button:hover { background: rgba(255, 255, 255, 0.15); }
@keyframes hint-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .info.has-hint .info-btn, .info-hint { animation: none; }
}
.card.has-hint-card { z-index: 6; }
@media (max-width: 520px) {
  .info-hint { left: 0; top: 38px; }
  .info-hint::before { left: 12px; top: -4px; transform: rotate(45deg); }
}

/* ---------- Sale prices ---------- */
.price { display: inline-flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price.is-sale { color: var(--sale); }
.was-price { font-size: 13px; font-weight: 700; color: var(--text-soft); }
.tag-sale { background: var(--sale-soft); color: var(--sale-text); }

/* ---------- Gift cards ---------- */
.price.is-giftcard { font-size: 16px; color: var(--gift); align-items: center; }
.price.is-giftcard svg, .plan-dot.is-gift svg { width: 16px; height: 16px; }
.plan-dot.is-gift { background: var(--accent-soft); }
.plan-row.is-giftcard { border-style: dashed; }

/* ---------- Setup check (?check) ---------- */
.check-wrap { padding-top: 18px; }
.check { display: flex; flex-direction: column; gap: 12px; }
.check-title { margin: 0; font-family: var(--font-display); font-size: 24px; }
.check-head p { margin: 4px 0 0; color: var(--text-soft); }
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.check-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--input); border: 1px solid var(--line); }
.check-icon { flex: none; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: #fff; }
.is-ok .check-icon { background: #2F9C6A; }
.is-warn .check-icon { background: #D98A1E; }
.is-bad .check-icon { background: #C9384A; }
.is-info .check-icon { background: #6B7280; font-family: Georgia, serif; font-style: italic; }
.is-bad { border-color: #C9384A; }
.is-warn { border-color: #D98A1E; }
.check-body p { margin: 2px 0 0; font-size: 14px; color: var(--text-soft); overflow-wrap: anywhere; }
.check-body .check-fix { color: var(--text); font-weight: 600; }
.check-body .check-fix::before { content: '→ '; }
.check-foot { margin: 0; font-size: 14px; color: var(--text-soft); }
