/* css/screens.css - quests/rewards, almanac, shop, HUD, card stats, deck, workshop.
   The CSS files are one stylesheet cut into pieces in cascade order (index.html links them in this order): a later rule
   overrides an earlier one. Append new rules to latest.css unless you know nothing later overrides them. */
/* ===== Quests / gifts ===== */
.section-title { text-align: left; font-size: 0.74rem; color: var(--ink-soft); margin: 14px 2px 6px; letter-spacing: 0.06em; text-transform: uppercase; }
.gift-card {
  display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 16px; cursor: pointer;
  background: linear-gradient(135deg, var(--stone), var(--board-bg)); border: 1px solid var(--stone-edge); box-shadow: 0 4px 14px var(--shadow);
}
.gift-card.ready { border-color: var(--accent); animation: gift-glow 2.2s ease-in-out infinite; }
@keyframes gift-glow { 0%,100% { box-shadow: 0 4px 14px var(--shadow); } 50% { box-shadow: 0 0 0 3px rgba(217,160,102,0.35), 0 4px 18px var(--shadow); } }
.gift-card:active { transform: scale(0.98); }
.gift-card .g-icon { font-size: 2rem; }
.gift-card.ready .g-icon { animation: wiggle 1.6s ease-in-out infinite; }
@keyframes wiggle { 0%,100% { transform: rotate(0); } 15% { transform: rotate(-10deg); } 30% { transform: rotate(9deg); } 45% { transform: rotate(-5deg); } 60% { transform: rotate(0); } }
.gift-card .g-title { font-size: 0.9rem; font-weight: 600; }
.gift-card .g-sub { font-size: 0.72rem; color: var(--ink-soft); }

.quest { text-align: left; background: var(--stone); border: 1px solid var(--stone-edge); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.quest .fav-detail { margin-top: 4px; }
.quest .fav-status { margin-top: 4px; color: var(--accent); }
.quest.done .fav-status { font-weight: 600; }
.quest-top { display: flex; align-items: center; gap: 8px; }
.quest .q-icon { font-size: 1.3rem; }
.quest .q-name { flex: 1; font-size: 0.84rem; font-weight: 500; }
.quest .q-count { font-size: 0.7rem; color: var(--ink-soft); }
.q-kind { display: inline-block; font-size: 0.6rem; font-weight: 600; color: var(--ink-soft); background: var(--board-bg); border: 1px solid var(--stone-edge); border-radius: 999px; padding: 1px 7px; margin-left: 6px; vertical-align: middle; text-transform: uppercase; letter-spacing: 0.03em; }
.q-bar { height: 7px; background: var(--stone-edge); border-radius: 999px; margin-top: 8px; overflow: hidden; }
.q-fill { height: 100%; background: linear-gradient(90deg, var(--water-glow), var(--water)); border-radius: 999px; transition: width 0.6s cubic-bezier(0.34, 1.2, 0.5, 1); }
.quest.done .q-fill { background: linear-gradient(90deg, var(--c-amber-76), var(--accent)); }
.quest .q-claim { margin-left: 4px; }

.ach-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ach { background: var(--stone); border: 1px solid var(--stone-edge); border-radius: 14px; padding: 10px 4px 8px; text-align: center; }
.ach .a-ico { font-size: 1.5rem; display: block; margin-bottom: 3px; }
.ach .a-name { font-size: 0.58rem; color: var(--ink-soft); line-height: 1.2; }
.ach.locked { opacity: 0.4; } .ach.locked .a-ico { filter: grayscale(1); }
.ach.fresh { animation: bump 0.6s ease; border-color: var(--accent); }
.ach .a-title { display: block; font-size: 0.5rem; color: var(--accent); margin-top: 2px; line-height: 1.1; }
/* Profile stats: a glanceable summary in the player menu, same tile shape as .ach above */
.profile-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.profile-stat { background: var(--stone); border: 1px solid var(--stone-edge); border-radius: 14px; padding: 10px 4px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.profile-stat .ps-icon { font-size: 1.3rem; margin-bottom: 2px; }
.profile-stat .ps-value { font-size: 0.95rem; font-weight: 700; color: var(--ink); }
.profile-stat .ps-label { font-size: 0.56rem; color: var(--ink-soft); line-height: 1.2; }
.title-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.title-chip { border: 1px solid var(--stone-edge); background: var(--stone); color: var(--ink); border-radius: 999px; padding: 6px 12px; font-size: 0.72rem; cursor: pointer; font-family: inherit; }
.title-chip.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.title-sub { font-size: 0.62rem; opacity: 0.8; }
.ent-title { position: absolute; left: 50%; bottom: -32%; transform: translateX(-50%); z-index: 2; font-size: calc(var(--t) * 0.15); line-height: 1.1;
  color: var(--c-amber-77); font-style: italic; font-weight: 600; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,0.9), 0 0 4px rgba(0,0,0,0.6); pointer-events: none; }

.settings-row { display: flex; align-items: center; justify-content: space-between; background: var(--stone); border: 1px solid var(--stone-edge); border-radius: 14px; padding: 10px 14px; margin-bottom: 8px; font-size: 0.85rem; }
.toggle { width: 46px; height: 28px; border-radius: 999px; background: var(--stone-edge); position: relative; cursor: pointer; transition: background 0.25s ease; border: none; padding: 0; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: white; transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); box-shadow: 0 1px 4px var(--shadow); }
.toggle.on { background: var(--water); } .toggle.on::after { transform: translateX(18px); }


