:root {
  color-scheme: dark;
  --ink: #f1efeb;
  --muted: #a5a2a2;
  --line: #353437;
  --paper: #161618;
  --panel: #202023;
  --red: #ef6159;
  --red-hover: #ff766d;
  --mono: 'DM Mono', ui-monospace, monospace;
  --sans: 'Space Grotesk', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: #111113; color: var(--ink); font-family: var(--sans); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
button, a, input, select { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--red); }
button { transition: background .15s, border-color .15s, transform .15s; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.app-shell { max-width: 1600px; min-height: 100vh; margin: auto; background: var(--paper); }
.eyebrow { color: var(--muted); font: 10px var(--mono); letter-spacing: .12em; line-height: 1.6; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; background: var(--red); color: #181719; font: 500 12px var(--mono); border-radius: 7px; }
.status-dot { display: inline-block; width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--red); }
.topbar { height: 84px; padding: 0 36px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #19191b; }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-link { text-decoration: none; }
.brand-lockup h1 { font-size: 23px; font-weight: 600; letter-spacing: -.06em; line-height: 1.1; }
.brand-lockup h1 span, .setup-heading h2 span { color: var(--red); }
.brand-lockup .eyebrow { font-size: 8px; margin-top: 5px; letter-spacing: .14em; }
.topbar-meta { display: flex; align-items: center; gap: 25px; }
.topbar-location { display: flex; align-items: center; gap: 8px; font: 9px var(--mono); color: var(--muted); letter-spacing: .06em; margin-right: 10px; }
.run-stat { display: flex; align-items: center; gap: 8px; font: 10px var(--mono); }
.run-stat span { color: var(--muted); }
.run-stat strong { font-weight: 400; }
.help-button { text-decoration: none; font-size: 12px; }
.help-button span { margin-left: 8px; color: var(--muted); }
.help-button:hover { color: var(--red); }
.icon-button { width: 34px; height: 34px; background: transparent; border: 1px solid var(--line); border-radius: 5px; font-size: 20px; }
.icon-button:hover { background: #303033; }
.main-menu { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.menu-content { min-height: 720px; display: flex; flex-direction: column; justify-content: center; padding: 75px 12% 35px; position: relative; }
.menu-brand .brand-mark { margin-bottom: 75px; width: 44px; height: 44px; }
.menu-brand .eyebrow { color: var(--red); }
.menu-brand h1 { margin-top: 18px; font-size: clamp(58px, 6.5vw, 105px); font-weight: 500; letter-spacing: -.09em; line-height: 1.03; }
.menu-brand h1 span { color: var(--red); }
.menu-tagline { margin-top: 26px; color: var(--muted); font-size: 17px; line-height: 1.7; }
.menu-actions { display: grid; gap: 12px; max-width: 310px; margin: 44px 0 85px; }
.menu-primary, .menu-secondary { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; font-size: 14px; }
.menu-primary { background: var(--red); color: #171719; border-color: var(--red); font-weight: 600; }
.menu-primary:hover { background: var(--red-hover); }
.menu-secondary { background: transparent; }
.menu-secondary:hover { background: var(--panel); border-color: #656065; }
.menu-secondary b { color: var(--muted); font-weight: 400; }
.menu-footer { position: absolute; bottom: 30px; left: 12%; right: 12%; display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font: 8px var(--mono); letter-spacing: .05em; }
.menu-footer .status-dot { margin-right: 6px; width: 5px; height: 5px; }
.menu-art { position: relative; overflow: hidden; background-color: #242426; background-image: linear-gradient(45deg,#29292b 25%,transparent 25%,transparent 75%,#29292b 75%),linear-gradient(45deg,#29292b 25%,transparent 25%,transparent 75%,#29292b 75%); background-position: 0 0, 10px 10px; background-size: 20px 20px; border-left: 1px solid var(--line); }
.art-coordinate { position: absolute; top: 40px; left: 35px; font: 9px var(--mono); letter-spacing: .1em; color: #999599; }
.menu-orbit { position: absolute; width: 520px; height: 520px; top: 50%; left: 50%; border: 1px solid #4b4143; border-radius: 50%; transform: translate(-50%,-50%); }
.menu-orbit:after { content: ''; position: absolute; inset: 44px; border: 1px solid #4b4143; border-radius: 50%; }
.specimen { position: absolute; padding: 22px; border: 1px solid #9f9790; border-radius: 10px; background: #e6e2db; color: #242226; box-shadow: 0 16px 35px #0003; }
.specimen > span, .specimen > i { display: block; font: 8px var(--mono); letter-spacing: .05em; }
.specimen img { image-rendering: pixelated; }
.specimen-front { z-index: 2; width: 270px; left: 16%; top: 30%; transform: rotate(-8deg); }
.specimen-front img { width: 205px; height: 205px; margin: 8px auto; }
.specimen-front strong { font-size: 23px; line-height: 1.2; letter-spacing: -.04em; }
.specimen-front i { margin-top: 23px; padding-top: 13px; border-top: 1px solid #bbb4ac; font-size: 7px; }
.specimen-back { width: 200px; right: 9%; top: 17%; transform: rotate(12deg); background: #b87870; border-color: #b87870; }
.specimen-back img { width: 160px; height: 160px; }
.specimen-back strong { font-size: 15px; }
.specimen-small { width: 150px; right: 8%; bottom: 16%; transform: rotate(9deg); background: #c7c5c4; }
.specimen-small img { width: 110px; height: 110px; }
.specimen-small span { font-size: 7px; margin-top: 10px; }
.art-caption { position: absolute; left: 35px; right: 35px; bottom: 30px; display: flex; justify-content: space-between; align-items: center; color: #b6b0ad; font: 8px var(--mono); letter-spacing: .12em; }
.art-caption > span:last-child { color: var(--red); font-size: 26px; }
.setup-screen { padding: 36px; }
.setup-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.setup-heading h2 { margin: 8px 0 10px; font-size: clamp(27px, 2.7vw, 39px); font-weight: 500; letter-spacing: -.06em; line-height: 1.15; }
.setup-heading > p:last-child { color: var(--muted); font-size: 13px; line-height: 1.6; }
.setup-steps { display: flex; align-items: center; gap: 14px; color: #8c888b; font: 10px var(--mono); white-space: nowrap; }
.setup-steps span { display: flex; align-items: center; gap: 8px; }
.setup-steps b { font: 11px var(--sans); }
.setup-steps i { width: 25px; height: 1px; background: var(--line); }
.setup-steps .current { color: var(--red); }
.setup-steps .current b { color: var(--ink); }
.starter-workspace { display: grid; grid-template-columns: 260px minmax(0,1fr) 218px; gap: 16px; align-items: stretch; }
.pokemon-detail, .collection-panel, .party-panel { min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); overflow: hidden; }
.pokemon-detail { display: flex; flex-direction: column; }
.detail-art { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 265px; background-color: #cececa; background-image: repeating-linear-gradient(0deg,transparent 0 3px,#ffffff1c 3px 4px); color: #555459; padding: 18px; }
.detail-art:after { content: ''; position: absolute; bottom: 43px; left: 24%; width: 52%; height: 15px; background: #3836381c; border-radius: 50%; }
.detail-art-top { display: flex; justify-content: space-between; font: 10px var(--mono); letter-spacing: .06em; }
.detail-art-top span:last-child { color: #767277; }
.detail-art img { width: 205px; height: 205px; align-self: center; image-rendering: pixelated; position: relative; z-index: 1; }
.detail-types { display: flex; gap: 6px; position: relative; z-index: 1; }
.type-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 4px; background: #353339; color: #d9d4da; font: 9px var(--mono); line-height: 1; text-transform: uppercase; letter-spacing: .04em; }
.type-pill.verdant { color: #cae4b0; background: #394c36; }
.type-pill.ember { color: #ffd2b6; background: #6b3c31; }
.type-pill.water { color: #c4e6f3; background: #365568; }
.type-pill.stone { color: #e3d4ba; background: #5e5345; }
.type-pill.electric { color: #f7e9ac; background: #645c33; }
.type-pill.spirit { color: #e5d4f3; background: #564064; }
.detail-copy { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.detail-name-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.detail-name-row h3 { font-size: 25px; font-weight: 500; letter-spacing: -.045em; }
.detail-name-row > span { color: var(--muted); font: 9px var(--mono); }
.detail-description { margin: 9px 0 22px; color: var(--muted); font-size: 12px; line-height: 1.6; min-height: 38px; }
.detail-stats { display: grid; gap: 12px; }
.detail-stat { display: grid; grid-template-columns: 52px 1fr 22px; align-items: center; gap: 10px; font: 10px var(--mono); }
.detail-stat > span { color: var(--muted); font-size: 9px; }
.stat-track { height: 4px; background: #373438; border-radius: 2px; overflow: hidden; }
.stat-track i { display: block; height: 100%; background: #bbb1a9; border-radius: inherit; }
.detail-stat:nth-child(2) .stat-track i { background: var(--red); }
.detail-stat strong { font-weight: 400; text-align: right; }
.detail-trait { margin-top: 23px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 11px; }
.detail-trait > span { color: var(--muted); }
.detail-add { margin-top: 22px; width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 12px; color: var(--ink); background: transparent; border: 1px solid #6b4545; border-radius: 5px; font-size: 11px; }
.detail-add:hover { background: #382a2c; border-color: var(--red); }
.detail-add.selected { border-color: #575056; color: #c8c2c5; }
.detail-add:disabled { color: #827b7f; border-color: var(--line); }
.collection-panel { display: flex; flex-direction: column; }
.collection-heading { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 16px; }
.collection-heading .eyebrow { font-size: 8px; }
.collection-heading h3 { margin-top: 4px; font-size: 15px; font-weight: 500; letter-spacing: -.025em; }
.collection-total { font: 10px var(--mono); border: 1px solid #444047; border-radius: 5px; padding: 5px 7px; color: #c3bbc1; }
.collection-tools { display: flex; gap: 8px; padding: 0 16px; }
.search-field { min-width: 0; flex: 1; display: flex; align-items: center; gap: 9px; background: #18181a; border: 1px solid var(--line); border-radius: 5px; padding: 0 10px; }
.search-field:focus-within { border-color: var(--red); }
.search-field svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--muted); }
.search-field input { min-width: 0; width: 100%; height: 37px; border: 0; background: transparent; color: var(--ink); outline: none; font-size: 11px; }
.search-field input::placeholder { color: #928c92; }
.sort-field select { width: 100%; height: 39px; border: 1px solid var(--line); border-radius: 5px; background: #18181a; color: #c5bdc2; padding: 0 8px; font: 10px var(--mono); }
.type-filters { display: flex; flex-wrap: wrap; gap: 4px; padding: 12px 16px 14px; }
.type-filters button { border: 1px solid transparent; border-radius: 4px; background: transparent; padding: 6px 7px; display: flex; align-items: center; gap: 5px; font-size: 10px; color: #b4acb3; }
.type-filters button:hover { background: #343035; }
.type-filters button.active { background: #422c30; color: #ffb0aa; border-color: #73434a; }
.type-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #8ea681; flex: 0 0 auto; }
.type-dot.ember { background: #d78766; }.type-dot.water { background: #7ba8c2; }.type-dot.stone { background: #af9c86; }.type-dot.electric { background: #d5be6e; }.type-dot.spirit { background: #ab8abf; }
.roster-surface { margin: 0 12px; padding: 12px; flex: 1; min-height: 380px; border-radius: 5px; background-color: #c3c1bf; background-image: linear-gradient(45deg,#bcbab8 25%,transparent 25%,transparent 75%,#bcbab8 75%),linear-gradient(45deg,#bcbab8 25%,transparent 25%,transparent 75%,#bcbab8 75%); background-size: 12px 12px; background-position: 0 0,6px 6px; }
.pokemon-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 5px; align-content: start; }
.pokemon-tile { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 7px 3px 8px; border: 1px solid transparent; border-radius: 4px; color: #3c373d; background: transparent; }
.pokemon-tile:hover { background: #efebe975; border-color: #aaa2a2; }
.pokemon-tile.previewing { background: #f7f1e9b5; border-color: #b44d4b; box-shadow: inset 0 0 0 1px #b44d4b; }
.pokemon-tile.previewing:before, .pokemon-tile.previewing:after { content: ''; position: absolute; width: 9px; height: 9px; border-color: #ac3337; border-style: solid; }
.pokemon-tile.previewing:before { top: -2px; left: -2px; border-width: 3px 0 0 3px; }
.pokemon-tile.previewing:after { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; }
.pokemon-tile.selected { background-color: #ead5d078; }
.tile-number { align-self: flex-start; color: #615b5e; font: 8px var(--mono); padding-left: 2px; }
.pokemon-tile img { width: 62px; height: 62px; image-rendering: pixelated; }
.tile-name { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; font-weight: 500; }
.tile-selected { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: #a33d3e; color: #fff3ea; font: 9px var(--mono); }
.pokemon-tile:focus-visible { outline: 2px solid #84242c; outline-offset: 1px; z-index: 1; }
.collection-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 43px; padding: 12px 17px; color: #a39ca1; font: 8px var(--mono); }
.collection-footer kbd { font: inherit; color: #dad2d7; }
.collection-footer i { padding: 0 4px; font-style: normal; }
.collection-empty { min-height: 280px; display: flex; flex-direction: column; justify-content: center; align-items: center; color: #4b434b; text-align: center; gap: 10px; }
.collection-empty img { width: 48px; height: 48px; opacity: .6; margin-bottom: 6px; }
.collection-empty strong { font-size: 15px; }
.collection-empty p { font-size: 12px; }
.collection-empty .text-button { color: #8b292e; }
.party-panel { display: flex; flex-direction: column; padding: 20px 14px 14px; }
.party-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 3px; }
.party-heading .eyebrow { font-size: 7px; letter-spacing: .08em; }
.party-heading h3 { margin-top: 5px; font-size: 18px; font-weight: 500; letter-spacing: -.03em; }
.party-count { font: 11px var(--mono); color: var(--red); white-space: nowrap; }
.random-button { margin: 19px 0 14px; display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; border: 1px solid #494148; border-radius: 5px; background: transparent; font-size: 11px; padding: 10px; }
.random-button svg { width: 15px; height: 15px; color: var(--red); }
.random-button:hover { background: #332a2f; border-color: #966267; }
.party-slots { display: grid; gap: 7px; }
.party-slot { display: flex; align-items: center; gap: 8px; padding: 7px 9px; min-width: 0; min-height: 58px; border: 1px dashed #444047; border-radius: 5px; background: #1b1b1e; color: #938b92; }
.party-slot > span:first-child { width: 12px; flex: 0 0 auto; font: 8px var(--mono); color: #8f868e; }
.party-slot > img { width: 34px; height: 34px; image-rendering: pixelated; opacity: .35; }
.party-slot > small { font-size: 10px; color: #989097; }
.party-slot.filled { border-style: solid; border-color: #594349; background: #2b2327; }
.party-slot.filled > img { opacity: 1; width: 38px; height: 38px; }
.party-member-copy { min-width: 0; flex: 1; }
.party-member-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 500; }
.party-member-copy small { display: flex; align-items: center; gap: 4px; margin-top: 4px; color: #a69aA2; font: 7px var(--mono); }
.remove-member { flex: 0 0 auto; background: transparent; border: 0; color: #ba9ba5; width: 26px; height: 30px; border-radius: 4px; font-size: 17px; }
.remove-member:hover { color: #ffc5c0; background: #5a343c; }
.party-bottom { margin-top: auto; padding-top: 12px; }
.text-button { border: 0; background: transparent; color: #c7b7be; padding: 6px 0; font-size: 11px; text-decoration: none; }
.text-button:hover { color: var(--red); }
.text-button:disabled { color: #766d74; }
.clear-party { display: block; margin: 0 auto 13px; font-size: 10px; }
.party-bottom p { color: #a99ca4; font-size: 10px; text-align: center; line-height: 1.5; margin-bottom: 12px; }
.end-turn-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 24px; padding: 13px 16px; background: var(--red); color: #21191c; border: 1px solid var(--red); border-radius: 5px; font-size: 12px; font-weight: 600; text-decoration: none; }
.end-turn-button b { font-size: 17px; font-weight: 400; }
.end-turn-button:hover { background: var(--red-hover); border-color: var(--red-hover); }
.end-turn-button:disabled { background: #383035; border-color: #4c3e45; color: #a88b96; }
.start-button { width: 100%; }
.selection-footer { display: flex; justify-content: space-between; gap: 15px; margin-top: 20px; color: #9b9299; font-size: 10px; }
.selection-footer > span:first-child { font: 8px var(--mono); letter-spacing: .035em; }
.selection-footer .status-dot { width: 5px; height: 5px; margin-right: 6px; }
.route-strip { padding: 20px 36px; border-bottom: 1px solid var(--line); background: #1c1b1e; }
.route-heading { display: flex; justify-content: space-between; margin-bottom: 15px; }
.route-heading > span { color: var(--muted); font: 9px var(--mono); }
.route-heading strong { color: var(--ink); font-weight: 400; }
.route-line { display: flex; align-items: flex-start; max-width: 570px; margin: auto; }
.route-node { display: grid; justify-items: center; gap: 6px; min-width: 42px; color: #a199a1; }
.route-node > span { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid #54494f; border-radius: 50%; font: 9px var(--mono); }
.route-node small { font: 8px var(--mono); }
.route-node.active { color: var(--red); }
.route-node.active > span { background: var(--red); color: #251b20; border-color: var(--red); box-shadow: 0 0 0 3px #ef61591f; }
.route-node.complete > span { border-color: #8d555c; color: #d99295; }
.route-connector { flex: 1; height: 1px; background: var(--line); margin-top: 12px; }
.route-connector.complete { background: #84515a; }
.encounter-setup { max-width: 1240px; margin: auto; padding-top: 32px; }
.encounter-preview { display: flex; align-items: center; gap: 22px; margin-top: 25px; padding: 18px 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; }
.preview-orb { flex: 0 0 auto; width: 100px; height: 100px; border-radius: 5px; background: #ccc9c4; }
.preview-orb img { width: 100%; height: 100%; image-rendering: pixelated; }
.preview-details h3 { margin: 4px 0 10px; font-size: 23px; font-weight: 500; letter-spacing: -.04em; }
.preview-stats { display: flex; gap: 17px; color: #b9a9af; font: 10px var(--mono); }
.preview-stats b { color: var(--ink); font-weight: 400; }
.preview-details > p:last-child { color: var(--muted); margin-top: 10px; font-size: 11px; }
.encounter-tag { margin-left: auto; align-self: flex-start; font: 8px var(--mono); color: #a2979e; }
.setup-team { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px; margin-top: 25px; }
.setup-card { display: block; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); text-align: center; }
.setup-card:hover { border-color: #90707a; background: #2c242a; }
.setup-card.selected { border-color: var(--red); background: #35272c; }
.setup-card-top { display: flex; justify-content: space-between; gap: 5px; color: var(--muted); font: 8px var(--mono); }
.setup-card.selected .setup-card-top { color: #ffa9a1; }
.setup-card-top b { font-weight: 400; }
.setup-orb { display: block; width: 100px; height: 100px; margin: 12px auto; image-rendering: pixelated; }
.setup-card h3 { font-size: 14px; font-weight: 500; }
.setup-card p { margin-top: 10px; color: #c3b4bc; font: 8px var(--mono); }
.setup-card small { display: block; margin-top: 9px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.setup-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; }
.setup-footer > div { display: flex; align-items: center; gap: 20px; }
.setup-footer #encounter-count { font: 10px var(--mono); color: var(--muted); }
.battle-layout { display: grid; grid-template-columns: 220px minmax(0,1fr) 210px; margin: auto; max-width: 1400px; }
.side-panel { padding: 30px 20px; border-right: 1px solid var(--line); }
.right-panel { border-right: 0; border-left: 1px solid var(--line); }
.panel-title { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.panel-title > span { color: #9e929a; font: 9px var(--mono); }
.panel-title h2 { font-size: 13px; font-weight: 500; }
.crew-list { display: grid; gap: 12px; }
.crew-member { display: flex; gap: 9px; align-items: center; padding: 10px 7px; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; }
.mini-orb { width: 37px; height: 37px; flex: 0 0 auto; display: grid; place-items: center; }
.mini-orb img { width: 100%; height: 100%; image-rendering: pixelated; }
.member-data { min-width: 0; flex: 1; }
.member-data > div:first-child { display: flex; justify-content: space-between; align-items: center; gap: 3px; }
.member-data strong { font-size: 10px; font-weight: 500; }
.member-data span { font: 7px var(--mono); color: var(--muted); }
.member-data small { display: block; font: 7px var(--mono); color: var(--muted); margin-top: 5px; }
.mini-health { margin-top: 7px; height: 3px; background: #42353d; }
.mini-health i { display: block; height: 100%; background: var(--red); }
.side-note { display: flex; align-items: baseline; gap: 8px; margin-top: 20px; font-size: 10px; line-height: 1.6; color: var(--muted); }
.battle-stage { min-width: 0; padding: 30px; }
.stage-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.stage-header h2 { font-size: 28px; font-weight: 500; letter-spacing: -.055em; margin-top: 5px; }
.turn-badge { display: flex; align-items: center; gap: 7px; color: #ffb0a8; font: 8px var(--mono); white-space: nowrap; padding-top: 6px; }
.enemy-zone { position: relative; min-height: 248px; margin-top: 22px; padding: 27px 22px 48px; border: 1px solid var(--line); border-radius: 6px; background: #242124; overflow: hidden; }
.enemy-copy { position: relative; z-index: 1; }
.enemy-level { color: var(--muted); font: 9px var(--mono); }
.enemy-level .type-pill { margin-left: 6px; font-size: 8px; }
.enemy-copy h3 { margin-top: 14px; font-size: 30px; font-weight: 500; letter-spacing: -.05em; }
.enemy-copy p { margin-top: 4px; max-width: 56%; color: var(--muted); font-size: 11px; }
.enemy-orb { position: absolute; top: 8px; right: 4%; width: 195px; height: 195px; }
.enemy-orb img { width: 100%; height: 100%; image-rendering: pixelated; }
.health-block { width: 44%; max-width: 220px; position: relative; margin-top: 21px; }
.health-label { display: flex; justify-content: space-between; gap: 5px; font: 8px var(--mono); color: var(--muted); margin-bottom: 7px; }
.health-label strong { color: var(--ink); font-weight: 400; }
.health-track { height: 5px; background: #4e373d; border-radius: 2px; overflow: hidden; }
.health-fill { height: 100%; background: var(--red); transition: width .3s; }
.intent-preview { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 15px; background: #34262b; border-top: 1px solid #51343c; color: #d8a5aa; font: 8px var(--mono); line-height: 1.5; }
.intent-preview strong { color: #f1c1be; font-weight: 400; margin-left: 8px; }
.combat-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--muted); font: 9px var(--mono); }
.combat-divider b { color: var(--ink); font-weight: 400; }
.combat-divider i { height: 1px; background: var(--line); flex: 1; }
.hand-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; font: 9px var(--mono); color: #c9bbc3; }
.hand-heading strong { margin-left: 7px; color: #a899a2; font-weight: 400; }
.hint { font: 10px var(--sans); color: var(--muted); }
.unit-board { margin-bottom: 25px; }
.unit-slots { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.unit-slot { min-width: 0; padding: 10px; background: var(--panel); border: 1px solid #4b3c43; border-radius: 5px; }
.slot-top { display: flex; justify-content: space-between; color: #b7a6b0; font: 8px var(--mono); }
.slot-top b { font-weight: 400; }
.slot-orb { width: 64px; height: 64px; margin: 0 auto 4px; }
.slot-orb img { width: 100%; height: 100%; image-rendering: pixelated; }
.occupied-slot h3 { text-align: center; font-size: 12px; font-weight: 500; }
.slot-stats { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px; margin-top: 10px; color: #b2a1ac; font: 8px var(--mono); }
.slot-stats b { color: var(--ink); font-weight: 400; }
.slot-health { height: 3px; background: #4a353d; margin-top: 9px; }
.slot-health i { display: block; height: 100%; background: var(--red); }
.empty-slot { display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 150px; color: var(--muted); border-style: dashed; }
.empty-slot span { font: 9px var(--mono); }.empty-slot strong { font-size: 11px; }.empty-slot small { font-size: 9px; }
.card-hand { display: flex; gap: 10px; padding: 6px 2px 12px; overflow-x: auto; scroll-snap-type: x proximity; }
.game-card { display: block; flex: 0 0 140px; width: 140px; min-height: 210px; border: 1px solid #64505b; border-radius: 7px; padding: 10px; background: #29232b; text-align: left; scroll-snap-align: start; }
.game-card:hover { transform: translateY(-4px); border-color: #ce8b94; background: #332933; }
.game-card:disabled { opacity: .55; }
.game-card:disabled:hover { transform: none; border-color: #64505b; background: #29232b; }
.card-top { display: flex; align-items: center; justify-content: space-between; font: 8px var(--mono); color: #c4afbe; }
.card-cost { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: #dba3a2; color: #281d25; font-size: 11px; }
.card-art { display: grid; place-items: center; height: 76px; background: #433644; margin: 9px 0; border-radius: 3px; }
.card-art img { width: 56px; height: 56px; image-rendering: pixelated; }
.card-info h3 { font-size: 13px; font-weight: 500; }
.card-info strong { display: block; margin: 5px 0; font: 7px var(--mono); color: #bca3b3; }
.card-info p { color: #c4b4bd; font-size: 10px; line-height: 1.5; }
.stage-actions { display: flex; align-items: center; gap: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.stage-actions .end-turn-button { flex: 0 0 auto; }
.stage-actions p { color: var(--muted); font-size: 11px; line-height: 1.5; }
.relic-card { display: flex; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.relic-icon { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; background: #493039; color: #f5a39e; border-radius: 6px; font-size: 20px; }
.relic-icon.muted { background: transparent; border: 1px dashed #53414b; color: #9b7d90; }
.relic-card strong { display: block; font-size: 11px; font-weight: 500; }
.relic-card span { display: block; margin-top: 5px; font-size: 10px; line-height: 1.5; color: var(--muted); }
.deck-summary { display: flex; gap: 35px; margin-top: 30px; }
.deck-summary span { display: block; color: var(--muted); font: 8px var(--mono); margin-bottom: 8px; }
.deck-summary strong { font: 21px var(--mono); }
.toast { position: fixed; z-index: 100; bottom: 24px; left: 50%; max-width: calc(100% - 32px); transform: translate(-50%,12px); padding: 13px 20px; background: #f1d4ce; color: #3a232c; border: 1px solid #efada4; border-radius: 6px; box-shadow: 0 8px 30px #0004; font-size: 12px; text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s,transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.tutorial-hero { padding: 60px 6% 35px; }
.tutorial-hero h2 { font-size: clamp(38px,5vw,64px); font-weight: 500; letter-spacing: -.065em; margin: 10px 0 15px; }
.tutorial-hero > p:last-child { max-width: 550px; color: var(--muted); line-height: 1.7; }
.tutorial-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin: 0 6%; }
.tutorial-step { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 24px; }
.step-number { font: 9px var(--mono); color: var(--muted); }
.step-icon { display: grid; place-items: center; width: 42px; height: 42px; margin: 25px 0 20px; color: #ffb6ae; background: #493038; border-radius: 5px; }
.tutorial-step h3 { font-size: 17px; font-weight: 500; letter-spacing: -.03em; }
.tutorial-step p { margin-top: 12px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.example-panel { display: grid; grid-template-columns: 160px 1fr; gap: 25px; margin: 40px 6% 0; padding: 25px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.example-panel h3 { font-size: 17px; margin-top: 5px; font-weight: 500; }
.example-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; font-size: 12px; }
.example-flow b { color: var(--red); margin-right: 6px; font: 11px var(--mono); }
.example-flow i { font-style: normal; color: var(--muted); }
.example-note { grid-column: 2; color: var(--muted); font-size: 11px; line-height: 1.6; }
.tutorial-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 30px 6%; font: 9px var(--mono); color: var(--muted); }
@media (min-width: 1450px) { .starter-workspace { grid-template-columns: 290px minmax(0,1fr) 240px; gap: 20px; }.roster-surface { padding: 16px; }.pokemon-tile img { width: 70px; height: 70px; }.detail-art img { width: 230px; height: 230px; }.detail-art { min-height: 290px; }.party-slot { min-height: 63px; } }
@media (max-width: 1150px) { .topbar, .route-strip { padding-left: 24px; padding-right: 24px; }.setup-screen { padding: 28px 24px; }.starter-workspace { grid-template-columns: 220px minmax(0,1fr) 190px; gap: 12px; }.setup-steps { gap: 8px; }.setup-steps i { width: 14px; }.pokemon-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }.detail-art { min-height: 235px; padding: 14px; }.detail-art img { width: 180px; height: 180px; }.detail-copy { padding: 17px; }.party-panel { padding-left: 10px; padding-right: 10px; }.party-slot { gap: 5px; padding: 7px 5px; }.party-slot.filled > img { width: 30px; height: 30px; }.party-heading .eyebrow { font-size: 6px; }.battle-layout { grid-template-columns: 190px minmax(0,1fr); }.right-panel { display: none; }.setup-team { grid-template-columns: repeat(3,minmax(0,1fr)); }.topbar-location { display: none; }.detail-name-row h3 { font-size: 22px; }.tile-name { font-size: 10px; } }
@media (max-width: 850px) {
  .setup-heading-row { align-items: flex-start; }.setup-steps { display: none; }
  .starter-workspace { grid-template-columns: 210px minmax(0,1fr); }
  .party-panel { grid-column: 1 / -1; padding: 18px; display: grid; grid-template-columns: 1fr auto; gap: 16px; }
  .party-heading { justify-content: flex-start; gap: 15px; }.party-heading .eyebrow { font-size: 8px; }
  .random-button { width: auto; margin: 0; padding: 10px 14px; align-self: center; }
  .party-slots { grid-column: 1 / -1; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .party-slot { padding: 8px; }.party-slot.filled > img { width: 36px; height: 36px; }
  .party-bottom { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0; }
  .clear-party { margin: 0; }.party-bottom p { margin: 0; }.start-button { width: 180px; }
  .selection-footer { flex-wrap: wrap; }.pokemon-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .collection-footer > span:last-child { display: none; }
  .main-menu { grid-template-columns: 1fr; }.menu-content { min-height: 640px; padding: 65px 9% 55px; }.menu-brand .brand-mark { margin-bottom: 50px; }.menu-footer { left: 9%; right: 9%; }.menu-brand h1 { font-size: 80px; }.menu-art { min-height: 550px; border-left: 0; border-top: 1px solid var(--line); }.specimen-front { top: 15%; left: 20%; }.specimen-back { top: 10%; right: 16%; }.specimen-small { right: 15%; bottom: 12%; }
  .tutorial-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.encounter-tag { display: none; }
}
@media (max-width: 600px) {
  .topbar { height: 72px; padding: 0 16px; }.topbar-meta { gap: 13px; }.brand-lockup h1 { font-size: 20px; }.brand-mark { width: 33px; height: 33px; }.brand-lockup .eyebrow { font-size: 6px; }.topbar .run-stat { display: none; }.help-button { font-size: 10px; }
  .setup-screen { padding: 25px 14px; }.setup-heading-row { margin-bottom: 23px; }.setup-heading h2 { font-size: 30px; }.setup-heading > p:last-child { font-size: 12px; }
  .starter-workspace { display: flex; flex-direction: column; gap: 14px; }
  .pokemon-detail { display: grid; grid-template-columns: 42% minmax(0,1fr); }
  .detail-art { min-height: 245px; padding: 12px 10px; }.detail-art-top { font-size: 8px; }.detail-art img { width: 160px; height: 160px; }.detail-art:after { bottom: 55px; }.detail-art-top span:last-child { display: none; }
  .detail-copy { padding: 15px 13px; }.detail-name-row { align-items: flex-start; gap: 5px; }.detail-name-row h3 { font-size: 20px; }.detail-name-row > span { font-size: 7px; padding-top: 6px; white-space: nowrap; }.detail-description { margin: 7px 0 13px; font-size: 10px; min-height: 30px; }.detail-stats { gap: 9px; }.detail-stat { grid-template-columns: 43px 1fr 20px; gap: 7px; }.detail-stat > span { font-size: 8px; }.detail-trait { margin-top: 13px; padding-top: 10px; font-size: 9px; }.detail-add { margin-top: 12px; font-size: 10px; padding: 9px; }
  .collection-heading { padding: 16px; }.pokemon-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }.pokemon-tile img { width: 65px; height: 65px; }.pokemon-tile { padding-bottom: 9px; }.roster-surface { min-height: 320px; padding: 10px; }.type-filters { gap: 4px; }.type-filters button { font-size: 10px; }.collection-footer { font-size: 9px; }
  .party-panel { padding: 16px 12px; gap: 13px; }.party-heading h3 { font-size: 17px; }.party-slots { grid-template-columns: repeat(2,minmax(0,1fr)); }.party-bottom { flex-wrap: wrap; }.party-bottom p { font-size: 9px; }.start-button { width: 100%; }.party-slot > small { font-size: 9px; }.party-slot.filled > img { width: 34px; height: 34px; }.party-heading .eyebrow { font-size: 7px; }
  .selection-footer { font-size: 10px; line-height: 1.6; }.selection-footer > span:first-child { font-size: 7px; }
  .route-strip { padding: 18px 16px; }.route-heading .eyebrow { font-size: 8px; }.route-node small { font-size: 7px; }
  .encounter-preview { padding: 14px; gap: 14px; }.preview-orb { width: 75px; height: 75px; }.preview-details h3 { font-size: 20px; }.preview-stats { gap: 9px; font-size: 9px; }.preview-details > p:last-child { font-size: 10px; line-height: 1.5; }
  .setup-team { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }.setup-card { padding: 12px; }.setup-footer { align-items: flex-start; }.setup-footer > div { flex-direction: column; align-items: flex-end; gap: 12px; }.setup-footer .end-turn-button { padding: 12px; gap: 14px; }
  .battle-layout { display: block; }.left-panel { display: none; }.battle-stage { padding: 24px 14px; }.stage-header h2 { font-size: 25px; }.turn-badge { font-size: 7px; }.enemy-zone { padding-left: 16px; padding-right: 16px; }.enemy-orb { width: 160px; height: 160px; right: 0; top: 25px; }.enemy-copy h3 { font-size: 27px; }.health-block { width: 48%; }.enemy-copy p { font-size: 10px; }.combat-divider { gap: 7px; font-size: 8px; }.hint { display: none; }.unit-slots { gap: 7px; }.unit-slot { padding: 8px; }.slot-stats { font-size: 7px; }.occupied-slot h3 { font-size: 10px; }.stage-actions { align-items: flex-start; flex-direction: column; gap: 12px; }.game-card { flex-basis: 137px; width: 137px; }
  .menu-content { min-height: 620px; padding-left: 25px; padding-right: 25px; }.menu-brand h1 { font-size: clamp(60px,16vw,80px); }.menu-brand .eyebrow { font-size: 9px; }.menu-tagline { font-size: 16px; }.menu-footer { left: 25px; right: 25px; font-size: 7px; }.menu-art { min-height: 500px; }.specimen-front { left: 9%; top: 20%; width: 230px; }.specimen-front img { width: 170px; height: 170px; }.specimen-front strong { font-size: 20px; }.specimen-back { width: 160px; right: 8%; }.specimen-back img { width: 120px; height: 120px; }.specimen-small { right: 5%; width: 115px; padding: 13px; bottom: 12%; }.specimen-small img { width: 85px; height: 85px; }.specimen-small span { font-size: 6px; }.art-coordinate { top: 25px; left: 25px; }
  .tutorial-hero { padding: 40px 20px 25px; }.tutorial-grid { margin: 0 20px; gap: 10px; }.tutorial-step { padding: 17px; }.tutorial-step h3 { font-size: 16px; }.tutorial-step p { font-size: 11px; }.example-panel { display: block; margin: 30px 20px 0; }.example-flow { margin: 20px 0; gap: 10px; }.example-note { font-size: 11px; }.tutorial-footer { margin: 25px 20px; align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { transition: none !important; scroll-behavior: auto !important; } }

.party-member-copy strong { color: var(--ink); }
@media (max-width: 600px) {
  .party-slot > span:first-child { display: none; }
  .party-slot { gap: 6px; padding: 7px 6px; }
  .party-slot.filled > img { width: 28px; height: 28px; }
  .party-slot .remove-member { width: 24px; }
}
.menu-content, .menu-art { min-width: 0; }
@media (max-width: 600px) {
  .menu-brand h1 { font-size: clamp(46px, 15vw, 80px); }
}

/* Motion stays in a clipped, noninteractive layer so it never shifts the layout. */
.motion-layer { position: fixed; inset: 0; z-index: 70; overflow: hidden; pointer-events: none; }
.motion-effect { position: absolute; pointer-events: none; user-select: none; }
.motion-ghost > *, .motion-card-flight > * { width: 100%; height: 100%; margin: 0; }
.motion-card-flight { transform-origin: center; filter: drop-shadow(0 14px 18px #0007); }
.motion-card-flight .game-card { background: #4a303b; border-color: #ffb3a3; opacity: 1; }
.motion-sprite-flight img { width: 100%; height: 100%; image-rendering: pixelated; filter: drop-shadow(0 5px 5px #0005); }
.motion-effect * { pointer-events: none !important; animation: none !important; }
.motion-projectile { width: 12px; height: 12px; background: #ffd9ba; border: 2px solid #ff8d70; border-radius: 3px; box-shadow: 0 0 16px #ef61598c; opacity: 0; }
.motion-projectile.enemy { background: #cde4ac; border-color: #91b277; box-shadow: 0 0 14px #a7bf9a8c; }
.motion-number { color: #ffd4c5; font: 600 28px var(--sans); text-shadow: 0 2px 0 #281820, 0 0 12px #281820; white-space: nowrap; z-index: 3; }
.motion-number.heal { color: #d2f3bd; font-size: 22px; }
.motion-ring { width: 48px; height: 48px; border: 3px solid #ffb599; border-radius: 50%; box-shadow: 0 0 15px #ef615933; }
.motion-ring.heal { border-color: #c5e5ac; box-shadow: 0 0 16px #a7bf9a55; }
.motion-cue { display: flex; align-items: center; gap: 12px; padding: 11px 17px; border: 1px solid #8a5258; border-radius: 6px; background: #261d25f5; box-shadow: 0 5px 25px #0003; white-space: nowrap; }
.motion-cue strong { font: 500 11px var(--mono); color: #ffc0ad; letter-spacing: .08em; }
.motion-cue span { font: 9px var(--mono); color: #c5b3bc; }
.enemy-orb, .slot-orb { transform-origin: 50% 85%; }
.slot-health i, .mini-health i { transition: width .4s cubic-bezier(.22, 1, .36, 1); }
.unit-slot.fainted .slot-orb { filter: grayscale(1); opacity: .4; transform: translateY(5px) rotate(-12deg); }
.unit-slot.fainted { border-color: #40383e; background: #1d1b1f; }
.unit-slot.fainted .slot-top b { color: #b58c96; }
.battle-layout.victorious .enemy-orb { opacity: .25; filter: grayscale(.7); transform: translateY(12px) scale(.94); transition: opacity .5s, filter .5s, transform .5s; }
.resolving .turn-badge .status-dot { background: #f0be9d; }
.resolving .game-card:disabled { opacity: .68; }
.game-card { transition: transform .2s cubic-bezier(.22,1,.36,1), border-color .18s, background .18s, opacity .18s, box-shadow .18s; }
.game-card:not(:disabled):hover, .game-card:not(:disabled):focus-visible { transform: translateY(-5px); box-shadow: 0 7px 18px #0004; }
.pokemon-tile img { transition: transform .2s cubic-bezier(.22,1,.36,1), filter .2s; }
.pokemon-tile:hover img, .pokemon-tile:focus-visible img { transform: translateY(-3px) scale(1.07); filter: drop-shadow(0 3px 0 #57454a26); }
.party-slot { transition: border-color .2s, background .2s; }
.party-slot.filled:hover { border-color: #a36872; background: #35272e; }
.type-filters button:active, .random-button:active, .remove-member:active, .detail-add:active,
.end-turn-button:not(:disabled):active, .menu-primary:active, .menu-secondary:active, .icon-button:active { transform: scale(.97); }
.start-button:not(:disabled) { box-shadow: 0 3px 15px #ef615919; }
@keyframes companion-idle { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }
@keyframes menu-arrive { from { opacity: 0; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: no-preference) {
  .main-menu:not([hidden]) .menu-brand, .main-menu:not([hidden]) .menu-actions { animation: menu-arrive .6s cubic-bezier(.22,1,.36,1) both; }
  .main-menu:not([hidden]) .menu-actions { animation-delay: .12s; }
  .main-menu:not([hidden]) .specimen img { animation: companion-idle 4s ease-in-out infinite; }
  .main-menu:not([hidden]) .specimen-back img { animation-delay: -.8s; }
  .starter-screen:not([hidden]) .detail-art img { animation: companion-idle 3.5s ease-in-out infinite; }
  .battle-layout:not([hidden]):not(.resolving):not(.victorious) .enemy-orb img { animation: companion-idle 3.8s ease-in-out infinite; }
  .battle-layout:not([hidden]):not(.resolving) .unit-slot:not(.fainted) .slot-orb img { animation: companion-idle 3.1s ease-in-out infinite; }
  .unit-slot:nth-child(2) .slot-orb img { animation-delay: -.7s !important; }
  .unit-slot:nth-child(3) .slot-orb img { animation-delay: -1.4s !important; }
}
@media (max-width: 600px) {
  .motion-cue { gap: 8px; padding: 9px 12px; }
  .motion-cue strong { font-size: 9px; }
  .motion-cue span { font-size: 8px; }
  .motion-number { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .pokemon-tile:hover img, .pokemon-tile:focus-visible img, .game-card:not(:disabled):hover,
  .game-card:not(:disabled):focus-visible { transform: none; }
}

/* Card pickup, targeting, and dealing share a single pointer-transparent layer. */
.hand-heading { min-height: 40px; }
.hand-tools { display: flex; align-items: center; gap: 18px; }
.draw-pile { display: flex; align-items: center; gap: 10px; color: #c9adb9; font: 8px var(--mono); }
.draw-pile > i { display: grid; place-items: center; width: 26px; height: 35px; font: 8px var(--mono); color: #f2b3a4; background: repeating-linear-gradient(45deg,#482d38 0 3px,#33252e 3px 6px); border: 1px solid #a37178; border-radius: 4px; box-shadow: 3px 2px 0 #241d25, 4px 2px 0 #725060, 6px 4px 0 #241d25, 7px 4px 0 #594250; }
.draw-pile > span { display: grid; gap: 4px; }.draw-pile b { color: var(--ink); font: 12px var(--mono); }
.game-card { touch-action: pan-x pinch-zoom; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.game-card img { -webkit-user-drag: none; pointer-events: none; }
.game-card:not(:disabled) { cursor: grab; }
.card-hand { padding-top: 14px; padding-bottom: 18px; }
.card-hand .game-card.drag-source { opacity: .16 !important; transform: none !important; border-style: dashed; box-shadow: inset 0 0 0 1px #9f6d78; }
.card-drag-active, .card-drag-active * { cursor: grabbing !important; user-select: none !important; }
.motion-card-drag { z-index: 8; transform-origin: 50% 70%; filter: drop-shadow(0 18px 14px #0007); will-change: left, top, transform; }
.motion-card-drag > .game-card, .motion-card-return > .game-card { width: 100%; height: 100%; opacity: 1; margin: 0; transform: none !important; border-color: #d9aaa9; box-shadow: 0 0 0 1px #eec3ad26; }
.motion-card-drag.over-target > .game-card { border-color: #ffceb1; background: #4a3037; box-shadow: 0 0 0 2px #ef61594d, 0 0 25px #ef61592b; }
.motion-card-flight.cast-heal { filter: drop-shadow(0 0 14px #a7bf9a88); }
.motion-card-flight.cast-draw { filter: drop-shadow(0 0 14px #c6b1e688); }
.motion-card-flight.cast-damage { filter: drop-shadow(0 0 14px #ef8b6888); }
.motion-card-return { z-index: 8; filter: drop-shadow(0 8px 12px #0004); }
.cast-particle { width: 8px; height: 8px; background: #ffc698; box-shadow: 0 0 10px #ef61594d; border-radius: 1px; }
.cast-particle.cast-heal { background: #c2eaa4; }.cast-particle.cast-draw { background: #cdb4f1; }
.card-drop-ready { outline: 1px dashed #b67976; outline-offset: 4px; transition: background .15s, box-shadow .15s; }
.card-drop-hover { outline: 2px solid #f0a18a; outline-offset: 4px; box-shadow: 0 0 0 5px #ef615914, inset 0 0 45px #ef615912; background-color: #38292e; }
.card-drag-guide { position: fixed; inset: 0; pointer-events: none; z-index: 69; overflow: hidden; }
.card-drag-guide svg { width: 100%; height: 100%; overflow: visible; }
.card-drag-guide path { stroke: #c59d92; stroke-width: 2; stroke-dasharray: 5 7; opacity: .5; fill: none; }
.card-drag-guide circle { stroke: #deb4a3; stroke-width: 2; fill: #2a2026; }
.card-drag-guide.valid-target path { opacity: .9; stroke: #ffc7a9; stroke-dasharray: none; }
.card-drag-guide.valid-target circle { fill: #ef6159; stroke: #ffdfbe; }
.card-drag-hint { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); max-width: calc(100% - 24px); padding: 11px 16px; border: 1px solid #80606c; border-radius: 6px; background: #211b22f5; color: #f4d5ca; font: 11px var(--sans); text-align: center; box-shadow: 0 8px 25px #0005; white-space: nowrap; }
.valid-target .card-drag-hint { border-color: #efaa91; color: #ffdbba; }
.motion-card-deal { perspective: 800px; transform-origin: 50% 50%; }
.deal-inner { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; }
.deal-inner > .game-card, .card-back { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.deal-inner > .game-card { opacity: 1; transform: rotateY(0deg) !important; }
.card-back { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 16px; border: 1px solid #ac7983; border-radius: 7px; background: repeating-linear-gradient(45deg,#402936 0 5px,#35232e 5px 10px); transform: rotateY(180deg); box-shadow: inset 0 0 0 7px #38232f, inset 0 0 0 8px #966473; }
.card-back > span { display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid #b48183; border-radius: 50%; color: #f2b19e; font: 18px var(--mono); }
.card-back small { color: #e9bdaf; font: 8px var(--mono); letter-spacing: .15em; }
@media (max-width: 600px) { .hand-tools { gap: 8px; }.draw-pile { font-size: 7px; }.card-drag-hint { white-space: normal; min-width: 210px; font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { .card-drag-guide svg { display: none; } }
