@charset "UTF-8";

:root {
  color-scheme: dark;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-synthesis: none;
  --ink: #1c2b2c;
  --deep: #101c25;
  --navy: #172b36;
  --teal: #8ec8b9;
  --gold: #d9bb7b;
  --paper: #eee8d9;
  --muted: #aebeb7;
  --line: rgba(218, 196, 141, .25);
}
* { box-sizing: border-box; }
html, body, #app { min-height: 100%; margin: 0; }
body { background: #101c25; color: #eff3e9; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
button:focus-visible, input:focus-visible { outline: 3px solid #efca7b; outline-offset: 3px; }
img { max-width: 100%; }
.boot-screen { min-height: 100vh; display: grid; place-items: center; color: var(--gold); letter-spacing: .1em; }
.app-shell { position: relative; min-height: 100dvh; overflow: hidden; background: #142632; }
.app-shell::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(ellipse at 80% 0, #63847b14, transparent 48%), linear-gradient(120deg, #080f14b3, transparent 50%); }
.site-header { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 clamp(20px, 4vw, 56px); background: #12242de8; border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.brand { display: flex; gap: 11px; align-items: center; min-width: 0; text-decoration: none; color: #f0ebdc; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; flex: none; border: 1px solid #c4a96b; transform: rotate(45deg); color: #e6cb8e; }
.brand-mark span { transform: rotate(-45deg); font-size: 18px; }
.brand-text { white-space: nowrap; font-family: "Batang", "Gungsuh", Georgia, serif; font-size: 18px; font-weight: 700; letter-spacing: .12em; }
.header-nav { display: flex; align-items: center; gap: 5px; }
.nav-button, .icon-button { border: 1px solid transparent; background: transparent; color: #b7c4bc; border-radius: 5px; padding: 9px 14px; font-size: 14px; white-space: nowrap; }
.nav-button:hover, .nav-button.active, .icon-button:hover { color: #fff8e8; background: #ffffff0d; border-color: #dec48238; }
.nav-button.active { color: #e6cb8d; }
.header-right { display: flex; align-items: center; gap: 15px; color: #a4b5ae; font-size: 12px; white-space: nowrap; }
.save-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #9ccfba; margin-right: 7px; box-shadow: 0 0 9px #9ccfba; }
.main-view { position: relative; z-index: 1; min-height: calc(100dvh - 68px); }
.title-screen { min-height: 100dvh; position: relative; display: flex; align-items: center; padding: clamp(28px, 5vw, 78px); background-image: linear-gradient(90deg, #0b1721f0 0%, #12232dd9 33%, #13252b70 65%, #10182029), linear-gradient(0deg,#0b1721bf,transparent 35%), url("에셋/장면%20CG/01-질버하인-첫인상.png"); background-size: cover; background-position: center; }
.title-content { max-width: 570px; padding: 35px 0; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: #e0c48a; font-size: 11px; font-weight: 700; letter-spacing: .23em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: #dbc18b; }
.title-screen h1 { margin: 28px 0 12px; font-family: "Batang", "Gungsuh", Georgia, serif; font-size: clamp(42px, 7vw, 78px); line-height: 1.15; font-weight: 600; letter-spacing: .1em; color: #fff8e8; text-shadow: 0 3px 24px #0008; }
.title-subtitle { margin: 0; color: #e5d4a6; font-family: "Batang", "Gungsuh", serif; font-size: clamp(18px, 2vw, 23px); letter-spacing: .14em; line-height: 1.5; }
.title-copy { max-width: 445px; margin: 32px 0; color: #d6dfd7; line-height: 1.9; font-size: 15px; word-break: keep-all; }
.title-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; }
.button { min-height: 44px; border: 1px solid #d5ba7f83; border-radius: 5px; background: #18363a; color: #f8f1df; padding: 11px 20px; transition: background .18s, border-color .18s, transform .18s; font-weight: 700; font-size: 14px; }
.button:hover:not(:disabled) { background: #285256; border-color: #e2ca93; transform: translateY(-1px); }
.button:disabled { opacity: .44; }
.button.primary { background: #d7bc80; color: #1b2929; border-color: #d7bc80; }
.button.primary:hover:not(:disabled) { background: #f0d59b; }
.button.ghost { background: #111e26a8; border-color: #b4bba84d; }
.button.text { border-color: transparent; background: transparent; color: #d2d9ce; }
.file-button { display: inline-flex; align-items: center; justify-content: center; position: relative; overflow: hidden; cursor: pointer; }
.file-button input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-button:focus-within { outline: 3px solid #efca7b; outline-offset: 3px; }
.title-meta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; color: #b9c8bd; font-size: 12px; margin-top: 25px; }
.title-meta span + span::before { content: "·"; margin-right: 18px; color: var(--gold); }
.title-footer { position: absolute; bottom: 25px; right: clamp(25px,4vw,58px); color: #f0e7d6a6; font-size: 11px; letter-spacing: .06em; }
.story-stage { position: absolute; inset: 0; overflow: hidden; background-color: #263e43; background-size: cover; background-position: center; }
.story-stage::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg,#12232bdf 0%,#12232b9e 50%,#12232b18 100%), linear-gradient(0deg,#102029bc,transparent 45%); }
.story-layout { position: relative; z-index: 2; width: min(1470px,100%); margin: auto; min-height: calc(100dvh - 68px); display: flex; align-items: center; padding: clamp(20px,3vw,40px) clamp(20px,4vw,58px); }
.story-paper { width: min(690px,61%); max-height: calc(100dvh - 120px); display: flex; flex-direction: column; position: relative; border: 1px solid #f8ebc4af; border-radius: 4px; color: var(--ink); background: linear-gradient(115deg,#f8f2e5f7,#e8dfccef); box-shadow: 0 22px 80px #06121980, inset 0 0 0 5px #f6f0dd55; }
.story-heading { padding: 24px 32px 18px; border-bottom: 1px solid #816f4a35; }
.story-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: #73795e; font-size: 11px; font-weight: 800; letter-spacing: .09em; }
.story-meta .dot { color: #b59661; }
.story-heading h1 { font-family: "Batang", "Gungsuh", serif; font-size: clamp(20px,2vw,27px); margin: 9px 0 0; line-height: 1.35; letter-spacing: -.025em; color: #1c3030; }
.story-scroll { overflow: auto; min-height: 145px; padding: 24px 34px 26px; overscroll-behavior: contain; scrollbar-color: #a89d80 transparent; line-height: 1.95; font-size: 16px; word-break: keep-all; }
.story-scroll p { margin: 0 0 1.15em; }
.story-scroll p:last-child { margin-bottom: 0; }
.story-scroll .dialogue { color: #264e49; font-weight: 650; }
.story-scroll blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 3px solid #b49a68; color: #5b6250; }
.story-scroll h2, .story-scroll h3 { font-family: "Batang", "Gungsuh", serif; font-size: 18px; margin: 1em 0; }
.story-speaker { display: inline-flex; color: #365e58; background: #d6e1d3; border: 1px solid #aac4b1; padding: 5px 10px; border-radius: 3px; font-size: 14px; font-weight: 800; margin-bottom: 14px; }
.story-footer { padding: 16px 30px 20px; border-top: 1px solid #816f4a35; display: flex; flex-direction: column; gap: 10px; }
.story-footer .button { align-self: flex-end; }
.choices { display: grid; gap: 8px; }
.choice { width: 100%; text-align: left; color: #28433c; background: #f8f6ec; border: 1px solid #b9b7a1; border-radius: 4px; padding: 12px 15px; line-height: 1.5; }
.choice:hover { border-color: #65897b; background: #e9f0e5; }
.choice .choice-marker { display: inline-block; margin-right: 10px; color: #b08c51; }
.story-portrait { pointer-events: none; position: absolute; right: clamp(1%,5vw,8%); bottom: 0; height: min(87%,850px); width: min(43%,600px); display: flex; align-items: end; justify-content: center; }
.story-portrait img { max-height: 100%; width: auto; object-fit: contain; object-position: bottom; filter: drop-shadow(0 10px 20px #00111a90); }
.scene-location { position: absolute; top: 28px; right: clamp(24px,4vw,60px); color: #f7efd6; font-size: 12px; text-shadow: 0 2px 8px #000; letter-spacing: .1em; }
.panel-page { min-height: calc(100dvh - 68px); padding: 34px clamp(20px,4vw,56px) 50px; background: radial-gradient(ellipse at 85% -10%,#496f6470,transparent 42%), linear-gradient(145deg,#1a3139,#10202b 75%); }
.page-inner { max-width: 1420px; margin: auto; }
.page-title { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 24px; }
.page-title h1 { margin: 8px 0 0; font: 600 clamp(25px,3vw,36px)/1.25 "Batang", "Gungsuh", serif; color: #f5eedf; }
.page-title p { color: #afc1b7; font-size: 13px; line-height: 1.7; margin: 7px 0 0; }
.small-label { color: #d6b877; font-weight: 800; font-size: 10px; letter-spacing: .18em; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.battle-page { background-position: center; background-size: cover; padding: 20px clamp(16px,3vw,44px) 30px; }
.battle-page::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg,#0d1b23dd,#142b35a3 42%,#0b1a23f5 83%); }
.battle-page .page-inner { position: relative; z-index: 1; }
.battle-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.battle-top h1 { font: 600 22px/1.3 "Batang", "Gungsuh", serif; margin: 4px 0 0; }
.turn-pill, .chip { display: inline-flex; align-items: center; border: 1px solid #cdb67a5e; color: #e7d5aa; border-radius: 99px; padding: 6px 11px; font-size: 11px; background: #122b2fbb; }
.battle-layout { display: grid; grid-template-columns: minmax(180px,230px) minmax(0,1fr) minmax(175px,220px); gap: 18px; align-items: stretch; margin-top: 18px; }
.battle-box, .side-card { background: #11252de8; border: 1px solid #d7c0874d; border-radius: 5px; padding: 15px; box-shadow: 0 14px 34px #0003; }
.battle-box h2, .side-card h2 { color: #e9d8b5; margin: 0 0 13px; font-size: 14px; }
.stat-name { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; color: #edf1e7; font-weight: 700; font-size: 14px; }
.stat-name small { color: #aec1b5; font-weight: 500; }
.meter { height: 7px; overflow: hidden; border-radius: 10px; background: #ffffff20; margin: 9px 0 6px; }
.meter > i { display: block; height: 100%; background: linear-gradient(90deg,#ad685a,#e6a37e); border-radius: inherit; }
.meter.teal > i { background: linear-gradient(90deg,#6aa89b,#a8dbc6); }
.stat-line { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: #bacbc1; }
.stat-line + .stat-line { margin-top: 9px; }
.energy { color: #f1cf78; font-size: 23px; font-weight: 800; }
.enemy-field { min-height: 250px; display: flex; align-items: end; justify-content: center; gap: 14px; padding: 5px; }
.enemy { width: min(235px,48%); min-width: 125px; display: flex; flex-direction: column; align-items: center; background: linear-gradient(0deg,#10242ce8,#142d347d 53%,transparent); border: 1px solid transparent; border-radius: 7px; padding: 10px; text-align: center; }
.enemy.selected, .target-card.selected, .battle-side-player.selected { border-color: #f4d889; box-shadow: 0 0 0 2px #f4d88970, 0 0 18px #f4d88938; }
.button.self-target.selected, .button.self-target.selected:hover:not(:disabled) { background: #ead29a; border-color: #f8df9e; color: #203632; }
.self-target:focus-visible { outline: 3px solid #fff0ba; outline-offset: 3px; }
.enemy:hover { border-color: #f2d58b99; }
.enemy img { height: clamp(115px,19vh,190px); width: 100%; object-fit: contain; filter: drop-shadow(0 8px 12px #0008); }
.enemy-name { color: #f5eee0; font-size: 14px; font-weight: 700; }
.enemy .meter { width: 100%; }
.intent { min-height: 32px; color: #f0c295; font-size: 14px; line-height: 1.45; }
.objective { border: 1px solid #b2bca759; background: #f0e8d9ed; color: #263d3c; border-radius: 5px; padding: 14px 16px; margin: 14px 0; }
.objective-title { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 14px; font-weight: 800; }
.objective p { margin: 7px 0 0; color: #596b5e; font-size: 14px; line-height: 1.55; }
.objective .meter { background: #304f3c26; }
.objective-guidance { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #52706445; color: #263f37; line-height: 1.5; }
.objective-guidance__label { color: #294f42; font-size: 14px; font-weight: 800; }
.objective-guidance__detail { flex: 1 1 260px; font-size: 15px; word-break: keep-all; }
.target-list { display: grid; gap: 8px; }
.target-card { display: block; text-align: left; background: #243d3c; border: 1px solid #acbb9d55; border-radius: 4px; padding: 10px; width: 100%; }
.target-card:hover { border-color: #e1c885; }
.battle-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 14px 0 9px; }
.battle-actions-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.battle-message { color: #d4dfd2; font-size: 14px; line-height: 1.5; }
.hand-label { color: #d7c696; font-size: 11px; font-weight: 700; letter-spacing: .08em; margin: 14px 0 8px; }
.battle-hand-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.battle-target-indicator { color: #d3ded4; font-size: 14px; }
.battle-target-indicator strong { color: #f5dda0; }
.hand { display: flex; gap: 10px; overflow-x: auto; align-items: stretch; padding: 6px 5px 14px; scrollbar-color: #a4895a #ffffff0d; }
.game-card { flex: 0 0 164px; width: 164px; min-height: 228px; padding: 5px; text-align: left; position: relative; background: #e9dfc8; color: #263c39; border: 2px solid #cbb179; border-radius: 7px; box-shadow: 0 5px 14px #0016; transition: transform .15s, box-shadow .15s; }
.game-card:hover:not(:disabled) { transform: translateY(-6px); box-shadow: 0 10px 20px #0008; }
.game-card:disabled { filter: saturate(.45); opacity: .62; }
.card-art { width: 100%; height: 112px; display: block; object-fit: cover; object-position: center 35%; border-radius: 3px; background: #61796b; }
.card-cost { position: absolute; top: -5px; left: -5px; height: 27px; min-width: 27px; padding: 2px; border: 2px solid #ead8a7; border-radius: 50%; display: grid; place-items: center; background: #315a58; color: white; font-weight: 800; font-size: 13px; }
.card-name { display: block; margin: 7px 4px 3px; font-family: "Batang", "Gungsuh", serif; font-size: 14px; font-weight: 800; line-height: 1.25; }
.card-description { display: block; margin: 0 4px 4px; font-size: 14px; color: #516159; line-height: 1.45; }
.card-help { font-size: 14px; color: #c1d0c2; }
.collection-summary { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.collection-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 14px; }
.collection-card { display: flex; flex-direction: column; overflow: hidden; background: #e9e2d1; color: #263e39; border: 1px solid #c9b784; border-radius: 5px; }
.collection-card img { width: 100%; height: 128px; object-fit: cover; object-position: center 32%; }
.collection-card-body { padding: 12px; display: flex; flex-direction: column; flex: 1; gap: 7px; }
.collection-card h3 { margin: 0; font: 700 15px "Batang", "Gungsuh", serif; }
.collection-card p { color: #59695d; margin: 0; font-size: 14px; line-height: 1.55; flex: 1; }
.collection-card .buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.collection-card .buttons button { flex: 1; min-width: 60px; border: 1px solid #8b9c85; border-radius: 3px; background: #e4eadb; color: #304940; font-size: 14px; padding: 8px; }
.collection-card .buttons button:hover:not(:disabled) { background: #cbdccb; }
.collection-card .buttons button:disabled { opacity: .45; }
.chapter-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,330px),1fr)); gap: 16px; }
.chapter-card { border: 1px solid #d2ba7b55; background: #142a31e8; border-radius: 5px; padding: 18px; }
.chapter-card h2 { margin: 0 0 13px; font: 600 17px "Batang", "Gungsuh", serif; color: #eedbb0; }
.quest-list { display: grid; gap: 5px; }
.quest-row { border: 0; background: transparent; color: #d5e0d4; padding: 8px 6px; display: flex; align-items: center; gap: 8px; text-align: left; border-radius: 3px; font-size: 14px; }
.quest-row:hover:not(:disabled) { background: #ffffff10; }
.quest-row:disabled { opacity: .5; }
.quest-row.current { color: #f1d28e; background: #d9bd7c13; }
.quest-symbol { color: #d9bd7d; min-width: 16px; text-align: center; }
.settings-card { max-width: 680px; border: 1px solid #d2ba7b55; background: #132b32eb; padding: clamp(20px,4vw,32px); border-radius: 5px; }
.setting-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 16px 0; border-bottom: 1px solid #ffffff1a; }
.setting-row:last-child { border-bottom: 0; }
.setting-row strong { display: block; font-size: 14px; }
.setting-row p { color: #aabdb1; font-size: 14px; line-height: 1.6; margin: 6px 0 0; }
.range { width: min(230px,40vw); accent-color: #c5aa72; }
.setting-select { min-width: 150px; min-height: 44px; padding: 10px 36px 10px 12px; color: #f8f1df; background: #18363a; border: 1px solid #d5ba7f83; border-radius: 5px; font: inherit; font-size: 14px; }
.setting-select:focus-visible { outline: 3px solid #efca7b; outline-offset: 3px; }
.empty { color: #b7c8bc; line-height: 1.7; padding: 28px 0; font-size: 13px; }
.toast { position: fixed; z-index: 50; bottom: 22px; left: 50%; transform: translateX(-50%); padding: 10px 17px; background: #f1ead8; color: #263c37; border-radius: 4px; box-shadow: 0 7px 25px #0006; font-size: 13px; max-width: calc(100% - 32px); }
@media (max-width: 900px) {
  .site-header { padding: 0 18px; gap: 6px; }
  .brand-text { font-size: 15px; }
  .nav-button { padding: 9px 8px; }
  .header-right { display: none; }
  .story-paper { width: min(72%,680px); }
  .story-portrait { width: 41%; right: 0; opacity: .88; }
  .battle-layout { grid-template-columns: 180px minmax(0,1fr); }
  .battle-layout > .battle-side-targets { grid-column: 1 / -1; }
  .target-list { grid-template-columns: repeat(auto-fit,minmax(155px,1fr)); }
}
@media (max-width: 600px) {
  .site-header { height: auto; min-height: 58px; flex-wrap: wrap; padding: 10px 14px; }
  .brand-mark { width: 27px; height: 27px; }
  .brand-mark span { font-size: 15px; }
  .brand-text { font-size: 14px; }
  .header-nav { margin-left: auto; gap: 0; }
  .nav-button { font-size: 14px; padding: 7px; }
  .main-view { min-height: calc(100dvh - 58px); }
  .title-screen { min-height: 100dvh; align-items: end; padding: 28px 22px 66px; background-position: 63% center; background-image: linear-gradient(0deg,#0b1721fa 2%,#14242ce6 45%,#14242c75 100%), url("에셋/장면%20CG/01-질버하인-첫인상.png"); }
  .title-content { padding: 0; }
  .title-screen h1 { font-size: 44px; margin-top: 20px; }
  .title-copy { margin: 22px 0; font-size: 14px; }
  .title-footer { left: 22px; right: auto; bottom: 20px; }
  .story-layout { min-height: calc(100dvh - 58px); align-items: end; padding: 165px 12px 14px; }
  .story-stage { background-position: 60% center; }
  .story-stage::before { background: linear-gradient(0deg,#102029e6,#10202960 65%,#1020293a); }
  .story-paper { z-index: 2; width: 100%; max-height: min(68dvh,680px); }
  .story-heading { padding: 16px 19px 12px; }
  .story-heading h1 { font-size: 20px; }
  .story-scroll { padding: 18px 20px; line-height: 1.8; font-size: 16px; }
  .story-footer { padding: 12px 16px 15px; }
  .story-portrait { top: 15px; bottom: auto; right: 0; height: min(55dvh,420px); width: 56%; opacity: .95; }
  .scene-location { top: 14px; right: 16px; font-size: 11px; }
  .panel-page { padding: 25px 14px 35px; }
  .page-title { align-items: start; }
  .page-title h1 { font-size: 24px; }
  .battle-layout { grid-template-columns: 1fr 1fr; gap: 9px; }
  .battle-layout > .battle-side-player { grid-column: 1 / -1; }
  .battle-layout > .battle-side-targets { grid-column: 1 / -1; }
  .battle-box { padding: 12px; }
  .enemy-field { grid-column: 1 / -1; min-height: 170px; }
  .enemy img { height: 125px; }
  .game-card { flex-basis: 150px; width: 150px; min-height: 225px; }
  .card-art { height: 102px; }
  .collection-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .collection-card img { height: 110px; }
  .setting-row { align-items: start; flex-direction: column; }
  .range { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* 전투 연출: 이미지 위에 겹치는 작은 마법진과 빛의 궤적 */
.battle-layout, .battle-side-player, .enemy, .target-card, .objective { position: relative; }
.battle-page[aria-busy="true"] .game-card:disabled { filter: none; opacity: 1; }

/* 처음 만나는 전투 요소를 설명하는 말풍선 */
.battle-tutorial-target { outline: 3px solid #f6d993 !important; outline-offset: 4px; box-shadow: 0 0 0 6px #e8c57636, 0 0 24px #f2cc7866 !important; }
.battle-tutorial { position: fixed; z-index: 120; width: min(330px,calc(100vw - 20px)); max-height: calc(100dvh - 20px); overflow: visible; border: 1px solid #cfa961; border-radius: 12px; padding: 17px 18px 14px; color: #233b38; background: #fff8e9; box-shadow: 0 12px 34px #081b20a8; font-size: 15px; line-height: 1.55; }
.battle-tutorial::before { content: ''; position: absolute; left: var(--tutorial-arrow-x,50%); top: -9px; width: 16px; height: 16px; transform: translateX(-50%) rotate(45deg); background: #fff8e9; border-left: 1px solid #cfa961; border-top: 1px solid #cfa961; }
.battle-tutorial--above::before { top: auto; bottom: -9px; border: 0; border-right: 1px solid #cfa961; border-bottom: 1px solid #cfa961; }
.battle-tutorial__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.battle-tutorial__top strong { color: #23463e; font-family: 'Batang','Gungsuh',serif; font-size: 18px; }
.battle-tutorial__count { color: #6c7666; font-size: 13px; white-space: nowrap; }
.battle-tutorial p { max-height: 35dvh; overflow-y: auto; margin: 8px 0 13px; color: #30443c; line-height: 1.65; white-space: pre-line; }
.battle-tutorial__actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.battle-tutorial__skip { border: 0; padding: 8px 2px; background: transparent; color: #667568; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.battle-tutorial__actions .button { padding: 8px 18px; }
.battle-tutorial:focus-visible, .battle-tutorial button:focus-visible { outline: 3px solid #77a999; outline-offset: 3px; }
@media (max-width: 600px) { .battle-tutorial { padding: 14px 15px 12px; } .battle-tutorial__top strong { font-size: 17px; } }
.battle-card-cast { z-index: 5; animation: battle-card-cast var(--fx-duration, 380ms) ease-out both; }
.battle-aim-glow { animation: battle-aim-glow var(--fx-duration, 380ms) ease-out both; }
.battle-cast-trail { position: fixed; z-index: 80; width: 10px; height: 10px; border-radius: 50%; pointer-events: none; animation: battle-cast-travel var(--fx-duration, 380ms) cubic-bezier(.3,.04,.54,1) both; }
.battle-cast-trail__core { position: absolute; inset: -5px; border-radius: 50%; background: #fffce4; box-shadow: 0 0 8px 3px #fff8c9, 0 0 25px 10px #dfbb78b3; }
.battle-cast-trail--hostile .battle-cast-trail__core { background: #ffe8d9; box-shadow: 0 0 8px 3px #ffb6a0, 0 0 25px 10px #d75a4bb3; }
.battle-viewport-proxy { position: fixed; z-index: 75; translate: -50% -50%; min-width: 62px; max-width: 150px; padding: 8px 10px; border: 1px solid #d7bd83; border-radius: 5px; color: #fff2cc; background: #142c34ee; box-shadow: 0 3px 18px #000a; font: 700 12px/1.35 system-ui, sans-serif; text-align: center; white-space: nowrap; pointer-events: none; }
.battle-enemy-lunge { z-index: 4; animation: battle-enemy-lunge var(--fx-duration, 680ms) ease-in-out both; }
.battle-target-hit { animation: battle-target-hit var(--fx-duration, 680ms) ease-out both; }
.battle-fx { --fx-color: #f8d896; --fx-glow: #ecc47c; position: absolute; z-index: 12; inset: 0; overflow: visible; pointer-events: none; }
.battle-fx--block { --fx-color: #b6f4df; --fx-glow: #5fc5ba; }
.battle-fx--heal { --fx-color: #d0f7bb; --fx-glow: #91d79b; }
.battle-fx--progress { --fx-color: #f8e0a5; --fx-glow: #dcb56f; }
.battle-fx--hit, .battle-fx--enemy-attack { --fx-color: #ffd5be; --fx-glow: #f47e67; }
.battle-fx__aura, .battle-fx__ring, .battle-fx__core, .battle-fx__spark, .battle-fx__number { position: absolute; left: 50%; top: 50%; pointer-events: none; }
.battle-fx__aura { width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle, var(--fx-color), transparent 67%); opacity: 0; animation: battle-aura var(--fx-duration) ease-out both; }
.battle-fx__ring { width: 88px; height: 88px; border: 2px solid var(--fx-color); border-radius: 50%; box-shadow: 0 0 16px var(--fx-glow), inset 0 0 18px var(--fx-glow); opacity: 0; animation: battle-ring var(--fx-duration) ease-out both; }
.battle-fx__ring::after { content: ""; position: absolute; inset: 6px; border: 1px dashed var(--fx-color); border-radius: 50%; }
.battle-fx__core { width: 80px; height: 3px; border-radius: 100%; background: white; box-shadow: 0 0 9px 3px var(--fx-color), 0 0 25px 7px var(--fx-glow); opacity: 0; animation: battle-slash var(--fx-duration) ease-out both; }
.battle-fx--block .battle-fx__core { width: 50px; height: 58px; background: #99eed566; border: 2px solid #d5fff0; box-shadow: 0 0 25px var(--fx-glow); clip-path: polygon(50% 0, 95% 16%, 88% 68%, 50% 100%, 12% 68%, 5% 16%); animation-name: battle-shield; }
.battle-fx--heal .battle-fx__core { width: 12px; height: 48px; border-radius: 6px; background: #edffe6; animation-name: battle-shield; }
.battle-fx--heal .battle-fx__core::after { content: ""; position: absolute; width: 48px; height: 12px; left: -18px; top: 18px; border-radius: 6px; background: #edffe6; }
.battle-fx--progress .battle-fx__core { width: 28px; height: 28px; border: 2px solid #fff5d3; background: #ffeab555; border-radius: 1px; animation-name: battle-diamond; }
.battle-fx__spark { width: 5px; height: 5px; border-radius: 50%; background: var(--fx-color); box-shadow: 0 0 7px 2px var(--fx-glow); opacity: 0; animation: battle-spark var(--fx-duration) ease-out var(--spark-delay) both; }
.battle-fx__number { color: white; font: 800 26px/1 system-ui, sans-serif; white-space: nowrap; text-shadow: 0 2px 4px #102129, 0 0 12px var(--fx-glow); opacity: 0; animation: battle-number var(--fx-duration) ease-out both; }
.battle-turn-banner { position: fixed; z-index: 76; left: 50%; top: 50%; width: min(320px,90%); padding: 15px 20px; border-block: 1px solid #e5d19a; background: linear-gradient(90deg,transparent,#172f36ee 18%,#172f36ee 82%,transparent); color: #f9eac4; text-align: center; font: 700 20px/1.4 "Batang", "Gungsuh", serif; letter-spacing: .08em; text-shadow: 0 0 18px #e4c57b; pointer-events: none; animation: battle-banner var(--fx-duration,620ms) ease-in-out both; }
@keyframes battle-card-cast { 0% { transform: translateY(0) scale(1); } 45% { transform: translateY(-14px) scale(1.04); box-shadow: 0 0 22px #f8d690c9; } 100% { transform: translateY(-6px) scale(.97); opacity: .55; } }
@keyframes battle-aim-glow { 0%, 40% { filter: brightness(1); } 80% { filter: brightness(1.3) drop-shadow(0 0 12px #f7da98); } 100% { filter: brightness(1); } }
@keyframes battle-cast-travel { 0%, 20% { opacity: 0; transform: translate(-50%,-50%) scale(.25); } 35% { opacity: 1; } 85% { opacity: 1; transform: translate(calc(-50% + var(--travel-x)),calc(-50% + var(--travel-y))) scale(1.3); } 100% { opacity: 0; transform: translate(calc(-50% + var(--travel-x)),calc(-50% + var(--travel-y))) scale(1.8); } }
@keyframes battle-enemy-lunge { 0%,100% { transform: translateY(0) scale(1); } 18% { transform: translateY(-8px) scale(.96); } 42% { transform: translateY(14px) scale(1.06); filter: drop-shadow(0 0 14px #f3b489); } 70% { transform: translateY(-2px) scale(1); } }
@keyframes battle-target-hit { 0%,100% { transform: translateX(0); } 12%,36% { transform: translateX(-4px); filter: brightness(1.4); } 24%,48% { transform: translateX(4px); } 70% { transform: translateX(0); filter: brightness(1); } }
@keyframes battle-aura { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.25); } 26% { opacity: .64; } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.35); } }
@keyframes battle-ring { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.35) rotate(-25deg); } 23% { opacity: .95; } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.32) rotate(35deg); } }
@keyframes battle-slash { 0% { opacity: 0; transform: translate(-50%,-50%) rotate(-35deg) scaleX(.05); } 25% { opacity: 1; transform: translate(-50%,-50%) rotate(-35deg) scaleX(1.1); } 70%,100% { opacity: 0; transform: translate(-50%,-50%) rotate(-35deg) scaleX(1.4); } }
@keyframes battle-shield { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.35); } 25%,55% { opacity: 1; transform: translate(-50%,-50%) scale(1); } 100% { opacity: 0; transform: translate(-50%,-58%) scale(1.17); } }
@keyframes battle-diamond { 0% { opacity: 0; transform: translate(-50%,-50%) rotate(0) scale(.3); } 35% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-50%) rotate(135deg) scale(1.2); } }
@keyframes battle-spark { 0%,15% { opacity: 0; transform: translate(-50%,-50%) scale(.2); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--spark-x)),calc(-50% + var(--spark-y))) scale(.5); } }
@keyframes battle-number { 0%,15% { opacity: 0; transform: translate(-50%,-25%); } 35% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-85%); } }
@keyframes battle-banner { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.95); } 20%,75% { opacity: 1; transform: translate(-50%,-50%) scale(1); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.03); } }
@media (max-width: 600px) { .battle-fx__aura { width: 100px; height: 100px; } .battle-fx__ring { width: 70px; height: 70px; } .battle-turn-banner { font-size: 17px; } }