/* ===== Almanac ===== */
.seg { display: flex; background: var(--stone); border: 1px solid var(--stone-edge); border-radius: 999px; padding: 3px; margin: 0 auto 12px; max-width: 360px; }
/* 5 tabs don't fit at readable size in a fixed-width segmented bar, so these two scroll horizontally
   instead of shrinking their labels down to 0.7rem - same overflow-x idiom as .cf-chips. */
.seg.seg-scroll { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; justify-content: flex-start; }
.seg.seg-scroll::-webkit-scrollbar { display: none; }
.seg.seg-scroll .seg-btn { flex: none; padding: 8px 16px; white-space: nowrap; }
.seg-btn { flex: 1; border: none; background: transparent; color: var(--ink-soft); font-family: inherit; font-size: 0.8rem; padding: 8px 6px; border-radius: 999px; cursor: pointer; min-height: 36px; transition: background 0.2s ease, color 0.2s ease; }
.seg-btn.active { background: var(--water); color: var(--on-water); font-weight: 600; }

.alm-progress { text-align: left; margin-bottom: 12px; }
.alm-progress .ap-top { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--ink-soft); margin-bottom: 5px; }
.alm-progress .ap-top b { color: var(--ink); }

.alm-section { text-align: left; font-size: 0.72rem; color: var(--ink-soft); margin: 14px 2px 6px; display: flex; justify-content: space-between; letter-spacing: 0.05em; text-transform: uppercase; }
.alm-grid { display: block; }
.alm-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.alm-card { border-radius: 14px; padding: 10px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 104px; justify-content: center; position: relative; box-shadow: 0 2px 8px var(--shadow); }
.alm-card .ac-icon { font-size: 1.9rem; }
.alm-card .ac-power { font-size: 0.95rem; font-weight: 700; color: white; }
.alm-card .ac-name { font-size: 0.66rem; color: rgba(255,255,255,0.92); text-align: center; line-height: 1.15; }
.alm-card .ac-count { position: absolute; top: 5px; right: 6px; font-size: 0.62rem; font-weight: 700; color: white; background: rgba(0,0,0,0.25); border-radius: 999px; padding: 1px 6px; }
.alm-card.fresh { animation: bump 0.6s ease; box-shadow: 0 0 0 2px var(--accent, var(--c-orange-55)), 0 2px 8px var(--shadow); }
.alm-card .ac-new {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%); z-index: 1;
  font-size: 0.56rem; font-weight: 800; letter-spacing: 0.04em; color: var(--on-accent); background: var(--accent, var(--c-orange-55));
  border-radius: 999px; padding: 1px 7px; box-shadow: 0 1px 4px rgba(0,0,0,0.4); white-space: nowrap;
}
.alm-card.fish-card { min-height: 112px; }
.alm-card .ac-season { position: absolute; bottom: 4px; right: 5px; font-size: 0.7rem; line-height: 1; }
.alm-season { font-size: 0.7rem; color: var(--ink-soft); margin-top: 6px; }
.alm-card .fish-hint-txt { font-size: 0.52rem; letter-spacing: 0; color: rgba(255,255,255,0.8); text-align: center; line-height: 1.2; padding: 0 2px; }
#cardsSeg .seg-btn { padding: 8px 4px; }
.alm-card.tappable { cursor: pointer; transition: transform 0.12s ease; }
.alm-card.tappable:active { transform: scale(0.94); }

