@font-face { font-family: 'Cormorant'; src: url('../assets/fonts/cormorant-normal.woff2') format('woff2'); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('../assets/fonts/cormorant-italic.woff2') format('woff2'); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Josefin'; src: url('../assets/fonts/josefin-normal.woff2') format('woff2'); font-weight: 300 600; font-display: swap; }
:root { --gold: #e9d3a4; --gold2: #c79a4e; --ink: #05070c; --serif: 'Cormorant', 'Noto Serif TC', 'Noto Serif JP', 'Noto Serif KR', 'Yu Mincho', 'PMingLiU', 'Batang', serif; --sans: 'Josefin', 'Noto Sans TC', 'Microsoft JhengHei', 'Yu Gothic', 'Malgun Gothic', sans-serif; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--ink); overflow: hidden; color: var(--gold); font-family: var(--serif); user-select: none; -webkit-user-select: none; touch-action: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#ui { position: fixed; inset: 0; pointer-events: none; }
.hidden { display: none !important; }
kbd { display: inline-block; min-width: 1.55em; padding: 0.18em 0.42em 0.1em; margin: 0 1px; border: 1px solid rgba(233,211,164,.55); border-radius: 3px; font: 500 0.82em/1.2 var(--sans); text-align: center; color: var(--gold); background: rgba(10,12,18,.45); }
.star { width: .7em; height: .7em; fill: var(--gold2); flex: none; }
.mouse { height: 1.35em; vertical-align: -0.3em; color: var(--gold); }
/* ---- Logo */
.logo h1 { margin: 0; font: 500 clamp(34px, 6.6vw, 92px)/1 var(--serif); letter-spacing: .2em; color: #f3e3bd; display: flex; align-items: center; justify-content: center; white-space: nowrap; text-shadow: 0 0 34px rgba(255,170,70,.35), 0 2px 14px rgba(0,0,0,.8); padding-left: .2em; }
.logo h1 span { display: inline-flex; margin-right: .1em; } .logo h1 b { width: .42em; }
.armil { width: .86em; height: .86em; color: #f3e3bd; overflow: visible; } .armil .core { fill: #ffb65a; filter: drop-shadow(0 0 6px #ff9a30); animation: corepulse 3.2s ease-in-out infinite; }
@keyframes corepulse { 50% { opacity: .55; } }
.rule { display: flex; align-items: center; gap: 14px; justify-content: center; margin: .9em auto .7em; width: min(520px, 44vw); } .rule i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(233,211,164,.7)); } .rule i:last-child { transform: scaleX(-1); }
.logo .sub { margin: 0; text-align: center; font: 400 clamp(11px, 1.35vw, 17px)/1.3 var(--sans); letter-spacing: .5em; text-transform: uppercase; color: rgba(233,211,164,.85); padding-left: .5em; }
:lang(zh-Hant) .logo .sub, :lang(ja) .logo .sub, :lang(ko) .logo .sub { letter-spacing: .9em; font-family: var(--serif); font-size: clamp(13px, 1.6vw, 20px); }
/* ---- 載入 */
.load { position: absolute; inset: 0; background: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; transition: opacity 1.4s ease .2s; z-index: 50; }
.load.gone { opacity: 0; pointer-events: none; } .load .logo h1 { font-size: clamp(26px, 4.2vw, 56px); color: rgba(243,227,189,.5); text-shadow: none; } .load .armil { color: rgba(243,227,189,.5); }
.load .bar { width: min(200px, 30vw); height: 1px; background: rgba(233,211,164,.16); } .load .bar i { display: block; height: 100%; background: var(--gold2); transform-origin: left; transform: scaleX(0); transition: transform .3s; }
/* ---- 標題 */
.title { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease; pointer-events: none; background: radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(3,5,10,.55)), linear-gradient(180deg, rgba(3,5,10,.45), transparent 34%, transparent 70%, rgba(3,5,10,.6)); }
.title.in { opacity: 1; } .title.in nav, .title.in footer { pointer-events: auto; } .title.dim { opacity: 0; }
.title .logo { position: absolute; right: 5vw; top: 12vh; } .title .logo h1 { font-size: clamp(30px, 5vw, 72px); }
.title nav { position: absolute; right: 9vw; bottom: 19vh; display: flex; flex-direction: column; align-items: flex-end; gap: .55em; font: 500 clamp(17px, 2.1vw, 27px)/1.2 var(--serif); letter-spacing: .08em; }
.title nav a, .row { display: flex; align-items: center; gap: .7em; cursor: pointer; color: rgba(233,211,164,.62); transition: color .25s, letter-spacing .35s, text-shadow .25s; }
.title nav a .star, .row > .star { opacity: 0; transform: scale(.4) rotate(-45deg); transition: opacity .25s, transform .35s; }
.title nav a.sel { color: #fff3d6; letter-spacing: .16em; text-shadow: 0 0 18px rgba(255,180,90,.6); } .title nav a.sel .star, .row.sel > .star { opacity: 1; transform: none; }
.title nav a::after { content: ''; width: .7em; }
.title footer, .panel footer { position: absolute; left: 0; right: 0; bottom: 3.2vh; display: flex; flex-wrap: wrap; justify-content: center; gap: .4em 1.9em; font: 400 clamp(9px, .95vw, 12.5px)/1.4 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: rgba(233,211,164,.72); padding: 0 3vw; }
footer span { display: inline-flex; align-items: center; gap: .65em; white-space: nowrap; } footer em { font-style: normal; } footer svg { width: 1.5em; height: 1.5em; }
/* ---- 面板（選項／暫停） */
.panel, .result { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(4,6,11,.72); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); pointer-events: auto; z-index: 20; }
.box { width: min(660px, 90vw); } .box h2 { margin: 0 0 .5em; font: italic 500 clamp(24px, 3vw, 38px)/1.1 var(--serif); color: #f3e3bd; padding-bottom: .45em; border-bottom: 1px solid rgba(233,211,164,.28); }
.rows { display: flex; flex-direction: column; gap: .15em; font: 500 clamp(15px, 1.65vw, 21px)/1.25 var(--serif); }
.row { padding: .32em 0; } .row label { flex: 1; cursor: pointer; } .row.sel { color: #fff3d6; } .row .ctl { display: flex; align-items: center; gap: 1em; width: 52%; }
.track { position: relative; flex: 1; height: 1px; background: rgba(233,211,164,.25); } .track i { position: absolute; left: 0; top: -1px; height: 3px; background: var(--gold2); } .track b { position: absolute; top: -5px; width: 9px; height: 9px; margin-left: -5px; background: var(--gold); transform: rotate(45deg); }
.track::before { content: ''; position: absolute; inset: -14px 0; }
.val { font: 400 .68em var(--sans); letter-spacing: .1em; min-width: 2.4em; text-align: right; opacity: .8; }
.choice { display: flex; flex-wrap: wrap; gap: .2em 1.1em; } .choice u { text-decoration: none; color: rgba(233,211,164,.45); padding-bottom: 2px; border-bottom: 1px solid transparent; cursor: pointer; font-size: .92em; } .choice u.on { color: #fff3d6; border-color: var(--gold2); }
.pausebox { width: min(900px, 92vw); display: flex; gap: 6vw; align-items: flex-start; } .pausebox .col { flex: 1; }
.keys { border-collapse: collapse; font: 400 clamp(12px, 1.2vw, 15px)/1.3 var(--serif); color: rgba(233,211,164,.8); margin-top: .6em; } .keys td { padding: .36em 0; } .keys td:first-child { padding-right: 2.6em; } .keys .ti svg { width: 1.5em; height: 1.5em; }
/* ---- HUD */
.hud { position: absolute; inset: 0; pointer-events: none; }
.vitals { position: absolute; left: max(2.6vw, env(safe-area-inset-left)); top: 3.4vh; display: flex; align-items: flex-start; gap: 12px; }
.emblem { width: 34px; height: 34px; padding: 4px; border-radius: 50%; background: rgba(5,7,12,.5); } .emblem .armil { width: 100%; height: 100%; }
.bars { display: flex; flex-direction: column; gap: 5px; padding-top: 5px; }
.bar { position: relative; height: 7px; width: min(300px, 30vw); background: rgba(5,7,12,.6); box-shadow: 0 0 0 1px rgba(233,211,164,.3); overflow: hidden; }
.bar i, .trk i { position: absolute; inset: 0; transform-origin: left; } .bar.hp .fill { background: linear-gradient(90deg, #a8382a, #d9623c); } .bar .lag, .trk .lag { background: #f1dca8; opacity: .75; } .bar.st { height: 4px; width: min(230px, 24vw); } .bar.st .fill { background: linear-gradient(90deg, #7fa7c9, #c4dcf2); }
.tonics { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: #ffb65a; } .tonics span { width: 17px; height: 17px; filter: drop-shadow(0 0 4px rgba(255,150,50,.7)); } .tonics span.used { color: rgba(233,211,164,.25); filter: none; } .tonics kbd { margin-left: 6px; font-size: 10px; }
.boss { position: absolute; left: 50%; bottom: 6.5vh; transform: translateX(-50%); width: min(720px, 62vw); }
.boss .name { font: 500 clamp(14px, 1.5vw, 20px)/1.2 var(--serif); color: #f3e3bd; letter-spacing: .05em; margin: 0 0 7px 22px; text-shadow: 0 1px 8px #000; }
.boss .bar { display: flex; align-items: center; gap: 8px; height: auto; width: 100%; background: none; box-shadow: none; overflow: visible; } .boss .trk { position: relative; flex: 1; height: 6px; background: rgba(5,7,12,.65); box-shadow: 0 0 0 1px rgba(233,211,164,.3); overflow: hidden; }
.boss .trk .fill { background: linear-gradient(90deg, #b7772c, #f0c06a); transition: background .8s; } .boss .trk u { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(5,7,12,.9); } .boss.p2 .trk .fill { background: linear-gradient(90deg, #4f9fb8, #bff1ff); }
.lockdot { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; color: #fff3d6; opacity: .85; filter: drop-shadow(0 0 5px #ffb65a); }
/* ---- 字幕、黑邊、跳過、橫幅 */
.letter i { position: absolute; left: 0; right: 0; height: 11.5vh; background: #000; transition: transform .9s ease; } .letter i:first-child { top: 0; transform: translateY(-101%); } .letter i:last-child { bottom: 0; transform: translateY(101%); } .letter.on i { transform: none; }
.subtitle { position: absolute; left: 8vw; right: 8vw; bottom: 14.5vh; text-align: center; font: italic 500 clamp(16px, 2vw, 26px)/1.4 var(--serif); color: #f6ead0; text-shadow: 0 1px 3px #000, 0 0 16px #000; opacity: 0; transition: opacity .6s; } .subtitle.on { opacity: 1; }
:lang(zh-Hant) .subtitle, :lang(ja) .subtitle, :lang(ko) .subtitle { font-style: normal; letter-spacing: .08em; }
.skip { position: absolute; right: 3vw; bottom: 3.6vh; font: 400 11px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: rgba(233,211,164,.7); z-index: 5; } .skip i { position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--gold); transform-origin: left; transform: scaleX(0); }
.banner { position: absolute; left: 0; right: 0; top: 36vh; text-align: center; opacity: 0; pointer-events: none; } .banner h3 { margin: 0; font: 500 clamp(24px, 3.6vw, 50px)/1.2 var(--serif); letter-spacing: .2em; color: #f3e3bd; text-shadow: 0 0 30px rgba(255,170,70,.5), 0 2px 10px #000; } .banner p { font: 400 12px var(--sans); letter-spacing: .4em; text-transform: uppercase; }
.banner.on { animation: banner 4.2s ease forwards; } @keyframes banner { 0% { opacity: 0; letter-spacing: .1em; } 18%, 72% { opacity: 1; } 100% { opacity: 0; } }
/* ---- 結算 */
.result { background: rgba(3,4,8,.8); opacity: 0; transition: opacity 1.2s; } .result.in { opacity: 1; } .result .box { width: min(560px, 88vw); text-align: center; } .result h2 { border: 0; font-style: normal; letter-spacing: .22em; font-size: clamp(26px, 3.6vw, 46px); margin: 0; padding: 0; }
.result .lose h2 { color: #d98a72; } .result .line { font: italic 500 clamp(15px, 1.6vw, 20px)/1.5 var(--serif); margin: 0 0 1.2em; color: rgba(243,227,189,.85); } :lang(zh-Hant) .result .line, :lang(ja) .result .line, :lang(ko) .result .line { font-style: normal; }
.result dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 1em; } .result dt { font: 400 10.5px var(--sans); letter-spacing: .22em; text-transform: uppercase; opacity: .65; } .result dd { margin: .25em 0 0; font: 500 clamp(18px, 2.2vw, 26px) var(--serif); color: #fff3d6; }
.result .saved { font: 400 11px var(--sans); letter-spacing: .16em; opacity: .55; margin: 0 0 1.3em; } .result .rows { align-items: center; } .result .row label { flex: none; } .result .row::after { content: ''; width: .7em; }
/* ---- 觸控 */
.touch { position: absolute; inset: 0; pointer-events: none; } .touch > * { pointer-events: auto; }
.stick { position: absolute; left: max(5vw, env(safe-area-inset-left)); bottom: 9vh; width: 118px; height: 118px; border-radius: 50%; border: 1px solid rgba(233,211,164,.35); background: radial-gradient(circle, rgba(233,211,164,.06), rgba(5,7,12,.3)); } .stick i { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px; border-radius: 50%; background: rgba(233,211,164,.35); box-shadow: 0 0 12px rgba(255,180,90,.4); }
.lookpad { position: absolute; left: 38%; right: 0; top: 0; bottom: 0; }
.btns { position: absolute; right: max(3.5vw, env(safe-area-inset-right)); bottom: 7vh; width: 210px; height: 190px; pointer-events: none !important; }
.touch button { position: absolute; width: 56px; height: 56px; border-radius: 50%; border: 1px solid rgba(233,211,164,.45); background: rgba(5,7,12,.42); color: var(--gold); padding: 14px; pointer-events: auto; transition: background .1s, transform .1s; } .touch button svg { width: 100%; height: 100%; } .touch button.on { background: rgba(255,180,90,.45); transform: scale(.93); }
.btns .big { width: 72px; height: 72px; right: 0; bottom: 34px; padding: 18px; } .btns [data-b=heavy] { right: 82px; bottom: 6px; } .btns [data-b=dodge] { right: 86px; bottom: 76px; } .btns [data-b=guard] { right: 14px; bottom: 120px; } .btns .sm { width: 44px; height: 44px; padding: 11px; } .btns [data-b=lock] { right: 154px; bottom: 44px; } .btns [data-b=tonic] { right: 150px; bottom: 112px; }
.pausebtn { right: max(2.5vw, env(safe-area-inset-right)); top: 3vh; width: 40px !important; height: 40px !important; padding: 11px !important; }
.rotate { position: fixed; inset: 0; background: var(--ink); display: none; align-items: center; justify-content: center; text-align: center; z-index: 90; font: 500 18px var(--serif); } .rotate svg { width: 54px; color: var(--gold2); }
@media (pointer: coarse) and (orientation: portrait) { .rotate { display: flex; } }
/* ---- 矮螢幕（手機橫放） */
@media (max-height: 520px) {
  .title .logo { top: 7vh; } .title nav { bottom: 20vh; gap: .3em; font-size: 17px; } .title footer { bottom: 3vh; font-size: 8.5px; gap: .3em 1.2em; letter-spacing: .14em; }
  .rule { margin: .5em auto .45em; } .box h2 { font-size: 22px; margin-bottom: .3em; padding-bottom: .3em; } .rows { font-size: 15px; } .row { padding: .2em 0; } .panel footer { display: none; }
  .is-touch .boss { bottom: 3.5vh; width: 44vw; } .boss .name { font-size: 12px; margin-bottom: 4px; } .vitals { top: 5vh; } .pausebox .keys { font-size: 11px; } .keys td { padding: .18em 0; }
  .stick { bottom: 12vh; width: 104px; height: 104px; } .btns { bottom: 11vh; transform: scale(.92); transform-origin: right bottom; } .subtitle { bottom: 16vh; font-size: 15px; }
  .result dl { margin-bottom: .5em; } .result .line { margin-bottom: .6em; } .result .saved { margin-bottom: .6em; }
}
/* ---- 共用存檔畫面：換成遊戲的深色黃銅風 */
.eoSave { background: rgba(4,6,11,.78) !important; font-family: var(--serif) !important; color: var(--gold) !important; backdrop-filter: blur(7px); pointer-events: auto; }
.eoSave .eoCard { background: #0b0e16 !important; border: 1px solid rgba(233,211,164,.3); border-radius: 4px !important; box-shadow: 0 20px 60px #000 !important; }
.eoSave h2 { font: italic 500 26px var(--serif) !important; color: #f3e3bd; } .eoSave button { background: transparent !important; color: var(--gold) !important; border: 1px solid rgba(233,211,164,.4) !important; border-radius: 2px !important; font-family: var(--serif) !important; }
.eoSave button.pri, .eoSave .eoTabs button.on { background: var(--gold2) !important; color: #0b0e16 !important; border-color: var(--gold2) !important; } .eoSave button.warn { background: #a8382a !important; color: #fff !important; }
.eoSave .eoSlot { background: rgba(233,211,164,.04) !important; border: 1px solid rgba(233,211,164,.22) !important; border-radius: 3px !important; } .eoSave .eoSlot.on { border-color: var(--gold2) !important; box-shadow: 0 0 0 1px var(--gold2) inset !important; }
.eoSave .eoSs, .eoSave .eoRow, .eoSave .eoSh b { color: #f3e3bd !important; } .eoSave .eoTip, .eoSave .eoSd, .eoSave .eoSum, .eoSave .eoRow small, .eoSave .eoRow .d, .eoSave .eoSs.empty, .eoSave .eoEmpty { color: rgba(233,211,164,.6) !important; }
.eoSave .eoPill { background: var(--gold2) !important; color: #0b0e16 !important; } .eoSave .eoRow { border-color: rgba(233,211,164,.18) !important; } .eoSave .eoMsg { color: #9fd0b8 !important; } .eoSave .eoRow.ok .r { color: #f0c06a !important; } .eoSave .eoRow.bad .r { color: #d98a72 !important; }
.eoToast { background: rgba(11,14,22,.92) !important; border: 1px solid rgba(233,211,164,.3); color: var(--gold) !important; font-family: var(--sans) !important; letter-spacing: .12em; }

/* 贊助按鈕（標題畫面左下）與自家廣告卡片 */
.donate { position: absolute; left: clamp(16px, 4vw, 56px); bottom: clamp(64px, 9vh, 96px); display: flex; flex-direction: column; gap: 4px; max-width: 300px; padding: 9px 14px; border: 1px solid rgba(233,211,164,.45); border-radius: 3px; background: rgba(8,10,16,.55); color: var(--gold); text-decoration: none; font-family: var(--sans); pointer-events: none; z-index: 5; transition: background .2s, border-color .2s; }
.donate:hover { background: rgba(40,30,14,.7); border-color: var(--gold2); }
.donate b { font-weight: 600; font-size: 14px; letter-spacing: .06em; }
.donate em { font-style: normal; font-size: 11.5px; line-height: 1.45; opacity: .72; }
.housead { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; background: rgba(3,4,8,.78); backdrop-filter: blur(3px); }
.housead .hbox { width: min(420px, 88vw); padding: 18px 20px 20px; border: 1px solid rgba(233,211,164,.4); background: #0b0e16; font-family: var(--sans); color: var(--gold); text-align: left; }
.housead small { display: block; font-size: 11px; letter-spacing: .14em; opacity: .65; margin-bottom: 10px; }
.housead img { display: block; width: 100%; aspect-ratio: 1.9; object-fit: cover; border-radius: 2px; margin-bottom: 12px; }
.housead h3 { margin: 0 0 6px; font: 600 20px/1.3 var(--serif); }
.housead p { margin: 0 0 16px; font-size: 13.5px; line-height: 1.55; opacity: .85; }
.housead .hrow { display: flex; gap: 10px; justify-content: flex-end; }
.housead .hplay, .housead .hskip { padding: 8px 16px; font: 600 13px var(--sans); border: 1px solid var(--gold2); border-radius: 2px; cursor: pointer; text-decoration: none; }
.housead .hplay { background: var(--gold2); color: #120d05; }
.housead .hskip { background: transparent; color: var(--gold); }
.housead .hskip:disabled { opacity: .45; cursor: default; }
@media (max-width: 700px) { .donate { bottom: auto; top: 12px; left: 12px; max-width: 200px; } .donate em { display: none; } }
.title.in .donate { pointer-events: auto; }
