/* Panel contents (js/panels.js): shared rows / switches / chips / stages, then one block per panel.
   Generic helpers that older modules also use (.spin, .money-pill, .qty, .total, .detail) are kept here too. */

/* ---------------------------------------------------------------- shared */
.sec { margin: 18px 2px 8px; font-size: 11.5px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 26px 12px; color: var(--muted); }
.empty .ic-tile { width: 48px; height: 48px; opacity: .8; }
.empty b { color: #fff; font-size: 15px; }
.empty small { font-size: 13px; max-width: 280px; }
.spin { width: 20px; height: 20px; border: 3px solid var(--accent-2); border-top-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; }
.money-pill { align-self: flex-end; background: rgba(0,0,0,.3); border: 1px solid var(--line-2); border-radius: 12px; padding: 4px 14px; font-size: 18px; font-weight: 900; color: var(--gold); }
.qty { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.qty input { width: 64px; min-height: 38px; background: rgba(0,0,0,.3); color: #fff; border: 1px solid var(--line-2); border-radius: 10px; text-align: center; font: inherit; font-weight: 900; }
.total { display: flex; justify-content: space-between; align-items: center; background: rgba(0,0,0,.25); border-radius: 12px; padding: 8px 12px; }
.total b { font-size: 20px; }
.detail { display: flex; gap: 12px; align-items: center; background: var(--surface); border-radius: 14px; padding: 10px; }
.detail small { display: block; color: var(--muted); }
.desc { font-size: 13px; margin: 0; color: #dde5ff; }

.row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-text b { font-size: 14.5px; }
.row-text small { font-size: 12.5px; color: var(--muted); }
.sw-row { cursor: pointer; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 50px; height: 30px; margin: 0; border-radius: 999px; background: rgba(255,255,255,.18); position: relative; cursor: pointer; transition: background var(--t); }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.35); transition: transform var(--t) var(--ease); }
.switch:checked { background: var(--ok); }
.switch:checked::after { transform: translateX(20px); }
.seg-row { flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: rgba(0,0,0,.3); border-radius: 12px; flex: none; }
.seg-b { min-height: 34px; min-width: 52px; padding: 4px 12px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-weight: 800; font-size: 13px; transition: background var(--t), color var(--t); }
.seg-b:hover { color: #fff; }
.seg-b.on { background: #fff; color: #13204a; }
.range-row input[type=range] { flex: 1 1 140px; max-width: 220px; accent-color: var(--gold); min-height: 30px; }
.range-row output { width: 44px; text-align: right; font-weight: 900; font-variant-numeric: tabular-nums; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 10px; }
.chip { min-height: 34px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 800; font-size: 13px; }
.chip.on { background: rgba(122, 168, 255, .22); border-color: var(--accent-2); color: #fff; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; background: rgba(0,0,0,.28); border: 1px solid var(--line-2); border-radius: 12px; color: var(--muted); }
.search:focus-within { border-color: var(--accent-2); }
.search input { flex: 1; min-width: 0; background: none; border: 0; color: #fff; font: inherit; font-size: 14px; font-weight: 700; outline: none; }
.sort, select { display: flex; align-items: center; gap: 6px; }
.modal select { min-height: 42px; padding: 0 10px; background: rgba(0,0,0,.28); border: 1px solid var(--line-2); border-radius: 12px; color: #fff; font: inherit; font-weight: 800; font-size: 13.5px; }
.sort { padding-left: 10px; background: rgba(0,0,0,.28); border: 1px solid var(--line-2); border-radius: 12px; color: var(--muted); }
.sort select { border: 0; background: none; }
.lbl { display: block; font-size: 11.5px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }

.type-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .4px;
  color: #10183a; background: linear-gradient(color-mix(in srgb, var(--c) 80%, #fff), var(--c)); box-shadow: inset 0 -1px 0 rgba(0,0,0,.2); }
.st-chip { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 6px; font-size: 10px; font-weight: 900; color: #fff; background: var(--c); }
.lead-chip { font-size: 10px; font-weight: 900; color: #3a2400; background: var(--gold); padding: 1px 6px; border-radius: 6px; }
.hpbar, .xpbar { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.hp-lbl { width: 26px; font-size: 10px; font-weight: 900; color: var(--muted); }
.hp-track, .xp-track { flex: 1; height: 8px; border-radius: 4px; background: rgba(0,0,0,.45); overflow: hidden; }
.xp-track { height: 4px; }
.xp-track > div { height: 100%; background: #4fc3ff; }
.hp-num { font-size: 12px; font-weight: 900; font-variant-numeric: tabular-nums; min-width: 56px; text-align: right; }

/* 3D stage (summaries, Pokédex, wardrobe, trainer card) */
.stage { position: relative; border-radius: 18px; overflow: hidden; min-height: 240px;
  background: radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--t, #4c8dff) 40%, #24306a), #10183a 72%); border: 1px solid var(--line); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.stage-hint { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; color: var(--muted); font-size: 11.5px; font-weight: 700; pointer-events: none; }
.stage.silhouette { background: radial-gradient(ellipse at 50% 40%, #5a70c0, #1c2756 72%); }

/* summary / detail chrome */
.sum-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sum-nav .muted { flex: 1; font-size: 13px; font-weight: 700; }
.sum-arrows { display: flex; gap: 6px; }
.sum-grid { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 16px; }
.sum-grid .stage { min-height: 300px; }
.sum-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sum-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sum-title h3 { margin: 0; font-size: 24px; }
.mc-types { display: flex; gap: 5px; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 10px 0 0; padding: 12px 14px; background: var(--surface); border-radius: 14px; align-items: center; }
.facts dt { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 800; }
.facts dt .ic { width: 16px; height: 16px; }
.facts dd { margin: 0; font-weight: 800; font-size: 14px; }
.held { display: inline-flex; align-items: center; gap: 6px; }
.held .ball3d { width: 20px; height: 20px; }
.flavour { margin: 10px 0 0; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.04); border-left: 3px solid var(--gold); font-size: 14px; line-height: 1.5; color: #e4eaff; }
.stats { display: grid; gap: 6px; padding: 12px 14px; background: var(--surface); border-radius: 14px; }
.stat { display: grid; grid-template-columns: 74px 40px 1fr; align-items: center; gap: 10px; font-size: 13px; }
.stat span { color: var(--muted); font-weight: 800; }
.stat b { text-align: right; font-variant-numeric: tabular-nums; }
.stat .bar { height: 8px; border-radius: 4px; background: rgba(0,0,0,.4); overflow: hidden; }
.stat .bar > div { height: 100%; border-radius: inherit; background: var(--accent-2); }
.stat.up span { color: #ff9b8a; } .stat.down span { color: #8ab8ff; }
.stat.total { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 2px; }
.moves-list { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.mv-row { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: 'ty name pp' 'ty meta meta'; gap: 2px 10px; align-items: center; padding: 8px 12px 8px 8px; border-radius: 12px; background: var(--surface); border-left: 4px solid var(--c); }
.mv-ty { grid-area: ty; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 10px; font-weight: 900; color: #10183a; background: var(--c); }
.mv-row b { grid-area: name; font-size: 14px; }
.mv-meta { grid-area: meta; display: flex; gap: 8px; font-size: 11.5px; color: var(--muted); font-weight: 700; }
.mv-pp { grid-area: pp; font-size: 12px; font-weight: 900; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- pokémon: Party & Box and each Pokémon's page live in pokemon.css (js/pokemon.js) */
/* ---- held item picker */
/* (one column that can shrink: a long item line no longer stretches the sheet past a phone's edge) */
.held-sheet { position: fixed; inset: 0; z-index: 60; background: rgba(4,8,20,.55); display: grid; grid-template-columns: minmax(0, 1fr); place-items: end center; animation: fade .15s; }
.hs-card { box-sizing: border-box; width: min(520px, 100%); min-width: 0; max-width: 100%; max-height: calc(78 * var(--uvh, 1vh)); display: flex; flex-direction: column; gap: 10px; background: var(--panel-solid); border: 1px solid var(--line-2);
  border-radius: 18px 18px 0 0; padding: 14px 14px max(14px, env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0,0,0,.5); }
@media (min-width: 761px) { .held-sheet { place-items: center; } .hs-card { border-radius: 18px; } }
.hs-head { display: flex; align-items: center; justify-content: space-between; }
.hs-cur { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(242,184,75,.1); border: 1px solid rgba(242,184,75,.45); }
.hs-cur .item-art { width: 40px; height: 40px; flex: none; }
.hs-cur span, .hs-item span { display: flex; flex-direction: column; min-width: 0; flex: 1; }
/* what the item does, in full (js/holdfx.js lines are short), wrapping instead of being cut off */
.hs-cur small, .hs-item small { color: var(--muted); font-size: 12.5px; line-height: 1.35; white-space: normal; }
.hs-list { overflow-y: auto; display: grid; gap: 6px; }
.hs-item { box-sizing: border-box; min-width: 0; display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); color: inherit; font: inherit; cursor: pointer; }
.hs-item:hover, .hs-item:focus-visible { border-color: #f2b84b; background: rgba(242,184,75,.08); }
.hs-item .item-art { width: 34px; height: 34px; flex: none; }
.hs-item em { font-style: normal; color: var(--muted); font-size: 12px; }

/* ---------------------------------------------------------------- shop (Poké Mart) */
.shop { display: grid; grid-template-columns: 1fr 300px; gap: 16px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; max-height: min(460px, calc(60 * var(--uvh, 1vh))); overflow: auto; padding: 2px; }
.shop-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px 8px; }
.shop-item:hover { background: var(--surface-2); }
.shop-item.sel { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.shop-item b { font-size: 12.5px; text-align: center; }
.shop-item .own { position: absolute; top: 6px; right: 8px; font-size: 10.5px; font-weight: 900; color: var(--muted); }
.price { background: rgba(255, 207, 74, .16); color: var(--gold); border-radius: 8px; padding: 1px 8px; font-weight: 900; font-size: 12px; }
.shop-right { display: flex; flex-direction: column; gap: 10px; }

/* ---------------------------------------------------------------- wardrobe */
.wardrobe { display: grid; grid-template-columns: 320px 1fr; gap: 16px; }
.wd-stage { height: 440px; }
.wd-side { min-width: 0; }
.wd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; max-height: 360px; overflow: auto; padding: 2px; }
.wd-item { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wd-item:hover { background: var(--surface-2); }
.wd-item.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.wd-item b { font-size: 13px; text-align: center; }
.wd-item small { color: var(--muted); font-size: 11.5px; text-align: center; }
.wd-thumb { width: 100%; aspect-ratio: 1; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #26468f, #10183a 75%); border-radius: 10px; overflow: hidden; }
.wd-thumb img { width: 100%; height: 100%; object-fit: contain; }
.in-use, .wd-item .lock { position: absolute; top: 8px; right: 8px; z-index: 1; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.in-use { background: var(--ok); color: #06301a; }
.wd-item .lock { background: rgba(0,0,0,.55); color: var(--gold); }
.in-use .ic, .wd-item .lock .ic { width: 14px; height: 14px; }
.wd-item.locked .wd-thumb { filter: grayscale(.85) brightness(.7); }
.wd-item.locked small { color: var(--gold); }
.wd-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.wd-foot > b { font-size: 17px; color: var(--gold); }
.wd-pin { display: flex; gap: 4px; align-items: center; }
.wd-pin small { color: var(--muted); font-weight: 800; margin-right: 4px; }
.wd-pin .reg-slot { width: 38px; height: 38px; }
.wd-pin .reg-slot > span { position: static; font-size: 12px; color: #fff; }

/* ---------------------------------------------------------------- pokédex */
/* by generation (js/dexgen.js): summary, All / Gen tabs with region tags and progress, a calm grid in National Dex order */
.dex-panel { --dex-tabs-h: 64px; --dex-bg: #142046; --dex-pad: 16px; }   /* --dex-pad: the body padding the sticky bars cover */
.modal.dex-panel { background: linear-gradient(180deg, #16234a, #142046 140px); }   /* near flat, so the sticky bars blend in */
.dex-sum { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; margin-bottom: 2px; }
.dex-sum-t { flex: 1 1 100%; color: var(--muted); font-weight: 700; font-size: 12.5px; }
.dex-sum-t b { color: var(--text); font-size: 14.5px; margin-right: 6px; }
.dex-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.dex-stats > span { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 3px 11px 3px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.dex-stats b { font-size: 15px; font-variant-numeric: tabular-nums; }
.dex-stats small { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 800; font-size: 12px; order: -1; }
.dex-stats small .ic, .dex-stats small .ball3d { width: 15px; height: 15px; }
.dex-stats > span:nth-child(3) small .ic { color: var(--gold); }
.dex-tabs { position: sticky; top: calc(-1 * var(--dex-pad)); z-index: 3; display: flex; gap: 6px; height: var(--dex-tabs-h); box-sizing: border-box; margin: 0 -16px; padding: 7px 16px;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; scroll-padding-inline: 16px; background: var(--dex-bg); border-bottom: 1px solid var(--line); }
.dex-tabs::-webkit-scrollbar { display: none; }
.dex-tab { flex: none; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto 1fr; column-gap: 8px; align-items: center; min-width: 84px;
  padding: 4px 10px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: left; transition: background var(--t), border-color var(--t); }
.dex-tab:hover { background: var(--surface-2); }
.dex-tab:focus-visible { outline: none; box-shadow: var(--focus); }
.dex-tab.on { background: rgba(122, 168, 255, .2); border-color: var(--accent-2); }
.dtb-t { font-weight: 900; font-size: 13.5px; line-height: 1.2; white-space: nowrap; }
.dtb-n { grid-column: 2; grid-row: 1; justify-self: end; display: flex; align-items: center; gap: 2px; font-weight: 800; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dtb-n .ic { width: 13px; height: 13px; }
.dex-tab.on .dtb-n { color: #fff; }
.dtb-r { grid-column: 1 / -1; grid-row: 2; font-size: 11px; font-weight: 800; color: var(--muted); white-space: nowrap; line-height: 1.25; }
.dex-tab .dex-bar { grid-column: 1 / -1; grid-row: 3; align-self: end; }
.dex-tab.locked .dtb-t { color: var(--muted); }
.dex-bar { position: relative; display: block; height: 4px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; }
.dex-bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--gold); z-index: 1; }
.dex-bar i.seen { background: rgba(122, 168, 255, .45); z-index: 0; }
.dex-tools { display: flex; gap: 8px; margin-top: 10px; }
.dex-tools .search { min-width: 0; }
.dex-chips { margin: 8px 0 4px; }
.dex-region { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; background: rgba(122, 168, 255, .14); color: var(--accent-2); font-size: 11px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.dex-gen { content-visibility: auto; contain-intrinsic-size: auto 900px; padding-bottom: 6px; }
.dex-gen.one { content-visibility: visible; }
.dex-gen-h { position: sticky; top: calc(var(--dex-tabs-h) - var(--dex-pad)); z-index: 2; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px;
  margin: 0 -16px; padding: 9px 16px 8px; background: var(--dex-bg); }
.dgh-t { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dgh-t b { font-size: 15px; }
.dgh-n { display: flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 800; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dgh-n b { color: #fff; }
.dgh-n .ic { width: 14px; height: 14px; }
.dex-gen-h .dex-bar { grid-column: 1 / -1; }
.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; padding-top: 2px; }
.dex-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; height: 118px; padding: 6px 6px 8px; border-radius: 14px;
  background: var(--surface); border: 1px solid transparent; color: var(--text); transition: background var(--t), border-color var(--t); }
.dex-tile:hover { background: var(--surface-2); border-color: var(--line); }
.dex-tile:focus-visible { outline: none; box-shadow: var(--focus); }
.dex-tile .dex-pic { width: 64px; height: 64px; margin-top: 8px; background: rgba(0,0,0,.22); border-radius: 50%; }
.dex-tile b { max-width: 100%; font-size: 12.5px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dex-tile.unseen b { color: var(--muted); }
.dex-tile.unseen .dex-pic { background: rgba(0,0,0,.3); }
.dex-tile .sil { font: 900 24px/1 Nunito, sans-serif; color: rgba(160, 180, 230, .32); }
.dt-no { position: absolute; top: 5px; left: 8px; font-size: 10.5px; font-weight: 900; color: var(--muted); font-variant-numeric: tabular-nums; }
.dt-st { position: absolute; top: 4px; right: 5px; display: flex; align-items: center; gap: 1px; }
.dt-st .ball3d, .dt-st .ic, .dt-st .got .ball3d { width: 16px; height: 16px; }
.dt-st .seen .ic { color: var(--muted); opacity: .8; }
.dt-shiny .ic { color: var(--gold); }
.sum-title .dt-shiny .ic { width: 18px; height: 18px; }
.dex-locked { display: flex; gap: 12px; align-items: flex-start; margin: 10px 0 4px; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--line-2); background: var(--surface); }
.dex-locked > span { display: flex; flex-direction: column; gap: 3px; }
.dex-locked b { font-size: 14px; }
.dex-locked small { color: var(--muted); font-weight: 700; font-size: 12.5px; line-height: 1.4; }
.dex-more { display: flex; justify-content: center; margin-top: 4px; }
.dex-gen-tag { margin: 2px 0 6px; align-self: flex-start; }
.dex-forms { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.dex-forms-l { font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.dex-forms .chip { display: inline-flex; align-items: center; gap: 6px; }
.dex-forms .chip small { font-size: 11px; color: var(--muted); font-weight: 800; }
.dex-forms-note { font-size: 12px; margin: 4px 0 0; }
html.touch .dex-panel { --dex-pad: 12px; }
html.touch .dex-panel .dex-tabs, html.touch .dex-panel .dex-gen-h { margin: 0 -12px; padding-left: 12px; padding-right: 12px; }
html.touch .dex-panel .dex-tabs { scroll-padding-inline: 12px; }
/* short landscape phones: only the tab strip stays pinned, so the grid keeps its room */
@media (max-height: 520px) {
  .dex-panel { --dex-tabs-h: 56px; }
  .dex-tab { padding: 3px 10px 5px; }
  .dex-gen-h { position: static; }
}
@media (max-width: 420px) {
  .dex-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 5px; }
  .dex-tile { height: 112px; }
  .dex-tile .dex-pic { width: 58px; height: 58px; }
}
.dex-pic, .evo-pic { width: 46px; height: 46px; border-radius: 12px; background: rgba(0,0,0,.25); display: grid; place-items: center; overflow: hidden; }
.dex-pic img, .evo-pic img { width: 100%; height: 100%; object-fit: contain; }
.sil .ic { width: 26px; height: 26px; color: rgba(160, 180, 230, .28); }
.dex-no { font-size: 12px; font-weight: 900; color: var(--muted); font-variant-numeric: tabular-nums; }
.dex-no.big { font-size: 14px; }
.ty-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--c); font-style: normal; font-size: 0; box-shadow: inset 0 -2px 0 rgba(0,0,0,.2); }
html.cb-types .ty-dot { width: auto; height: 20px; padding: 0 5px; border-radius: 6px; font: 900 9.5px/20px Nunito, sans-serif; color: #10183a; }
.got .ball3d { width: 20px; height: 20px; }
.dex-detail .stage { min-height: 300px; }
.evo { display: flex; overflow-x: auto; padding: 4px 2px 8px; }
.evo-node { display: flex; align-items: center; gap: 6px; }
.evo-kids { display: flex; flex-direction: column; gap: 6px; }
.evo-arrow { display: flex; flex-direction: column; align-items: center; color: var(--muted); min-width: 56px; }
.evo-arrow .ic { width: 20px; height: 20px; }
.evo-arrow small { font-size: 11px; font-weight: 800; text-align: center; white-space: nowrap; }
.evo-mon { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); min-width: 84px; }
.evo-mon.cur { border-color: var(--gold); }
.evo-mon b { font-size: 12.5px; }
.evo-mon .evo-pic { width: 56px; height: 56px; }
.where { display: grid; gap: 6px; }
.where-row { display: grid; grid-template-columns: 20px auto 1fr; gap: 4px 8px; align-items: start; padding: 10px 12px; border-radius: 12px; background: var(--surface); }
.where-row .ic { width: 18px; height: 18px; color: var(--gold); margin-top: 1px; }
.where-row b { font-size: 14px; }
.where-row span { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: flex-end; }
.where-row em { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 700; }

/* ---------------------------------------------------------------- trainer card */
.tcard { display: flex; flex-direction: column; gap: 14px; }
.tc-front { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 14px; border-radius: 22px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #2b4fa8, #1a2a62 55%, #2a1f5c); border: 1px solid rgba(255,255,255,.18); box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.tc-front::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 26px solid rgba(255,255,255,.06); pointer-events: none; }
.tc-avatar { min-height: 230px; --t: #6fa6ff; }
.tc-id { display: flex; flex-direction: column; gap: 6px; min-width: 0; position: relative; z-index: 1; }
.tc-kicker { font-size: 11px; font-weight: 900; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(255,255,255,.7); }
.tc-name { display: flex; align-items: center; gap: 6px; }
.tc-name input { flex: 1; min-width: 0; font: 900 26px Nunito, sans-serif; color: #fff; background: transparent; border: 1px solid transparent; border-radius: 10px; padding: 2px 6px; margin-left: -6px; }
.tc-name input:hover, .tc-name input:focus { border-color: rgba(255,255,255,.35); background: rgba(0,0,0,.2); }
.tc-edit .ic { width: 18px; height: 18px; color: rgba(255,255,255,.6); }
.tc-user { display: flex; align-items: center; gap: 4px; font-weight: 800; font-size: 13.5px; color: #cfe0ff; }
.tc-user .ic { width: 16px; height: 16px; }
.tc-title { align-self: flex-start; font-size: 12px; font-weight: 900; color: #3a2400; background: linear-gradient(#ffe07a, #f0a51c); padding: 2px 10px; border-radius: 999px; }
.tc-badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: auto; padding: 10px; border-radius: 14px; background: rgba(0,0,0,.25); }
.tc-badge { display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.06); }
.badge-svg { width: 78%; height: 78%; }
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: 8px; }
.tc-stat { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.tc-stat .ic-tile { width: 36px; height: 36px; }
.tc-stat span { display: flex; flex-direction: column; min-width: 0; }
.tc-stat small { font-size: 11.5px; color: var(--muted); font-weight: 800; }
.tc-stat b { font-size: 14.5px; }

/* ---------------------------------------------------------------- quest log */
.qcard { padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 10px; }
.qcard.main { border-color: rgba(255, 207, 74, .45); background: linear-gradient(180deg, rgba(255, 207, 74, .07), rgba(255,255,255,.03)); }
.qcard h3 { margin: 2px 0 6px; font-size: 17px; display: flex; align-items: center; gap: 6px; }
.qcard h3 .ic { width: 18px; height: 18px; color: var(--ok); }
.qcard p { margin: 0; font-size: 13.5px; line-height: 1.45; color: #dde5ff; }
.qc-kicker { font-size: 11px; font-weight: 900; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); }
.qc-bar { position: relative; height: 8px; border-radius: 4px; background: rgba(0,0,0,.4); margin: 4px 40px 12px 0; }
.qc-bar > div { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffd85e, #f3a51e); }
.qc-bar span { position: absolute; right: -40px; top: -5px; font-size: 12px; font-weight: 900; color: var(--muted); }
.qc-now { padding: 12px; border-radius: 12px; background: rgba(0,0,0,.22); margin-bottom: 10px; }
.qc-now b { font-size: 15px; color: var(--gold); }
.qc-where, .qc-reward { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12.5px; font-weight: 800; color: #c8e7ff; }
.qc-reward { color: #ffd98a; }
.qc-where .ic, .qc-reward .ic { width: 16px; height: 16px; }
.qsteps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.qs { display: flex; gap: 10px; padding: 6px 2px; font-size: 13.5px; }
.qs i { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid var(--muted); margin-top: 3px; }
.qs span { display: flex; flex-direction: column; gap: 1px; }
.qs small { color: var(--muted); font-size: 12.5px; }
.qs em { display: flex; align-items: center; gap: 4px; font-style: normal; font-size: 12px; color: #ffd98a; font-weight: 700; }
.qs em .ic { width: 13px; height: 13px; }
.qs.done { color: var(--muted); }
.qs.done i { background: var(--ok); border-color: var(--ok); }
.qs.now b { color: #fff; }
.qs.now i { border-color: var(--gold); background: var(--gold); box-shadow: inset 0 0 0 3px #1a2550; }
.qs.todo { opacity: .55; }
details.qcard summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; }
details.qcard summary::-webkit-details-marker { display: none; }
details.qcard summary h3 { grid-column: 1; }
.qc-count { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-weight: 900; color: var(--muted); }
.qcard.done { opacity: .9; }

/* ---------------------------------------------------------------- mail / events */
.inbox { display: flex; flex-direction: column; gap: 8px; }
.msg-card, .event-card { border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.msg-card summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; min-height: 60px; }
.msg-card summary::-webkit-details-marker { display: none; }
.msg-card .ic-tile { width: 38px; height: 38px; }
.mc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mc-txt b { font-size: 14.5px; }
.mc-txt small { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); display: none; }
.msg-card.unread .unread-dot { display: block; }
.msg-card.unread { border-color: rgba(122, 168, 255, .45); }
.chev .ic { width: 18px; height: 18px; color: var(--muted); transition: transform var(--t); }
.msg-card[open] .chev .ic { transform: rotate(180deg); }
.msg-card p { margin: 0; padding: 0 14px 14px 62px; font-size: 14px; line-height: 1.5; color: #dde5ff; }
.event-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px; }
.event-card .ic-tile { width: 42px; height: 42px; }
.event-card b { font-size: 15px; }
.event-card p { margin: 2px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--muted); }

/* ---------------------------------------------------------------- settings */
.settings { display: grid; grid-template-columns: 190px 1fr; gap: 16px; align-items: start; }
.set-nav { flex-direction: column; align-items: stretch; margin: 0; position: sticky; top: 0; }
.set-nav .tab { border-radius: 12px; justify-content: flex-start; background: transparent; border-color: transparent; min-height: 44px; }
.set-nav .tab:hover { background: var(--surface); }
.set-nav .tab.on { background: var(--surface-2); color: #fff; border-color: var(--line-2); }
.set-body { min-width: 0; }
.set-body > .sec:first-child { margin-top: 0; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: center; margin: 0; padding: 12px 14px; background: var(--surface); border-radius: 14px; font-size: 13.5px; }
.keys dt { display: flex; gap: 3px; font-weight: 900; }
.keys dd { margin: 0; color: var(--muted); font-weight: 700; }
.acct { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 8px; }
.acct .ic-tile { width: 46px; height: 46px; }
.acct div { display: flex; flex-direction: column; }
.acct b { font-size: 17px; }
.acct small { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.pw-form { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.pw-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 800; color: var(--muted); }
.pw-form input { min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(0,0,0,.3); color: #fff; font: inherit; font-size: 15px; }
.pw-form input:focus { border-color: var(--accent-2); outline: none; }
.form-msg { margin: 0; min-height: 18px; font-size: 13px; font-weight: 800; }
.form-msg.err { color: #ff9aa2; }
.form-msg.ok { color: #8cf0b0; }
.pw-form .btn { align-self: flex-start; }

/* ---------------------------------------------------------------- responsive (narrow windows / phones) */
@media (max-width: 760px) {
  .shop, .wardrobe, .sum-grid, .tc-front { grid-template-columns: 1fr; }
  .settings { grid-template-columns: 1fr; }
  .set-nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; position: static; scrollbar-width: none; }
  .set-nav::-webkit-scrollbar { display: none; }
  .set-nav .tab { flex: none; }
  .wd-stage { height: 240px; }
  .sum-grid .stage, .dex-detail .stage { min-height: 240px; }
  .tc-avatar { min-height: 200px; }
  .dex-tools { flex-wrap: wrap; }
  .dex-tools select { flex: 1; }
  .where-row { grid-template-columns: 20px 1fr; }
  .where-row span { grid-column: 2; justify-content: flex-start; }
  .msg-card p { padding-left: 14px; }
}
.sort { flex: none; }
.sort select { max-width: 116px; padding-right: 4px; }
@media (max-width: 420px) { .sort select { max-width: 92px; } }

/* ---------- Help & Support (js/support.js) ---------- */
.sup { display: grid; gap: 12px; }
.sup .sec { margin: 6px 0 0; }
.sup-new { min-height: 48px; font-size: 16px; }
.sup-list { display: grid; gap: 8px; }
.sup-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); color: inherit; font: inherit; cursor: pointer; min-height: 56px; }
.sup-row:hover { border-color: var(--line-2); }
.sup-row.unread { border-color: var(--gold); box-shadow: inset 3px 0 0 var(--gold); }
.sup-ic { font-size: 22px; }
.sup-main { display: grid; min-width: 0; }
.sup-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sup-main small { color: var(--muted); font-weight: 700; font-size: 12px; }
.sup-st { font: 900 11px Nunito, sans-serif; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.st-open { background: rgba(79, 140, 255, .2); color: #a9c6ff; }
.st-waiting { background: rgba(255, 180, 70, .2); color: #ffd08a; }
.st-answered { background: rgba(70, 210, 120, .2); color: #8ff0b0; }
.st-closed { background: rgba(255,255,255,.1); color: var(--muted); }
.sup-faq details { border-radius: 12px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 6px; }
.sup-faq summary { padding: 12px 14px; font-weight: 800; cursor: pointer; min-height: 44px; }
.sup-faq p { margin: 0; padding: 0 14px 12px; color: var(--muted); font-weight: 700; }
.sup-back { justify-self: start; background: none; border: 0; color: var(--gold); font: 900 14px Nunito, sans-serif; padding: 6px 0; cursor: pointer; min-height: 36px; }
.sup-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sup-cat { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); color: inherit; font: inherit; cursor: pointer; }
.sup-cat span { font-size: 20px; }
.sup-cat small { color: var(--muted); font-weight: 700; font-size: 12px; line-height: 1.3; }
.sup-cat.on { border-color: var(--gold); background: rgba(255, 207, 74, .1); }
.sup-form label { display: grid; gap: 6px; font-weight: 800; font-size: 13px; color: var(--muted); }
.sup-form input, .sup-form textarea, .sup-reply textarea { font: 700 15px Nunito, sans-serif; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(0,0,0,.28); color: #fff; resize: vertical; }
.sup-note { margin: 0; font-size: 12px; color: var(--muted); font-weight: 700; }
.sup-err { margin: 0; min-height: 18px; color: #ff8a8a; font-weight: 800; }
.sup-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sup-head b { font-size: 17px; }
.sup-thread { display: grid; gap: 8px; max-height: calc(46 * var(--uvh, 1vh)); overflow: auto; padding-right: 2px; }
.sup-msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; }
.sup-msg small { display: block; font-weight: 800; color: var(--muted); font-size: 11.5px; margin-bottom: 2px; }
.sup-msg p { margin: 0; white-space: pre-line; font-weight: 700; }
.sup-msg.me { justify-self: end; background: rgba(79, 140, 255, .18); border: 1px solid rgba(79, 140, 255, .35); }
.sup-msg.staff { justify-self: start; background: rgba(255, 207, 74, .12); border: 1px solid rgba(255, 207, 74, .35); }
.sup-reply { display: grid; gap: 8px; }
.sup-reply div { display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- Events calendar (js/calendar.js) ---------- */
/* Events calendar (js/calendar.js): Today / This week / This month / Season, live on top, a coloured chip per category */
.cal2 { display: grid; gap: 12px; }
.cal-seg { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; position: sticky; top: -2px; z-index: 2; box-shadow: 0 6px 14px rgba(5, 10, 26, .55); background: #0d1630; }
.cal-seg .seg-b { min-width: 0; padding: 4px 6px; white-space: nowrap; }
.cal-seg .seg-b.on { background: linear-gradient(#ffe27a, var(--gold)); color: #2a1a00; }
.cal-filt { display: flex; gap: 6px; overflow-x: auto; margin: -2px -2px 0; padding: 2px; scrollbar-width: none; }
.cal-filt::-webkit-scrollbar { display: none; }
.cal-f { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 800; font-size: 13px; }
.cal-f i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.cal-f.on { color: #fff; border-color: var(--c, var(--gold)); background: color-mix(in srgb, var(--c, var(--gold)) 22%, transparent); }
.cal-list { display: grid; gap: 14px; }
.cal-sec { display: grid; gap: 6px; }
.cal-dh { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 2px 2px; border-bottom: 1px solid var(--line); }
.cal-dh b { font: 900 14px Nunito, sans-serif; color: #fff; display: inline-flex; align-items: center; gap: 7px; }
.cal-dh span { font-weight: 800; font-size: 12px; color: var(--muted); }
.cal-dh.live b { color: var(--gold); }
.cal-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff5f6b; box-shadow: 0 0 0 0 rgba(255, 95, 107, .6); animation: calPulse 1.6s infinite; }
@keyframes calPulse { 70% { box-shadow: 0 0 0 7px rgba(255, 95, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 95, 107, 0); } }
.cal-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 10px 10px 10px 12px; border-radius: 14px; text-align: left;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; position: relative; overflow: hidden; }
.cal-row::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); }
.cal-row.tap { cursor: pointer; }
.cal-row.tap:hover { border-color: var(--line-2); background: var(--surface-2); }
.cal-row.tap:active { transform: scale(.99); }
.cal-row.live { border-color: rgba(255, 207, 74, .45); background: linear-gradient(135deg, rgba(255, 207, 74, .1), rgba(255, 255, 255, .03)); }
.cal-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.cal-ic svg { width: 22px; height: 22px; }
.cal-main { display: grid; gap: 2px; min-width: 0; }
.cal-main b { font-size: 14.5px; line-height: 1.25; }
.cal-main small { color: var(--muted); font-weight: 700; font-size: 12.5px; line-height: 1.3; }
.cal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 3px; }
.cal-chip { font: 900 10.5px Nunito, sans-serif; letter-spacing: .4px; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; color: var(--c);
  background: color-mix(in srgb, var(--c) 15%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); white-space: nowrap; }
.cal-cd { font-weight: 900; font-size: 12px; color: #fff; font-variant-numeric: tabular-nums; }
.cal-row.live .cal-cd { color: var(--gold); }
.cal-cd.on { color: #3ee07a !important; }
.cal-at { font-weight: 800; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-hp { display: block; height: 5px; margin-top: 4px; border-radius: 3px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.cal-hp i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #ff5f6b, #ff9a4a); }
/* what is on now, featured: a Pokémon portrait, HP or time progress, what you get, what a tap does */
.cal-dh.up b { color: #fff; }
.cal-row.mon { grid-template-columns: 48px 1fr auto; }
.cal-ic.art { width: 48px; height: 48px; background: radial-gradient(circle, color-mix(in srgb, var(--c) 30%, transparent), transparent 72%); }
.cal-ic.art img { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .35)); }
.cal-row.feat { padding: 12px 10px 12px 14px; border-color: color-mix(in srgb, var(--c) 55%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--c) 16%, transparent), rgba(255, 255, 255, .03) 70%); }
.cal-row.feat .cal-main b { font-size: 16px; }
.cal-row.feat.mon { grid-template-columns: 64px 1fr auto; }
.cal-row.feat .cal-ic.art, .cal-row.feat .cal-ic.art img { width: 64px; height: 64px; }
.cal-hpr { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.cal-hpr .cal-hp { flex: 1; min-width: 0; height: 8px; margin-top: 0; border-radius: 4px; }
.cal-hpr b { flex: none; font-size: 12px !important; font-weight: 900; font-variant-numeric: tabular-nums; color: #fff; }
.cal-hpt { font-size: 11.5px !important; font-variant-numeric: tabular-nums; }
.cal-tp { display: block; height: 4px; margin-top: 5px; border-radius: 2px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.cal-tp i { display: block; height: 100%; border-radius: 2px; background: var(--c); opacity: .85; }
.cal-gets { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.cal-gets i { font-style: normal; font-weight: 800; font-size: 11.5px; line-height: 1.25; padding: 2px 8px; border-radius: 8px; color: #ffe9a8; background: rgba(255, 207, 74, .12); border: 1px solid rgba(255, 207, 74, .3); }
.cal-go { display: inline-flex; align-items: center; gap: 2px; align-self: center; font: 900 12px Nunito, sans-serif; white-space: nowrap; color: #2a1a00; background: linear-gradient(#ffe27a, var(--gold)); border-radius: 999px; padding: 6px 8px 6px 11px; }
.cal-go svg { width: 12px; height: 12px; }
.cal-right { display: grid; justify-items: end; align-content: center; gap: 6px; }
@media (max-width: 460px) {
  .cal-row.feat.mon { grid-template-columns: 52px 1fr; }
  .cal-row.feat .cal-ic.art, .cal-row.feat .cal-ic.art img { width: 52px; height: 52px; }
  .cal-row:has(.cal-right.go) { grid-template-columns: 40px 1fr; }
  .cal-row.mon:has(.cal-right.go) { grid-template-columns: 48px 1fr; }
  .cal-row.feat.mon:has(.cal-right.go) { grid-template-columns: 52px 1fr; }
  .cal-right.go { grid-column: 2; justify-items: start; }
  .cal-right.go > .cal-mult { position: absolute; top: 10px; right: 10px; }
  .cal-row:has(.cal-right.go > .cal-mult) .cal-main > b { padding-right: 46px; }
}
.cal-mult { font: 900 16px Nunito, sans-serif; color: #3a2400; background: linear-gradient(#ffe066, #ffb21c); border-radius: 10px; padding: 3px 8px; }
.cal-slim { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; background: color-mix(in srgb, var(--c) 7%, transparent); font-size: 13px; font-weight: 800; color: var(--muted); }
.cal-slim .cal-ic { width: 24px; height: 24px; border-radius: 8px; }
.cal-slim .cal-ic svg { width: 15px; height: 15px; }
.cal-slim b { color: #fff; flex: 1; min-width: 0; }
.cal-empty { margin: 8px 0; padding: 18px 12px; text-align: center; color: var(--muted); font-weight: 800; border: 1px dashed var(--line-2); border-radius: 14px; }
.cal-cards { display: grid; gap: 10px; }
.cal-card { display: grid; gap: 8px; width: 100%; padding: 12px; border-radius: 16px; text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; }
.cal-card.tap { cursor: pointer; }
.cal-card.tap:hover { border-color: var(--line-2); background: var(--surface-2); }
.cal-card-h { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; }
.cal-card-h .cal-chip { align-self: start; }
.cal-bar { display: block; height: 7px; border-radius: 4px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.cal-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c)); }
.cal-range { display: flex; justify-content: space-between; gap: 8px; font-weight: 800; font-size: 12px; color: var(--muted); }
.cal-range span:nth-child(2) { color: #fff; }
.cal-kv { display: flex; justify-content: space-between; font-size: 13px; font-weight: 800; color: var(--muted); padding-top: 6px; border-top: 1px solid var(--line); }
.cal-kv b { color: #fff; }
.cal-spots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.cal-spots span { display: grid; gap: 1px; padding: 6px 8px; border-radius: 10px; background: rgba(0, 0, 0, .22); font-weight: 900; font-size: 12.5px; }
.cal-spots span.on { background: color-mix(in srgb, var(--c) 18%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent); }
.cal-spots small { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }

/* ---------- Ferry route board + sailing scene (js/ferry.js) ---------- */
.fs { display: grid; gap: 10px; }
.fs-head { display: flex; align-items: center; gap: 10px; font: 900 19px Nunito, sans-serif; color: #ffd979; }
.fs-ticket { font-size: 22px; }
.fs .sec { margin: 6px 0 0; }
.fs-route { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 10px; overflow-x: auto; padding: 18px 2px 8px; position: relative; scroll-snap-type: x proximity; scrollbar-width: thin; }
.fs-route::before { content: ''; position: absolute; left: 0; right: 0; top: 8px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, #36a8e8, #7fd6ff); opacity: .7; }
.fs-stop { position: relative; display: grid; justify-items: center; gap: 4px; padding: 14px 10px 12px; border-radius: 16px; text-align: center; scroll-snap-align: start;
  background: linear-gradient(180deg, rgba(40, 70, 140, .55), rgba(16, 30, 72, .8)); border: 1.5px solid rgba(120, 180, 255, .3); }
.fs-stop::before { content: ''; position: absolute; top: -14px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #0d1838; border: 3px solid #4fb6f0; box-shadow: 0 0 0 3px rgba(79, 182, 240, .25); }
.fs-stop.here { border-color: #6fe0a0; box-shadow: 0 0 0 1px rgba(111, 224, 160, .4), 0 8px 20px rgba(0,0,0,.3); }
.fs-stop.here::before { border-color: #6fe0a0; background: #6fe0a0; }
.fs-stop.locked { opacity: .62; filter: saturate(.55); }
.fs-art svg { width: 96px; height: 54px; display: block; }
.fs-stop b { font-size: 14.5px; line-height: 1.15; }
.fs-stop small { color: var(--muted); font-weight: 800; font-size: 11.5px; min-height: 2.4em; }
.fs-go { min-width: 92px; min-height: 40px; }
.fs-here { font: 900 11px Nunito, sans-serif; color: #8ff0b0; border: 1.5px solid rgba(111, 224, 160, .7); border-radius: 10px; padding: 7px 10px; letter-spacing: .3px; }
.fs-lock { font-size: 18px; min-height: 40px; display: grid; place-items: center; }
.fs-note { margin: 4px 0 0; font-size: 12px; color: var(--muted); font-weight: 700; }
/* phones in portrait: a vertical list reads better than a long sideways strip */
html.touch.portrait .fs-route { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr; overflow: visible; padding: 4px 0 4px 18px; }
html.touch.portrait .fs-route::before { left: 6px; right: auto; top: 0; bottom: 0; width: 4px; height: auto; }
html.touch.portrait .fs-stop { grid-template-columns: 74px 1fr auto; grid-template-rows: auto auto; justify-items: start; text-align: left; align-items: center; column-gap: 12px; padding: 10px 12px; }
html.touch.portrait .fs-stop::before { top: 50%; left: -19px; margin: -7px 0 0; }
html.touch.portrait .fs-art { grid-row: 1 / 3; }
html.touch.portrait .fs-art svg { width: 74px; height: 42px; }
html.touch.portrait .fs-stop small { min-height: 0; }
html.touch.portrait .fs-go, html.touch.portrait .fs-here, html.touch.portrait .fs-lock { grid-column: 3; grid-row: 1 / 3; }

/* World Cruise: region stops show why they're locked, the catch progress, and the "still being charted" card */
.fs-req { display: flex; flex-wrap: wrap; gap: 6px; }
.fs-req-i { font: 900 11.5px Nunito, sans-serif; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1.5px solid rgba(160, 190, 255, .25); color: var(--muted); }
.fs-req-i.ok { color: #8ff0b0; border-color: rgba(111, 224, 160, .6); background: rgba(111, 224, 160, .1); }
.fs-region { background: linear-gradient(180deg, color-mix(in srgb, var(--rg1, #7aa2d6) 30%, rgba(16, 30, 72, .8)), rgba(16, 30, 72, .85)); }
.fs-region.locked { opacity: .9; filter: none; }
.fs-region.locked .fs-art { filter: saturate(.35) brightness(.85); }
.fs-region.ready { border-color: color-mix(in srgb, var(--rg1, #7aa2d6) 70%, white); box-shadow: 0 0 0 1px color-mix(in srgb, var(--rg1, #7aa2d6) 40%, transparent), 0 8px 20px rgba(0,0,0,.3); }
.fs-chip { font: 900 10.5px Nunito, sans-serif; line-height: 1.25; padding: 4px 8px; border-radius: 9px; background: rgba(0, 0, 0, .28); color: #ffe7a3; border: 1px solid rgba(255, 217, 121, .35); }
.fs-chip.k-closed { color: #bcd2ff; border-color: rgba(160, 190, 255, .35); }
.fs-prog { width: 100%; height: 6px; border-radius: 3px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.fs-prog i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #ffd23f, #ff9f1c); }
.fs-prog.full i { background: linear-gradient(90deg, #6fe0a0, #3cc17a); }
html.touch.portrait .fs-region b, html.touch.portrait .fs-region small, html.touch.portrait .fs-region .fs-chip, html.touch.portrait .fs-region .fs-prog { grid-column: 2; justify-self: stretch; }
html.touch.portrait .fs-region .fs-chip { justify-self: start; }
html.touch.portrait .fs-region { grid-template-rows: auto auto auto auto; }
html.touch.portrait .fs-region .fs-art { grid-row: 1 / 5; }
html.touch.portrait .fs-region .fs-go { grid-row: 1 / 5; }
.fs-chart { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 6px 4px 4px; }
.fs-chart-art svg { width: min(320px, 100%); height: auto; display: block; filter: drop-shadow(0 10px 22px rgba(0,0,0,.35)); }
.fs-chart h3 { margin: 0; font: 900 20px Nunito, sans-serif; color: #ffd979; }
.fs-chart p { margin: 0; color: var(--muted); font-weight: 700; max-width: 420px; }
.fs-chart .fs-chart-soon { color: #8ff0b0; font-weight: 900; letter-spacing: .3px; }
.fs-chart-route { animation: fs-route 1.6s linear infinite; }
@keyframes fs-route { to { stroke-dashoffset: -24; } }
.fs-chart-quill { transform-origin: 120px 54px; animation: fs-quill 1.2s ease-in-out infinite alternate; }
@keyframes fs-quill { from { transform: translate(0, 0) rotate(0); } to { transform: translate(-6px, 4px) rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .fs-chart-route, .fs-chart-quill { animation: none; } }

.fs-scene { position: fixed; inset: 0; z-index: 60; overflow: hidden; opacity: 0; transition: opacity .35s; pointer-events: none; }
.fs-scene.on { opacity: 1; }
.fs-scene.out { opacity: 0; transition: opacity .45s; }
.fs-sky { position: absolute; inset: 0; background: linear-gradient(#5fb7ff 0%, #a9dbff 48%, #2f86d6 50%, #1b5ea8 100%); }
.fs-sun { position: absolute; right: 14%; top: 14%; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, #fff7c2, #ffd76a 60%, transparent 70%); }
.fs-sea { position: absolute; left: -50%; width: 200%; background-repeat: repeat-x; }
.fs-sea1 { bottom: 0; height: 32%; background-image: radial-gradient(60px 18px at 60px 0, transparent 58px, #1b5ea8 60px); background-size: 120px 100%; animation: fs-wave 2.2s linear infinite; }
.fs-sea2 { bottom: 12%; height: 30%; background-image: radial-gradient(60px 16px at 60px 0, transparent 58px, rgba(47, 134, 214, .95) 60px); background-size: 120px 100%; animation: fs-wave 3.2s linear infinite reverse; }
.fs-sea3 { bottom: 26%; height: 26%; background-image: radial-gradient(70px 14px at 70px 0, transparent 68px, rgba(90, 170, 235, .9) 70px); background-size: 140px 100%; animation: fs-wave 4.5s linear infinite; }
@keyframes fs-wave { to { transform: translateX(-120px); } }
.fs-boat { position: absolute; bottom: 37%; left: -30%; z-index: 1; width: min(300px, calc(60 * var(--uvw, 1vw))); animation: fs-sail 2.6s ease-in-out forwards, fs-bob 1.1s ease-in-out infinite; }
.fs-boat svg { width: 100%; height: auto; filter: drop-shadow(0 8px 10px rgba(0,0,0,.25)); }
@keyframes fs-sail { to { left: 105%; } }
@keyframes fs-bob { 50% { transform: translateY(6px) rotate(-1.5deg); } }
.fs-smoke { animation: fs-smoke 1s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes fs-smoke { from { opacity: .9; transform: translate(0, 0) scale(.6); } to { opacity: 0; transform: translate(-14px, -12px) scale(1.6); } }
.fs-label { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); text-align: center; color: #fff; text-shadow: 0 2px 8px rgba(0, 40, 90, .6); }
.fs-label small { display: block; font: 900 13px Nunito, sans-serif; letter-spacing: 3px; text-transform: uppercase; opacity: .9; }
.fs-label b { font: 400 clamp(30px, calc(7 * var(--uvw, 1vw)), 54px) 'Lilita One', Nunito, sans-serif; letter-spacing: 1px; }
html.reduce-motion .fs-sea, html.reduce-motion .fs-boat { animation: none; } html.reduce-motion .fs-boat { left: 35%; }

/* ---------------------------------------------------------------- Pokémon summary: Stats / Moves tabs (js/summary.js) */
.sum-tabs-host { margin-top: 14px; }
.sum-tabs { margin-bottom: 12px; }
.sum-stats { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.st-table { padding: 10px 12px; background: var(--surface); border-radius: 14px; min-width: 0; }
.st-row { display: grid; grid-template-columns: minmax(64px, 1fr) 38px minmax(30px, 1.2fr) 34px 30px 34px; align-items: center; gap: 6px; padding: 5px 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.st-row > span:nth-child(n+4), .st-row > b { text-align: right; }
.st-row + .st-row { border-top: 1px solid var(--line); }
.st-head { font-size: 10.5px; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); padding-top: 0; }
.st-n { color: var(--muted); font-weight: 800; white-space: nowrap; }
.st-row b { font-size: 14px; }
.st-bar { height: 6px; border-radius: 3px; background: rgba(0,0,0,.4); overflow: hidden; }
.st-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent-2); }
.st-iv { font-weight: 900; }
.st-iv.max { color: var(--gold); }
.nat { font-style: normal; font-size: 10px; margin-left: 4px; }
.st-row.up .st-n, .st-row.up b, .nat.up, .nat-line .up { color: #ff7a6b; }
.st-row.down .st-n, .st-row.down b, .nat.down, .nat-line .down { color: #6fa8ff; }
.st-row.up .st-bar i { background: #ff7a6b; } .st-row.down .st-bar i { background: #6fa8ff; }
.st-foot { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-2); display: grid; gap: 6px; }
.ev-total { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; font-size: 12px; font-weight: 900; color: var(--muted); }
.ev-total b { color: #fff; font-variant-numeric: tabular-nums; } .ev-total small { color: var(--muted); }
.ev-track { height: 8px; border-radius: 4px; background: rgba(0,0,0,.4); overflow: hidden; }
.ev-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-2), var(--gold)); }
.nat-line { margin: 0; font-size: 13px; }
.iv-card { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 10px 12px; background: var(--surface); border-radius: 14px; min-width: 0; }
.iv-radar { width: 100%; max-width: 250px; justify-self: center; overflow: visible; }
.iv-radar .rg { fill: none; stroke: rgba(170,195,255,.22); stroke-width: 1; }
.iv-radar .rv { fill: rgba(79,195,255,.32); stroke: #4fc3ff; stroke-width: 2; stroke-linejoin: round; }
.iv-radar .rl { fill: var(--muted); font: 800 10.5px Nunito, sans-serif; text-anchor: middle; }
.iv-radar .rl .rn { fill: #fff; font-weight: 900; }
.iv-radar .rl.up { fill: #ff7a6b; } .iv-radar .rl.down { fill: #6fa8ff; }
.judge { display: grid; gap: 4px; }
.judge > b { font-size: 14px; } .judge > small { color: var(--muted); font-weight: 700; font-size: 12px; }
.judge .j-top { color: var(--gold); } .judge .j-good { color: #9be35a; } .judge .j-mid { color: #4fc3ff; } .judge .j-low { color: #fff; }
.judge ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; font-size: 12px; }
.judge li { display: flex; justify-content: space-between; gap: 6px; }
.judge li span { color: var(--muted); font-weight: 800; } .judge li em { font-style: normal; font-weight: 800; }
.judge li.best em { color: var(--gold); }
.hp-type { margin: 6px 0 0; font-size: 12.5px; font-weight: 800; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.mv-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mv-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 14px; padding: 6px 8px 6px 6px; transition: transform var(--t), box-shadow var(--t); }
.mv-card.sel { border-color: color-mix(in srgb, var(--c) 70%, #fff); border-left-color: var(--c); background: var(--surface-2); }
.mv-card.dragging { z-index: 2; box-shadow: var(--shadow); transition: none; opacity: .95; }
.mv-card.drop-target { box-shadow: 0 0 0 2px var(--gold); }
.mv-main { display: grid; grid-template-columns: auto 1fr; grid-template-areas: 'ty name' 'ty stats'; gap: 2px 10px; align-items: center; width: 100%; background: none; border: 0; padding: 2px; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.mv-main .mv-ty { grid-area: ty; }
.smv-name { grid-area: name; display: flex; align-items: center; gap: 6px; min-width: 0; }
.smv-name b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-chip { font-style: normal; font-size: 9.5px; font-weight: 900; padding: 1px 5px; border-radius: 5px; color: #3a2400; background: var(--gold); }
.mv-stats { grid-area: stats; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; font-weight: 900; font-variant-numeric: tabular-nums; align-items: center; }
.mv-stats small { color: var(--muted); font-weight: 800; font-size: 10.5px; margin-right: 3px; text-transform: uppercase; }
.mv-stats .pp-low { color: var(--gold); } .mv-stats .pp-out { color: var(--danger); }
.mv-cat { display: inline-grid; place-items: center; min-width: 22px; height: 18px; padding: 0 4px; border-radius: 5px; font-size: 11px; color: #10183a; }
.mv-cat.cat-physical { background: #ff9b5a; } .mv-cat.cat-special { background: #7aa8ff; } .mv-cat.cat-status { background: #c8cfe2; }
.mv-desc { grid-column: 1 / -1; grid-row: 2; margin: 2px 4px 4px 50px; font-size: 13px; line-height: 1.4; color: #dfe6ff; }
.mv-tools { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.mv-tools .btn[disabled] { opacity: .4; }
.mv-grip { cursor: grab; touch-action: none; }
.mv-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.mv-actions small { font-size: 12px; }
.relearn { margin-top: 12px; padding: 10px; border-radius: 14px; background: rgba(0,0,0,.22); border: 1px solid var(--line-2); }
.rl-head { display: grid; gap: 2px; margin: 0 2px 8px; }
.rl-head b { color: var(--gold); font-size: 14px; } .rl-head small { color: var(--muted); font-size: 12.5px; font-weight: 700; } .rl-head small b { color: #fff; font-size: inherit; }
.rl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 420px; overflow: auto; }
.rl-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 6px 8px 6px 6px; border-radius: 12px; background: var(--surface); border-left: 4px solid var(--c); }
.rl-row .mv-ty { grid-area: auto; }
.rl-txt { display: grid; gap: 1px; min-width: 0; }
.rl-txt b { font-size: 14px; } .rl-txt small { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.rl-txt small em { font-style: normal; color: var(--gold); }
.rl-txt .rl-desc { color: #c9d4f5; font-weight: 600; }
.rl-none { margin: 4px; }

/* ---------------------------------------------------------------- Mounts screen (js/mounts.js) */
.mounts { display: grid; gap: 12px; }
.mt-banner { margin: 0; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 207, 74, .1); border: 1px solid rgba(255, 207, 74, .35); font-weight: 800; font-size: 13px; }
.mt-banner .ic { width: 18px; height: 18px; color: var(--gold); flex: none; }
.mt-top { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 14px; scroll-margin-top: 8px; }
.mt-stage { min-height: 300px; }
.mt-side { min-width: 0; }
.mt-defs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mt-def { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 10px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: inherit; font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.mt-def .ic { width: 22px; height: 22px; flex: none; color: var(--gold); }
.mt-def span { display: grid; min-width: 0; line-height: 1.2; }
.mt-def small { font-size: 11px; color: var(--muted); font-weight: 700; }
.mt-def b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-def.none { opacity: .6; cursor: default; }
.mt-detail { display: grid; gap: 10px; }
.mt-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mt-name h3 { margin: 0; font-size: 24px; }
.mt-prem, .mt-riding { font-size: 10px; font-weight: 900; padding: 1px 6px; border-radius: 6px; }
.mt-prem { color: #fff; background: linear-gradient(90deg, #8c6cff, #ff5fa8); }
.mt-riding { color: #10183a; background: var(--ok); }
/* shiny mounts: a "Shiny" chip, a twinkling sparkle on the card, colours kept on a locked card (they are the point) */
.mt-shiny { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 900; padding: 1px 6px; border-radius: 6px; color: #2a1240; background: linear-gradient(90deg, #ffe27a, #ff9ee0, #9fdcff); }
.mt-shiny .ic { width: 11px; height: 11px; }
.mt-spark { position: absolute; top: 8px; left: 8px; z-index: 1; width: 22px; height: 22px; display: grid; place-items: center; color: #ffe27a; filter: drop-shadow(0 0 4px rgba(255, 226, 122, .8)); animation: mtTwinkle 2.4s ease-in-out infinite; }
.mt-spark .ic { width: 18px; height: 18px; }
.mt-key ~ .mt-spark { top: 32px; }
.mt-card.locked.shiny .wd-thumb { filter: grayscale(.2) brightness(.85); }
@keyframes mtTwinkle { 0%, 100% { transform: scale(.8) rotate(0deg); opacity: .75; } 50% { transform: scale(1.1) rotate(20deg); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mt-spark { animation: none; } }
.mt-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.mt-facts > div { padding: 8px 10px; border-radius: 12px; background: var(--surface); min-width: 0; }
.mt-facts dt { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .4px; }
.mt-facts dt .ic { width: 15px; height: 15px; }
.mt-facts dd { margin: 2px 0 0; font-weight: 900; font-size: 15px; text-transform: capitalize; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-facts dd small { color: var(--muted); font-size: 11.5px; text-transform: none; }
.mt-kind-note { font-size: 12.5px; }
.mt-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mt-actions .btn { flex: 1 1 150px; justify-content: center; }
.mt-slots .lbl .muted { text-transform: none; letter-spacing: 0; font-weight: 700; }
.mt-slot-row { display: flex; gap: 6px; }
.mt-slot { position: relative; flex: 1 1 0; max-width: 64px; aspect-ratio: 1; min-height: 46px; border-radius: 12px; border: 1px dashed var(--line-2); background: rgba(0,0,0,.25); display: grid; place-items: center; padding: 0; overflow: hidden; color: var(--muted); cursor: pointer; }
.mt-slot > span { position: absolute; top: 2px; left: 5px; font-size: 10.5px; font-weight: 900; color: var(--muted); z-index: 1; }
.mt-slot img { width: 86%; height: 86%; object-fit: contain; }
.mt-slot .item-art, .mt-slot .ic { width: 26px; height: 26px; }
.mt-slot:hover { border-color: var(--accent-2); }
.mt-slot.on { border: 2px solid var(--gold); background: rgba(255, 207, 74, .14); }
.mt-slot.on > span { color: var(--gold); }
.mt-slot-hint { display: block; margin-top: 6px; font-size: 12px; }
.mt-how { margin: 0; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--surface); }
.mt-how > .ic { width: 22px; height: 22px; color: var(--gold); flex: none; }
.mt-how span { display: grid; gap: 2px; } .mt-how small { color: var(--muted); font-weight: 700; }
.mt-tabs { margin: 0; }
.mt-kinds { justify-self: start; max-width: 100%; overflow-x: auto; }
.mt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.mt-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: inherit; font: inherit; cursor: pointer; min-width: 0; }
.mt-card:hover { background: var(--surface-2); }
.mt-card.sel { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.mt-card b { font-size: 12.5px; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-card small { color: var(--muted); font-size: 11px; text-align: center; }
.mt-card.locked .wd-thumb { filter: grayscale(.85) brightness(.7); }
.mt-card.locked small { color: var(--gold); }
.mt-card .lock { position: absolute; top: 8px; right: 8px; z-index: 1; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.55); color: var(--gold); }
.mt-card .lock .ic { width: 14px; height: 14px; }
.mt-key { position: absolute; top: 8px; left: 8px; z-index: 1; min-width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 900; color: #10183a; background: var(--gold); }

@media (max-width: 760px) {
  .sum-stats, .mt-top { grid-template-columns: 1fr; }
  .mt-stage { min-height: 200px; height: 200px; }
  .mt-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}
@media (max-width: 560px) {
  .mv-card { grid-template-columns: 1fr; }
  .mv-desc { grid-row: auto; }
  .mv-tools { margin-top: 2px; }
}
@media (max-width: 420px) {
  .st-row { grid-template-columns: minmax(58px, 1fr) 34px minmax(16px, .8fr) 30px 26px 30px; gap: 5px; font-size: 12.5px; }
  .mv-desc { margin-left: 4px; }
  .mt-facts dd { font-size: 14px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .mt-top { grid-template-columns: minmax(180px, 240px) 1fr; }
  .mt-stage { min-height: 200px; height: 200px; }
}

/* ---------------------------------------------------------------- Pokémon summary sections inside the Pokémon page (js/summary.js; page layout: pokemon.css) */
.ty-dot { display: inline-grid; place-items: center; min-width: 26px; height: 16px; padding: 0 3px; border-radius: 6px; background: var(--c); color: #fff; font-size: 9px; font-weight: 900; letter-spacing: .3px; text-shadow: 0 1px 1px rgba(0, 0, 0, .45); }

/* stats: value, IV (genetics, purple) and EV (effort, blue) columns */
.gt { display: grid; padding: 8px 10px 10px; background: var(--surface); border-radius: 14px; border: 1px solid var(--line); }
.gt-row { display: grid; grid-template-columns: minmax(62px, 1fr) 40px minmax(84px, 1.3fr) minmax(84px, 1.3fr); column-gap: 8px; align-items: stretch; font-size: 13px; font-variant-numeric: tabular-nums; }
.gt-row > .st-n, .gt-row > b { padding: 5px 0; align-self: center; }
.gt-row > b { text-align: right; font-size: 14px; }
.gt-row.up .st-n, .gt-row.up > b { color: #ff7a6b; } .gt-row.down .st-n, .gt-row.down > b { color: #6fa8ff; }
.gt-head { padding-bottom: 6px; align-items: center; }
.gt-title { font-weight: 900; font-size: 15px; color: #fff; }
.gt-pill { text-align: center; font-size: 11px; font-weight: 900; padding: 3px 6px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: help; }
.gt-pill.iv { background: linear-gradient(#d5adff, #a46cf0); color: #2a0a55; } .gt-pill.ev { background: linear-gradient(#b2e3ff, #56b4f5); color: #06294a; }
.gt-c { display: flex; align-items: center; gap: 6px; padding: 4px 8px; }
.gt-c.iv { background: rgba(160, 90, 255, .15); border-inline: 1px solid rgba(190, 130, 255, .4); }
.gt-c.ev { background: rgba(70, 170, 255, .12); border-inline: 1px solid rgba(110, 190, 255, .4); }
.gt-head + .gt-row .gt-c { border-top: 1px solid; border-radius: 10px 10px 0 0; padding-top: 7px; }
.gt-head + .gt-row .gt-c.iv { border-top-color: rgba(190, 130, 255, .4); } .gt-head + .gt-row .gt-c.ev { border-top-color: rgba(110, 190, 255, .4); }
.gt-foot .gt-c { border-bottom: 1px solid; border-radius: 0 0 10px 10px; padding-bottom: 7px; border-top: 1px solid rgba(255, 255, 255, .12); }
.gt-foot .gt-c.iv { border-bottom-color: rgba(190, 130, 255, .4); } .gt-foot .gt-c.ev { border-bottom-color: rgba(110, 190, 255, .4); }
.gt-foot .gt-c em { width: 100%; text-align: center; } .gt-foot small { color: var(--muted); font-weight: 800; }
.gb { flex: 1; min-width: 20px; height: 8px; border-radius: 4px; background: rgba(0, 0, 0, .45); overflow: hidden; }
.gb i { display: block; height: 100%; border-radius: inherit; }
.gb.iv i { background: linear-gradient(90deg, #a35cff, #dcb0ff); } .gb.ev i { background: linear-gradient(90deg, #2d8cff, #8fd8ff); }
.gt-c em { font-style: normal; font-weight: 900; min-width: 22px; text-align: right; } .gt-c em.max { color: var(--gold); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pkd-stats .nat-line { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 2px 10px; }

/* moves */
.mv-headline { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.mv-headline h4 { margin: 0; font-size: 16px; }
.mv-pending { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px; margin-bottom: 8px; border-radius: 12px; border: 1px dashed var(--gold); background: rgba(255, 207, 74, .1); }
.mv-pending .mv-ty { grid-area: auto; }
.mp-txt { display: grid; gap: 2px; min-width: 0; }
.mp-txt b { color: var(--gold); font-size: 13.5px; } .mp-txt small { font-size: 11.5px; color: var(--muted); font-weight: 700; } .mp-txt .mp-how { color: #fff; } .mp-how:empty { display: none; }
.mp-btns { display: flex; flex-direction: column; gap: 4px; }
.mv-note { display: block; margin-top: 8px; font-size: 11.5px; }

/* stats table on narrower columns */
@media (max-width: 1000px) and (min-width: 761px), (max-width: 760px) and (min-height: 561px), (max-width: 599px) {
  .gt-row { grid-template-columns: minmax(54px, 1fr) 36px minmax(66px, 1.25fr) minmax(66px, 1.25fr); column-gap: 6px; font-size: 12.5px; }
  .gt-c { padding: 4px 6px; gap: 5px; } .gt-pill { font-size: 10.5px; }
}
@media (max-height: 560px) and (min-width: 600px) {
  .gt-row { grid-template-columns: minmax(52px, 1fr) 32px minmax(60px, 1.2fr) minmax(60px, 1.2fr); column-gap: 5px; font-size: 12px; }
  .gt-c { padding: 3px 5px; gap: 4px; } .gt-pill { font-size: 9.5px; } .gt-row > .st-n, .gt-row > b { padding: 3px 0; }
}

/* ---- Pokémon stats: base values, tools row, stat sheets (details / nature / IVs / EVs / EV guide) */
.st-base { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.nat-line .nat-change { margin-left: auto; }
.nat-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sum-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 4px 0 10px; }
.sum-tools .btn { justify-content: center; }
@media (min-width: 761px) { .sum-tools { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.iv-card.open .iv-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.sum-sheet { z-index: 400; }
.ss-card { max-height: calc(86 * var(--uvh, 1vh)); }
.ss-body { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 2px; }
.ss-lead, .ss-note { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.ss-lead b, .ss-note b { color: var(--text, #fff); }
.ss-table { display: grid; gap: 2px; font-size: 13px; }
.ss-tr { display: grid; grid-template-columns: 1.05fr 1.6fr .7fr 1fr; align-items: center; gap: 6px; padding: 6px 4px; border-radius: 8px; }
.ss-tr:nth-child(even) { background: rgba(255,255,255,.04); }
.ss-th { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ss-tf { border-top: 1px solid var(--line); border-radius: 0; }
.ss-sn { font-weight: 800; border-left: 3px solid var(--c, #888); padding-left: 6px; }
.ss-base { position: relative; height: 20px; border-radius: 6px; background: rgba(255,255,255,.06); overflow: hidden; display: flex; align-items: center; }
.ss-base i { position: absolute; inset: 0 auto 0 0; opacity: .8; border-radius: 6px; }
.ss-base b { position: relative; padding-left: 6px; font-size: 12px; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.nat .up, .ss-pick .up, .ss-sn .up { color: #ff7a6b; } .ss-pick .down { color: #6aa8ff; }
.nat-grid { display: grid; grid-template-columns: 44px repeat(5, minmax(0, 1fr)); gap: 4px; font-size: 11.5px; }
.ng-h { display: grid; place-items: center; font-weight: 800; color: var(--muted); font-size: 11px; }
.ng-h.row { color: #ff9a8e; } .nat-grid > .ng-h:not(.row) { color: #8db8ff; }
.ng-corner { font-size: 10px; color: var(--muted); display: grid; place-items: center; }
.nat-cell { padding: 7px 2px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: inherit; font: 700 11.5px/1.1 inherit; cursor: pointer; }
.nat-cell.neutral { opacity: .65; }
.nat-cell.cur { border-color: #f2b84b; box-shadow: inset 0 0 0 1px #f2b84b; }
.nat-cell.on { background: #f2b84b; color: #1b1406; border-color: #f2b84b; opacity: 1; }
.ss-pick { margin: 0; font-size: 14px; }
.ss-act, .ss-alt { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ss-act .btn, .ss-alt .btn, .ss-do .btn { display: inline-flex; align-items: center; gap: 6px; }
.ss-act .item-art, .ss-alt .item-art, .ss-do .item-art { width: 20px; height: 20px; }
.ss-need { display: inline-flex; align-items: center; gap: 6px; flex-wrap: nowrap; font-size: 12.5px; color: #ffd9a0; background: rgba(242,184,75,.1); border: 1px solid rgba(242,184,75,.35); border-radius: 10px; padding: 6px 9px; }
.ss-need svg { width: 16px; height: 16px; flex: none; }
.ss-need > span { min-width: 0; }   /* (the icon stays beside the text; the text wraps under itself) */
.ss-row { display: grid; grid-template-columns: 70px 1fr 34px; grid-template-areas: "n bar v" "do do do"; align-items: center; gap: 4px 8px; padding: 8px 6px; border-radius: 10px; background: rgba(255,255,255,.03); }
.ss-row .ss-sn { grid-area: n; } .ss-row .ss-bar { grid-area: bar; } .ss-row > b { grid-area: v; text-align: right; } .ss-row .ss-do { grid-area: do; }
.ss-row > b.max { color: #ffd75e; }
.ss-bar { position: relative; height: 10px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: visible; }
.ss-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; }
.ss-bar u { position: absolute; top: -3px; bottom: -3px; width: 2px; background: rgba(255,255,255,.5); }
.ss-do .ok, .ss-alt .ok { color: #7be08f; display: inline-flex; gap: 4px; align-items: center; }
.ss-do .ok svg, .ss-alt .ok svg { width: 16px; height: 16px; }
.ss-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ss-tabs .chip.on { background: var(--c); border-color: var(--c); color: #111; }
.ss-allsw { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-left: auto; }
.ss-guide { display: grid; gap: 4px; }
.sg-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 7px 9px; border-radius: 10px; background: rgba(255,255,255,.04); }
.sg-row small { grid-column: 1 / -1; color: var(--muted); font-size: 11.5px; }
.sg-n { font-weight: 800; color: var(--c); font-size: 12.5px; }

/* shinies: a gold SHINY tag and a gold border everywhere they show (they're rare and +10% stronger) */
.shiny-tag { display: inline-block; margin-left: 5px; padding: 1px 6px; border-radius: 6px; font: 900 9.5px/1.5 inherit; letter-spacing: .06em; font-style: normal;
  color: #2a1a00; background: linear-gradient(135deg, #fff1a6, #ffc93c 55%, #f2a93b); box-shadow: 0 0 8px rgba(255,210,80,.55); vertical-align: middle; white-space: nowrap; }
.shiny-tag.big { font-size: 11px; padding: 2px 8px; margin-left: 8px; }
.shiny-tag.on-pic { position: absolute; left: -4px; top: -4px; margin: 0; font-size: 8.5px; }
.pm.shiny .pm-icon { box-shadow: inset 0 0 0 2px #ffd23f, 0 0 10px rgba(255,210,80,.45); }
html.touch.portrait .pm.shiny .pm-icon { box-shadow: 0 0 0 2px #ffd23f, 0 0 10px rgba(255,210,80,.55); }

/* base stats sheet: species bars; a shiny shows its +10% values in gold */
.ss-base-only .ss-tr { grid-template-columns: 90px 1fr; }
.ss-base-only.sh .ss-tr { grid-template-columns: 90px 1fr 54px; }
.ss-shiny { color: #ffd23f; font-weight: 900; text-align: right; }
.ss-shiny::before { content: '✦ '; font-size: 10px; }

/* ability: name (tap to see both options), description underneath */
.abil { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.abil-btn { background: none; border: 0; padding: 0; color: inherit; font: inherit; font-weight: 800; cursor: pointer; text-align: left; display: inline-flex; gap: 6px; align-items: baseline; }
.abil-btn small { font-size: 10.5px; font-weight: 800; color: #f2b84b; }
.abil-desc { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.abil-opt { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.abil-opt small { grid-column: 1 / -1; color: var(--muted); }
.abil-opt.on { border-color: #f2b84b; background: rgba(242,184,75,.08); }
.abil-cur { font-size: 11px; font-weight: 900; color: #f2b84b; }

/* moves: four slots, then "Learn moves" (level up / TMs & HMs) */
.mv-card.empty { display: grid; place-items: center; min-height: 46px; border: 1.5px dashed var(--line-2); border-left-width: 1.5px; background: none; color: var(--muted); font-size: 12px; font-weight: 600; }
.mv-card.replacing { border-color: rgba(242,184,75,.55); }
.mv-card .mv-replace { justify-self: end; }
.mv-tools { display: inline-flex; gap: 4px; }
.mv-teach { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 8px 10px; border-radius: 12px; background: rgba(242,184,75,.1); border: 1px solid rgba(242,184,75,.45); font-size: 13px; }
.mv-teach .ic { width: 18px; height: 18px; color: var(--gold); flex: none; }
.mv-teach span { flex: 1; } .mv-teach b { color: #ffe1a0; }
.learn { margin-top: 14px; }
.ln-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.ln-head h4 { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: #dfe5ff; }
.ln-seg .seg-b em { font-style: normal; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: #f2b84b; color: #1b1406; font-size: 11px; font-weight: 800; }
.ln-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: min(420px, calc(52 * var(--uvh, 1vh))); overflow: auto; overscroll-behavior: contain; }
.ln-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 8px 6px 6px; border-radius: 12px; background: rgba(255,255,255,.04); border-left: 3px solid var(--c); }
.ln-row[data-drag] { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.ln-row.known, .ln-row.later, .ln-row.missing { opacity: .55; }
.ln-txt { display: grid; gap: 1px; min-width: 0; }
.ln-txt b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ln-txt small { color: var(--muted); font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ln-txt small em { font-style: normal; color: var(--gold); font-weight: 800; }
.ln-state { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.ln-state.known { color: #8fe0a0; } .ln-state .ic { width: 14px; height: 14px; }
.ln-none { margin: 6px 2px; font-size: 13px; }
.mv-ghost { position: fixed; z-index: 9999; pointer-events: none; margin: 0; list-style: none; transform: scale(1.04) rotate(-1.5deg); box-shadow: 0 14px 30px rgba(0,0,0,.5); opacity: .95; }
.mv-card.drop-on { outline: 3px solid #f2b84b; outline-offset: 1px; transform: none; }
.ln-row .mv-ty { grid-area: auto; grid-row: 1; grid-column: 1; } .ln-row .ln-txt { grid-row: 1; grid-column: 2; } .ln-row > :last-child { grid-row: 1; grid-column: 3; }

/* ================================================================ unified panel system (menu pass)
   One look for every menu panel: tab strips are one segmented track (equal-width pills, the active one white), empty
   states sit in the middle of the space, and the Adventure Story page leads with the current goal. */
.tabs:not(.set-nav) { flex-wrap: nowrap; gap: 4px; padding: 4px; border-radius: 16px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none; }
.tabs:not(.set-nav)::-webkit-scrollbar { display: none; }
.tabs:not(.set-nav) .tab { flex: 1 0 auto; justify-content: center; border-radius: 12px; background: transparent; border-color: transparent; white-space: nowrap; }
.tabs:not(.set-nav) .tab:hover:not(.on) { background: rgba(255, 255, 255, .06); }
.tabs:not(.set-nav) .tab.on { background: #fff; border-color: #fff; color: #13204a; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.modal.tall .modal-body > .empty:only-child, .modal.tall .sp-body > .empty:only-child { min-height: 60%; justify-content: center; }

/* ---------------------------------------------------------------- Adventure · Story (js/panels.js storyPage) */
.qlog .qnow { position: relative; padding: 16px; border-radius: 18px; margin-bottom: 12px; overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0, rgba(255, 207, 74, .2), transparent 55%), linear-gradient(160deg, #2a2a6a, #1a1f4a);
  border: 1px solid rgba(255, 207, 74, .5); box-shadow: 0 8px 22px rgba(4, 8, 22, .35); }
.qnow .qc-kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); }
.qnow .qc-kicker .ic { width: 14px; height: 14px; }
.qnow h3 { margin: 6px 0 4px; font-size: 21px; line-height: 1.15; color: #fff; }
.qnow p { margin: 0; font-size: 14px; line-height: 1.45; color: #dde5ff; }
.qnow-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; }
.qnow-meta .qc-where, .qnow-meta .qc-reward { margin: 0; padding: 5px 10px; border-radius: 999px; background: rgba(0, 0, 0, .28); }
.qnow-meta .qc-reward small { font-size: 10.5px; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.qlog .qact { padding: 14px; }
.qact-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qact-n { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.qact h3 { margin: 2px 0 8px; font-size: 16px; }
.qact .ql-bar { margin-bottom: 10px; }
.qlog .sec { margin-top: 16px; }
.qlog details.qcard summary { align-items: center; }
.qlog details.qcard summary h3 { margin: 0; font-size: 15px; }
.qlog .qc-mini { padding: 10px 14px; }
.qlog .qc-mini h3 { margin: 0; font-size: 15px; }
.qlog .ql-total { margin-top: 14px; }

/* ---------------------------------------------------------------- Rankings: your row stands out, tap your card to find it */
.sp-you { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--gold); color: #2a1a00; font-size: 10.5px; font-weight: 900;
  letter-spacing: .4px; text-transform: uppercase; vertical-align: 1px; }
.sp-brow.me { border-color: rgba(255, 207, 74, .75); background: linear-gradient(90deg, rgba(255, 207, 74, .18), rgba(255, 207, 74, .05)); box-shadow: inset 4px 0 0 var(--gold); }
.sp-brow.me.flash { animation: sp-flash 1.1s var(--ease); }
@keyframes sp-flash { 30% { box-shadow: inset 4px 0 0 var(--gold), 0 0 0 3px rgba(255, 207, 74, .6); } }
.sp-mecard[data-act] { cursor: pointer; }
.sp-mecard[data-act]:hover { border-color: rgba(255, 207, 74, .7); }
.sp-board .sp-score { min-width: 56px; }
.sp-board .sp-score b { font-size: 17px; }
/* phones: tab strips fit the width (labels only, the icons go), so no tab hides off the edge */
@media (max-width: 480px) {
  .tabs:not(.set-nav) .tab, html.touch .tabs.swipe:not(.set-nav) .tab, html.touch.portrait .tabs.swipe.pg-tabs .tab, html.touch .tabs.swipe.ql-tabs .tab {
    flex: 1 1 auto; min-width: 0; padding: 6px 8px; gap: 4px; font-size: 13px; }
  .tabs:not(.set-nav) .tab > .ic { display: none; }
}

/* ---- type matchups (js/typematch.js): tap any type badge */
.type-chip { cursor: pointer; }
.tm-card { max-height: calc(86 * var(--uvh, 1vh)); }
.tm-card .hs-head b { font-size: 16px; }
.tm-pick { display: flex; flex-wrap: wrap; gap: 5px; }
.tm-pt { border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); background: transparent; color: #dfe6ff; border-radius: 999px;
  padding: 4px 9px; font: 800 11px Nunito, sans-serif; text-transform: uppercase; letter-spacing: .3px; cursor: pointer; opacity: .62; }
.tm-pt.on { background: var(--c); border-color: var(--c); color: #111; opacity: 1; box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.tm-pt:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.tm-body { overflow-y: auto; display: grid; gap: 12px; padding-right: 2px; overscroll-behavior: contain; }
.tm-sec h4 { margin: 0 0 6px; font: 900 12px Nunito, sans-serif; letter-spacing: .6px; text-transform: uppercase; color: #9fb0d8; }
.tm-sec { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); border-radius: 14px; padding: 10px; }
.tm-sec.bad { border-color: rgba(255,110,110,.28); }
.tm-sec.ok { border-color: rgba(110,220,150,.28); }
.tm-row { display: grid; grid-template-columns: 44px 1fr; gap: 2px 8px; align-items: center; padding: 4px 0; }
.tm-row small { grid-column: 2; color: #8f9cc0; font-size: 11.5px; font-weight: 700; }
.tm-x { grid-row: span 2; display: grid; place-items: center; height: 30px; border-radius: 9px; font: 900 14px Nunito, sans-serif; color: #fff; background: #3a4468; }
.tm-row.hot .tm-x { background: #e2373b; } .tm-row.warm .tm-x { background: #ff7a3d; }
.tm-row.cool .tm-x { background: #2f9e5b; } .tm-row.cold .tm-x { background: #1f7a45; } .tm-row.zero .tm-x { background: #5a6280; }
.tm-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.tm-chip { cursor: default; }
.tm-none { margin: 2px 0; color: #8f9cc0; font-size: 12.5px; font-weight: 700; }
.tm-team { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 0; }
.tm-tag { font: 900 11px Nunito, sans-serif; text-transform: uppercase; letter-spacing: .4px; padding: 4px 8px; border-radius: 8px; min-width: 64px; text-align: center; }
.tm-tag.good { background: rgba(47,158,91,.25); color: #8ff0b5; } .tm-tag.risky { background: rgba(226,55,59,.22); color: #ffb0b0; }
.tm-mon { display: inline-flex; align-items: center; gap: 5px; background: rgba(255,255,255,.06); border-radius: 999px; padding: 2px 9px 2px 3px; }
.tm-mon img { width: 26px; height: 26px; object-fit: contain; }
.tm-mon b { font-size: 12.5px; } .tm-mon small { color: #b9c6ea; font-weight: 800; font-size: 11px; }
.tm-card .icon-btn { width: 36px; height: 36px; border-radius: 11px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #fff; font-size: 16px; cursor: pointer; }
.tm-card .icon-btn:hover, .tm-card .icon-btn:focus-visible { background: rgba(255,255,255,.14); outline: none; }

/* Adventure · Story: the quest helper switch, side quests you can track (js/panels.js storyPage) */
.qlog .ql-helper { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; padding: 8px 10px 8px 14px;
  border-radius: 14px; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); font-size: 13.5px; font-weight: 800; color: #dde5ff; cursor: pointer; }
.qlog .ql-helper > span { display: inline-flex; align-items: center; gap: 6px; }
.qlog .ql-helper .ic { width: 16px; height: 16px; }
.qlog .qside { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.qlog .qside.on { border-color: rgba(255, 207, 74, .6); box-shadow: inset 4px 0 0 var(--gold); }
.qside-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qside-tag { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .1);
  font-size: 11.5px; font-weight: 900; color: #fff; }
.qside.on .qside-tag { background: var(--gold); color: #2a1a00; }
.qside-tag .ic { width: 12px; height: 12px; }
.qlog .qcard .qc-reward small { font-size: 10.5px; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin-right: 6px; }

/* the password form (Account): closed behind its row until "Change" */
.pw-form[hidden] { display: none; }
.pw-note { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.pw-note .ic { width: 16px; height: 16px; flex: none; }
.pw-form label small { font-size: 11.5px; font-weight: 700; color: var(--muted); opacity: .8; }
.pw-acts { display: flex; gap: 8px; justify-content: flex-end; }
.pw-form .pw-acts .btn { align-self: auto; }
#pw-open[hidden] { display: none; }

/* Poké Mart: Buy | Sell switch on top (always visible), and the treasure sell list as compact rows that fit one screen */
.mart-mode { display: flex; gap: 6px; margin: 0 0 10px; }
.mart-mode button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border-radius: 12px;
  font-weight: 800; font-size: 15px; background: rgba(255, 255, 255, .06); color: inherit; border: 1px solid rgba(255, 255, 255, .12); cursor: pointer; }
.mart-mode button.on { background: linear-gradient(180deg, #ffd34d, #f0a91c); color: #2a1a00; border-color: transparent; }
.mart-mode button svg { width: 18px; height: 18px; }
.shop.mart-sell { display: flex; flex-direction: column; gap: 8px; }
.mart-sell-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mart-sell-top small { flex: 1; min-width: 160px; }
.mart-sell-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px; }
.mart-sell-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: rgba(255, 255, 255, .05); }
.mart-sell-row .msr-n { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mart-sell-row .msr-n b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mart-sell-row .btn { min-height: 36px; padding: 0 10px; }

/* Poké Mart, every screen: the (i) info button, and Total + Buy on one row */
.shop-right .detail { position: relative; }
.shop-i { margin-left: auto; flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: inherit; font: 800 15px/1 Georgia, serif; font-style: italic; cursor: pointer; }
.shop-i.on { background: var(--gold); color: #2a1a00; border-color: transparent; }
.shop-buyrow { display: flex; align-items: center; gap: 10px; }
.shop-buyrow .total { flex: 1; }
.shop-buyrow .buy { flex: 1; min-height: 44px; }

/* Poké Mart on phones: everything on one screen. 4-column compact grid that scrolls on its own, and a compact buy bar
   pinned under it (item, (i), quantity, Total + Buy); the description opens with (i) */
@media (max-width: 760px) {
  .shop:not(.mart-sell) { display: flex; flex-direction: column; gap: 8px; }
  .shop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; max-height: calc(46 * var(--uvh, 1vh)); }
  .shop-item { padding: 6px 3px 5px; gap: 2px; border-radius: 10px; }
  /* the icon's own box is sized (it stayed 52 px with a 30 px picture at its top: an empty band under the icon) */
  .shop-item .item-art { width: 38px !important; height: 38px !important; display: grid; place-items: center; flex: none; }
  .shop-item .item-art img, .shop-item .item-art svg, .shop-item .item-img { width: 100% !important; height: 100% !important; object-fit: contain; }
  .shop-item b { font-size: 10.5px; line-height: 1.15; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .shop-item .price { font-size: 10.5px; padding: 0 5px; }
  .shop-item .own { top: 3px; right: 4px; font-size: 9.5px; }
  .shop-right { gap: 6px; padding: 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
  .shop-right .money-pill { align-self: flex-end; font-size: 12px; padding: 2px 8px; margin-bottom: -30px; }
  .shop-right .detail { display: flex; align-items: center; gap: 8px; padding-right: 80px; }
  .shop-right .detail .item-art { width: 36px !important; height: 36px !important; flex: none; }
  .shop-right .detail .item-art img, .shop-right .detail .item-art svg { width: 100%; height: 100%; }
  .shop-right .detail small { font-size: 11px; }
  .shop-right .desc { display: none; margin: 0; font-size: 12.5px; }
  .shop-right .desc.open { display: block; }
  .shop-right .qty { gap: 4px; }
  .shop-right .qty .btn { min-height: 36px; padding: 0 8px; }
  .shop-right .qty input { width: 52px; }
  .shop-after { display: none; }
  .shop-buyrow .total { display: flex; flex-direction: column; line-height: 1.1; }
  .mart-mode { margin-bottom: 4px; }
  .mart-mode button { min-height: 40px; }
}
/* Events: the Shiny Hunt card (js/calendar.js): the mystery mark, "Next shiny in", one countdown per region */
.cal-ic.cal-q { background: radial-gradient(circle, rgba(255, 207, 74, .28), transparent 70%); }
.cal-ic.cal-q svg { width: 38px; height: 38px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4)); animation: cal-q 2.4s ease-in-out infinite; }
@keyframes cal-q { 50% { transform: translateY(-2px) scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .cal-ic.cal-q svg { animation: none; } }
.cal-hnext { display: block; margin: 2px 0 1px; font-size: 13.5px; color: var(--gold); }
.cal-hreg { margin: 6px 0 2px; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.cal-hreg b { font-size: 13px; color: #fff; }
.cal-hreg em { font-style: normal; font-weight: 700; font-size: 10.5px; color: var(--muted); }
