/* One Piece Card Game theme: a ship's deck at sunset on the Grand Line. Deep
   sea-blue surfaces, rope-and-brass edges, bold Unbounded titles over Outfit
   text, and the six card colours. Everything here is original; no
   publisher artwork or logos. */
:root {
  --bg: #071a30;
  --bg2: #0f2c4c;
  --ink: #fbf3e2;
  --muted: #b9c6d6;
  --surface: rgba(10, 32, 58, 0.82);
  --toggle-bg: rgba(10, 32, 58, 0.74);
  --surface-solid: #0c2440;
  --edge: rgba(242, 201, 76, 0.32);
  --line: rgba(251, 243, 226, 0.1);
  --accent: #f2c94c;
  --accent-2: #ff6a5a;
  --accent-ink: #1e1204;
  --display: "Unbounded", "Outfit", system-ui, sans-serif;
  --sans: "Outfit", system-ui, sans-serif;
  --shadow: 0 22px 50px rgba(1, 8, 20, 0.6);
  --shadow-soft: 0 10px 26px rgba(1, 8, 20, 0.4);
  --veil: radial-gradient(120% 90% at 50% 30%, rgba(7, 26, 48, 0.05), rgba(7, 26, 48, 0.55) 70%, rgba(7, 26, 48, 0.88));
  --brass: linear-gradient(135deg, #8a5a12, #f9dc8a 30%, #c8901e 50%, #fbe6a8 70%, #8a5a12);
  --card-back: radial-gradient(circle at 50% 50%, #f2c94c 0 14%, transparent 15%), radial-gradient(circle at 50% 50%, #0f2c4c 0 40%, #e0303a 41% 45%, #0c2440 46%);
  color-scheme: dark;
}
body { font-size: 17.5px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; }
h4 { font-weight: 700; }
h1 { text-shadow: 0 2px 22px rgba(1, 8, 20, 0.7); }
.kicker, .focus-kicker, .meta-row dt, .fact-grid dt, .zone-label, .field span, .search-group, .switcher-head { letter-spacing: 0.14em; }
.btn, .chip-btn, .topnav a, .tabs button, .scope-toggle a, .crumbs a { font-weight: 600; }
.scene { background: radial-gradient(100% 70% at 50% 0%, #1f5a8a, #071a30 70%); }

/* Brass-and-rope frames */
.set-hero, .focus-panel, .toolbar, .prose-block, .htp-win, .htp-type, .phase, .sources, .card-modal, .enc-card, .quick, .showcase-card {
  border: 1px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, rgba(249, 220, 138, 0.62), rgba(138, 90, 18, 0.28) 35%, rgba(255, 106, 90, 0.2) 65%, rgba(249, 220, 138, 0.62)) border-box;
}
.card-modal { background: linear-gradient(var(--surface-solid), var(--surface-solid)) padding-box, var(--brass) border-box; border: 1.5px solid transparent; }
.set-hero, .prose-block, .focus-panel { position: relative; }
.set-hero::before, .focus-panel::before { content: ""; position: absolute; inset: 6px; border: 1px dashed rgba(242, 201, 76, 0.2); border-radius: calc(var(--r-lg) - 6px); pointer-events: none; }
.btn-primary { background: var(--brass); color: var(--accent-ink); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset, 0 8px 24px rgba(242, 201, 76, 0.3); }
.btn-ghost, .chip-btn, .search-toggle, .switcher-btn { background: rgba(10, 32, 58, 0.86); border-color: rgba(242, 201, 76, 0.4); }
.brand-game { background: transparent; color: var(--accent); border: 1px solid rgba(242, 201, 76, 0.5); font-family: var(--display); font-weight: 700; font-size: 0.74rem; letter-spacing: 0.02em; }
.topbar { background: linear-gradient(180deg, rgba(7, 26, 48, 0.86), rgba(7, 26, 48, 0.35)); }
.topbar.is-scrolled { background: rgba(7, 26, 48, 0.9); box-shadow: 0 1px 0 rgba(242, 201, 76, 0.25); }
.tabs button[aria-selected="true"], .scope-toggle a[aria-selected="true"], .mode-switch a[aria-current] { background: var(--brass); color: var(--accent-ink); }
.tl-headline { font-family: var(--display); letter-spacing: -0.02em; }
.footer { background: rgba(4, 16, 30, 0.95); }

/* The six colours */
.col-red { --ic: #e0303a; } .col-green { --ic: #22a35f; } .col-blue { --ic: #2a7fd4; } .col-purple { --ic: #8a45b0; } .col-black { --ic: #3a3d46; } .col-yellow { --ic: #f2c51b; }
.col-dot { display: inline-block; width: 0.85em; height: 0.85em; border-radius: 50%; vertical-align: -0.06em; margin: 0 2px; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--ic, #888) 40%, #fff), var(--ic, #888)); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4), 0 1px 3px rgba(0, 0, 0, 0.5); }
.col-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 6px; border-radius: 999px; font-size: 0.86rem; font-weight: 600; background: color-mix(in srgb, var(--ic, #888) 24%, transparent); border: 1px solid color-mix(in srgb, var(--ic, #888) 60%, transparent); }
.col-tag.col-black { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.35); }
.op-stats-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 10px; }
.op-cost, .op-life { display: inline-flex; align-items: center; gap: 6px; }
.op-cost b, .op-life b { display: inline-grid; place-items: center; width: 2em; height: 2em; border-radius: 50%; font: 800 1rem/1 var(--display); color: var(--accent-ink); background: var(--brass); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35); }
.op-life b { border-radius: 6px; background: linear-gradient(160deg, #ff8a7a, #c8202a); color: #fff; }
.op-cost i, .op-life i { font-style: normal; font-size: 0.8rem; color: var(--muted); }
.op-stat { display: inline-flex; gap: 5px; align-items: center; padding: 2px 10px; border-radius: 8px; font-size: 0.9rem; background: rgba(251, 243, 226, 0.07); border: 1px solid var(--line); }
.op-stat b { font-family: var(--display); font-size: 0.86rem; }
.op-attr { color: var(--accent); }
.op-parallel { display: inline-block; margin-left: 10px; padding: 2px 9px; border-radius: 999px; font: 700 0.7rem/1.4 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; vertical-align: middle; color: var(--accent-ink); background: var(--brass); font-style: normal; }
.op-text { padding: 12px 16px; margin: 8px 0; border-radius: 12px; background: rgba(251, 243, 226, 0.05); border: 1px solid rgba(242, 201, 76, 0.2); }
.op-text p { margin: 0 0 6px; }
.op-trigger { border-color: rgba(242, 197, 27, 0.5); background: rgba(242, 197, 27, 0.08); }
.kw { display: inline-block; padding: 0 7px; margin: 0 2px 2px 0; border-radius: 6px; font-size: 0.8em; font-weight: 700; line-height: 1.6; color: #fff; background: #3a5a80; }
.kw-on-play, .kw-when-attacking, .kw-on-k-o, .kw-on-block, .kw-end-of-your-turn, .kw-your-turn, .kw-opponents-turn, .kw-on-your-opponents-attack { background: #2a7fd4; }
.kw-activate-main, .kw-main { background: #c86a1a; }
.kw-counter { background: #c8202a; }
.kw-trigger { background: #c8a010; color: #1e1204; }
.kw-blocker, .kw-rush, .kw-double-attack, .kw-banish { background: #6a3aa0; }
.kw-don, .kw-don-x, .kw-don-1 { background: #1e1e26; box-shadow: inset 0 0 0 1px #f2c94c; color: #f2c94c; }
.kw-once-per-turn { background: #b8202a; }
.enc-links .chip { text-decoration: none; }
.enc-links .chip:hover, .set-stories .chip:hover { border-color: var(--accent); color: var(--accent); }
.set-stories { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 0; font-size: 0.92rem; }
.set-stories .chip { text-decoration: none; }

/* Card tiles: the effect is an aura around the card so the image stays untouched */
.card-tile { background: rgba(8, 26, 48, 0.9); border-color: rgba(242, 201, 76, 0.22); }
.card-tile .card-img { aspect-ratio: 600 / 838; border-radius: 3.5% / 2.5%; background: #04101e; }
.card-tile::after { top: calc(var(--pad) - 6px); left: calc(var(--pad) - 6px); right: calc(var(--pad) - 6px); z-index: 0; border-radius: 14px; filter: blur(3px); }
.card-tile.is-lit::after { opacity: 0.95; }
.card-tile .card-img { z-index: 1; }
.card-tile.is-lit { border-color: color-mix(in srgb, var(--tc) 60%, #f2c94c); }
.card-tile.is-lit::before { opacity: calc(0.16 + var(--far, 0) * 0.16); }
.is-lit[data-foil]::before { opacity: calc(0.14 + var(--far, 0) * 0.14); }
.cm-card .card-img { aspect-ratio: 600 / 838; overflow: visible; }
.cm-card .card-img::after { inset: -14px; z-index: -1; border-radius: 22px; filter: blur(6px); opacity: 0.85; }
.cm-card .card-img img { border-radius: 3.5% / 2.5%; position: relative; z-index: 1; object-fit: contain; }
.cm-card .card-img::before { z-index: 2; border-radius: 3.5% / 2.5%; }
.cm-stage { background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--tc) 30%, transparent), transparent 70%), radial-gradient(120% 100% at 50% 0%, #174a74, #071a30); }
.printing-card img { aspect-ratio: 600 / 838; object-fit: contain; }

/* Timeline plaques: card art in a brass frame with an original ship's-wheel badge */
.op-pack { width: 230px; }
.plaque { position: relative; display: grid; grid-template-rows: 160px auto auto; justify-items: center; gap: 6px; padding: 12px 12px 14px; border-radius: 16px; text-align: center; background: linear-gradient(#0f2c4c, #071a30) padding-box, var(--brass) border-box; border: 2px solid transparent; box-shadow: var(--shadow); }
.plaque-art { width: 100%; height: 160px; border-radius: 10px; overflow: hidden; background: #123a62; box-shadow: inset 0 0 0 1px rgba(249, 220, 138, 0.3); }
.plaque-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 16%; transform: scale(1.14); transform-origin: 50% 0; }
.plaque .plaque-icon { margin-top: -38px; width: 64px; height: 64px; display: grid; place-items: center; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.55)); }
.op-emblem { width: 100%; height: 100%; display: block; }
.plaque-name { font-family: var(--display); font-size: 0.92rem; line-height: 1.2; min-height: 2.4em; display: grid; place-items: center; letter-spacing: -0.01em; }
.plaque-year { font-style: normal; color: var(--accent); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.1em; }
.is-upcoming .plaque { filter: saturate(0.75); }
.is-upcoming .plaque-year { color: var(--accent-2); }
.op-chapter { background: linear-gradient(#0f2c4c, #071a30) padding-box, var(--brass) border-box; border: 2px solid transparent; width: 200px; }
.op-chapter .chapter-year { font-size: 2.4rem; font-family: var(--display); font-weight: 800; color: transparent; background: var(--brass); -webkit-background-clip: text; background-clip: text; }
.op-chapter strong { font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.op-chapter em { font-size: 0.92rem; color: var(--ink); }
.skel-pack { width: 70px; height: 70px; border-radius: 50%; background: conic-gradient(#e0303a 0 16.6%, #22a35f 16.6% 33.3%, #2a7fd4 33.3% 50%, #8a45b0 50% 66.6%, #3a3d46 66.6% 83.3%, #f2c51b 83.3%); animation: spin 1.6s linear infinite; mask: radial-gradient(circle, transparent 42%, #000 44%); -webkit-mask: radial-gradient(circle, transparent 42%, #000 44%); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Set page hero */
.op-plaque { position: relative; display: grid; justify-items: center; gap: 8px; }
.op-plaque .plaque-art { height: auto; aspect-ratio: 600 / 838; max-width: 280px; border-radius: 14px; border: 2px solid transparent; background: linear-gradient(#071a30, #071a30) padding-box, var(--brass) border-box; }
.op-plaque .plaque-art img { transform: none; object-position: 50% 50%; animation: none; filter: none; max-height: none; }
.op-plaque .plaque-icon { margin-top: -48px; width: 88px; height: 88px; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.55)); animation: none; }
.op-plaque .plaque-credit { text-align: center; }
.op-set .set-hero { grid-template-columns: minmax(200px, 300px) 1fr; }
@media (max-width: 640px) { .op-set .set-hero { grid-template-columns: minmax(0, 1fr); } .op-plaque .plaque-art { width: min(100%, 260px); } .scope-toggle a { font-size: min(0.9rem, 3vw); } h1 { letter-spacing: -0.03em; } }

/* Battle: the card in a brass porthole, framed on the character */
.op-battle .bt-fig { border-radius: 50%; overflow: hidden; border: 3px solid transparent; background: linear-gradient(#071a30, #071a30) padding-box, var(--brass) border-box; box-shadow: 0 0 30px color-mix(in srgb, var(--fc) 50%, transparent); }
.op-battle .bt-fig img { object-fit: cover; object-position: 50% 24%; transform: scale(1.5); transform-origin: 50% 24%; animation: none; filter: none; }
.op-battle .bt-right .bt-fig img { transform: scale(1.5); }
.op-battle .bt-fx { inset: 0; }
.op-battle.battle { height: clamp(260px, 30vw, 340px); }
.op-battle .bt-fig { width: clamp(96px, 13vw, 160px); }
.op-battle .bt-arena { align-items: center; }
.battle { background: radial-gradient(120% 90% at 50% 120%, rgba(255, 106, 90, 0.22), transparent 60%), rgba(8, 26, 48, 0.8); }

/* Encyclopedia */
.enc-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; }
.enc-tabs a { text-decoration: none; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(242, 201, 76, 0.4); font-weight: 600; font-size: 0.9rem; }
.enc-tabs a[aria-current] { background: var(--brass); color: var(--accent-ink); }
.enc-sec { margin-top: 34px; }
.op-enc strong { font-family: var(--display); font-size: 0.92rem; letter-spacing: -0.01em; }
.op-enc .enc-art { display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #123a62; margin-bottom: 8px; }
.op-enc .enc-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; transform: scale(1.15); transform-origin: 50% 0; transition: transform 0.5s var(--ease); }
.op-enc:hover .enc-art img { transform: scale(1.22); }
.pip-btn { display: inline-flex; gap: 6px; align-items: center; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); opacity: 0.6; }
.pip-btn[aria-pressed="true"] { opacity: 1; border-color: var(--accent); }
.op-leader-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.entry-hero { display: grid; grid-template-columns: minmax(180px, 300px) 1fr; gap: 28px; align-items: center; margin-bottom: 8px; }
.entry-art { margin: 0; }
.op-entry-art img { width: 100%; aspect-ratio: 600 / 838; object-fit: contain; border-radius: 14px; border: 2px solid transparent; background: linear-gradient(#071a30, #071a30) padding-box, var(--brass) border-box; }

/* World & How to Play */
.op-wheel { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.col-c { display: grid; justify-items: start; gap: 4px; padding: 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: inset 0 3px 0 var(--ic); transition: transform 0.3s var(--ease); }
.col-c.col-black { box-shadow: inset 0 3px 0 #9aa0ac; }
.col-c:hover { transform: translateY(-4px); }
.col-c span { color: var(--muted); font-size: 0.95rem; }
.col-gem { width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--ic) 35%, #fff), var(--ic) 60%, color-mix(in srgb, var(--ic) 60%, #000)); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25); }
.life-dial { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, #174a74, #071a30); box-shadow: 0 0 0 3px #f2c94c; }
.life-dial b { font-family: var(--display); font-size: 2rem; color: var(--accent); animation: life 6s steps(1) infinite; }
@keyframes life { 0% { opacity: 1; } 50% { opacity: 0.35; } 55% { opacity: 1; } }
.bench i.tapped { transform: rotate(90deg); }
.bench i.leader { box-shadow: 0 0 0 2px #f2c94c, 0 0 18px rgba(242, 201, 76, 0.5); }
.lands i.don { background: radial-gradient(circle at 50% 50%, #f2c94c 0 22%, #1e1e26 24%); box-shadow: inset 0 0 0 2px rgba(242, 201, 76, 0.55); }
.slot-big .card-back { background: linear-gradient(160deg, #174a74, #0c2440); }
.op-types { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.type-glyph { font-size: 2rem; color: var(--accent); line-height: 1; }
.op-turn { grid-template-columns: repeat(5, 1fr); }
.op-world { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 26px; }
@media (max-width: 980px) { .op-turn { grid-template-columns: 1fr; } .entry-hero { grid-template-columns: 1fr; } }
[data-entry-grid] .card-tile[hidden] { display: none; }
