#hashaDifficulty { width:min(560px,calc(100vw - 32px));box-sizing:border-box;padding:20px;border:2px solid #c7ad72;border-radius:10px;background:#092f27;color:#f1ead9; }
#hashaDifficulty::backdrop { background:#001b16c9; }
.hasha-exchange-result { width:min(520px,calc(100vw - 32px));box-sizing:border-box;padding:24px;border:2px solid #c7ad72;border-radius:10px;background:#092f27;color:#f1ead9;text-align:center;font:700 clamp(18px,4.5vw,24px)/1.6 "Yu Mincho",serif; }
.hasha-exchange-result::backdrop { background:#001b16aa; }
.hasha-exchange-result h2 { margin:0 0 1em;font-size:1.1em; }
.hasha-exchange-result p { margin:0 0 1em;overflow-wrap:anywhere; }
.hasha-exchange-result button { min-width:140px;min-height:48px;padding:8px 24px;border:1px solid #ac935f;border-radius:6px;background:linear-gradient(#f0ead5,#dcd0aa);color:#08291f;font:inherit;cursor:pointer; }
#hashaDifficulty h2 { margin:0 0 14px;text-align:center;color:#f1ead9;font:700 clamp(20px,5vw,26px)/1.35 "Yu Mincho",serif; }
#hashaDifficulty .hasha-difficulty-choices { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px; }
#hashaDifficulty button { display:block;width:100%;min-height:58px;margin:0;padding:10px;border:1px solid #ac935f;border-radius:6px;background:linear-gradient(#f0ead5,#dcd0aa);color:#08291f;font:700 clamp(20px,5vw,26px)/1.4 "Yu Mincho",serif;cursor:pointer; }
#hashaDifficulty .hasha-difficulty-choices button.is-selected { border-color:#ffe18a;box-shadow:inset 0 0 0 3px #f7d36d,0 0 0 3px #caa64e; }
#hashaDifficulty .hasha-difficulty-start { min-height:68px;margin-top:18px;border-color:#ffe18a;background:linear-gradient(#7a190f,#430c08);box-shadow:inset 0 0 0 2px #b94822,inset 0 0 0 4px #f7d36d,0 3px 0 #240804;color:#fff0bd;font-size:clamp(24px,6vw,30px);text-shadow:0 2px 2px #000; }
#hashaDifficulty button:focus-visible { outline:3px solid #ffe18a;outline-offset:3px; }
#hashaDifficulty:not(.hasha-practice-start) { max-height:calc(100dvh - 24px);overflow:auto; }
#hashaDifficulty:not(.hasha-practice-start) h1 { margin:0 0 10px;text-align:center;color:#fff0bd;font:700 clamp(22px,5vw,28px)/1.3 "Yu Mincho",serif; }
#hashaDifficulty:not(.hasha-practice-start) h2 { margin:0 0 8px;font-size:clamp(16px,4vw,20px); }
#hashaDifficulty .hasha-new-game-intro { margin:0 0 16px;color:#f1ead9;font:500 clamp(14px,3.6vw,17px)/1.5 "Yu Mincho",serif;white-space:pre-line; }
#hashaDifficulty .hasha-difficulty-description { min-height:1.5em;margin:12px 0 0;text-align:center;color:#e9d1a3;font:500 clamp(14px,3.6vw,17px)/1.5 "Yu Mincho",serif; }
#hashaDifficulty:not(.hasha-practice-start) .hasha-difficulty-choices button { min-height:49px;padding:7px 4px;font-size:clamp(18px,4.5vw,23px); }
#hashaDifficulty:not(.hasha-practice-start) .hasha-difficulty-start { min-height:54px;margin-top:14px;padding:6px;font-size:clamp(21px,5vw,27px); }
#hashaDifficulty .hasha-difficulty-actions { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(12px,3vw,20px);margin-top:14px; }
#hashaDifficulty .hasha-difficulty-actions button { min-height:54px;padding:6px;font-size:clamp(20px,5vw,27px); }
#hashaDifficulty .hasha-difficulty-actions .hasha-difficulty-start { margin-top:0; }
@media (max-width:420px) { #hashaDifficulty { padding:18px 14px; } #hashaDifficulty .hasha-difficulty-choices { gap:7px; } #hashaDifficulty button { min-height:56px;padding:8px 3px; } }
#hashaDomestic .hd-header h1 { margin-right:auto;min-width:0; }
#hashaDomestic .hd-difficulty { flex:0 0 auto;font-size:clamp(14px,3vw,20px);color:#e8d39a;white-space:nowrap; }
#hashaModeButton {
  position: relative;
  isolation: isolate;
  grid-template-columns: 29% max-content;
  justify-content: center;
  column-gap: 8px;
  background: radial-gradient(ellipse at 75% 20%, #e46b2c66, transparent 65%), linear-gradient(115deg, #530b0b, #8b2014 48%, #190a08);
  color: #fff1bb;
  border-color: #ffe49a;
  box-shadow: inset 0 0 0 2px #986223, inset 0 0 0 3px #f4d17b, inset 0 2px 9px #ffd16a66, 0 4px 0 #47230f, 0 0 9px #dca53688;
}
#hashaModeButton .boot-mode-button-copy { grid-column: 2; grid-row: 1; text-align: center; margin-left: 0; position: relative; z-index: 1; text-shadow: 0 2px 3px #000; }
#hashaModeButton .hasha-sequel-mark { position: relative; grid-column: 1; grid-row: 1; align-self: center; justify-self: center; width: 100%; height: 48px; object-fit: contain; pointer-events: none; z-index: 2; filter: drop-shadow(0 3px 2px #000) drop-shadow(0 0 3px #e9aa4255); }
#hashaModeButton .hasha-sequel-mark[hidden] { display: none; }
#hashaModeButton:hover { box-shadow: inset 0 0 0 2px #ad7832, inset 0 0 0 3px #ffe6a0, 0 4px 0 #47230f, 0 0 13px #ffd16aaa; }
#hashaModeButton .boot-mode-button-main {
  font-size: clamp(0.7rem, 2.8vw, 0.82rem);
  line-height: 1.05;
}
#hashaModeButton .boot-mode-button-sub {
  margin-top: 0.12rem;
  font-size: clamp(1.12rem, 4.4vw, 1.45rem);
  line-height: 1.05;
}
html:lang(en) #hashaModeButton {
  grid-template-columns: minmax(0, 20%) minmax(0, 1fr);
}
html:lang(en) #hashaModeButton .boot-mode-button-main {
  font-size: clamp(0.62rem, 3.2cqi, 0.82rem);
  letter-spacing: 0.02em;
}
html:lang(en) #hashaModeButton .boot-mode-button-sub {
  font-size: clamp(0.58rem, 3.85cqi, 1.2rem);
  letter-spacing: 0.025em;
  white-space: nowrap;
}
#hashaTitleOverlay[hidden] { display: none; }
#hashaTitle[hidden] { display: none !important; }
#hashaCinematic {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  background-color: #000;
  animation: hasha-paper 1400ms 1400ms both, hasha-reveal-title 1000ms 8s both;
}
#hashaCinematic[hidden] { display: none; }
.hasha-cinematic-playing #hashaTitle { pointer-events: none; }
.hasha-cinematic-playing #hashaTitle .hasha-status,
.hasha-cinematic-playing #hashaTitle nav { visibility: hidden; }
#hashaCinematic p {
  grid-area: 1 / 1;
  max-width: 100vw;
  box-sizing: border-box;
  margin: 0;
  padding: 0 1rem;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 12px #000, 0 0 5px #000;
  font: 700 clamp(1.5rem, 6vw, 4rem)/1.4 "Yu Mincho", serif;
  animation: hasha-caption 1400ms both;
}
#hashaCinematic .hasha-rivals { animation-delay: 1400ms; animation-duration: 2800ms; }
.hasha-ink {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  aspect-ratio: 1672 / 941;
  width: min(100vw, 177.68dvh);
  animation: hasha-reveal-title 800ms 7200ms both;
}
.hasha-ink i {
  position: absolute;
  inset: 0;
  background: url('images/opening_suiboku.png') center / 100% 100% no-repeat;
  animation: hasha-ink-appear 1200ms 2800ms both;
}
.hasha-ink i:nth-child(1) {
  mask-image: radial-gradient(ellipse 75% 62% at 50% 0%, #000 70%, transparent 100%);
}
.hasha-ink i:nth-child(2) {
  mask-image: radial-gradient(ellipse 63% 75% at 100% 100%, #000 62%, transparent 100%);
  animation-delay: 4s;
}
.hasha-ink i:nth-child(3) { animation-delay: 5200ms; }
@media (orientation: portrait) {
  .hasha-ink { width: min(174vw, 177.68dvh); }
}
@media (prefers-reduced-motion: reduce) {
  #hashaCinematic {
    align-content: center;
    gap: 0.5rem;
    background: #000;
    animation: none;
  }
  #hashaCinematic p, #hashaCinematic .hasha-rivals {
    grid-area: auto;
    z-index: 1;
    animation: none;
  }
  .hasha-ink, .hasha-ink i { animation: none; }
  .hasha-ink { opacity: 0.45; }
  .hasha-ink i:nth-child(-n+2) { display: none; }
}
@keyframes hasha-paper {
  from { background-color: #000; }
  to { background-color: #f2e7d1; }
}
@keyframes hasha-caption {
  0%, 100% { opacity: 0; }
  24%, 72% { opacity: 1; }
}
@keyframes hasha-ink-appear {
  from { opacity: 0; filter: blur(5px); }
  to { opacity: 1; filter: blur(0); }
}
@keyframes hasha-reveal-title { from { opacity: 1; } to { opacity: 0; } }
#hashaUnificationEnding {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 0;
  margin: 0;
  border: 0;
  background: #000;
  color: #fff;
  font-family: "Yu Mincho", serif;
}
#hashaUnificationEnding::backdrop { background: transparent; }
#hashaTitleReturnConfirm {
  position: fixed;
  inset: 0;
  margin: auto;
  box-sizing: border-box;
  width: min(calc(100% - 32px), 450px);
  padding: 1.25rem;
  border: 2px solid #b79752;
  border-radius: .65rem;
  background: #0b3027;
  color: #fff3d4;
  text-align: center;
}
#hashaTitleReturnConfirm::backdrop { background: #0009; }
#hashaTitleReturnConfirm p { margin: 0 0 1rem; }
#hashaTitleReturnConfirm button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: .55em .4em;
  border: 1px solid #b79752;
  border-radius: .4rem;
  background: #f1e7c8;
  color: #0b3027;
  font: inherit;
  cursor: pointer;
}
#hashaTitleReturnConfirm button + button { margin-top: .6rem; }
.hasha-ending-scene {
  box-sizing: border-box;
  height: 100%;
  overflow: auto;
  padding: clamp(12px, 3vmin, 32px);
  text-align: center;
}
.hasha-ending-prologue, .hasha-ending-logo {
  display: grid;
  place-content: center;
  gap: .65em;
}
.hasha-ending-prologue { font-size: clamp(1.25rem, 4vw, 3rem); }
.hasha-ending-prologue p { margin: 0; }
.hasha-ending-profile {
  box-sizing: border-box;
  width: min(100%, 60rem);
  min-height: 100%;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  gap: clamp(6px, 1.2vh, 15px);
}
.hasha-ending-profile header p, .hasha-ending-profile h2 { margin: .15em 0; }
.hasha-ending-profile header { color: #f2dfb4; font-size: clamp(.9rem, 2.3vmin, 1.3rem); }
.hasha-ending-profile h2 { font-size: clamp(1.6rem, 5vmin, 3.1rem); }
.hasha-ending-profile img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(39vh, 420px);
  object-fit: contain;
  border-radius: .65rem;
}
.hasha-ending-lines {
  width: min(100%, 46rem);
  font-size: clamp(1rem, 2.75vmin, 1.35rem);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.hasha-ending-lines p { margin: .25em 0; }
.hasha-ending-logo button {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  cursor: pointer;
}
.hasha-ending-logo button:disabled { opacity: 1; cursor: default; }
.hasha-ending-logo button:focus,
.hasha-ending-logo button:focus-visible { outline:none;box-shadow:none; }
body.keyboard-enabled:has(#hashaUnificationEnding[open] .hasha-ending-logo) .keyboard-menu-cursor { display:none; }
.hasha-ending-logo img { display: block; width: min(80vw, 680px); }
.hasha-ending-logo img[src$="title-logo_SimpleS.png"] {
  width: min(80vw, 640px, 145dvh);
  height: auto;
}
html:lang(en) .hasha-ending-logo img { height: auto; }
html:lang(en) .hasha-ending-prologue { font-size:clamp(1.1rem,3.2vw,2.5rem); }
html:lang(en) .hasha-ending-lines { font-size:clamp(.9rem,2.6vmin,1.25rem); }
html:lang(en) .hasha-ending-profile img { max-height:min(33dvh,420px); }
html:lang(en) .hasha-battle #note { white-space:normal;overflow-wrap:anywhere; }
.hasha-deployment-name { display: block; font-size: 12px; font-weight: 900; white-space: nowrap; }
.hasha-battle #board .cell.hasha-assault-support {
  background-color: #ffe45b !important;
  box-shadow: inset 0 0 0 4px #fffbd0, inset 0 0 0 8px #ffbf00,
    inset 0 0 28px 12px #ffd700, 0 0 16px 5px #ffcc00 !important;
}
.hasha-battle #board .cell.hasha-assault-support .shogi-piece {
  filter: drop-shadow(0 0 5px #fffbd0) drop-shadow(0 0 10px #ffbd00);
}
body.hasha-battle.hasha-defender-player .shogi-piece.gote { transform: none; }
body.hasha-battle.hasha-defender-player .shogi-piece.sente { transform: rotate(180deg); }
body.hasha-deployment .piece-stand-slot { min-height: 90px; }
body.hasha-deployment .side-panel-existing-right > #devPanelContent,
body.hasha-deployment .side-panel-existing-right > h2 { display: none; }
body.hasha-deployment #devPanel .piece-stand {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  max-height: none;
  margin-top: 0;
}
body.hasha-deployment #devPanel .piece-stand-pieces {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  align-content: start;
}
body.hasha-deployment .no-drops-overlay { display: none !important; }
body.hasha-deployment #storyThreeVisitsCurtain { display: block !important; pointer-events: auto; }
body.hasha-deployment #storyThreeVisitsCurtain { display: none !important; }
#hashaDeploymentCover { position: absolute; left: 0; width: 100%; z-index: 30; background-size: cover; background-position: center; pointer-events: auto; }
#hashaDeploymentCover[hidden] { display: none; }
#hashaDeploymentCover.attacker { top: 2px; left: 2px; width: calc(100% - 4px); height: calc(66.6667% - 10px); background-image: url('images/battle-deployment-attacker.webp'); }
#hashaDeploymentCover.defender { top: 0; height: calc(33.3333% - 6px); background-image: url('images/battle-deployment-defender.webp'); }
.hasha-fort { position: absolute; width: 76%; height: 76%; left: 12%; top: 12%; object-fit: contain; pointer-events: none; z-index: 4; }
.hasha-fort-durability { position: absolute; right: 2px; top: 1px; z-index: 6; color: white; font-weight: 900; text-shadow: -1px -1px #31251a, 1px 1px #31251a, 0 0 3px #31251a; pointer-events: none; }
.hasha-fort-slot { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; min-height: 3.5rem; }
.hasha-fort-stand-image { display: block; width: min(48px, 90%); height: 48px; max-height: 48px; object-fit: contain; pointer-events: none; }
.hasha-fort-stand-name { font-size: 12px; font-weight: 900; line-height: 1; white-space: nowrap; pointer-events: none; }
.hasha-fort-durability-input { box-sizing: border-box; width: 3.5em; max-width: 100%; font-size: 0.9rem; text-align: center; }
@media (max-width: 999px) {
  body.hasha-deployment:not(.hasha-defender-player) .mobile-piece-stand-gote,
  body.hasha-deployment.hasha-defender-player .mobile-piece-stand-sente {
    display:none;
  }
  body.hasha-deployment .dev-panel .piece-stand { display: block; }
  body.hasha-deployment .piece-stand,
  body.hasha-deployment .mobile-piece-stand { height:auto;min-height:0;max-height:none; }
  body.hasha-deployment #devPanel .piece-stand-pieces,
  body.hasha-deployment .piece-stand-pieces,
  body.hasha-deployment .mobile-piece-stand-pieces {
    display:flex;flex-wrap:wrap;gap:16px 12px;padding:12px;
    height:auto;min-height:0;max-height:none;overflow:visible;align-items:flex-start;align-content:flex-start;
  }
  body.hasha-deployment .piece-stand .piece-stand-slot,
  body.hasha-deployment .mobile-piece-stand .piece-stand-slot {
    display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:6px;
    flex:0 0 calc(var(--gunshi-board-cell-width, 3.4rem) + 16px);
    width:calc(var(--gunshi-board-cell-width, 3.4rem) + 16px);
    height:auto;min-height:0;padding:4px;min-width:0;
  }
  body.hasha-deployment .hasha-deployment-name {
    width:100%;white-space:normal;overflow-wrap:anywhere;text-align:center;line-height:1.4;
  }
  body.hasha-deployment .mobile-piece-stand,
  body.hasha-deployment .mobile-piece-stand-pieces {
    flex-shrink:0;
    overflow:visible;
  }
  body.hasha-deployment .mobile-piece-stand .piece-stand-slot > .shogi-piece {
    flex:none;
    height:var(--gunshi-board-cell-height, 3rem);
    max-height:none;
  }
}
/* 専用タイトル表示中は、従来画面のモーダルを同時に描画しない。 */
body.hasha-title-open > .modal-overlay:not(#hashaTitleOverlay) {
  display: none !important;
}
#hashaTitle {
  box-sizing: border-box;
  width: min(calc(100% - 1rem), 44rem);
  max-height: min(96dvh, 52rem);
  overflow-y: auto;
  padding: clamp(1rem, 3vw, 1.5rem);
  text-align: center;
}
#hashaTitle img { display: block; width: 100%; height: auto; margin: 0 auto 20px; }
#hashaTitle button { display: block; width: min(100%, 420px); margin: 12px auto; min-height: 48px; }
#hashaTitle button:disabled { opacity: .6; cursor: default; }
#hashaTitle button[hidden] { display: none; }
.hasha-status { color: #77501d; }
/* Static sequel title: independent layers leave room for a future opening. */
#hashaTitleOverlay { position: fixed; inset: 0; z-index: 2000; display: block; padding: 0; overflow-y: auto; background: #1b1718; }
#hashaTitle { position: relative; isolation: isolate; width: 100%; max-height: none; min-height: 100%; padding: max(12px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom)); overflow: hidden; color: #ffe9b2; background: radial-gradient(ellipse at 50% 94%, #d29447 0, #683621 23%, transparent 55%), linear-gradient(#272227, #211c20 55%, #492b22); }
#hashaTitle::after { content: ''; position: absolute; inset: 10px; border: 1px solid #c99447; outline: 1px solid #72512d; outline-offset: -5px; pointer-events: none; z-index: 3; }
#hashaTitle .language-switch { top: max(18px, env(safe-area-inset-top)); left: max(20px, env(safe-area-inset-left)); z-index: 4; }
#hashaTitle .language-switch .language-option,
#hashaTitle .language-switch .language-option:hover,
#hashaTitle .language-switch .language-option:active,
#hashaTitle .language-switch .language-option:focus-visible {
  display: block; width: auto; min-height: 34px; margin: 0; padding: .12rem .45rem;
  border: 0; border-radius: 0; background: #f5f6f5; color: #405347;
  box-shadow: none; text-shadow: none; transform: none;
  font: 800 clamp(.68rem, 2.5vw, .78rem)/1 sans-serif;
}
#hashaTitle .language-switch .language-option + .language-option { border-left: 1px solid #c9d0c9; }
#hashaTitle .language-switch .language-option.is-selected,
#hashaTitle .language-switch .language-option.is-selected:hover,
#hashaTitle .language-switch .language-option.is-selected:active,
#hashaTitle .language-switch .language-option.is-selected:focus-visible {
  background: #fff0a8; color: #304d35; box-shadow: inset 0 0 0 1px rgba(191, 151, 22, .3);
}
#hashaTitle .hasha-title-background { position: absolute; inset: auto 0 0; height: clamp(150px, 24vh, 250px); z-index: -1; pointer-events: none; background: url('images/title-logo2_simple-prototype.webp') center bottom / auto 480% no-repeat; mask-image: linear-gradient(transparent, #000 35%); }
#hashaTitle .hasha-title-content { position: relative; max-width: 760px; margin: 0 auto; padding-bottom: clamp(80px, 16vh, 180px); }
#hashaTitle .hasha-title-logo { width: 100%; aspect-ratio: 1.95; overflow: hidden; mask-image: linear-gradient(#000 80%, transparent); }
#hashaTitle .hasha-title-logo img { width: 100%; height: auto; margin: 0; }
html:lang(en) #hashaTitle .hasha-title-logo {
  width: min(100%, 680px);
  margin: clamp(18px, 5vh, 54px) auto 0;
  aspect-ratio: 3;
  overflow: visible;
  mask-image: none;
}
html:lang(en) #hashaTitle .hasha-title-logo img { display: block; }
html:lang(en) #hashaTitle .hasha-title-background {
  background: url('images/title-logo_Eng.png') center bottom / contain no-repeat;
  opacity: 0.18;
}
#hashaTitle .hasha-status { color: #ffe6b0; font-family: 'Yu Mincho', serif; font-weight: 700; font-size: clamp(16px, 2.5vw, 24px); line-height: 1.6; text-shadow: 0 2px 4px #000; margin: 8px auto 24px; max-width: 32em; }
#hashaTitle .hasha-status::after { content: none; }
#hashaTitle .hasha-tagline, #hashaTitle .hasha-version { display: block; }
#hashaTitle .hasha-version { color: #e9d1a3; font-size: clamp(12px, 1.8vw, 17px); line-height: 1.45; margin-top: 4px; white-space: nowrap; }
#hashaTitle .hasha-version[hidden] { display: none; }
#hashaTitle .hasha-clear-medals:not([hidden]) {
  display: flex;
  justify-content: center;
  column-gap: 24px;
  margin-top: 3px;
}
@media (max-width: 480px) {
  #hashaTitle .hasha-clear-medals:not([hidden]) { column-gap: 16px; }
}
#hashaTitle .hasha-status:has(.hasha-clear-medals:not([hidden])) { margin-bottom: 8px; }
@media (max-height: 800px) {
  #hashaTitle .hasha-title-content:has(.hasha-clear-medals:not([hidden])) .hasha-title-menu button {
    margin-block: 8px;
  }
}
.hasha-clear-medal {
  --rim-light: #f3c19a;
  --rim-dark: #703819;
  --face-light: #c88b5b;
  --face-dark: #8b4728;
  position: relative;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: clamp(30px, 8vw, 36px);
  aspect-ratio: 1;
  border: 1px solid var(--rim-dark);
  border-radius: 50%;
  background: linear-gradient(145deg, var(--rim-light), var(--face-light) 36%, var(--rim-dark) 78%, var(--face-dark));
  box-shadow: inset 0 0 0 1px var(--rim-light), inset -1px -2px 3px #1b100e80, 0 2px 4px #000b;
}
.hasha-clear-medal::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: radial-gradient(circle at 31% 22%, var(--face-light), var(--face-dark) 72%);
  box-shadow: 0 0 0 1px var(--rim-dark), inset 0 0 0 1px var(--rim-light), inset -1px -2px 3px #1b100e50;
}
.hasha-clear-medal::after {
  content: '';
  position: relative;
  width: 44%;
  height: 51%;
  clip-path: polygon(50% 0, 87% 23%, 100% 100%, 0 100%, 13% 23%);
  background: linear-gradient(145deg, var(--rim-light) 26%, var(--face-light));
  box-shadow: inset -1px -1px 0 var(--rim-dark);
}
.hasha-clear-medal[data-difficulty="normal"] {
  --rim-light: #f5f8fc;
  --rim-dark: #515d69;
  --face-light: #c2cbd5;
  --face-dark: #687686;
}
.hasha-clear-medal[data-difficulty="hard"] {
  --rim-light: #fff1ad;
  --rim-dark: #805112;
  --face-light: #e7ba56;
  --face-dark: #955f17;
}
.hasha-clear-medal[data-difficulty="normal"]::before,
.hasha-clear-medal[data-difficulty="hard"]::before {
  border: 2px dotted var(--rim-light);
}
.hasha-clear-medal[data-difficulty="hard"]::before {
  background: repeating-conic-gradient(from 8deg, #fff2ab33 0deg 11deg, transparent 11deg 30deg),
    radial-gradient(circle at 31% 22%, var(--face-light), var(--face-dark) 72%);
}
.hasha-clear-medal.is-new { animation: hasha-clear-medal-shine 500ms ease-in-out; }
@keyframes hasha-clear-medal-shine {
  50% { filter: brightness(1.28) drop-shadow(0 0 4px var(--rim-light)); }
}
@media (prefers-reduced-motion: reduce) {
  .hasha-clear-medal.is-new { animation: none; }
}
#hashaTitle nav { max-width: 470px; margin: auto; }
#hashaTitle nav[hidden] { display: none; }
#hashaTitle .hasha-debug-cpu { display: flex; align-items: center; justify-content: center; gap: .5rem; margin: 14px auto 0; color: #ffe6b0; font: 700 14px/1.4 'Yu Mincho', serif; }
#hashaTitle .hasha-debug-cpu[hidden] { display: none; }
#hashaTitle .hasha-debug-cpu select { min-height: 32px; padding: 2px 8px; border: 1px solid #edc675; border-radius: 4px; color: #35200e; background: #fff4d8; font: inherit; }
#hashaTitle button { box-sizing: border-box; width: 100%; min-height: 54px; margin: 12px auto; padding: 10px 18px; border: 2px solid #edc675; border-radius: 16px 5px; color: #35200e; background: linear-gradient(110deg, #e5c992, #fff4d8 45%, #ddbb7e); box-shadow: inset 0 0 0 2px #fff1c7, inset 0 0 0 3px #b88c48, 0 4px 0 #583718, 0 6px 12px #0009; font: 700 clamp(17px, 2.5vw, 23px)/1.3 'Yu Mincho', Georgia, serif; transition: filter .12s, transform .12s; }
#hashaTitle #hashaNewGame { min-height: 70px; }
#hashaTitle .hasha-title-menu button small { display: block; font-size: .7em; }
.story-chapter-actions.hasha-tutorial-actions { grid-template-columns: minmax(0, 24rem); justify-content: center; }
#hashaTitle .hasha-tutorial-dialog {
  box-sizing: border-box;
  width: min(34rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  padding: clamp(16px, 4vw, 28px);
  border: 2px solid #c6ac63;
  border-radius: 10px;
  background: #0b3026;
  color: #fff1ce;
  font: 17px/1.55 'Yu Mincho', Georgia, serif;
}
#hashaTitle .hasha-tutorial-dialog::backdrop { background: #0009; }
#hashaTitle .hasha-tutorial-dialog h2 { margin: 0; font-size: 1.25em; }
#hashaTitle .hasha-tutorial-dialog p { text-align: start; }
#hashaTitle .hasha-tutorial-dialog button { margin: 5px 0; }
#hashaTitle button { transition: color .15s, box-shadow .15s, border-color .15s, text-shadow .15s, transform .12s; }
#hashaTitle button:focus-visible,
#hashaTitle button:active { color: #fff0c0; border-color: #ffde81; background: linear-gradient(110deg, #500d09, #a52615 45%, #5c0b08); box-shadow: inset 0 0 0 2px #7c3b13, inset 0 0 0 3px #ffde81, 0 0 15px #ffbd4c88, 0 5px 0 #5a2a10; text-shadow: 0 2px 3px #000; }
@media (hover: hover) and (pointer: fine) {
  #hashaTitle button:hover { color: #fff0c0; border-color: #ffde81; background: linear-gradient(110deg, #500d09, #a52615 45%, #5c0b08); box-shadow: inset 0 0 0 2px #7c3b13, inset 0 0 0 3px #ffde81, 0 0 15px #ffbd4c88, 0 5px 0 #5a2a10; text-shadow: 0 2px 3px #000; }
}
#hashaTitle button:active { transform: translateY(2px); }
#hashaTitle button:focus-visible { outline: 3px solid #fff1a9; outline-offset: 4px; }
body.hasha-title-open { overflow: hidden; }
@media (max-width: 480px) {
  #hashaTitle .hasha-title-logo { width: calc(100% + 16px); margin-left: -8px; }
  #hashaTitle .hasha-status { max-width: none; margin-bottom: 18px; font-size: clamp(12px, 3.4vw, 16px); }
  #hashaTitle button { margin: 10px auto; }
}
.hasha-troops, .hasha-commander { position: absolute; top: 2px; z-index: 8; font-size: clamp(10px, 1.5vw, 16px); font-weight: 900; line-height: 1.15; padding: 1px 3px; border-radius: 3px; pointer-events: none; }
.hasha-troops {
  top: 3px;
  right: 3px;
  z-index: 1000;
  display: block;
  width: max-content;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #fff8dc;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  -webkit-text-stroke: 0.7px #312009;
  paint-order: stroke fill;
  text-shadow: -1px 0 #312009, 1px 0 #312009, 0 -1px #312009, 0 1px #312009;
}
.hasha-commander { left: 2px; background: #be1921; color: white; }
/* 名札をマスの内側へ3px寄せ、隣の段へのはみ出しを抑える。 */
.hasha-battle .board .gunshi-selected-warrior-name:not(.is-gote) {
  top: calc(100% - 0.8rem - 3px);
  padding-bottom: 0;
}
.hasha-battle .board .gunshi-selected-warrior-name.is-gote {
  top: calc(-0.38rem + 3px);
  padding-top: 0;
}
.hasha-troops.is-gote { top: auto; right: auto; bottom: 3px; left: 3px; }
.hasha-commander.is-gote { top: auto; left: auto; right: 2px; bottom: 2px; }
.hasha-hit-flash {
  position: absolute; inset: 2px; z-index: 900; pointer-events: none;
  border: 3px solid #db2929; border-radius: 5px;
  box-shadow: inset 0 0 8px #e32b2b55;
  animation: hasha-hit-flash 1700ms ease-out both;
}
.hasha-hit-damage {
  position: absolute; left: 50%; top: 42%; z-index: 1001; pointer-events: none;
  color: #d71920; background: transparent; white-space: nowrap;
  font-size: clamp(16px, 2.5vw, 25px); font-weight: 900; line-height: 1;
  text-shadow: -1px 0 #fff6db, 1px 0 #fff6db, 0 -1px #fff6db, 0 1px #fff6db;
  animation: hasha-hit-damage 1700ms ease-out both;
}
@keyframes hasha-hit-flash {
  0%, 35% { opacity: 1; } 20%, 55% { opacity: .2; } 70% { opacity: .8; } 100% { opacity: 0; }
}
@keyframes hasha-hit-damage {
  0% { opacity: 1; transform: translate(-50%, 4px); }
  60% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -12px); }
}
@media (prefers-reduced-motion: reduce) {
  .hasha-hit-flash { animation-name: hasha-hit-fade; }
  .hasha-hit-damage { animation-name: hasha-hit-fade; transform: translateX(-50%); }
}
@keyframes hasha-hit-fade { 0%, 65% { opacity: 1; } 100% { opacity: 0; } }
#hashaBattleReturn { position: fixed; right: 10px; bottom: 8px; z-index: 35; padding: 8px 14px; }
#hashaBattleReturn[hidden] { display: none !important; }
#positionEditorOverlay.hasha-result-overlay > section { max-height:92dvh;overflow-y:auto;width:min(520px,calc(100vw - 24px));padding:24px; }
#positionEditorOverlay.hasha-result-overlay h2 { text-align:center; }
.hasha-result-image { display:block;width:100%;height:auto;max-height:46dvh;object-fit:contain;border-radius:8px;margin:16px auto 20px; }
#positionEditorOverlay.hasha-result-overlay .editor-actions { display:flex;flex-direction:column;gap:12px; }
#positionEditorOverlay.hasha-result-overlay .editor-actions button { width:100%;min-height:52px;margin:0;padding:12px;color:#193c2c;background:linear-gradient(#fff6d9,#e4d5ac);border:2px solid #b89342;border-radius:7px;font-weight:800;text-shadow:none;box-shadow:0 2px 3px #0003; }
#positionEditorOverlay.hasha-result-overlay .editor-actions button:hover,
#positionEditorOverlay.hasha-result-overlay .editor-actions button:focus-visible { color:#fff5d5;background:#78352c;border-color:#e6c267;box-shadow:0 0 9px #e6c26766;outline:2px solid #e6c267;outline-offset:2px; }
#positionEditorOverlay.hasha-result-overlay .editor-actions button:active { transform:translateY(2px);background:#58231e;color:#fff5d5; }
.hasha-battle #takebackButton, .hasha-battle #resetButton { visibility: hidden; }
.hasha-battle #takebackButton,.hasha-battle #resetButton { display:none; }
.hasha-battle #gameplayControls { display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;padding:4px; }
.hasha-battle #gameplayControls button { min-height:48px;padding:8px;font-weight:800; }
.hasha-battle #hashaRetreat { background:#945000;color:#fff; }
.hasha-battle #hashaExitWar,.hasha-battle #hashaWarResult { background:#3d524b;color:#fff; }
body.hasha-deployment #takebackButton, body.hasha-deployment #resetButton { display: none; }
body.hasha-deployment #gameplayControls { display:grid;grid-template-columns:1fr 1fr 1fr;align-items:center;column-gap:clamp(8px,2.5vw,20px);padding:4px 8px; }
body.hasha-deployment #gameplayControls button { min-height:48px;width:auto;min-width:0;margin:0;padding:8px 6px;justify-self:center;font-size:clamp(14px,1.5vw,18px);font-weight:800;line-height:1.25;text-shadow:none;white-space:nowrap; }
body.hasha-deployment #gameplayControls #undoButton { justify-self:start;color:#fff;background:linear-gradient(#2783ba,#075084); }
body.hasha-deployment #gameplayControls #hashaAutoDeploy { color:#fff;background:linear-gradient(#2783ba,#075084); }
body.hasha-deployment #gameplayControls #hashaBackPrepare { justify-self:end;color:#fff;background:linear-gradient(#2783ba,#075084); }
body.hasha-deployment #statusText { font-weight:900;font-size:clamp(24px,3vw,32px);color:#fff; }
body.hasha-deployment #status { cursor:pointer;background:linear-gradient(#2783ba,#075084); }
@keyframes hasha-deployment-glow {
  0%, 100% { box-shadow:0 0 5px 1px #ffd46a66; }
  50% { box-shadow:0 0 16px 4px #ffd46acc, inset 0 0 12px #ffe7a333; }
}
body.hasha-deployment #status.hasha-deployment-ready {
  animation:hasha-deployment-glow 1.5s ease-in-out infinite;
}
body.hasha-deployment #status.hasha-deployment-not-ready {
  background:linear-gradient(#17608d,#063a5e);
  box-shadow:inset 0 0 0 1px #001d30aa;
}
body.hasha-deployment #status.hasha-deployment-not-ready #statusText {
  color:#ffffffa8;
  text-shadow:0 1px 2px #001f33;
}
@keyframes hasha-deployment-text-glow {
  0%, 100% { text-shadow:0 1px 2px #00314f, 0 0 3px #ffd46a66; }
  50% { text-shadow:0 1px 2px #00314f, 0 0 6px #ffe7a3, 0 0 12px #ffd46acc; }
}
body.hasha-deployment #status.hasha-deployment-ready #statusText {
  animation:hasha-deployment-text-glow 1.5s ease-in-out infinite;
}
@media (prefers-reduced-motion:reduce) {
  body.hasha-deployment #status.hasha-deployment-ready #statusText {
    animation:none;
    text-shadow:0 1px 2px #00314f, 0 0 6px #ffd46a99;
  }
  body.hasha-deployment #status.hasha-deployment-ready {
    animation:none;
    box-shadow:0 0 10px 2px #ffd46a99;
  }
}
.hasha-battle #gunshiKunPanel { display: none !important; }
#hashaArmyPanel[hidden] { display: none; }
.hasha-battle #recordPanel, .hasha-battle #devPanel { display: flex; flex-direction: column; min-height: 0; }
.hasha-battle #devPanel > .piece-stand { order: 1; flex: 0 0 auto; }
.hasha-battle .hasha-report-panel { flex: 1 1 0; min-height: 0; overflow: hidden; }
.hasha-battle .hasha-report-panel > .side-panel-logo { display: block; flex: 0 0 auto; width: min(90%, 300px); max-height: 88px; object-fit: contain; margin: 8px auto 12px; }
.hasha-battle .hasha-report-panel[hidden] { display: none !important; }
.hasha-battle .hasha-report-panel #recordPanelList { min-height: 0; max-height: 50vh; overflow-y: auto; }
body.hasha-deployment #devPanel > .piece-stand { flex: 1 1 auto; }
body.hasha-deployment #recordPanel .side-panel-existing-right > #devPanelContent,
body.hasha-deployment #recordPanel .side-panel-existing-right > h2 { display: block; }
#hashaArmyPanel { flex: 0 0 auto; margin-bottom: 10px; border: 1px solid #c9bb8d; border-radius: 7px; background: #fffdea; overflow: hidden; }
#hashaArmyPanel > h2 { margin: 0; padding: 7px; font-size: 1.18rem; }
.hasha-armies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1em; padding: 10px; font-size: clamp(0.94rem, 1.1vw, 1.08rem); }
.hasha-armies h3 { margin: 0 0 7px; font-size: 1.05em; color: #234d35; overflow-wrap: anywhere; }
.hasha-armies dl { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.25em; row-gap: 5px; margin: 0; font-size: 1em; }
.hasha-armies dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hasha-battle .side-panel-existing-right > #devPanelContent { flex: 1 1 0; max-height: none; }
.hasha-battle #recordPanelList { overflow-x: hidden; }
.hasha-battle #recordPanelList li { overflow-wrap: anywhere; white-space: pre-line; }
.hasha-battle .gunshi-side-label { font-size: clamp(12px, 1.5vw, 20px); }
@media (max-width: 1199px) {
  body.hasha-battle:not(:where(.desktop-fit-embedded.desktop-fit-active)) { display: flex; flex-direction: column; align-items: center; }
  body.hasha-battle:not(:where(.desktop-fit-embedded.desktop-fit-active)) .desktop-fit-viewport { width: 100%; height: auto !important; }
  body.hasha-battle:not(:where(.desktop-fit-embedded.desktop-fit-active)) .desktop-fit-stage {
    position: static; display: flex; flex-direction: column; align-items: center;
    width: 100% !important; transform: none;
  }
  body.hasha-battle:not(:where(.desktop-fit-embedded.desktop-fit-active)) .app-shell { width: min(100%, 600px); box-sizing: border-box; }
  body.hasha-battle:not(:where(.desktop-fit-embedded.desktop-fit-active)) :is(#devPanel, #recordPanel) {
    display: block; position: static; width: min(100% - 20px, 600px);
    height: auto; max-height: none; margin: 12px auto; box-sizing: border-box;
  }
  body.hasha-battle:not(:where(.desktop-fit-embedded.desktop-fit-active)) .side-panel-existing-right > #devPanelContent { flex: 1 1 auto; max-height: 60vh; }
  body.hasha-battle:not(:where(.desktop-fit-embedded.desktop-fit-active)) #recordPanelList { max-height: 22rem; overflow-y: auto; }
  body.hasha-battle:not(:where(.desktop-fit-embedded.desktop-fit-active)) .side-panel-logo { display: none; }
  body.hasha-battle:not(:where(.desktop-fit-embedded.desktop-fit-active)) #hashaBattleReturn { position: static; display: block; margin: 12px auto; max-width: calc(100% - 20px); }
  body.hasha-battle.desktop-fit-embedded.desktop-fit-active:has(> #hashaBattleReturn:not([hidden])) #devPanel {
    padding-bottom: 4rem;
  }
}
@media (max-width: 999px) {
  body.hasha-battle .dev-panel .piece-stand { display: none; }
  body.hasha-battle #recordPanel { order: 1; }
  body.hasha-battle #devPanel { order: 2; overflow: visible; }
  body.hasha-battle .hasha-report-panel:not([hidden]) {
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: 40dvh;
    overflow: hidden;
    margin-top: 16px;
    overflow-anchor: none;
  }
  body.hasha-battle .hasha-report-panel #recordPanelList {
    height: auto;
    min-height: 0;
    max-height: calc(40dvh - 60px);
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    overflow-anchor: none;
  }
  body.hasha-battle .side-panel-existing-right > #devPanelContent {
    max-height: none;
    overflow: visible;
  }
}
@media (max-width: 719px) {
  .hasha-battle .side-panel-existing-right > #devPanelContent { flex: 1 1 auto; max-height: 60vh; }
  .hasha-battle #hashaBattleReturn { position: static; display: block; margin: 12px auto; max-width: calc(100% - 20px); }
}
.boot-choice-actions:has(#hashaModeButton) { gap: 10px; }
#positionEditorOverlay.hasha-timeout .editor-description { margin-bottom:1.65em; }
#positionEditorOverlay.hasha-supply-shortage .editor-description { white-space:pre-line; }
#positionEditorOverlay.hasha-timeout:has(.hasha-supply-resources) .editor-description { margin-bottom:10px; }
#positionEditorOverlay .hasha-supply-resources { margin:0 0 16px;padding:10px 12px;background:#f4edcf;border:1px solid #c6ac63;border-radius:6px;color:#193c2c;font-size:clamp(15px,4vw,18px); }
#positionEditorOverlay .hasha-supply-resources>div { display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:4px 0; }
#positionEditorOverlay .hasha-supply-resources>div:nth-child(3) { border-top:1px solid #c6ac63;margin-top:5px;padding-top:9px; }
#positionEditorOverlay .hasha-supply-resources dt { min-width:0; }
#positionEditorOverlay .hasha-supply-resources dd { margin:0;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap; }
#positionEditorOverlay.hasha-timeout .keyboard-menu-cursor { display:none; }
#positionEditorOverlay.hasha-timeout .editor-actions button {
  width:100%;min-height:52px;padding:12px 8px;margin:0;
  background:linear-gradient(#2783ba,#075084);color:#fff;
  border:2px solid #e4c66b;border-radius:7px;font-size:clamp(14px,4vw,18px);
  font-weight:800;text-align:center;text-shadow:0 1px 2px #00314f;
  box-shadow:0 2px 3px #0003;cursor:pointer;
}
#positionEditorOverlay.hasha-timeout .editor-actions button::before,
#positionEditorOverlay.hasha-timeout .editor-actions button::after { display:none; }
#positionEditorOverlay.hasha-deployment-warning .editor-description { margin-bottom:1.65em; }
#positionEditorOverlay.hasha-deployment-warning .editor-actions { overflow:visible; }
#positionEditorOverlay.hasha-deployment-warning .editor-actions button {
  width:100%;min-height:50px;margin:0;padding:10px 16px;color:#193c2c;
  background:linear-gradient(#fff7dc,#eadbb4);border:2px solid #b68d37;border-radius:7px;
  font-weight:800;text-shadow:none;box-shadow:0 2px 0 #7e642c,0 3px 6px #0003;
}
#positionEditorOverlay.hasha-deployment-warning .editor-actions button:hover,
#positionEditorOverlay.hasha-deployment-warning .editor-actions button:focus-visible {
  color:#fff5d5;background:#78352c;border-color:#e6c267;outline:2px solid #e6c267;outline-offset:2px;
}
#positionEditorOverlay.hasha-deployment-warning .editor-actions button:active { transform:translateY(2px);box-shadow:0 1px 2px #0003; }
#positionEditorOverlay.hasha-pass-confirm .rule-modal {
  width:min(500px,calc(100vw - 28px));box-sizing:border-box;
  background:#fff8df;color:#173e2b;border:2px solid #c7ad72;border-radius:9px;
  padding:20px;box-shadow:0 8px 28px #071b1566;
}
#positionEditorOverlay.hasha-pass-confirm .editor-actions {
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;
}
#positionEditorOverlay.hasha-pass-confirm .editor-actions button {
  width:100%;min-width:0;min-height:52px;margin:0;padding:10px 8px;
  border:2px solid #71987a;border-radius:7px;background:#dcebd6;color:#173e2b;
  font-weight:700;box-shadow:0 3px 0 #71987a;
}
#positionEditorOverlay.hasha-pass-confirm .editor-actions button:first-child {
  background:#945000;color:#fff;border-color:#c7ad72;box-shadow:0 3px 0 #684019;
}
#positionEditorOverlay.hasha-pass-confirm .editor-actions button:focus-visible { outline:3px solid #315d43;outline-offset:3px; }
#positionEditorOverlay.hasha-pass-confirm .editor-actions button:active { transform:translateY(2px);box-shadow:none; }
#positionEditorOverlay.hasha-retreat-confirm .rule-modal {
  width:min(380px,calc(100vw - 28px));
  max-height:calc(100dvh - 28px);
  padding:0 18px 18px;
  overflow:auto;
  border:3px solid #b89545;
  border-radius:12px;
  background:#f6f0dc;
  color:#173d2d;
  box-shadow:0 0 0 2px #27533d,0 12px 30px #071b15a6;
}
#positionEditorOverlay.hasha-retreat-confirm #positionEditorTitle {
  margin:0 -18px 13px;
  padding:13px 12px;
  border-bottom:2px solid #c8a752;
  background:linear-gradient(135deg,#123d2d,#1e573d);
  color:#fffdf3;
  font-size:clamp(1.2rem,5vw,1.45rem);
  font-weight:900;
  line-height:1.3;
  text-align:center;
}
#positionEditorOverlay.hasha-retreat-confirm .editor-description {
  margin:0 0 14px;
  color:#294738;
  font-size:clamp(1rem,4vw,1.08rem);
  line-height:1.5;
  text-align:center;
}
#positionEditorOverlay.hasha-retreat-confirm .editor-actions {
  display:grid;
  width:min(100%,280px);
  max-height:none;
  gap:9px;
  margin:0 auto;
  overflow:visible;
}
#positionEditorOverlay.hasha-retreat-confirm .editor-actions button {
  width:100%;
  min-height:48px;
  margin:0;
  padding:9px 12px;
  border:2px solid #c1a04e;
  border-radius:8px;
  background:linear-gradient(#fff8df,#e9d9a8);
  color:#254632;
  font-size:clamp(1rem,4vw,1.08rem);
  font-weight:800;
  line-height:1.3;
  text-align:center;
  text-shadow:none;
  box-shadow:0 2px 0 #b89a53,0 3px 7px #10281b2b;
}
#positionEditorOverlay.hasha-retreat-confirm .editor-actions button:first-child {
  border-color:#d7b653;
  background:linear-gradient(#f2d77f,#c99a32);
  color:#3b2b0b;
  box-shadow:0 2px 0 #94712a,0 3px 7px #10281b30;
}
#positionEditorOverlay.hasha-retreat-confirm .editor-actions button:hover,
#positionEditorOverlay.hasha-retreat-confirm .editor-actions button:focus-visible {
  filter:brightness(1.06);
  outline:2px solid #315d43;
  outline-offset:2px;
}
#positionEditorOverlay.hasha-retreat-confirm .editor-actions button:active { transform:translateY(1px); }
body.keyboard-enabled:has(#positionEditorOverlay.hasha-retreat-confirm:not([hidden])) .keyboard-menu-cursor { display:none; }
@media (max-width: 600px) {
  .boot-choice-actions:has(#hashaModeButton) button { min-height: 56px; padding-block: 7px; }
  #hashaModeButton .boot-mode-button-main { font-size: clamp(0.66rem, 2.9vw, 0.76rem); }
  #hashaModeButton .boot-mode-button-sub { font-size: clamp(0.9rem, 4vw, 1.02rem); }
}
html:lang(en) .hasha-battle .hasha-deployment-name { white-space:normal;overflow-wrap:anywhere; }
html:lang(en) body.hasha-battle #gameplayControls button { white-space:normal;overflow-wrap:anywhere; }
html:lang(en) .hasha-armies dl { grid-template-columns:minmax(0,1fr) auto; }
html:lang(en) .hasha-armies dt { overflow-wrap:anywhere; }
@media(max-width:600px) {
  html:lang(en) .hasha-armies { font-size:13px;gap:8px;padding:8px; }
}
.gunshi-cutin-layer .hasha-cutin-caption {
  display:block;max-width:min(76vw,440px);padding:.65em 1.3em;
  color:#fff3cb;background:#632418;border:2px solid #e4b95f;border-radius:8px;
  font-size:clamp(18px,5vw,36px);line-height:1.2;text-align:center;
}
.gunshi-cutin-layer button:has(.hasha-cutin-caption) span { right:4%;bottom:7%; }

.hasha-title-menu button[hidden]{display:none!important}
#hashaTitle .hasha-practice-menu button.hasha-locked:disabled{background:#edf0ed;color:#68736c;border-color:rgba(92,112,98,.26);box-shadow:0 3px 0 #c8ceca;text-shadow:none;opacity:.45;cursor:not-allowed;filter:none;outline:none}
#hashaTitle .hasha-rename-notice { max-width: 560px; margin: 8px auto 12px; padding: 0 12px; color: #e1cfad; font-size: clamp(12px, 2.7vw, 14px); line-height: 1.6; text-align: center; white-space: pre-line; }
#hashaTitle .hasha-rename-notice::after { content: '────── ◇ ──────'; display: block; color: #dca54e; font-size: 16px; margin-top: 10px; }

.hasha-unlock-dialog{border:0;padding:8px;background:transparent;max-width:min(94vw,29rem);max-height:94dvh;overflow:auto;color:#173d2a;cursor:pointer}
.hasha-unlock-dialog::backdrop{background:rgba(10,35,22,.72)}
.hasha-unlock-dialog .unlock-celebration-modal{box-sizing:border-box;width:100%}

.hasha-reserve-deployment-hint{box-sizing:border-box;margin:8px 0 12px;padding:8px 10px;border:1px solid #ad873e;border-radius:4px;background:#fff4cf;color:#173d2a;font-size:clamp(13px,1.1vw,16px);font-weight:bold;line-height:1.5;overflow-wrap:anywhere}

.piece-stand-slot > .hasha-reserve-troops { font-size: clamp(12px, 2.5vw, 16px); }



#hashaDifficulty.hasha-practice-start { width:min(860px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:clamp(12px,2vw,18px); }
#hashaDifficulty.hasha-practice-start h1 { margin:0 0 12px;text-align:center;font-size:clamp(20px,4.5vw,26px);color:#fff0bd; }
.hasha-basic-rules { border:1px solid #ac935f;border-radius:6px;margin-bottom:14px; }
.hasha-basic-rules summary { padding:10px;cursor:pointer;color:#ffe18a;font-weight:bold; }
.hasha-rules-content { padding:0 14px 10px;line-height:1.45;text-align:left; }
.hasha-rules-content section+section { border-top:1px solid #ac935f;padding-top:8px;margin-top:8px; }
.hasha-rules-content h3 { margin:0 0 5px;font-size:17px;color:#ffe18a; }
.hasha-rules-content p { margin:5px 0; }
.hasha-rules-content ul { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;list-style:none;margin:8px 0;padding:0; }
.hasha-rules-content li { padding:6px 8px;border-radius:6px;background:#174437;text-align:center;overflow-wrap:anywhere; }
#hashaDifficulty.hasha-practice-start button { min-height:44px;font-size:20px;padding:7px; }
#hashaDifficulty .hasha-practice-difficulty { display:grid;grid-template-columns:auto 336px;justify-content:center;align-items:center;gap:16px; }
#hashaDifficulty .hasha-practice-difficulty h2 { margin:0;text-align:left;font-size:17px; }
#hashaDifficulty .hasha-practice-difficulty button { min-height:38px;padding:4px 8px;font-size:17px; }
#hashaDifficulty.hasha-practice-start .hasha-difficulty-start { min-height:50px;margin-top:12px;font-size:24px; }
@media (max-width:600px) {
  .hasha-rules-content { font-size:14px; }
  .hasha-rules-content ul { grid-template-columns:1fr;gap:4px; }
  #hashaDifficulty .hasha-practice-difficulty { grid-template-columns:minmax(0,336px);gap:10px; }
  #hashaDifficulty .hasha-practice-difficulty h2 { text-align:center; }
  #hashaDifficulty .hasha-practice-difficulty button { min-height:44px; }
}

.hasha-basic-rules:not([open]) .hasha-rules-open-label,
.hasha-basic-rules[open] .hasha-rules-closed-label { display:none; }
.hasha-basic-rules:not([open]) { margin-bottom:20px; }
#hashaDifficulty .hasha-basic-rules:not([open]) ~ .hasha-difficulty-start { margin-top:16px; }