.alm-card.unknown { background: var(--stone); border: 1.5px dashed var(--stone-edge); box-shadow: none; }
.alm-card.unknown .ac-icon { filter: brightness(0) opacity(0.22); }
.alm-card.unknown .ac-icon { filter: brightness(0) invert(1) opacity(0.16); }
.alm-card.unknown .ac-name { color: var(--ink-soft); letter-spacing: 0.2em; }
.alm-card.unknown .ac-rar { font-size: 0.56rem; letter-spacing: 0.04em; color: white; padding: 2px 7px; border-radius: 999px; }
.alm-card.unknown .ac-rar.rt-common { background: var(--rc-b); }
.alm-card.unknown .ac-hint { font-size: 0.56rem; color: var(--ink-soft); font-style: italic; }


/* ===== Shop + release ===== */
.wallet { display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg, var(--stone), var(--board-bg)); border: 1px solid var(--stone-edge); border-radius: 16px; padding: 12px 14px; margin-bottom: 12px; box-shadow: 0 4px 14px var(--shadow); text-align: left; }
.wallet .w-amt { font-size: 1.6rem; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.wallet .w-sub { font-size: 0.7rem; color: var(--ink-soft); margin-top: 1px; }
.pack { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--stone); border: 1px solid var(--stone-edge); border-radius: 16px; padding: 12px; margin-bottom: 10px; }
.pack .pk-icon { font-size: 2.2rem; width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--board-bg); flex-shrink: 0; }
.pack .pk-body { flex: 1; min-width: 0; }
.pack .pk-name { font-size: 0.9rem; font-weight: 600; }
.pack .pk-floor { font-size: 0.7rem; color: var(--accent); margin: 1px 0; }
.pack .pk-desc { font-size: 0.68rem; color: var(--ink-soft); line-height: 1.3; }
.pack .btn { padding: 8px 14px; min-height: 44px; font-size: 0.85rem; white-space: nowrap; }
.pack.cant .btn { background: var(--stone-edge); color: var(--ink-soft); }
.pack.cant .pk-icon { filter: grayscale(0.6); opacity: 0.8; }
.shop-note { font-size: 0.7rem; color: var(--ink-soft); margin: 10px 4px 0; line-height: 1.5; text-align: center; }
.shop-swatch-row { grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.shop-swatch { position: relative; }
.shop-swatch.locked { opacity: 0.55; }
.shop-swatch-row .emoji-swatch, .shop-swatch-row .color-swatch { width: 64px; height: 64px; border-radius: 18px; font-size: 2.1rem; }
.shop-swatch-cost { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); font-size: 0.62rem; background: var(--water); color: var(--on-water); border-radius: 999px; padding: 2px 6px; white-space: nowrap; }
.release-btn { border-color: var(--stone-edge); color: var(--ink); }
.panel-item.has-spare { border-color: rgba(127,179,172,0.55); }
.spare-tag { font-size: 0.66rem; color: var(--water-ink); font-weight: 600; margin-top: 1px; }
.release-bar { display: flex; justify-content: space-between; align-items: center; font-size: 0.74rem; color: var(--ink-soft); margin: 0 2px 10px; }
.release-bar b { color: var(--ink); }


