#statusLine { margin-top: 10px; color: #f4dca4; min-height: 1.5em; }
#game.active { height: 100vh; min-height: 0; overflow: hidden; }
#game > header { flex: 0 0 58px; }
#game .game-layout { width: 100%; min-width: 1250px; grid-template-columns: minmax(280px,1fr) 630px minmax(300px,1fr); transform-origin: top left; will-change: transform; }
#game .game-layout .side-panel.enemy { display: block; }
#game .game-layout .side-panel.player,#game .game-layout .center-stack,#game .game-layout .board-wrap { grid-column: auto; grid-row: auto; }
#game .game-layout .center-stack { width: 654px; }
#game .game-layout .center-stack .board-wrap { width: auto; overflow: visible; }
.manual-screen { padding: 26px; align-items: center; justify-content: center; }
.manual-book { width: min(900px,96vw); min-height: 650px; padding: 32px 38px 24px; border: 1px solid #9d7a3d; border-radius: 18px; background: radial-gradient(circle at 50% 0,#2a2530,#111319 65%); box-shadow: 0 25px 90px #000; transition: width .22s ease,min-height .22s ease; }
.manual-book.zoomed { width: min(1160px,98vw); min-height: min(820px,94vh); font-size: 1.24em; }
.manual-heading { display: flex; align-items: end; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid #d6b26966; }
.manual-heading small { color: #d6b269; font: 700 13px/1 Georgia,serif; letter-spacing: .22em; }
.manual-heading h2 { margin: 6px 0 0; color: #ffe29a; font-size: 34px; }
#manualPageNumber { color: #c6bda9; font: 700 16px sans-serif; }
.manual-pages { min-height: 410px; }
.manual-page { display: none; padding: 24px 4px 12px; animation: manual-page-in .25s ease both; }
.manual-page.active { display: block; }
.manual-page h3 { margin: 0 0 13px; color: #ffd77d; font-size: 29px; }
.manual-lead { margin: 0 0 24px; color: #eee5d4; font-size: 18px; line-height: 1.7; }
.manual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.manual-grid section { padding: 17px 20px; border: 1px solid #78623a; border-radius: 11px; background: #090b10a6; }
.manual-grid h4 { margin: 0 0 12px; color: #e3bf72; font-size: 19px; }
.manual-grid ul { margin: 0; padding-left: 1.35em; font-family: sans-serif; line-height: 1.9; }
.manual-ready { margin: 20px 0 0; color: #ffe6a4; text-align: center; font-weight: 700; }
.manual-controls { display: grid; grid-template-columns: repeat(3,1fr) 1.45fr; gap: 10px; margin-top: 16px; }
.manual-controls button,.manual-back-title { margin: 0; padding: 12px 10px; font-size: 15px; }
.manual-controls .manual-start { border-color: #e6bd67; background: linear-gradient(#64491e,#241a0e); color: #fff0bf; }
.manual-back-title { display: block; width: 180px; margin: 12px auto 0; border-color: #63583f; color: #bdb5a6; background: #111319; }
@keyframes manual-page-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: translateX(0); } }
@media(max-width:700px){.manual-screen{padding:8px}.manual-book{padding:22px 18px}.manual-grid{grid-template-columns:1fr}.manual-pages{min-height:0}.manual-controls{grid-template-columns:1fr 1fr}.manual-page h3{font-size:23px}}
.setup-message-hidden { display: none; }
.setup-instruction-overlay { position: fixed; inset: 58px 0 0; z-index: 30; display: none; place-items: center; padding: 24px; background: #05070aa8; backdrop-filter: blur(3px); cursor: pointer; }
.setup-instruction-overlay.show { display: grid; }
.setup-instruction-card { width: min(620px,90vw); padding: 34px 38px; border: 2px solid #d6b269; border-radius: 18px; background: linear-gradient(145deg,#24212a,#101116); text-align: center; box-shadow: 0 20px 70px #000,0 0 35px #d6b26930; animation: setup-card-in .28s ease-out both; }
.setup-instruction-card span { color: #d6b269; font: 700 16px/1 Georgia,serif; letter-spacing: .2em; }
.setup-instruction-card p { margin: 22px 0; color: #fff7e2; font-size: clamp(23px,3vw,36px); font-weight: 700; line-height: 1.55; }
.setup-instruction-card small { color: #bfb5a2; font-family: sans-serif; }
@keyframes setup-card-in { from { opacity: 0; transform: scale(.88); } to { opacity: 1; transform: scale(1); } }
.main-title-logo { display: block; width: min(620px,100%); max-height: 330px; margin: -34px auto -42px; object-fit: contain; filter: drop-shadow(0 12px 25px #000b); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.trial-notice { margin: 18px auto 0; padding: 14px 18px; border: 1px solid #d6b269; border-radius: 10px; background: linear-gradient(135deg,#3a2b13cc,#17151bcc); color: #fff7e2; font-family: sans-serif; font-size: 15px; font-weight: 700; line-height: 1.75; box-shadow: 0 0 24px #d6b26925; }
.trial-notice strong { color: #ffd77d; font-size: 1.14em; }
#gameLog { margin: 18px 0 0; padding-left: 24px; max-height: 185px; overflow: auto; font-family: sans-serif; font-size: 13px; line-height: 1.5; color: #c9c2b4; }
#gameLog li:first-child { color: #fff; }
.result-dialog h2 { font-size: 58px; margin: 8px; }
.result-dialog nav { margin-top: 24px; }
.card small { line-height: 1.25; }
.card { width: 92px; height: 148px; padding: 4px; overflow: hidden; position: relative; background: #18151b; }
.card img { display: block; width: 78px; height: 117px; margin: 0 auto; object-fit: cover; border-radius: 5px; }
.card small { position: absolute; left: 4px; right: 4px; bottom: 3px; padding: 2px; color: #fff7e2; background: #111c; font-size: 11px; }
.player-status { line-height: 1.7; padding: 10px 12px; border: 1px solid #ffffff20; border-radius: 8px; background: #080a0e88; }
.side-panel h3 { margin: 18px 0 8px; color: #d6b269; font-size: 15px; }
.public-stand { min-height: 62px; display: flex; flex-wrap: wrap; gap: 6px; padding: 7px; border: 1px solid #8e713e77; border-radius: 8px; background: #08090d; }
.public-piece { width: 52px !important; height: 58px; margin: 0 !important; padding: 3px; display: grid; place-items: center; border-radius: 6px; }
.public-piece img { width: 39px; height: 39px; object-fit: contain; }
.public-piece span { font-size: 9px; line-height: 1; }
.public-piece.selected { outline: 3px solid #70b5ff; }
.empty-stand { margin: auto; color: #777; font-size: 12px; }
.deck-area { margin-top: 42px; text-align: center; }
.deck-area h3 { margin-bottom: 15px; letter-spacing: .18em; }
.deck-pile { position: relative; width: 78px !important; height: 117px; margin: 0 auto !important; padding: 0; display: block; border: 1px solid #d6b269; border-radius: 7px; background: #17131b; box-shadow: -5px 5px 0 #31293a,-10px 10px 0 #17131b,0 13px 25px #0009; overflow: visible; opacity: 1 !important; }
.deck-pile img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 6px; }
.deck-count { position: absolute; left: 50%; bottom: -36px; width: 105px; padding: 5px 8px; transform: translateX(-50%); border: 1px solid #d6b269; border-radius: 999px; background: #0d0e13; color: #ffe29a; font: 700 14px/1.2 sans-serif; white-space: nowrap; box-shadow: 0 5px 14px #0009; }
.deck-pile.empty { opacity: .22 !important; box-shadow: none; }
.draw-fly-card { position: fixed; z-index: 100; width: 78px; height: 117px; object-fit: cover; border: 1px solid #e3c77e; border-radius: 7px; pointer-events: none; box-shadow: 0 12px 34px #000c,0 0 18px #d6b26977; transform: translate(-50%,-50%); }
.center-stack { width: 654px; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.center-stack .board-wrap { position: relative; }
#battleAnnouncement { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; pointer-events: none; opacity: 0; font: 900 68px/1 "Yu Mincho",serif; letter-spacing: .12em; color: #fff; text-shadow: 0 4px 8px #000,0 0 24px #c91f37; }
#battleAnnouncement.show { animation: battle-word 1.05s ease both; }
#battleAnnouncement.promotion { color: #ffe6a4; text-shadow: 0 4px 8px #000,0 0 26px #d6b269; font-family: Georgia,serif; text-transform: uppercase; }
#battleAnnouncement.check { color: #ffedf0; }
#battleAnnouncement.truce { color: #dcecff; text-shadow: 0 4px 8px #000,0 0 28px #6aa7d8; }
#battleAnnouncement.assassination { color: #ff3159; text-shadow: 0 4px 8px #000,0 0 30px #d00032; }
#actionMenu { position:absolute; inset:0; z-index:4; display:none; place-items:center; background:#05070bb8; backdrop-filter:blur(2px); }
#actionMenu.show { display:grid; }
#assassinationMenu { position:absolute; inset:0; z-index:6; display:none; place-items:center; background:#070007d9; backdrop-filter:blur(3px); }
#assassinationMenu.show { display:grid; }
.assassination-card { border-color:#e3264f; box-shadow:0 14px 50px #000,0 0 35px #b5002d66; }
.assassination-card p { color:#ff5575; }
#assassinateButton { border-color:#f04466; background:linear-gradient(#72162a,#27070e); }
.action-menu-card { width:280px; padding:24px; display:grid; gap:11px; text-align:center; border:2px solid #d6b269; border-radius:14px; background:linear-gradient(145deg,#24212a,#101116); box-shadow:0 14px 50px #000; }
.action-menu-card p { margin:0; color:#d6b269; letter-spacing:.12em; }
.action-menu-card strong { margin-bottom:6px; font-size:22px; }
.action-menu-card button { width:100%; padding:11px; margin:0; }
@keyframes battle-word { 0%{opacity:0;transform:scale(.62)} 18%{opacity:1;transform:scale(1.12)} 32%{transform:scale(1)} 76%{opacity:1} 100%{opacity:0;transform:scale(1.04)} }
canvas.dragging { cursor: grabbing; }
.card[draggable="true"],.public-piece[draggable="true"] { cursor: grab; }
.board-wrap.drag-over { box-shadow: 0 0 0 4px #70b5ff,0 8px 40px #000; }
.center-stack .hand { width: 100%; min-height: 156px; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; justify-content: flex-start; padding: 18px 2px 8px; scrollbar-width: thin; }
.center-stack .card { flex: 0 0 72px; width: 72px; height: 124px; }
.center-stack .card img { width: 62px; height: 93px; }
@media(max-width:1050px){.center-stack{grid-column:2}.side-panel.player{grid-column:1/-1}.board-wrap{grid-column:auto}}
@media(max-width:760px){.center-stack{width:96vw}.center-stack .board-wrap{width:96vw}}
