@import url("./review-guide.css");
:root{font-family:"Yu Mincho","Hiragino Mincho ProN","Noto Serif JP",serif;color:#263a50;background:#f4e8d6;font-synthesis:none}*{box-sizing:border-box}html,body,#app{margin:0;min-width:1120px;min-height:100%;height:100%}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed}button:focus-visible,input:focus-visible+span{outline:3px solid #bf4253;outline-offset:3px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.scene{position:relative;isolation:isolate;min-height:100dvh;overflow:hidden}.scene-background{position:absolute;inset:0;z-index:-2;background:url('/assets/shop-background.png') center center/cover no-repeat}.scene::before{content:"";position:absolute;inset:0;z-index:-1;background:rgba(255,245,231,.62)}.site-header{height:62px;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(24px,3vw,56px);background:rgba(255,252,246,.96);border-bottom:1px solid rgba(74,63,52,.12);box-shadow:0 2px 18px rgba(62,43,27,.06);position:relative;z-index:2}.brand{display:flex;align-items:center;gap:13px;white-space:nowrap}.brand-mark{display:grid;place-items:center;width:32px;height:37px;background:#b72e45;color:white;font-size:18px;font-weight:700;clip-path:polygon(50% 0,100% 18%,93% 100%,7% 100%,0 18%)}.brand-name{font-size:22px;font-weight:800;letter-spacing:.12em}.brand-divider{height:19px;width:1px;background:#cbbba8;margin:0 2px}.brand-sub{font-size:14px;font-weight:700;letter-spacing:.11em}.header-status{position:absolute;left:50%;transform:translateX(-50%);border:1px solid #e1d8cd;border-radius:40px;background:white;padding:8px 17px;font-size:13px;font-weight:700;letter-spacing:.05em;white-space:nowrap}.status-dot,.note-dot{display:inline-block;vertical-align:middle;width:8px;height:8px;background:#bb344b;border-radius:50%;margin-right:8px;box-shadow:0 0 0 4px #fce9ea}.header-actions{display:flex;align-items:center;gap:10px}.icon-button,.header-settings{background:#fff;border:1px solid #e1d8cd;color:#304760;box-shadow:0 2px 5px rgba(36,53,69,.04)}.icon-button{border-radius:50%;width:37px;height:37px;font-size:19px}.header-settings{border-radius:20px;padding:8px 16px;font-size:13px;font-weight:700}.primary-button,.secondary-button,.outline-button,.text-button{border-radius:11px;padding:14px 23px;font-weight:800;letter-spacing:.05em}.primary-button{background:#243f5d;color:white;border:1px solid #243f5d;box-shadow:0 7px 14px rgba(29,52,79,.16)}.primary-button:not(:disabled):hover{background:#315778}.primary-button:disabled{opacity:.46}.secondary-button{background:#f8f4ed;color:#304760;border:1px solid #d9cdbd}.outline-button{background:white;color:#263e59;border:1px solid #9eb1c4}.text-button{border:0;background:transparent;color:#304d68;text-decoration:underline;text-underline-offset:4px}.section-kicker{font-family:Georgia,serif;font-size:11px;letter-spacing:.2em;font-weight:700;color:#b64d5b}.section-kicker span{font-family:inherit;letter-spacing:.04em;color:#a37561;margin-left:12px}.eyebrow{display:flex;align-items:center;gap:15px;font-size:13px;letter-spacing:.18em;color:#a25958;font-weight:700}.eyebrow-line{width:30px;height:1px;background:#bf8790}.title-scene::before{background:linear-gradient(90deg,rgba(255,248,237,.91),rgba(255,248,237,.68) 48%,rgba(255,248,237,.1))}.welcome-layout{position:relative;min-height:calc(100dvh - 62px);max-width:1450px;margin:auto;display:flex;align-items:center;padding:40px clamp(45px,8vw,130px)}.welcome-card{position:relative;z-index:1;width:min(560px,52%);padding:56px 42px 48px;background:rgba(255,252,246,.83);border:1px solid rgba(187,139,98,.26);border-radius:24px;box-shadow:0 20px 60px rgba(77,52,31,.13);backdrop-filter:blur(8px)}.welcome-card h1{font-size:clamp(39px,4.5vw,66px);line-height:1.42;letter-spacing:.09em;margin:23px 0 24px;font-weight:800}.welcome-card h1 em{font-style:normal;color:#ae2d45}.welcome-lead{font-size:17px;line-height:2;letter-spacing:.08em;margin:0 0 30px}.welcome-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.welcome-actions .primary-button{font-size:17px;padding:18px 28px}.development-note{font-family:"Yu Gothic","Hiragino Kaku Gothic ProN",sans-serif;font-size:12px;color:#6c6b68;margin:30px 0 0;line-height:1.5}.welcome-character{position:absolute;right:7%;bottom:0;height:min(76dvh,800px);width:min(43vw,575px);display:flex;align-items:flex-end;justify-content:center}.welcome-character img{display:block;height:100%;max-width:100%;object-fit:contain;object-position:bottom;filter:drop-shadow(4px 14px 12px rgba(70,52,40,.14))}.welcome-speech{position:absolute;top:6%;left:-14%;background:#fffdf8;border:2px solid #365371;border-radius:25px;padding:15px 23px;color:#243e5b;font-weight:800;font-size:17px;line-height:1.55;transform:rotate(-5deg);box-shadow:4px 6px 0 #d9e7ed}.welcome-speech::after{content:"";position:absolute;bottom:-14px;right:28px;background:#fffdf8;width:22px;height:22px;transform:rotate(45deg);border-right:2px solid #365371;border-bottom:2px solid #365371}.vertical-copy{position:absolute;right:20px;top:50%;writing-mode:vertical-rl;letter-spacing:.4em;color:#714c36;font-size:16px}.setup-scene::before{background:rgba(255,246,232,.71)}.setup-layout{min-height:calc(100dvh - 62px);max-width:1370px;margin:auto;display:grid;grid-template-columns:minmax(0,800px) minmax(240px,1fr);gap:35px;align-items:center;padding:26px 30px}.setup-card{background:rgba(255,253,249,.96);border:1px solid rgba(183,151,115,.38);border-radius:22px;padding:28px 34px 25px;box-shadow:0 15px 46px rgba(67,45,26,.13);max-height:calc(100dvh - 98px);overflow:auto}.setup-card h1{font-size:32px;margin:9px 0 6px}.setup-intro{font-size:14px;margin:0 0 20px;color:#697889}.option-group{border:0;border-top:1px solid #e8ded1;padding:13px 0 14px;margin:0}.option-group legend{font-size:15px;font-weight:800;padding:0 10px 0 0;float:left;margin-right:100%;white-space:nowrap}.option-description{font-size:12px;color:#657085}.option-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;clear:both;padding-top:6px}.option-grid:has(.option:nth-child(3):last-child){grid-template-columns:repeat(3,1fr)}.option input{position:absolute;opacity:0;width:1px;height:1px}.option-face{display:flex;flex-direction:column;justify-content:center;min-height:48px;padding:7px 8px;text-align:center;border:1px solid #dcd6cd;border-radius:10px;background:#fff;color:#31445b;transition:background .15s,border-color .15s}.option-face strong{font-size:14px}.option-face small{font-size:10px;letter-spacing:0;margin-top:3px;color:#718093}.option input:checked+.option-face{border:2px solid #b6364f;background:#fff0ef;color:#9c2d41}.option input:focus-visible+.option-face{outline:3px solid #bf4253;outline-offset:3px}.setup-footer{border-top:1px solid #e8ded1;padding-top:17px;display:flex;justify-content:space-between;align-items:center;gap:12px}.setup-footer-right{display:flex;gap:9px;align-items:center}.unavailable-label{font-size:12px;color:#9a6a5e;margin-right:5px}.setup-footer button{padding:10px 14px;font-size:13px}.setup-aside{position:relative;height:min(75dvh,700px);display:flex;flex-direction:column;align-items:center;justify-content:flex-end}.setup-aside img{height:85%;width:100%;object-fit:contain;object-position:bottom;filter:drop-shadow(5px 9px 8px rgba(80,61,42,.16))}.setup-aside-bubble{position:absolute;top:4%;right:2%;background:#fffefa;border:2px solid #35516b;padding:13px 20px;border-radius:18px;transform:rotate(4deg);font-weight:800;font-size:15px;line-height:1.5;z-index:1}.setup-aside-foot{font-size:13px;font-weight:800;letter-spacing:.2em;padding:12px;color:#334c63;background:rgba(255,248,235,.8);border-radius:20px}.game-scene::before{background:rgba(255,245,229,.64)}.game-layout{height:calc(100dvh - 62px);max-width:1680px;margin:0 auto;padding:12px clamp(14px,2vw,32px) 15px;display:flex;flex-direction:column}.game-topbar{height:35px;min-height:35px;display:flex;align-items:center;justify-content:space-between;padding:0 4px 8px;gap:12px}.game-topbar>div{display:flex;align-items:center;gap:18px}.back-link{background:transparent;border:0;color:#284968;font-size:12px;font-weight:800;padding:0;text-decoration:underline;text-underline-offset:4px}.game-top-title{font-size:17px;font-weight:800;letter-spacing:.1em}.game-top-note{font-family:"Yu Gothic",sans-serif;font-size:11px;color:#715c50;background:rgba(255,250,242,.8);padding:6px 11px;border-radius:20px}.game-columns{display:grid;grid-template-columns:minmax(220px,24%) minmax(0,1fr) minmax(275px,27%);gap:clamp(10px,1.5vw,25px);height:calc(100% - 35px);min-height:0;align-items:stretch}.manager-panel,.side-panel{min-height:0}.manager-panel{position:relative;display:flex;flex-direction:column;max-height:100%;background:rgba(255,249,238,.8);border:1px solid rgba(187,139,90,.47);border-radius:19px;overflow:hidden;box-shadow:0 8px 20px rgba(78,50,27,.08)}.speech-bubble{position:absolute;z-index:1;top:13px;left:12px;right:12px;background:#fffefa;border:2px solid #2c4967;border-radius:16px;padding:12px 16px;font-weight:800;font-size:clamp(13px,1.25vw,18px);line-height:1.5;transform:rotate(-2deg);box-shadow:3px 4px 0 #d7e4e8}.speech-bubble::after{content:"";position:absolute;right:22px;bottom:-11px;width:17px;height:17px;transform:rotate(45deg);background:#fffefa;border-right:2px solid #2c4967;border-bottom:2px solid #2c4967}.manager-portrait{flex:1;min-height:0;display:flex;align-items:flex-end;justify-content:center;padding:63px 5px 0}.manager-portrait img{display:block;width:100%;height:100%;object-fit:contain;object-position:center bottom}.manager-info{background:#233e5c;color:white;padding:12px 17px;display:flex;flex-direction:column;gap:3px}.manager-info small{font-size:10px;letter-spacing:.13em;color:#d4e3f4}.manager-info strong{font-size:17px;letter-spacing:.08em}.manager-info span{font-family:"Yu Gothic",sans-serif;font-size:11px;color:#cad7e2}.portrait-preview{background:#182f48;color:#e9f1f7;padding:7px 12px 9px}.portrait-preview>span{font-family:"Yu Gothic",sans-serif;font-size:10px;display:block;margin-bottom:5px}.portrait-buttons{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}.portrait-buttons button{background:#35516e;color:white;border:1px solid #637b94;border-radius:6px;padding:5px 3px;font-size:10px}.portrait-buttons button[aria-pressed=true]{background:#fff;color:#243c57;border-color:white;font-weight:800}.board-column{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:0;gap:5px}.hand-strip{width:min(100%,calc(var(--board-size) + 30px));height:45px;min-height:45px;display:flex;align-items:center;gap:10px;padding:6px 12px;background:rgba(255,252,246,.88);border:1px dashed #cda982;border-radius:12px}.hand-owner{background:#273f5b;color:white;padding:5px 9px;border-radius:15px;font-size:11px;font-weight:800;white-space:nowrap}.player-hand .hand-owner{background:#ba344c}.hand-content{font-size:12px;color:#7a746e;flex:1}.clock-chip{font-size:11px;color:#41566f;padding:5px 8px;border:1px solid #d8dfe7;background:white;border-radius:7px;white-space:nowrap}.board-frame{width:calc(var(--board-size) + 26px);padding:5px 8px 11px;background:linear-gradient(140deg,#bb7e3f,#dfa759 30%,#a96731 85%,#85502b);border:2px solid #9c632f;border-radius:14px;box-shadow:0 8px 0 #7d4926,0 17px 18px rgba(68,43,25,.24),inset 0 1px 3px #fff1ce}.file-coordinates{height:16px;display:grid;grid-template-columns:repeat(9,1fr);padding-right:18px;align-items:center;text-align:center;color:#fff8e8;font-size:11px;font-family:Georgia,serif;font-weight:800}.board-main{display:flex}.board-grid{width:var(--board-size);height:var(--board-size);display:grid;grid-template-columns:repeat(9,1fr);grid-template-rows:repeat(9,1fr);border-left:1.5px solid #6b4b27;border-top:1.5px solid #6b4b27;background-color:#e9b966;background-image:linear-gradient(90deg,rgba(255,240,185,.27),transparent 30%,rgba(155,91,33,.06) 70%,transparent),repeating-linear-gradient(0deg,transparent 0px,rgba(255,255,255,.05) 4px,transparent 7px);box-shadow:inset 0 0 14px rgba(128,67,21,.2)}.square{display:grid;place-items:center;position:relative;border-right:1px solid rgba(96,63,30,.61);border-bottom:1px solid rgba(96,63,30,.61)}.piece{width:69%;height:81%;display:grid;place-items:center;background:linear-gradient(120deg,#ffe8ae,#fff2c9 50%,#dba766);clip-path:polygon(50% 0,98% 20%,91% 100%,9% 100%,2% 20%);filter:drop-shadow(1px 2px 1px rgba(85,52,24,.5));position:relative;color:#172b3e;font-size:clamp(16px,2vw,29px);font-weight:900;line-height:1;text-shadow:0 1px 1px #fff4ce}.piece span{transform:translateY(8%)}.piece.manager{transform:rotate(180deg)}.rank-coordinates{width:18px;display:grid;grid-template-rows:repeat(9,1fr);text-align:center;color:#fff7e5;font-size:10px;font-weight:800}.rank-coordinates span{display:grid;place-items:center}.side-panel{display:flex;flex-direction:column;gap:11px}.info-card,.history-card,.action-card{background:rgba(255,253,248,.96);border-radius:18px;box-shadow:0 9px 26px rgba(71,51,32,.11);padding:15px 17px;border:1px solid rgba(212,194,170,.5)}.card-topline{display:flex;align-items:center;justify-content:space-between;gap:8px}.preview-tag{font-family:"Yu Gothic",sans-serif;color:#27435d;background:#e6eef3;border-radius:20px;padding:5px 8px;font-size:10px;font-weight:700}.side-panel h2{margin:8px 0;font-size:20px;letter-spacing:.1em}.info-card>p{font-size:12px;color:#6e7782;margin:0 0 9px}.info-divider{height:1px;background:#e6ddd1;margin:11px 0}.info-row{display:flex;justify-content:space-between;padding:4px 1px;font-family:"Yu Gothic",sans-serif;font-size:11px}.info-row span{color:#718091}.info-row strong{color:#31455d}.history-card{flex:1;min-height:90px;display:flex;flex-direction:column}.history-count{font-family:"Yu Gothic",sans-serif;font-size:12px;color:#677788}.history-empty{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px dashed #dfd2c3;border-radius:11px;background:#fbf8f3;text-align:center;padding:10px;color:#536b7d}.history-ornament{font-size:26px;color:#c2a783;margin-bottom:6px}.history-empty strong{font-size:14px}.history-empty p{font-family:"Yu Gothic",sans-serif;font-size:11px;line-height:1.5;margin:8px 0 0;color:#87909a}.muted-note{font-family:"Yu Gothic",sans-serif;color:#9a8d7f;font-size:10px}.game-actions{display:grid;grid-template-columns:repeat(2,1fr);gap:7px;margin-top:11px}.game-actions button{border-radius:9px;border:1px solid #dae2eb;background:#f5f7f9;color:#8a96a2;min-height:37px;font-size:12px;font-weight:800;opacity:1}
@media (min-width:1500px){.game-layout{--board-size:min(63vh,660px)}.game-columns{grid-template-columns:minmax(265px,23%) minmax(0,1fr) minmax(300px,26%)}.manager-portrait{padding-top:75px}}
@media (max-width:1499px){.game-layout{--board-size:min(58vh,560px)}.game-columns{grid-template-columns:minmax(205px,23%) minmax(0,1fr) minmax(265px,27%)}.side-panel h2{font-size:17px}.info-card,.history-card,.action-card{padding:11px 13px}.manager-info{padding:8px 12px}.manager-info strong{font-size:14px}.portrait-preview{padding:5px 9px}.game-actions button{min-height:32px}.hand-strip{height:40px;min-height:40px}.speech-bubble{padding:8px 12px}}
@media (max-height:800px){.game-layout{--board-size:min(calc(100dvh - 240px),535px);padding-top:7px;padding-bottom:8px}.game-topbar{height:28px;min-height:28px}.game-columns{height:calc(100% - 28px)}.hand-strip{height:37px;min-height:37px}.board-column{gap:4px}.board-frame{padding-bottom:8px}.info-card,.history-card,.action-card{padding-top:9px;padding-bottom:9px}.side-panel{gap:7px}.info-card h2,.history-card h2{margin:5px 0}.history-empty p{margin-top:3px}.setup-card{padding-top:18px;padding-bottom:17px}.setup-card h1{font-size:27px}.setup-intro{margin-bottom:12px}.option-group{padding:10px 0}.option-face{min-height:42px}.setup-footer{padding-top:10px}}

.volume-setting{display:flex;align-items:center;gap:10px;border-top:1px solid #e8ded1;padding:12px 0 4px;font-size:13px;font-weight:800}.volume-setting input{flex:1;accent-color:#b6364f}.volume-setting span{min-width:35px;text-align:right;font-family:"Yu Gothic",sans-serif;font-size:12px}

/* Phase 1 visual review: retain the three-column proportions and board size. */
.manager-panel{
  background:linear-gradient(180deg,rgba(255,251,240,.96) 0%,rgba(250,238,218,.93) 58%,rgba(236,210,177,.88) 100%);
}
.speech-stack{position:relative;z-index:1;flex:none;display:flex;flex-direction:column;gap:10px;padding:12px 12px 0}
.speech-stack .speech-bubble{
  position:relative;inset:auto;transform:none;padding:8px 12px;
  font-size:clamp(12px,.86vw,14px);line-height:1.43;letter-spacing:.015em;
  box-shadow:2px 3px 0 #d7e4e8;overflow-wrap:anywhere;
}
.speech-stack .speech-bubble.second{margin-left:8px;margin-right:5px}
.speech-stack .speech-bubble.second::after{right:auto;left:27px}
.manager-portrait{padding:3px 5px 0;background:radial-gradient(ellipse at 50% 75%,rgba(255,248,229,.85),rgba(243,220,192,.28) 65%,transparent 85%)}
.manager-portrait img{width:95%;height:95%}
.board-frame{background:linear-gradient(140deg,#aa7d4d,#c79760 30%,#97673d 85%,#79502f);border-color:#8e6036}
.board-grid{background-color:#dbb77e;background-image:linear-gradient(90deg,rgba(255,236,200,.15),transparent 30%,rgba(126,76,38,.055) 70%,transparent),repeating-linear-gradient(0deg,transparent 0px,rgba(255,255,255,.045) 4px,transparent 7px)}
.info-card h2{margin-bottom:8px}
.info-card .info-divider{margin:8px 0}
.info-row{font-size:13px;line-height:1.45;padding:5px 2px;gap:10px}
.info-row strong{font-size:13px;text-align:right}
.info-row-primary{background:#f3f6f8;border-radius:8px;padding:8px 9px;margin-bottom:5px}
.info-row-primary span,.info-row-primary strong{font-weight:800;color:#243e5a}
.history-card{overflow:hidden}
.history-card h2{display:flex;align-items:baseline;gap:9px}
.history-card h2 small{font-family:'Yu Gothic',sans-serif;font-size:11px;font-weight:700;color:#a44b5a;letter-spacing:0}
.history-preview-note{font-family:'Yu Gothic',sans-serif;font-size:11px;line-height:1.45;color:#667586;margin:0 0 9px}
.history-list{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;border:1px solid #e7dfd4;border-radius:9px;background:#fffdf9;scrollbar-color:#baa999 #f5f0e8;scrollbar-width:thin}
.history-list:focus-visible{outline:3px solid #bf4253;outline-offset:-3px}
.history-row{display:grid;grid-template-columns:29px minmax(0,1fr) minmax(0,1fr);align-items:center;gap:6px;min-height:37px;padding:4px 8px;border-bottom:1px solid #eee7dc;font-family:'Yu Gothic',sans-serif;font-size:12px;white-space:nowrap}
.history-row:last-child{border-bottom:0}
.history-number{color:#7d8791;font-size:11px;font-weight:700}
.history-player{color:#a52f47;font-weight:700}
.history-manager{color:#2d4965;font-weight:700}
.history-row.current-preview{background:#fff0e9;border-left:3px solid #b7354b;padding-left:5px;font-weight:800}
.history-row.current-preview .history-number::before{content:'▶ ';color:#b7354b;font-size:9px}
.game-actions{gap:9px}
.game-actions button{min-height:42px;font-size:13px;line-height:1.2}
@media (max-width:1499px){
  .speech-stack{gap:8px;padding:9px 9px 0}
  .speech-stack .speech-bubble{font-size:12px;padding:6px 9px;line-height:1.38}
  .manager-portrait{padding:2px 3px 0}
  .info-row{font-size:12px;padding:3px 2px}
  .info-row strong{font-size:12px}
  .info-row-primary{padding:6px 8px}
  .history-row{min-height:34px;font-size:11px;padding:3px 6px;gap:3px;grid-template-columns:25px minmax(0,1fr) minmax(0,1fr)}
  .history-row.current-preview{padding-left:3px}
  .history-preview-note{font-size:10px;margin-bottom:5px}
  .game-actions button{min-height:38px;font-size:12px}
}
@media (max-height:800px){
  .speech-stack{gap:7px;padding-top:7px}
  .speech-stack .speech-bubble{padding:5px 8px;line-height:1.34}
  .manager-info{padding-top:6px;padding-bottom:6px}
  .portrait-preview{padding-top:4px;padding-bottom:5px}
  .info-card h2,.history-card h2{margin-top:4px;margin-bottom:5px}
  .history-preview-note{line-height:1.3;margin-bottom:4px}
  .game-actions button{min-height:36px}
}
/* Final small-screen tuning after 1280 × 720 visual inspection. */
.manager-portrait img{width:98%;height:98%}
@media (max-width:1499px){.info-row,.info-row strong{font-size:13px}.history-row{font-size:12px;min-height:35px}}
@media (max-height:800px){.game-actions button{min-height:39px}}
/* Keep the playable grid square after accounting for the right-hand rank labels. */
.board-frame{width:calc(var(--board-size) + 40px)}
.board-grid{flex:0 0 var(--board-size)}
/* Show the sign from the original scene image itself, without a second UI sign. */
.game-scene .scene-background{
  background-image:url('/assets/shop-background.png');
  background-size:auto calc(100% + 20px);
  background-position:left -20px;
  background-repeat:no-repeat;
}
.game-scene::before{background:transparent}
.game-scene .site-header{
  --sign-clear:clamp(285px,22vw,420px);
  background:linear-gradient(90deg,rgba(255,252,246,.06) 0 var(--sign-clear),rgba(255,252,246,.94) calc(var(--sign-clear) + 155px),rgba(255,252,246,.96) 100%);
}
.game-scene .brand{margin-left:clamp(280px,22vw,400px)}
.game-scene .game-topbar>div:first-child{margin-left:clamp(280px,22vw,400px)}
/* Render every portrait in full and preserve the original RGB colours. */
.manager-portrait img{
  width:100%;height:100%;object-fit:contain;object-position:center bottom;
  filter:none;opacity:1;mix-blend-mode:normal;
}
/* The rank labels all share one set of drawing conditions. */
.board-frame{width:calc(var(--board-size) + 44px)}
.file-coordinates{padding-right:22px}
.rank-coordinates{width:22px;flex:0 0 22px;font-family:Meiryo,'Yu Gothic',sans-serif;font-size:13px;font-weight:800;line-height:1;color:#fff9e9;opacity:1;text-shadow:0 1px 2px rgba(64,35,18,.8),0 0 1px rgba(255,255,255,.5)}
.rank-coordinates span{font:inherit;color:inherit;opacity:1;text-shadow:inherit}
/* Keep the five-sided silhouette while adding only a little wood depth. */
.piece{
  background:linear-gradient(155deg,#fff3d2 0%,#fbe3ad 26%,#efd096 74%,#d8aa6c 100%);
  box-shadow:inset 0 2px 2px rgba(255,255,255,.72),inset 0 -2px 2px rgba(112,66,28,.18);
  filter:drop-shadow(0 1px 0 rgba(107,63,32,.25)) drop-shadow(1px 2px 2px rgba(77,48,28,.28));
}
/* The two move columns follow actual actor order in the display fixture. */
.history-row{grid-template-columns:29px minmax(0,1fr) minmax(0,1fr)}
.history-move{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:4px;min-width:0;align-items:center}
.move-actor{font-size:11px;font-weight:800;white-space:nowrap}
.history-move.player .move-actor{color:#a52f47}
.history-move.manager .move-actor{color:#2d4965}
.move-notation{color:#263c51;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:1499px){
  .game-scene .brand-divider,.game-scene .brand-sub{display:none}
  .game-scene .brand,.game-scene .game-topbar>div:first-child{margin-left:clamp(280px,22vw,400px)}
  .rank-coordinates{font-size:12px}
  .history-row{grid-template-columns:25px minmax(0,1fr) minmax(0,1fr)}
  .move-actor{font-size:10px}
  .history-move{gap:3px}
}
/* Match visible character height to the thinking portrait, accounting for canvas margins. */
.manager-portrait{--portrait-scale:1.55;--portrait-width-factor:1;--portrait-height-factor:1;overflow:hidden;background:#fff}
.manager-portrait img{
  width:calc(100% * var(--portrait-width-factor));
  height:calc(100% * var(--portrait-height-factor));
  flex-shrink:0;transform-origin:center bottom;transform:scale(var(--portrait-scale));
}
/* Canvas: thinking 1246 x 1262 (character height 1254), start 1210 x 1300 (1271). */
.manager-portrait.start{--portrait-width-factor:.9581;--portrait-height-factor:1.0163}
.manager-portrait.start img{transform:translateX(-5%) scale(var(--portrait-scale))}
/* Waiting canvas 1254 x 1254; character height 1235, excluding transparent margins. */
.manager-portrait.waiting{--portrait-width-factor:1.0219;--portrait-height-factor:1.0091}
@media (max-width:1499px){
  .manager-portrait{--portrait-scale:1.20}
  .manager-portrait.start img{transform:translateX(-3%) scale(var(--portrait-scale))}
}

.history-move{gap:6px}
@media (max-width:1499px){.history-move{gap:5px}}
/* Final PC visual adjustment: keep the source image's top and both sides in view. */
.game-scene .scene-background{
  background-size:100% auto;
  background-position:left top;
  background-repeat:no-repeat;
}
.game-scene::before{background:rgba(255,249,238,.51)}
/* Keep the earlier sign-clearing header positions and the original header height. */
.game-scene .site-header{
  border-bottom-color:rgba(74,63,52,.1);
  box-shadow:0 2px 18px rgba(62,43,27,.06);
}
/* Portrait card: warm shop interior, gold frame and gently tilted dialogue. */
.manager-panel{
  --speech-font-size:clamp(15px,1.15vw,21px);
  border:1px solid #cba778;border-radius:26px;background:#f7e6c5;
  box-shadow:0 8px 24px rgba(89,59,26,.13),inset 0 0 0 4px rgba(255,249,232,.7);
}
.manager-stage{
  position:relative;isolation:isolate;flex:1;min-height:0;display:flex;flex-direction:column;
  background-image:linear-gradient(rgba(255,246,224,.28),rgba(255,240,209,.28)),url('/assets/shop-background.png');
  background-size:auto 100%;background-position:24% bottom;background-repeat:no-repeat;
}
.manager-stage::after{
  content:'';position:absolute;inset:10px;border:1px solid rgba(194,154,94,.4);
  border-radius:19px;z-index:2;pointer-events:none;
}
.manager-stage .speech-stack{
  z-index:3;gap:16px;padding:18px 14px 10px;
  min-height:calc(var(--speech-font-size) * 9.6 + 88px);
}
.manager-stage .speech-bubble{
  margin:0;padding:12px 15px;background:#fffef9;border:2px solid #284e70;border-radius:25px;
  color:#22496a;font-family:'UD Digi Kyokasho NK-B','UD デジタル 教科書体 NK-B','BIZ UDPGothic',Meiryo,sans-serif;
  font-size:var(--speech-font-size);font-weight:700;line-height:1.6;letter-spacing:.035em;
  transform:rotate(-2deg);transform-origin:center center;
  box-shadow:5px 7px 0 #dcebf0;overflow-wrap:anywhere;
}
.manager-stage .speech-bubble.second{margin:0;transform:rotate(-1.5deg)}
.manager-stage .speech-bubble::after,
.manager-stage .speech-bubble.second::after{
  left:auto;right:22px;bottom:-11px;width:18px;height:18px;
  background:#fffef9;border-right:2px solid #284e70;border-bottom:2px solid #284e70;
}
.manager-stage .manager-portrait{
  position:relative;z-index:1;container-type:size;background:transparent;padding:6px 5px 0;
}
.manager-stage .manager-portrait img{
  width:calc(min(100cqw * var(--portrait-scale),100cqh * 1246 / 1262) * var(--portrait-width-factor));
  height:calc(min(100cqw * var(--portrait-scale) * 1262 / 1246,100cqh) * var(--portrait-height-factor));
  transform:none;
}
.manager-stage .manager-portrait.start img{transform:translateX(-4%)}
.manager-panel .manager-info{
  flex:none;position:relative;z-index:3;background:#193e66;padding:16px 20px;gap:5px;
  border-top:1px solid rgba(205,171,122,.65);
}
.manager-panel .manager-info small{font-family:'BIZ UDPGothic',Meiryo,sans-serif;font-size:12px;font-weight:700;color:#e1eef5}
.manager-panel .manager-info strong{font-size:20px;letter-spacing:.07em}
.manager-panel .manager-info span{font-size:13px;color:#c4d8e9}
.manager-thinking-time{display:inline-block;margin-left:.55em;font-family:'BIZ UDPGothic',Meiryo,sans-serif;font-variant-numeric:tabular-nums;white-space:nowrap}
@media (max-height:800px){
  .manager-panel{--speech-font-size:14px}
  .manager-stage .speech-stack{gap:12px;padding:13px 12px 8px;min-height:calc(var(--speech-font-size) * 9.6 + 76px)}
  .manager-stage .speech-bubble{padding:10px 13px;border-radius:22px;line-height:1.55}
  .manager-panel .manager-info{padding:11px 17px;gap:4px}
  .manager-panel .manager-info strong{font-size:18px}
  .manager-panel .manager-info small{font-size:11px}
  .manager-panel .manager-info span{font-size:12px}
}

/* Softer move record styling with stable CSS Grid columns and an internal scroll region. */
.history-card{
  background:linear-gradient(180deg,rgba(255,253,248,.98),rgba(252,246,236,.97));
  border-color:rgba(207,181,149,.54);
  box-shadow:0 7px 20px rgba(79,52,28,.09);
}
.history-list{
  background:rgba(255,252,246,.72);
  border-color:rgba(211,192,165,.55);
  border-radius:11px;
}
.history-row{
  border-bottom:1px solid rgba(205,184,159,.42);
  background:transparent;
}
.history-row:nth-child(even){background:rgba(246,236,218,.30)}
.history-row.current-preview{
  background:rgba(245,227,209,.68);
  border-left:3px solid #b87960;
}
.history-row.current-preview .history-number::before{color:#a76d55}
.history-number{color:#887663}
@media (max-width:1499px){
  .history-row{grid-template-columns:25px minmax(0,1fr) minmax(0,1fr)}
}
/* Align the game header title to the left while keeping the background sign readable. */
.game-scene .site-header{padding-left:clamp(14px,1.4vw,24px)}
.game-scene .brand{margin-left:0}
.game-scene .brand-divider{display:block}
.game-scene .brand-sub{display:inline}

/* Phase 4 gameplay: retain the three-column layout and make the existing pieces interactive. */
.board-grid .square{width:100%;height:100%;padding:0;border-top:0;border-left:0;border-right:1px solid rgba(96,63,30,.61);border-bottom:1px solid rgba(96,63,30,.61);border-radius:0;background:transparent;color:inherit;appearance:none;min-width:0;min-height:0}
.board-grid .square:disabled{cursor:default}
/* A stationary pointer must not make a fresh board look preselected. */
.board-grid .square{-webkit-tap-highlight-color:transparent}
@media(min-width:1101px) and (hover:hover) and (pointer:fine){.board-grid .square:not(:disabled):hover{background:rgba(255,251,223,.35)}}
.board-grid .square:focus:not(:focus-visible),.board-grid .square[data-pointer-focus]:focus{outline:none}
.board-grid .square.selected{background:rgba(173,46,68,.21)}
.board-grid .square.last-target,.board-grid .square.last-source{background:rgba(255,252,205,.24)}
.board-grid .square.hint-source,.board-grid .square.hint-target{box-shadow:inset 0 0 0 3px #2d8e75}
.board-grid .square.check-square{box-shadow:inset 0 0 0 3px #c72f47;background:rgba(198,47,71,.18)}
.board-grid .square.legal-target::after{content:'';position:absolute;width:22%;height:22%;border-radius:50%;background:rgba(35,87,88,.56);pointer-events:none}
.board-grid .square.legal-target:has(.piece)::after{width:82%;height:82%;border:3px solid rgba(35,87,88,.65);background:transparent}
.board-grid .square .piece{pointer-events:none}
.hand-content{display:flex;align-items:center;gap:4px;min-width:0;overflow-x:auto;white-space:nowrap}
.hand-piece{flex:0 0 auto;position:relative;display:inline-flex;align-items:center;gap:0;border:0;background:transparent;color:#172b3e;border-radius:4px;padding:0 2px;font-size:16px;font-weight:900;line-height:1}
.hand-piece>span{flex:none;display:grid;place-items:center;width:1.2em;height:1.35em;padding-top:.08em;background:linear-gradient(155deg,#fff3d2 0%,#fbe3ad 26%,#efd096 74%,#d8aa6c 100%);clip-path:polygon(50% 0,98% 20%,91% 100%,9% 100%,2% 20%);box-shadow:inset 0 2px 2px rgba(255,255,255,.72),inset 0 -2px 2px rgba(112,66,28,.18);filter:drop-shadow(0 1px 0 rgba(107,63,32,.25)) drop-shadow(1px 2px 2px rgba(77,48,28,.28));font-family:"Yu Mincho","Hiragino Mincho ProN","Noto Serif JP",serif;font-weight:900;line-height:1;text-shadow:0 1px 1px #fff4ce}
.manager-hand .hand-piece>span{transform:rotate(180deg)}
.hand-piece small{position:relative;z-index:1;flex:none;align-self:flex-end;min-width:1.1em;margin-left:-4px;padding:1px 2px;border:1px solid #be9c73;border-radius:3px;background:#fff9ec;color:#263a50;text-align:center;font-family:'Yu Gothic',sans-serif;font-size:10px;font-weight:800;line-height:1.1}
.hand-piece:disabled{opacity:.8;cursor:default}
.hand-piece.selected{outline:2px solid #bb344b;background:transparent}
.hand-piece.selected>span{background:#fff0d2}
.history-move{border:0;background:transparent;padding:2px 0;text-align:left;font:inherit;cursor:pointer;border-radius:4px}
.history-move:hover{background:#fff1dc}
.history-move:focus-visible{outline:2px solid #bf4253}
.game-actions button:not(:disabled){background:#fff;color:#29445e;border-color:#cbd9e6}
.game-actions button:not(:disabled):hover{background:#eef4f8}

/* PC record tools use the same two-column rhythm as the play controls. */
@media (min-width:1101px){
 .action-card>:is(.desktop-conversation-button,.record-download-button){display:inline-flex;align-items:center;justify-content:center;vertical-align:top;width:calc((100% - 9px)/2);min-height:42px;margin:9px 0 0;padding:8px 6px;border:1px solid #cbd9e6;border-radius:9px;background:#fff;color:#29445e;font-size:13px;font-weight:800;line-height:1.2}
 .action-card>.desktop-conversation-button{margin-right:9px}
 .action-card>:is(.desktop-conversation-button,.record-download-button):hover{background:#eef4f8}
}
@media (min-width:1101px) and (max-width:1499px){.action-card>:is(.desktop-conversation-button,.record-download-button){min-height:38px;font-size:12px}}
@media (min-width:1101px) and (max-height:800px){.action-card>:is(.desktop-conversation-button,.record-download-button){min-height:39px}}
.check-notice{color:#af2943;font-weight:900;margin:5px 0 0}
.game-error{color:#a6313d;background:#fff1ed;border-radius:6px;padding:5px;margin:6px 0;font:12px/1.4 'Yu Gothic',sans-serif}
.retry-button,.exit-replay,.result-actions button{border:1px solid #a9bed0;background:#fff;border-radius:7px;color:#29445e;padding:5px 9px;font:700 11px 'Yu Gothic',sans-serif;cursor:pointer}
.retry-button,.exit-replay{width:100%;margin-top:7px}
.replay-controls{display:flex;justify-content:center;align-items:center;gap:5px;margin-top:9px;font:700 11px 'Yu Gothic',sans-serif;color:#4e6277}
.replay-controls button{border:1px solid #d5dce3;border-radius:5px;background:#fff;color:#29445e;padding:3px 7px;min-width:29px}
.replay-controls button:disabled{opacity:.45}
.result-actions{display:flex;align-items:center;flex-wrap:wrap;gap:5px;margin-top:8px;padding-top:8px;border-top:1px solid #e1d7c8;font:11px 'Yu Gothic',sans-serif}
.result-actions strong{width:100%;color:#a33148;font-size:13px}
.game-modal{position:absolute;inset:0;z-index:5;display:grid;place-items:center;background:rgba(35,40,48,.36)}
.game-modal>div{width:min(360px,90vw);padding:22px;background:#fffdf8;border:2px solid #ba9b75;border-radius:16px;box-shadow:0 20px 50px rgba(30,30,30,.25);text-align:center}
.game-modal h2{margin:0 0 8px;font-size:22px}.game-modal p{margin:0 0 17px;font-size:13px}
.game-modal button{border:1px solid #a6b8c9;border-radius:8px;background:#fff;padding:9px 15px;margin:0 4px;color:#2d4762;font-weight:800}
.game-modal button:first-of-type{background:#263f5c;color:#fff}
.game-toast{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);z-index:6;background:#fff6e4;color:#82453d;border:1px solid #d9ad87;padding:7px 12px;border-radius:8px;font:12px 'Yu Gothic',sans-serif}
.header-fullscreen{white-space:nowrap}
.header-fullscreen[aria-pressed="true"]{background:#e6eef3;border-color:#9eb1c4}
.header-fullscreen:disabled{opacity:.5}
.saved-records{border-top:1px solid #e5d6c6;margin-top:23px;padding-top:12px;max-height:190px;overflow:auto}
.saved-records h2{font-size:14px;margin:0 0 6px}.saved-records p{font-size:12px;color:#6a7784;margin:3px 0}
.saved-record{display:flex;gap:7px;align-items:center;justify-content:space-between;width:100%;border:0;border-bottom:1px solid #eee3d6;background:transparent;text-align:left;padding:6px 2px;color:#2d4560;font:11px 'Yu Gothic',sans-serif}
.saved-record strong{white-space:nowrap;color:#a7354c}
/* Shared finish for secondary controls that had only browser defaults.
   Keep this scoped: board squares, move rows, switches and primary actions
   retain their own purpose-specific styles. */
:where(.mobile-sheet .record-download-button,.record-save-notice button,[data-watch-save-warning] button,.stored-watch-item>[data-watch-raw-record],.review-state>[data-action="review-retry"],.mobile-sheet-heading>button,.mobile-seat-toggle){min-height:40px;padding:8px 13px;border:1px solid #a9bed0;border-radius:9px;background:#fff;color:#29445e;font:inherit;font-size:13px;font-weight:800;line-height:1.4;cursor:pointer}
:where(.mobile-sheet .record-download-button,.record-save-notice button,[data-watch-save-warning] button,.stored-watch-item>[data-watch-raw-record],.review-state>[data-action="review-retry"],.mobile-sheet-heading>button,.mobile-seat-toggle):not(:disabled):hover{background:#eef4f8}
:where(.mobile-sheet .record-download-button,.record-save-notice button,[data-watch-save-warning] button,.stored-watch-item>[data-watch-raw-record],.review-state>[data-action="review-retry"],.mobile-sheet-heading>button,.mobile-seat-toggle):disabled{opacity:.45;cursor:not-allowed}
.stored-watch-item>[data-watch-raw-record]{max-width:100%;margin:0 0 12px;white-space:normal;text-align:left}
.record-save-notice button,[data-watch-save-warning] button{margin:0 8px 6px 0}
.watch-import{display:grid;gap:6px;color:#304760;font-size:13px;line-height:1.5}
.watch-import input[type="file"]{display:block;width:100%;min-width:0;max-width:100%;color:#697889;font-size:12px}
.watch-import input[type="file"]::file-selector-button{min-height:40px;margin-right:10px;padding:9px 14px;border:1px solid #9eb1c4;border-radius:10px;background:#fff;color:#263e59;font:inherit;font-size:13px;font-weight:800;line-height:1.4;cursor:pointer}
.watch-import input[type="file"]::file-selector-button:hover{background:#eef4f8}
.watch-import input[type="file"]:focus-visible{outline:3px solid #bf4253;outline-offset:3px;border-radius:10px}
/* Saved-game file tools match the surrounding outline controls. */
.saved-records .normal-record-import{display:grid;gap:6px;margin-top:10px;color:#304760;font-size:13px;line-height:1.5}
.saved-records .normal-record-import input[type="file"]{display:block;max-width:100%;width:100%;min-width:0;color:#697889;font-size:12px}
.saved-records .normal-record-import input[type="file"]::file-selector-button,.saved-records>[data-action="export-records"]{min-height:40px;padding:9px 14px;border:1px solid #9eb1c4;border-radius:10px;background:#fff;color:#263e59;font:inherit;font-size:13px;font-weight:800;line-height:1.4;cursor:pointer}
.saved-records .normal-record-import input[type="file"]::file-selector-button{margin-right:10px}
.saved-records>[data-action="export-records"]{display:block;max-width:100%;margin:9px 0 8px;white-space:normal;text-align:center}
.saved-records .normal-record-import input[type="file"]::file-selector-button:hover,.saved-records>[data-action="export-records"]:hover{background:#eef4f8}
.saved-records .normal-record-import input[type="file"]:focus-visible{outline:3px solid #bf4253;outline-offset:3px;border-radius:10px}
.option input:disabled+.option-face{opacity:.45;cursor:not-allowed}
@media (max-height:800px){.side-panel{overflow-y:auto}.history-card{min-height:135px;flex:1 0 135px}.action-card{flex:0 0 auto}.info-card{flex:0 0 auto}.saved-records{max-height:125px}}

/* Phase 5: three evidence-based post-game cards. */
.result-actions .review-primary{background:#243f5d;color:#fff;border-color:#243f5d;font-size:12px}
.review-scene .scene-background{background-size:100% auto;background-position:left top}
.review-scene::before{background:rgba(255,247,234,.75)}
.review-layout{max-width:1200px;min-height:calc(100dvh - 62px);margin:0 auto;padding:24px clamp(22px,4vw,56px);display:flex;flex-direction:column;gap:15px}
.review-heading{position:relative;display:flex;align-items:center;justify-content:space-between;min-height:128px;padding:14px 26px;background:rgba(255,253,247,.92);border:1px solid #d8c5af;border-radius:18px;overflow:hidden}
.review-heading h1{font-size:32px;letter-spacing:.08em;margin:8px 0 3px}.review-heading p{font-size:13px;color:#68798b;margin:0}
.review-heading img{height:128px;width:140px;object-fit:contain;object-position:center top;align-self:flex-end}
.review-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;flex:1}
.review-card{position:relative;display:flex;flex-direction:column;min-height:275px;padding:25px 23px;background:rgba(255,253,248,.96);border:1px solid #d8c1a5;border-radius:17px;box-shadow:0 12px 30px rgba(72,47,24,.1)}
.review-number{font:700 15px Georgia,serif;color:#b65a5d;letter-spacing:.1em}.review-card h2{font-size:18px;margin:12px 0 10px;color:#253e58}.review-card h3{font-size:21px;margin:0 0 13px;line-height:1.4;color:#a73349}.review-card p{font:14px/1.85 'Yu Gothic',sans-serif;color:#3b4b59;margin:0 0 20px}
.review-card button{align-self:flex-start;margin-top:auto;border:1px solid #b7cada;border-radius:8px;background:#f5f9fb;color:#264a64;padding:8px 13px;font-size:12px;font-weight:800}
.review-card button:hover{background:#e7f2f5}
.review-method{font:11px/1.6 'Yu Gothic',sans-serif;color:#68798a;background:rgba(255,253,247,.85);border-radius:8px;padding:8px 12px;margin:0}
.review-footer{display:flex;justify-content:flex-end;gap:10px}.review-footer button{padding:10px 15px;font-size:13px}
.review-state{flex:1;min-height:270px;display:flex;flex-direction:column;align-items:center;justify-content:center;background:rgba(255,253,248,.94);border:1px solid #d8c1a5;border-radius:18px;color:#344e66;text-align:center}
.review-spinner{width:33px;height:33px;border:3px solid #d5dce1;border-top-color:#ad394f;border-radius:50%;animation:review-spin .7s linear infinite}
@keyframes review-spin{to{transform:rotate(360deg)}}
.site-footer{min-height:44px;display:flex;align-items:center;justify-content:center;padding:12px 24px;background:#fffaf2;border-top:1px solid #dfd0bf;font:13px 'Yu Gothic',sans-serif}
.site-footer a{color:#34516b;text-underline-offset:4px}.site-footer a:hover{color:#a73349}.site-footer a:focus-visible{outline:3px solid #bf4253;outline-offset:4px}
@media(max-width:850px){.review-cards{grid-template-columns:1fr}.review-card{min-height:190px}.review-heading img{height:105px}.review-layout{padding:12px}}

/* Full-mode review: one central card, then seven always-readable cards. */
.full-review-page,.full-review-page body,.full-review-page #app{min-width:0}
.full-review-layout{max-width:1320px;gap:22px;padding-bottom:32px}
.full-review-primary{background:rgba(255,253,248,.98);border:1px solid #cdb493;border-top:4px solid #ac3b50;border-radius:22px;box-shadow:0 15px 38px rgba(72,47,24,.12);overflow:hidden}
.full-review-primary .review-card{min-height:0;border:0;border-radius:0;background:transparent;box-shadow:none;padding:30px 32px}
.full-review-primary .review-card+.review-card{border-top:1px solid #e6d8c6}
.full-review-feature{display:grid;grid-template-columns:minmax(250px,.9fr) minmax(0,1.1fr);gap:18px 30px}
.full-review-feature.without-evidence{display:block}
.full-review-feature h2{font-size:24px;margin:10px 0 14px}
.full-review-feature h3{font-size:23px}
.full-review-feature .review-card-copy p{font-size:15px;line-height:1.95;margin-bottom:0}
.review-evidence{margin:0;padding:16px 18px;background:#f9f3e9;border-radius:12px;font:13px/1.8 'Yu Gothic',sans-serif;overflow-wrap:anywhere}
.review-evidence>div+div{margin-top:12px;padding-top:10px;border-top:1px solid #e6dbcd}
.review-evidence dt{font-weight:800;color:#9a3b4c;margin-bottom:3px}
.review-evidence dd{margin:0;color:#344c60}
.review-card-links{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px;align-items:flex-start}
.review-card .review-card-links button{margin-top:0;align-self:auto;line-height:1.5;text-align:left}
.full-review-secondary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;align-items:stretch}
.full-review-compact{min-height:0;padding:23px;gap:12px;overflow-wrap:anywhere}
.full-review-compact h2{font-size:18px;margin:7px 0 10px}
.full-review-compact h3{font-size:19px}
.full-review-compact p{margin-bottom:0}
.full-review-compact .review-card-links{margin-top:auto}
.full-review-compact .review-evidence{font-size:12px;padding:12px 14px}
.full-review-progress{flex:none;min-height:180px;padding:22px;gap:12px}
.full-review-progress p{font:14px/1.7 'Yu Gothic',sans-serif;margin:0}
.full-review-progress progress{width:min(400px,85%);height:10px;accent-color:#a73349}
.review-notice{margin:0;padding:14px 18px;border:1px solid #dfc1a2;border-radius:12px;background:#fff4e2;color:#704b35;font:14px/1.8 'Yu Gothic',sans-serif}
.full-review-layout .review-footer{flex-wrap:wrap}
.review-board-modal{position:fixed;inset:0;z-index:30;display:grid;place-items:center;padding:16px;background:rgba(21,36,51,.6)}
.review-board-modal>section{width:min(580px,100%);max-height:calc(100dvh - 32px);overflow:auto;background:#fffaf2;border:1px solid #c9ad8b;border-radius:19px;padding:20px 24px;box-shadow:0 20px 60px #15243355}
.review-board-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}
.review-board-heading h2{font-size:20px;margin:0}
.review-board-modal button{border:1px solid #bacbd6;border-radius:8px;background:#fff;color:#2c4862;padding:8px 12px;font-size:13px}
.review-branch-tabs{display:flex;gap:7px;margin-top:16px;flex-wrap:wrap}
.review-branch-tabs button[aria-pressed="true"]{background:#284663;color:#fff;border-color:#284663}
.review-board-modal p{font:12px/1.7 'Yu Gothic',sans-serif}
.review-mini-board{--board-size:min(45dvh,380px,calc(100vw - 100px));width:calc(var(--board-size) + 18px);margin:auto}
.review-mini-board .piece{font-size:clamp(16px,2.2vw,24px)}
.review-mini-board .square:disabled{cursor:default;opacity:1}
.review-mini-board .file-coordinates,.review-mini-board .rank-coordinates{background:#ad783b}
.review-board-note{color:#846951}
/* A quiet board-side lesson; the actual game and analysis budgets stay intact. */
.review-coach-modal>section{width:min(1000px,100%)}
.review-coach-body{display:grid;grid-template-columns:minmax(230px,1fr) minmax(280px,1.1fr);gap:24px;align-items:start}
.review-coach-talk{padding:20px;background:#fff1d8;border:1px solid #dcc09a;border-radius:18px 18px 18px 4px;margin-top:16px;color:#29435b;overflow-wrap:anywhere}
.review-coach-talk h3{font-size:19px;margin:10px 0}.review-coach-talk p{font-size:15px;line-height:1.95;margin:10px 0}
.review-coach-name{font-size:12px;color:#906132;font-weight:800}.review-coach-answer{border-top:1px solid #dec7a6;padding-top:12px}
.review-coach-modal .review-coach-talk button,.review-coach-open{background:#284663;color:#fff;border-color:#284663}
.review-coach-steps{display:flex;flex-wrap:wrap;gap:6px;margin:15px 0 4px}
.review-coach-steps button[aria-pressed="true"]{background:#284663;color:#fff;border-color:#284663}
.review-coach-pager{display:flex;justify-content:space-between;gap:12px;margin-top:16px}.review-coach-pager button:disabled{opacity:.4}
.review-coach-summary{margin-top:16px;font:13px/1.8 'Yu Gothic',sans-serif}.review-coach-summary summary{cursor:pointer;color:#335775;padding:8px 0}
.review-card>.review-coach-open{margin-top:10px;margin-bottom:10px}
@media(max-width:700px){.review-coach-body{grid-template-columns:1fr;gap:8px}.review-coach-modal>section{padding:14px;max-height:calc(100dvh - 20px)}.review-coach-modal{padding:10px}.review-coach-talk{padding:14px;margin-top:8px}.review-coach-talk p{font-size:14px}.review-coach-steps button{font-size:11px;padding:7px 9px}.review-coach-modal .review-mini-board{--board-size:min(41dvh,380px,calc(100vw - 86px))}.review-coach-pager button{min-height:44px}.review-coach-modal .review-board-heading h2{font-size:18px}}
@media(min-width:1500px){.full-review-secondary{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:850px){
  .full-review-layout{padding:16px;gap:16px}
  .full-review-feature{grid-template-columns:1fr}
  .full-review-primary .review-card{padding:24px}
  .full-review-secondary{grid-template-columns:1fr}
  .full-review-scene .site-header{padding:10px 16px;gap:12px;height:auto;min-height:62px;flex-wrap:wrap}
  .full-review-scene .brand-sub,.full-review-scene .brand-divider,.full-review-scene .header-status{display:none}
  .full-review-scene .brand-name{font-size:19px}
  .full-review-scene .header-actions{gap:6px}
  .full-review-scene .header-settings{padding:8px 11px}
  .full-review-layout .review-heading{padding:16px;min-height:120px}
  .full-review-layout .review-heading h1{font-size:25px}
  .full-review-layout .review-heading img{width:85px;height:110px;flex-shrink:0}
}



/* Ordinary game record colors; spectator records keep their own styling. */
.side-panel .history-move.player{background:#fff1f3;border:0;padding:3px 6px}
.side-panel .history-move.manager{background:#edf5fb;border:0;padding:3px 6px}
.side-panel .history-row.current-preview{border-left:0}
.side-panel .history-move.player .move-notation,.side-panel .history-move.player .move-actor,.side-panel .history-legend-player{color:#9b2643}
.side-panel .history-move.manager .move-notation,.side-panel .history-move.manager .move-actor,.side-panel .history-legend-manager{color:#234f78}
.side-panel .history-move.player:hover{background:#fbe1e7}
.side-panel .history-move.manager:hover{background:#dbeaf5}
.entering-king-notice{border:1px solid #bd934c;border-left:4px solid #a8772b;border-radius:10px;background:#fff4d9;color:#674614;padding:10px 12px;font:13px/1.6 'Yu Gothic',sans-serif}
.entering-king-notice strong{display:block;font-size:15px}
.entering-king-notice p{margin:4px 0 0}
.game-actions .entering-king-button:not(:disabled){grid-column:1/-1;background:#fff4d9;color:#674614;border-color:#bd934c}

/* Announcement only; declaration remains a separate explicit game action. */
.entering-king-modal{position:fixed;z-index:520;padding:12px}
.entering-king-modal>div{max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:auto;border-color:#b58a49}
.entering-king-modal .entering-king-points{margin:14px 0;padding:10px;border-radius:10px;background:#fff4d9;color:#674614;font-size:16px}
.entering-king-modal .entering-king-points strong{font-size:32px;margin:0 5px}
.entering-king-modal #entering-king-help{line-height:1.8;color:#5c6670}
.entering-king-modal button{min-height:44px;min-width:110px}

.review-coach-portrait{float:right;width:66px;height:78px;object-fit:cover;object-position:top;margin:0 0 6px 10px;border-radius:12px;background:#fae6c6}.review-coach-talk::after{content:"";display:block;clear:both}

.review-coach-modal .square.last-source{background:#f5cf8f;box-shadow:inset 0 0 0 2px #996d38}.review-coach-modal .square.last-target{background:#ffe49a;box-shadow:inset 0 0 0 3px #ac3b50}

@media(max-width:700px){
 .review-coach-modal>section{display:flex;flex-direction:column;max-height:calc(100dvh - 20px)}
 .review-coach-body{display:flex;flex-direction:column;overflow:auto;min-height:0;overscroll-behavior:contain}
 .review-coach-body>div:last-child{order:-1}
 .review-coach-modal .review-mini-board{--board-size:min(31dvh,320px,calc(100vw - 86px))}
 .review-coach-modal .review-branch-tabs{margin-top:0;gap:4px}.review-coach-modal .review-branch-tabs button{font-size:11px;padding:6px 8px}
 .review-coach-modal .review-mini-board p,.review-coach-modal .review-board-note{margin:5px 0;line-height:1.5;font-size:11px}
 .review-coach-talk h3{font-size:16px;margin:7px 0}.review-coach-talk p{font-size:13px;line-height:1.75;margin:8px 0}
 .review-coach-portrait{width:48px;height:58px}.review-coach-pager{flex-shrink:0;margin-top:8px}
}

/* Semantic rows retain the existing 9 by 9 grid dimensions. */
.board-grid .board-row{display:contents}