/* ===== Volume sliders ===== */
.vol-row { display: flex; align-items: center; gap: 10px; background: var(--stone); border: 1px solid var(--stone-edge); border-radius: 14px; padding: 6px 14px; margin: -2px 0 8px; transition: opacity 0.25s ease; }
.vol-row.off { opacity: 0.4; }
.vol-lbl { font-size: 0.74rem; color: var(--ink-soft); width: 46px; text-align: left; }
.vol-num { font-size: 0.74rem; color: var(--ink-soft); width: 28px; text-align: right; font-variant-numeric: tabular-nums; }
input.vol { -webkit-appearance: none; appearance: none; flex: 1; height: 44px; background: transparent; margin: 0; cursor: pointer; touch-action: pan-y; }
input.vol::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--water) 0%, var(--water) var(--fill, 50%), var(--stone-edge) var(--fill, 50%), var(--stone-edge) 100%); }
input.vol::-moz-range-track { height: 6px; border-radius: 999px; background: var(--stone-edge); }
input.vol::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--water); }
input.vol::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: white; border: 2px solid var(--water); margin-top: -10px; box-shadow: 0 2px 6px var(--shadow); }
input.vol::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: white; border: 2px solid var(--water); box-shadow: 0 2px 6px var(--shadow); }
input.vol:focus-visible { outline: none; }
input.vol:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(127,179,172,0.4); }


/* ===== Compact HUD for narrow phones ===== */
.hud { gap: 6px; min-width: 0; }
.hud-stat { flex-shrink: 1; min-width: 0; white-space: nowrap; }
.hud-resources { flex-shrink: 1; min-width: 0; gap: 8px; }
.icon-btn { flex-shrink: 0; }
@media (max-width: 400px) {
  .hud { gap: 5px; }
  .hud-resources { gap: 6px; }
  .hs-icon { width: 20px; height: 20px; font-size: 0.7rem; }
  .hs-bar { height: 16px; min-width: 26px; padding: 0 6px 0 12px; }
  .hs-val { font-size: 0.7rem; }
  .hud-portrait { width: 36px; height: 36px; }
  .icon-btn { width: 30px; height: 30px; font-size: 0.9rem; }
}
@media (max-width: 340px) {
  .hud-name { display: none; }                /* the portrait alone carries identity; tapping it still opens You */
}



/* ===== Card stats: cost badge, attack / health ===== */
.card-mini.crafted { outline: 2px solid var(--c-amber-59); outline-offset: 1px; }
.card-mini.crafted::after { content: '✦'; position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; border-radius: 50%; background: var(--c-amber-59); color: var(--c-amber-16); font-size: 0.6rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px var(--shadow); }
.card-mini .c-cost { position: absolute; top: -5px; left: -5px; width: 17px; height: 17px; border-radius: 50%; background: var(--ink); color: var(--stone); font-size: 0.6rem; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px var(--shadow); }
.card-mini .c-power { font-size: 0.58rem; white-space: nowrap; }
.alm-card .ac-cost { position: absolute; top: 5px; left: 6px; font-size: 0.66rem; font-weight: 700; color: white; background: rgba(0,0,0,0.25); border-radius: 999px; padding: 1px 6px; }
.alm-card .ac-kw { font-size: 0.8rem; letter-spacing: 2px; }
.alm-card .ac-power { font-size: 0.8rem; }


/* ===== Deck tab ===== */
.dk-curve { display: flex; gap: 8px; margin: 14px 6px 4px; height: 70px; }
.dk-curve .col { flex: 1; display: flex; flex-direction: column; }
.dk-curve .barwrap { flex: 1; display: flex; align-items: flex-end; }
.dk-curve .bar { width: 100%; background: linear-gradient(180deg, var(--water-glow), var(--water)); border-radius: 6px 6px 0 0; position: relative; transition: height 0.3s ease; }
.dk-curve .bar span { position: absolute; top: -16px; left: 0; right: 0; text-align: center; font-size: 0.72rem; font-weight: 600; color: var(--ink-soft); }
.dk-curve .lbl { text-align: center; font-size: 0.68rem; color: var(--ink-soft); margin-top: 3px; }
.dk-kws { display: flex; justify-content: center; gap: 12px; font-size: 0.74rem; color: var(--ink-soft); margin: 4px 0 8px; flex-wrap: wrap; }
.dk-tip { margin: 2px 10px 10px; padding: 8px 12px; border-radius: 12px; background: var(--stone); border: 1px solid var(--stone-edge); font-size: 0.76rem; line-height: 1.4; color: var(--ink-soft); text-align: center; }
.dk-tip.hidden { display: none; }
.card-filter { margin: 0 0 10px; }
.cf-row { display: flex; gap: 6px; margin-bottom: 8px; }
.cf-search { flex: 1; min-width: 0; border: 1px solid var(--stone-edge); background: var(--stone); color: var(--ink); border-radius: 999px; padding: 0 14px; height: 40px; font-size: 0.85rem; font-family: inherit; -webkit-user-select: text; user-select: text; }
.cf-sort-btn { flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; height: 40px; border: 1px solid var(--stone-edge); background: var(--stone); color: var(--ink); border-radius: 999px; padding: 0 14px; font-size: 0.8rem; font-weight: 600; font-family: inherit; cursor: pointer; white-space: nowrap; }
.cf-sort-btn .cf-caret { font-size: 0.65rem; color: var(--ink-soft); }
/* A horizontal-scrolling strip, like a mobile game's inventory filters, rather than a wrapping form row.
   Negative margin + padding lets the row bleed to the panel's edges so the last chip isn't flush against it. */
.cf-chips { display: flex; gap: 7px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 -14px; padding: 0 14px 2px; }
.cf-chips::-webkit-scrollbar { display: none; }
.cf-chip { flex-shrink: 0; display: inline-flex; align-items: center; height: 40px; border: 1px solid var(--stone-edge); background: var(--stone); color: var(--ink-soft); border-radius: 999px; padding: 0 15px; font-size: 0.8rem; font-weight: 600; cursor: pointer; font-family: inherit; transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.cf-chip.active { color: var(--c-grey-100); border-color: transparent; }
.cf-chip[data-r="common"].active { color: var(--on-water); }
.cf-chip[data-r="all"].active { background: var(--ink-soft); }
.cf-chip[data-r="common"].active { background: var(--water); }
.cf-chip[data-r="rare"].active { background: var(--rare); }
.cf-chip[data-r="ultra"].active { background: var(--epic); }
.cf-chip[data-r="super"].active { background: var(--accent); }
.cf-chip[data-r="mythic"].active { background: var(--mythic); }
.cf-chip[data-r="spell"].active { background: var(--c-violet-72); }
.sort-options { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 16px; }
.sort-opt { border: 1px solid var(--stone-edge); background: var(--stone); color: var(--ink); border-radius: 12px; padding: 12px 14px; font-size: 0.9rem; font-family: inherit; cursor: pointer; text-align: left; }
.sort-opt.active { border-color: var(--water); background: var(--water); color: var(--on-water); font-weight: 600; }
.wx-rows { display: flex; flex-direction: column; gap: 10px; margin: 10px 0 18px; text-align: left; }
.wx-row { display: flex; align-items: flex-start; gap: 10px; font-size: 0.85rem; color: var(--ink-soft); line-height: 1.35; }
.wx-row .wx-icon { font-size: 1.15rem; flex-shrink: 0; line-height: 1.3; }
.dk-slots { display: flex; gap: 6px; margin: 0 0 10px; align-items: stretch; }
.dk-slot { flex: 1; min-width: 0; border: 1px solid var(--stone-edge); background: var(--stone); color: var(--ink-soft); border-radius: 12px; padding: 6px 4px; cursor: pointer; font-family: inherit; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.dk-slot:active { transform: scale(0.96); }
.dk-slot.active { background: var(--water); border-color: var(--water); color: var(--on-water); }
.dk-slot-name { font-size: 0.74rem; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-slot-n { font-size: 0.62rem; opacity: 0.8; }
.dk-slot-edit { width: 36px; flex-shrink: 0; border: 1px solid var(--stone-edge); background: var(--board-bg); border-radius: 12px; cursor: pointer; font-size: 0.9rem; padding: 0; }
.dk-actions { display: flex; justify-content: center; gap: 8px; margin-bottom: 10px; }
.dk-actions .panel-action { min-height: 40px; padding: 8px 20px; }
.dk-actions .panel-action:disabled { opacity: 0.4; }

/* Options and filters are collapsed by default (see deckToggleSection in collection-tools.js) - these
   two small toggles replace what used to be four always-visible rows above the card list. */
.dk-toolbar { display: flex; justify-content: center; gap: 8px; margin: 2px 0 10px; }
.dk-tool-btn { border: 1px solid var(--stone-edge); background: var(--stone); color: var(--ink); border-radius: 999px; min-height: 38px; padding: 7px 16px; font-size: 0.78rem; font-weight: 600; font-family: inherit; cursor: pointer; }
.dk-tool-btn:active { transform: scale(0.95); }
.dk-tool-btn.active { background: var(--water); border-color: var(--water); color: var(--on-water); }
.dk-options { animation: pop-in 0.2s ease; margin-bottom: 4px; }

.panel-action:disabled { opacity: 0.4; cursor: default; }


/* ===== Workshop ===== */
.cr-intro { text-align: center; font-size: 0.8rem; color: var(--ink-soft); margin: 0 6px 12px; line-height: 1.4; }
.cr-section { margin-bottom: 18px; }
.cr-title { font-family: var(--f-display); font-weight: 500; font-size: 1.08rem; margin: 4px 4px 2px; }
.cr-desc { font-size: 0.76rem; color: var(--ink-soft); margin: 0 4px 8px; line-height: 1.45; }
.cr-empty { font-size: 0.78rem; color: var(--ink-soft); text-align: center; padding: 10px 6px; }
.cr-chips { display: flex; gap: 6px; margin: 4px 0 10px; flex-wrap: wrap; }
.cr-chip { border: 1px solid var(--stone-edge); background: var(--stone); color: var(--ink); font-family: inherit; font-size: 0.76rem; border-radius: 999px; padding: 6px 10px; min-height: 34px; cursor: pointer; }
.cr-chip { text-transform: capitalize; }
.cr-chip small { opacity: 0.65; margin-left: 2px; }
.cr-chip.active { background: var(--water); color: var(--on-water); border-color: var(--water); }
.cr-tray { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 4px 0 12px; }
.cr-slot { width: 52px; height: 68px; border-radius: 10px; border: 1.5px dashed var(--stone-edge); display: flex; align-items: center; justify-content: center; color: var(--ink-soft); font-size: 0.72rem; background: transparent; padding: 0; font-family: inherit; transition: border-color 0.2s ease; }
.cr-slot.filled { border-style: solid; border-color: transparent; cursor: pointer; }
.cr-slot.filled.just-picked { animation: pop-in 0.25s ease; }
.cr-slot.next { border-color: var(--water); animation: pulse-dot 1.4s ease-in-out infinite; }
.cr-slot.result { border-style: solid; border-color: var(--c-amber-59); color: var(--c-amber-30); font-weight: 600; text-align: center; text-transform: capitalize; line-height: 1.15; padding: 2px; }
.cr-arrow { color: var(--ink-soft); font-size: 1.1rem; }
.cr-go { display: flex; flex-direction: column; align-items: center; margin-top: 12px; }
.cr-go .btn:disabled { opacity: 0.5; }
.cr-go .btn.cr-ready { animation: bt_pulseBtn 1.6s ease-in-out infinite; }

/* Refine rows: tapping the card/row itself expands an inline stat-choice picker in place, rather than
   showing both refine buttons on every row up front - same "expand in place" idiom as the mailbox's
   mail-item/mail-body (see houses-and-cellar.js renderMailList). */
.cr-refine-row { cursor: pointer; align-items: flex-start; flex-wrap: wrap; transition: background-color 0.15s ease, transform 0.1s ease; }
.cr-refine-row:active { transform: scale(0.99); }
.cr-refine-row.open { background: var(--board-bg); }
.cr-chevron { font-size: 0.6rem; color: var(--ink-soft); padding-top: 8px; flex-shrink: 0; }
.cr-refine-choice { flex-basis: 100%; display: flex; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--stone-edge); animation: pop-in 0.2s ease; }
.cr-refine-choice .panel-action { flex: 1; }

/* Trade-up candidate rows: the whole row is the tap target (not a small "Add" button), so picking a
   card feels like touching the card itself. */
.cr-pick-row { cursor: pointer; transition: transform 0.1s ease, background-color 0.15s ease; }
.cr-pick-row:active { transform: scale(0.99); background: var(--board-bg); }
.cr-pick-row.disabled { cursor: default; opacity: 0.7; }
.cr-pick-hint { font-size: 0.78rem; font-weight: 700; color: var(--water-ink); flex-shrink: 0; padding: 0 4px; }
.cr-pick-row.disabled .cr-pick-hint { color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
