/* Subcommand styles share the campaign palette; the adopted main layout stays in domestic.css. */
#hashaPrisoners { box-sizing:border-box;width:min(580px,calc(100vw - 24px));max-height:90dvh;overflow:auto;padding:20px;border:2px solid #c7ad72;border-radius:10px;background:#092f27;color:#f1ead9;font:clamp(17px,3.8vw,20px)/1.65 "Yu Mincho",serif; }
#hashaPrisoners::backdrop { background:#001b16c9; }
#hashaPrisoners h2 { margin:0 0 14px;text-align:center;color:#e8d39a;font-size:1.3em; }
#hashaPrisoners p { margin:10px 0;overflow-wrap:anywhere; }
#hashaPrisoners .hasha-prisoner-summary { display:grid;grid-template-columns:minmax(0,1fr) max-content max-content;align-items:center;gap:10px clamp(8px,2vw,20px);margin:14px 0 20px;font-size:clamp(14px,3.5vw,18px); }
#hashaPrisoners .hasha-prisoner-army { display:contents; }
#hashaPrisoners .hasha-prisoner-gold,
#hashaPrisoners .hasha-prisoner-count { text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums;font-family:ui-monospace,"Yu Gothic",monospace; }
#hashaPrisoners button { box-sizing:border-box;display:block;width:100%;min-height:48px;margin:9px 0;padding:10px;border:1px solid #ac935f;border-radius:6px;background:linear-gradient(#f0ead5,#dcd0aa);color:#08291f;font:inherit;font-weight:700;white-space:normal; }
#hashaPrisoners button:disabled { opacity:.45; }
#hashaPrisoners button:focus-visible { outline:3px solid #e8d39a;outline-offset:2px; }
html:lang(en) #hashaDomestic .hd-header h1 { font-size:clamp(16px,3vw,27px);white-space:normal; }
html:lang(en) #hashaDomestic .hd-territory-heading { flex-wrap:wrap;gap:4px 12px; }
html:lang(en) #hashaDomestic .hd-territory-heading:has(.hd-strategist:not([hidden])) { flex-wrap:nowrap;gap:6px; }
html:lang(en) #hashaDomestic .hd-territory-heading:has(.hd-strategist:not([hidden])) :is(h2,.hd-governor,.hd-strategist) { font-size:clamp(14px,3.5vw,17px); }
html:lang(en) #hashaDomestic .hd-territory-heading h2,
html:lang(en) #hashaDomestic .hd-governor { font-size:clamp(17px,3vw,24px); }
html:lang(en) #hashaDomestic .hd-resources > div { font-size:clamp(13px,2vw,18px);gap:4px;justify-content:space-between; }
html:lang(en) #hashaDomestic .hd-resources dt { white-space:normal; }
html:lang(en) #hashaDomestic .hd-resources dd { min-width:0;margin-left:auto; }
html:lang(en) #hashaDomestic .hd-map-legend { font-size:clamp(11px,1.5vw,15px); }
html:lang(en) #hashaDomestic .hd-city-name { font-size:clamp(15px,2.3vw,23px); }
html:lang(en) #hashaDomestic .hd-city-faction { font-size:clamp(10px,1.4vw,14px);white-space:normal; }
html:lang(en) #hashaDomestic .hd-orders:not(.hg-showing-command) > button {
  font-size:clamp(12px,2vw,22px);letter-spacing:0;white-space:normal;overflow-wrap:anywhere;
}
html:lang(en) #hashaDomestic .hd-report > p { font-size:clamp(15px,2vw,22px); }
html:lang(en) #hashaDomestic .hd-report .hd-report-quote { white-space:normal; }
html:lang(en) #hashaCommandOverlay button { white-space:normal;overflow-wrap:anywhere; }
html:lang(en) #hashaCommandOverlay select { max-width:100%; }
html:lang(en) #hashaCommandOverlay .hg-transfer-quantity { grid-template-columns:4em minmax(0,1fr) 48px; }
html:lang(en) #hashaCommandOverlay .hg-reward-officer { flex-wrap:wrap; }
html:lang(en) #hashaCommandOverlay .hg-reward-name { overflow-wrap:anywhere; }
html:lang(en) #hashaDomestic .hg-poach-grid > button { white-space:normal;overflow-wrap:anywhere; }
html:lang(en) #hashaDomestic .hd-layout > *,
html:lang(en) #hashaDomestic .hd-overview-body > * { min-width:0; }
html:lang(en) #hashaCommandOverlay .hg-dialog { overflow-wrap:anywhere; }
html:lang(en) #hashaCommandOverlay h2,
html:lang(en) #hashaDomestic .hd-mobile-prompt { white-space:normal; }
@media(max-width:850px) {
  html:lang(en) #hashaDomestic .hd-layout { grid-template-columns:minmax(0,1fr); }
}
#hashaDomestic .hd-report { position:relative;height:280px;min-height:0;max-height:280px;padding-bottom:66px;overflow-y:auto;overscroll-behavior:contain; }
#hashaDomestic .hd-report.hg-history-open { height:280px;min-height:0;overflow-y:auto;overscroll-behavior:contain; }
#hashaDomestic .hd-report .hg-advance { position:absolute;right:14px;bottom:10px;width:48px;height:48px;padding:0;border:0;background:transparent;color:#e8d39a;font-size:28px; }
#hashaDomestic .hd-report .hg-advance::before { content:none !important; }
#hashaDomestic .hd-report .hg-advance::after { content:none !important; }
#hashaDomestic .hd-report { background:#031a15; }
#hashaDomestic .hd-report > p { color:#fff1d5;font-weight:600;overflow-wrap:anywhere; }
#hashaDomestic .hd-report .hd-report-quote { white-space:nowrap;font-size:clamp(14px,2.6vw,1em); }
#hashaDomestic .hd-report.hg-recommendation-page .hd-report-quote { white-space:normal; }
#hashaDomestic footer { display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:stretch;gap:12px; }
#hashaDomestic footer .hg-history { justify-self:start;display:block;margin:0;font:inherit;min-height:48px; }
#hashaDomestic footer [data-hd="back"] { justify-self:end; }
#hashaDomestic .hd-report > button[hidden] { display:none; }
@media(min-width:601px) { #hashaDomestic .hd-report > p { font-size:28px;line-height:1.8; } }
@media(min-width:1100px) { #hashaDomestic .hd-report > p { font-size:32px; } }
@media(max-width:600px) {
 #hashaDomestic footer { grid-template-columns:repeat(2,minmax(0,1fr)); }
 #hashaDomestic footer button { width:auto;min-width:0;min-height:48px;font-size:15px;padding:8px; }
 #hashaDomestic footer [data-hd="rules"] { grid-column:1 / -1;grid-row:2;justify-self:center; }
}
#hashaDomestic #hashaCommandOverlay.hg-target-selection .hg-dialog { display:flex;flex-direction:column;min-height:300px; }
#hashaCommandOverlay.hg-target-selection .hg-actions { margin-top:auto;padding-top:20px; }
@media(min-width:851px) {
 #hashaDomestic .hd-overview-body { grid-template-columns:minmax(245px,.9fr) minmax(0,1.1fr);gap:24px; }
 #hashaDomestic .hd-territory-heading { padding-bottom:6px;margin-bottom:6px;gap:24px; }
 #hashaDomestic .hd-resources { display:flex;flex-wrap:wrap;max-width:280px;gap:0 12px; }
 #hashaDomestic .hd-resources > div { width:100%;justify-content:flex-start;gap:14px;padding:2px 0;font-size:25px; }
 #hashaDomestic .hd-resources > div:nth-child(-n+2) { width:calc(50% - 6px);gap:10px;font-size:26px; }
 #hashaDomestic .hd-resources dd { min-width:0;margin-left:auto; }
 #hashaDomestic .hd-resources > div:nth-child(-n+2) dd { margin-left:0; }
 #hashaDomestic .hd-resources > div:nth-child(2) { justify-content:flex-end; }
 #hashaDomestic .hd-map { height:280px; }
 #hashaDomestic [data-territory=xuchang] { top:58px; }
 #hashaDomestic [data-territory=xinye],#hashaDomestic [data-territory=wu] { bottom:4px; }
 #hashaDomestic .hd-orders > button { min-height:62px;margin-top:10px; }
 #hashaDomestic .hd-orders h2 { font-family:"Yu Mincho",serif;font-size:23px; }
 #hashaDomestic .hd-report { min-height:280px; }
 #hashaDomestic .hd-report > p { line-height:1.8; }
}
#hashaDomestic .hd-mobile-prompt { display:none; }
@media(max-width:600px) {
 #hashaDomestic .hd-map { order:-1;align-self:center;width:100%;max-width:390px;height:122px;margin:0 auto; }
 #hashaDomestic .hd-map-legend { display:none; }
 #hashaDomestic .hd-map .hd-map-art { top:0;height:100%; }
 #hashaDomestic .hd-map-terrain,#hashaDomestic .hd-map-river { display:none; }
 #hashaDomestic .hd-map-roads { stroke-width:1.2;stroke-dasharray:3 4; }
 #hashaDomestic .hd-map button { top:17px;width:31%;min-width:0;height:94px;padding:20px 3px 5px;font-size:clamp(22px,6vw,27px);line-height:1.1; }
 #hashaDomestic [data-territory=xinye] { left:0;right:auto;bottom:auto;top:26px; }
 #hashaDomestic [data-territory=xuchang] { left:34.5%;right:auto;bottom:auto;top:2px; }
 #hashaDomestic [data-territory=wu] { left:auto;right:0;bottom:auto;top:26px; }
 #hashaDomestic .hd-city-faction { font-size:clamp(12px,3.5vw,15px);line-height:1.2; }
 #hashaDomestic .hd-map .hd-city-castle { top:-13px;width:28px;height:23px;left:calc(50% - 14px); }
 #hashaDomestic .hd-map button[aria-current=step]::after,
 #hashaDomestic .hd-map button[aria-pressed=true]::before { content:none; }
 #hashaDomestic .hd-map button[aria-pressed=true] { outline:2px solid #e8d7a9;outline-offset:1px;box-shadow:inset 0 0 0 2px #e8d7a9,0 0 8px #e8d39a70; }
 #hashaDomestic .hd-shell { padding-bottom:calc(12px + env(safe-area-inset-bottom,0px)); }
 #hashaDomestic .hd-overview-body { display:flex;flex-direction:column;align-items:stretch; }
 #hashaDomestic .hd-map { order:-1;align-self:center; }
 #hashaDomestic .hd-resources { display:flex;flex-wrap:wrap;max-width:100%;gap:0 12px; }
 #hashaDomestic .hd-resources > div { box-sizing:border-box;width:calc(50% - 6px);min-width:0;gap:4px;font-size:clamp(18px,5.5vw,26px); }
 #hashaDomestic .hd-resources dd { min-width:0;margin-left:auto;white-space:nowrap; }
 #hashaDomestic .hd-resources > div:nth-child(2n) { justify-content:flex-end; }
 #hashaDomestic .hd-mobile-prompt { display:block;margin:2px 0 4px;text-align:center;color:#e8d39a;font-size:20px;font-weight:bold;white-space:nowrap; }
 #hashaDomestic .hd-orders:not(.hg-showing-command) { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:0;border:0;background:none;box-shadow:none;min-height:0; }
 #hashaDomestic .hd-orders:not(.hg-showing-command) > h2 { display:none; }
 #hashaDomestic .hd-orders:not(.hg-showing-command) > button { position:static;width:100%;height:55px;min-height:55px;margin:0;padding:5px;font-size:24px;letter-spacing:.15em;box-shadow:inset 0 0 0 1px #fff8e3,0 2px 0 #597c69; }
 #hashaDomestic .hd-orders > button[data-command="内政"] { left:8px; }
 #hashaDomestic .hd-orders > button[data-command="軍事"] { left:calc(8px + (100% - 8px)/3); }
 #hashaDomestic .hd-orders > button[data-command="情報"] { right:8px; }
 #hashaDomestic .hd-command-area:has(.hg-showing-command) > .hd-mobile-prompt { display:none; }
}
/* Landscape phones are wider than the portrait breakpoint, so keep their
   command bar in the same three-column layout using the short viewport. */
@media(orientation:landscape) and (max-height:600px) and (pointer:coarse) {
 #hashaDomestic .hd-orders:not(.hg-showing-command) { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:0;border:0;background:none;box-shadow:none;min-height:0; }
 #hashaDomestic .hd-orders:not(.hg-showing-command) > h2 { display:none; }
 #hashaDomestic .hd-orders:not(.hg-showing-command) > button { position:static;width:100%;height:52px;min-height:52px;margin:0;padding:5px;font-size:24px;letter-spacing:.15em;box-shadow:inset 0 0 0 1px #fff8e3,0 2px 0 #597c69; }
 #hashaDomestic .hd-command-area:has(.hg-showing-command) > .hd-mobile-prompt { display:none; }
}
@media(max-width:520px) {
 #hashaDomestic .hd-report { height:auto;min-height:0;max-height:none;padding:15px 12px;overflow:visible; }
 #hashaDomestic .hd-report.hg-history-open { height:auto;min-height:0;max-height:none;overflow:visible; }
 #hashaDomestic .hd-report > p { font-size:20px;line-height:1.65; }
 #hashaDomestic .hd-report .hd-report-quote { font-size:1em;white-space:normal; }
 #hashaDomestic .hd-territory-heading { gap:20px; }
 #hashaDomestic .hd-territory-heading h2,#hashaDomestic .hd-governor { font-size:28px; }
 #hashaDomestic .hd-resources > div { font-size:clamp(18px,5.2vw,24px); }
 #hashaDomestic .hd-resources dd { font-size:.9em; }
 #hashaCommandOverlay.hg-inline .hg-dialog { font-size:16px;line-height:1.65; }
 #hashaCommandOverlay.hg-inline h2 { font-size:28px; }
}
#hashaCommandOverlay .hg-slot { margin:16px 0;padding:12px;border:1px solid #587167;border-radius:6px;overflow-wrap:anywhere; }
#hashaCommandOverlay .hg-slot-saved { border:2px solid #c7ad72;background:#c7ad7217; }
#hashaCommandOverlay .hg-slot-saved p { color:#f1e4bf; }
#hashaCommandOverlay .hg-slot-saved .hg-slot-compatibility { display:block;color:#bac5b3;font-size:.9em; }
#hashaCommandOverlay .hg-slot-empty,#hashaCommandOverlay .hg-slot-invalid { color:#bbc7bf;background:#001b161c; }
#hashaCommandOverlay .hg-slot-back { display:none; }
#hashaCommandOverlay.hg-title-records .hg-dialog { padding:14px 20px;line-height:1.4; }
#hashaCommandOverlay.hg-title-records .hg-slot { margin:7px 0;padding:8px 12px; }
#hashaCommandOverlay.hg-title-records .hg-slot p { margin:4px 0; }
#hashaCommandOverlay.hg-title-records .hg-slot button { min-height:40px;margin:6px 0 0;padding:4px 10px; }
#hashaCommandOverlay.hg-title-records .hg-actions { margin-top:6px; }
@media(max-width:520px) { #hashaCommandOverlay.hg-title-records .hg-dialog { padding:10px 12px;line-height:1.35; } }
#hashaCommandOverlay .hg-recruit-increase { font-weight:800;font-size:1.35em;white-space:nowrap;color:#f4dda1; }
#hashaDomestic .hd-orders.hg-showing-command > :not(#hashaCommandOverlay) { display:none; }
#hashaDomestic #hashaCommandOverlay.hg-inline { position:static;inset:auto;display:block;padding:0;background:transparent;z-index:auto; }
#hashaDomestic #hashaCommandOverlay.hg-inline[hidden] { display:none; }
#hashaDomestic #hashaCommandOverlay.hg-inline .hg-dialog { width:100%;max-height:none;overflow:visible;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none; }
#hashaCommandOverlay input { box-sizing:border-box;max-width:100%;width:100%;font:inherit;padding:8px;background:#f0ead5;color:#123e2d;border:1px solid #ac935f;border-radius:6px; }
#hashaCommandOverlay[hidden] { display:none; }
body.hasha-domestic-open > .modal-overlay#hashaCommandOverlay:not([hidden]) { display:flex !important; }
#hashaCommandOverlay { position:fixed;inset:0;z-index:23000;display:flex;align-items:center;justify-content:center;padding:16px;background:#001b16c9; }
#hashaCommandOverlay .hg-dialog { box-sizing:border-box;width:min(620px,100%);max-height:90dvh;overflow:auto;padding:24px;border:2px solid #c7ad72;border-radius:9px;background:#092f27;color:#f1ead9;font:20px/1.8 "Yu Mincho",serif;box-shadow:0 8px 36px #0008; }
#hashaCommandOverlay .hg-merchant-quote { margin:8px 0 16px;padding:9px 12px;border-left:3px solid #d0ad56;border-radius:4px;background:#f4edcf;color:#183d2c;font-size:.9em;line-height:1.55; }
#hashaCommandOverlay h2 { margin:0 0 16px;color:#e8d39a;font-size:28px;border-bottom:1px solid #826f4d;padding-bottom:10px; }
#hashaCommandOverlay p { white-space:pre-line;margin:12px 0; }
#hashaCommandOverlay button,#hashaCommandOverlay select { box-sizing:border-box;font:inherit;min-height:48px;border:1px solid #ac935f;border-radius:6px;padding:8px 14px; }
#hashaCommandOverlay button { cursor:pointer;background:linear-gradient(#f0ead5,#dcd0aa);color:#08291f;font-weight:800;text-shadow:none;opacity:1;width:100%;margin:6px 0; }
#hashaCommandOverlay button:not(:disabled):hover { color:#061e17; }
#hashaCommandOverlay.hg-command-menu button { font-size:1.2em;line-height:1.5; }
#hashaCommandOverlay.hg-command-menu:has(.hg-body > button:nth-child(4):last-child) .hg-body { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px; }
#hashaCommandOverlay button:disabled { opacity:.45;cursor:default; }
#hashaCommandOverlay select { background:#f0ead5;color:#123e2d; }
#hashaCommandOverlay button:focus-visible,#hashaCommandOverlay select:focus-visible { outline:3px solid #e8d39a;outline-offset:3px; }
#hashaCommandOverlay .hg-error { color:#ffbeb0; }
#hashaCommandOverlay .hg-loyalty-short { display:none; }
#hashaCommandOverlay .hg-actions { display:flex;gap:12px;margin-top:16px; }
#hashaCommandOverlay.hg-recruitment-confirm .hg-body { text-align:center; }
#hashaCommandOverlay.hg-recruitment-confirm .hg-body > p { margin:6px 0;line-height:1.5; }
#hashaCommandOverlay.hg-recruitment-confirm .hg-body > .hg-recruitment-name { margin:10px 0 2px;color:#f3d578;font-size:clamp(32px,8vw,46px);font-weight:800;line-height:1.25;overflow-wrap:anywhere; }
#hashaCommandOverlay.hg-recruitment-confirm .hg-actions,
#hashaDomestic #hashaCommandOverlay.hg-inline.hg-recruitment-confirm .hg-actions { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:16px; }
#hashaCommandOverlay.hg-recruitment-confirm .hg-actions > button,
#hashaDomestic #hashaCommandOverlay.hg-inline.hg-recruitment-confirm .hg-actions > button { width:100%;height:52px;min-height:48px;margin:0;padding:8px;line-height:1.3;font-size:20px; }
#hashaDomestic #hashaCommandOverlay.hg-inline.hg-recruitment-confirm .hg-dialog { min-height:0;padding:14px; }
#hashaCommandOverlay.hg-recruitment-confirm h2 { margin-bottom:10px;padding-bottom:8px; }
#hashaDomestic .hd-orders > button:disabled { opacity:.55;cursor:default; }
#hashaDomestic .hg-history { display:block;margin:10px 0 0 auto;font-size:16px;min-height:40px; }
#hashaDomestic .hd-map button[aria-pressed=true]::before { content:none; }
#hashaDomestic .hd-map button[aria-current=step]::after { content:none; }
#hashaDomestic .hd-map button[aria-pressed=true] { outline:2px solid #69acff; }
#hashaDomestic .hd-map button[aria-current=step] {
  border-color:#ffe18a;background:#23513e;
  box-shadow:inset 0 0 0 1px #ffe18a;
}
@media(max-width:520px) { #hashaCommandOverlay {padding:10px;} #hashaCommandOverlay .hg-dialog {padding:18px;font-size:19px;} }
@media(max-width:600px) { #hashaCommandOverlay .hg-recruit-increase { font-size:clamp(1em,4.8vw,1.25em); } }
@media(max-width:600px) {
 #hashaCommandOverlay .hg-reward-officer { display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0;white-space:nowrap;overflow:hidden;padding:8px 10px;font-size:clamp(13px,4vw,17px); }
 #hashaCommandOverlay .hg-reward-name { flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis; }
 #hashaCommandOverlay .hg-reward-officer .hg-loyalty-long { display:none; }
 #hashaCommandOverlay .hg-reward-officer .hg-loyalty-short { display:block;flex:0 0 auto; }
 #hashaDomestic #hashaCommandOverlay.hg-inline .hg-slot-back { display:block; }
 #hashaDomestic #hashaCommandOverlay.hg-inline .hg-actions { display:flex;flex-wrap:wrap;gap:8px;margin-top:10px; }
 #hashaDomestic #hashaCommandOverlay.hg-inline .hg-actions > button { flex:1 1 120px;width:auto;min-width:0;margin:0;padding:8px; }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-command-menu .hg-dialog { padding:12px; }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-command-menu h2 { margin:0 0 8px;padding-bottom:6px;font-size:22px; }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-command-menu .hg-body { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px; }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-command-menu .hg-body > button { width:100%;min-width:0;min-height:48px;margin:0;padding:6px 3px;font-size:clamp(15px,4.7vw,19px);line-height:1.25;overflow-wrap:anywhere; }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-command-menu:has(.hg-body > button:nth-child(3):last-child) .hg-body { grid-template-columns:repeat(3,minmax(0,1fr)); }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-command-menu .hg-actions { display:block;margin-top:8px; }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-command-menu .hg-actions > #hashaCommandBack { display:block;width:100%;min-height:44px;margin:0;padding:6px;font-size:18px; }
}
@media(orientation:landscape) and (max-height:600px) and (pointer:coarse) {
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-command-menu .hg-dialog { padding:10px; }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-command-menu h2 { margin-bottom:6px;padding-bottom:4px;font-size:20px; }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-command-menu .hg-body { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px; }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-command-menu .hg-body > button { width:100%;min-width:0;min-height:44px;margin:0;padding:5px 3px;font-size:16px;line-height:1.2;overflow-wrap:anywhere; }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-command-menu:has(.hg-body > button:nth-child(3):last-child) .hg-body { grid-template-columns:repeat(3,minmax(0,1fr)); }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-command-menu .hg-actions { display:block;margin-top:6px; }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-command-menu .hg-actions > #hashaCommandBack { display:block;width:100%;min-height:42px;margin:0;padding:5px;font-size:17px; }
}
@media(max-width:600px) { #hashaDomestic .hd-map button[aria-current=step]::after { content:none; } }
@media(max-width:600px) {
 #hashaDomestic .hd-overview { padding-top:10px;padding-bottom:8px; }
 #hashaDomestic .hd-overview-body { gap:6px; }
 #hashaDomestic .hd-map { height:108px; }
 #hashaDomestic .hd-map button { height:88px; }
 #hashaDomestic [data-territory=xinye],#hashaDomestic [data-territory=wu] { top:19px; }
 #hashaDomestic [data-territory=xuchang] { top:4px; }
 #hashaDomestic .hd-territory-heading { margin-bottom:3px;padding-bottom:4px; }
 #hashaDomestic .hd-territory-heading h2,#hashaDomestic .hd-governor { font-size:22px;line-height:1.35; }
 #hashaDomestic .hd-layout { gap:4px; }
 #hashaDomestic .hd-mobile-prompt { margin:0;line-height:1.35; }
 #hashaDomestic .hd-orders:not(.hg-showing-command)>button { height:48px;min-height:48px; }
 #hashaDomestic .hd-report { margin-top:5px; }
}
@media(orientation:landscape) and (max-height:600px) and (pointer:coarse) {
 #hashaDomestic .hd-orders:not(.hg-showing-command)>button { height:48px;min-height:48px; }
 #hashaDomestic .hd-report { margin-top:5px; }
}
@media(max-width:600px) {
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-mobile-target-selection .hg-dialog { display:block;min-height:0; }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-mobile-target-selection .hg-body { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px; }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-mobile-target-selection .hg-body > p { grid-column:1/-1;margin:4px 0 6px;font-size:18px;line-height:1.45; }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-mobile-target-selection .hg-body > button { width:100%;min-width:0;min-height:48px;margin:0;padding:6px;font-size:20px; }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-mobile-target-selection .hg-actions { margin-top:8px;padding:0; }
}
@media(orientation:landscape) and (max-height:600px) and (pointer:coarse) {
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-mobile-target-selection .hg-dialog { display:block;min-height:0; }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-mobile-target-selection .hg-body { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px; }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-mobile-target-selection .hg-body > p { grid-column:1/-1;margin:4px 0;font-size:17px;line-height:1.4; }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-mobile-target-selection .hg-body > button { width:100%;min-width:0;min-height:44px;margin:0;padding:5px;font-size:18px; }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-mobile-target-selection .hg-actions { margin-top:6px;padding:0; }
}
#hashaCommandOverlay.hg-save-confirm .hg-actions,
#hashaDomestic #hashaCommandOverlay.hg-inline.hg-save-confirm .hg-actions {
  display:flex;flex-direction:column;gap:10px;margin-top:12px;
}
#hashaCommandOverlay.hg-save-confirm .hg-actions > button,
#hashaDomestic #hashaCommandOverlay.hg-inline.hg-save-confirm .hg-actions > button {
  flex:none;width:100%;min-height:50px;margin:0;padding:10px 8px;
  white-space:nowrap;text-align:center;
}
#hashaCommandOverlay.hg-save-confirm .hg-dialog { min-height:0; }
#hashaDomestic .hd-report.hg-history-open {
  height:280px;min-height:0;max-height:280px;overflow-y:auto;
}
.hg-trade-quantity { appearance:textfield; }
.hg-trade-quantity::-webkit-inner-spin-button,
.hg-trade-quantity::-webkit-outer-spin-button { appearance:none; }
#hashaCommandOverlay .hg-trade-steppers { display:flex;gap:8px; }
#hashaDomestic #hashaCommandOverlay.hg-inline.hg-command-menu .hg-body > button,
#hashaDomestic #hashaCommandOverlay.hg-inline .hg-actions button {
  font-family:"Yu Gothic","Hiragino Kaku Gothic ProN","Meiryo",sans-serif;
  font-weight:500;
}
#hashaDomestic .hd-territory-heading:has(.hd-strategist:not([hidden])),
html:lang(en) #hashaDomestic .hd-territory-heading:has(.hd-strategist:not([hidden])) {
  flex-wrap:wrap;
  gap:4px clamp(12px,1.5vw,20px);
}
@media(min-width:601px) and (min-height:601px) {
 #hashaDomestic .hd-report > p { font-size:25.2px;line-height:1.75; }
 html:lang(en) #hashaDomestic .hd-report > p { font-size:clamp(13.5px,1.8vw,19.8px); }
}
@media(min-width:1100px) and (min-height:601px) {
 #hashaDomestic .hd-report > p { font-size:28.8px; }
}
#hashaDomestic .hd-report .hd-advice-heading {
 display:block;min-width:0;max-width:100%;font-size:1em;color:#c7ad72;
 border-bottom:1px solid #826f4d;padding-bottom:0.35em;margin-bottom:0.55em;
 white-space:normal;overflow-wrap:anywhere;
}
#hashaDomestic .hd-report .hd-advice-body {
 display:block;margin-left:0.4em;padding-left:1em;text-indent:-1em;
 min-width:0;white-space:pre-line;overflow-wrap:anywhere;word-break:normal;
}
#hashaDomestic .hd-report > p.hd-advice { min-width:0;max-width:100%;white-space:normal; }
#hashaDomestic .hd-report .hd-joining-quote {
 display:block;margin-top:0.3em;white-space:pre-line;overflow-wrap:anywhere;color:#fff1d5;font-weight:600;
}
#hashaDomestic .hd-report,
#hashaDomestic .hd-report.hg-poach-report,
#hashaDomestic .hd-report.hg-history-open {
 min-height:280px;
}
#hashaDomestic .hd-report.hg-poach-report { padding-bottom:66px; }

@media(min-width:601px) and (min-height:601px) {
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-mobile-target-selection .hg-dialog { min-height:0; }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-mobile-target-selection .hg-body { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-mobile-target-selection .hg-body > p { grid-column:1/-1;margin:8px 0;line-height:1.5; }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-mobile-target-selection .hg-body > button { width:100%;min-width:0;min-height:48px;margin:0; }
 #hashaDomestic #hashaCommandOverlay.hg-inline.hg-mobile-target-selection .hg-actions { margin-top:14px;padding-top:0; }
}

#hashaCommandOverlay.hg-batch-reward .hg-reward-officer { display:flex;align-items:center;gap:10px;padding:10px;margin:6px 0;min-height:44px;box-sizing:border-box;border:2px solid #ac935f;border-radius:6px;background:#eee4c5;color:#123e2d;cursor:pointer;font-family:"Yu Gothic","Meiryo",sans-serif; }
#hashaCommandOverlay.hg-batch-reward .hg-reward-officer > span:last-child { margin-left:auto; }
#hashaCommandOverlay.hg-batch-reward .hg-reward-officer.is-selected { background:#ffe6a0;border-color:#e5b844; }
#hashaCommandOverlay.hg-batch-reward .hg-reward-officer:has(input:disabled) { opacity:.55;cursor:default; }
#hashaCommandOverlay.hg-batch-reward input { width:20px;height:20px;flex:none; }
#hashaDomestic #hashaCommandOverlay.hg-batch-reward .hg-actions { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; }
#hashaDomestic #hashaCommandOverlay.hg-batch-reward .hg-actions button { min-width:0;width:100%;font-family:"Yu Gothic","Meiryo",sans-serif; }

#hashaDomestic #hashaCommandOverlay.hg-scout-selection .hg-body { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px; }
#hashaDomestic #hashaCommandOverlay.hg-scout-selection .hg-body > button { min-width:0;width:100%;min-height:48px;margin:0;font-family:"Yu Gothic","Meiryo",sans-serif;font-weight:700;background:linear-gradient(#f0ead5,#dcd0aa);color:#123e2d;border:2px solid #ac935f;box-shadow:inset 0 0 0 1px #fff8e3,0 3px 0 #597c69; }
@media(max-width:600px), (orientation:landscape) and (max-height:600px) and (pointer:coarse) {
 #hashaDomestic.hd-scout-detail .hd-report { display:none; }
}
#hashaDomestic .hd-report.hg-cpu-war-detail {
  position:relative;
  height:auto;
  max-height:none;
  padding-bottom:56px;
}
#hashaDomestic .hd-report.hg-cpu-war-detail > p {
  max-height: min(280px, 42vh);
  overflow-y:auto;
  overscroll-behavior:contain;
}

#hashaDomestic .hd-map button[aria-pressed=true],
#hashaDomestic .hd-map button[aria-current=step] { outline:none;box-shadow:none; }
#hashaDomestic .hd-map button[data-faction=cao] { border-color:#ee6c70; }
#hashaDomestic .hd-map button[data-faction=liu] { border-color:#69acff; }
#hashaDomestic .hd-map button[data-faction=sun] { border-color:#f2d552; }
#hashaDomestic .hd-map .hd-city-name { position:relative;width:max-content;max-width:100%;margin-inline:auto; }
#hashaDomestic .hd-map button[aria-pressed=true] .hd-city-name::before {
 content:'';position:absolute;right:calc(100% + 2px);top:50%;transform:translateY(-50%);
 border-top:.45em solid transparent;border-bottom:.45em solid transparent;border-left:.75em solid #ffe18a;
}
#hashaDomestic .hd-map button:focus-visible { outline:2px dashed #fff3ca;outline-offset:4px; }


/* Phone panels follow their contents, including after territory/detail changes. */
#hashaDomestic .hd-command-area { display:contents; }
@media(max-width:600px), (orientation:landscape) and (max-height:600px) and (pointer:coarse) {
 /* Preserve both rows while the result image covers their combined area. */
 #hashaDomestic .hd-command-area { display:grid;position:relative;min-width:0;gap:12px; }
 #hashaDomestic.hd-result-picture .hd-mobile-prompt { visibility:hidden; }
 #hashaDomestic.hd-result-picture .hd-command-area .hd-orders { position:static;overflow:visible;min-height:0; }
 #hashaDomestic.hd-result-picture .hd-command-area .hd-result-image { object-fit:contain;background:#062d24;border-radius:7px; }
 #hashaDomestic .hd-layout { min-height:0 !important;height:auto;align-content:start;align-items:start;gap:12px; }
 #hashaDomestic .hd-overview,
 #hashaDomestic .hd-orders { height:auto;min-height:0;align-self:start; }
 #hashaDomestic .hd-mobile-prompt { margin:0;white-space:normal; }
 #hashaDomestic .hd-header { margin-bottom:12px; }
 #hashaDomestic #hashaCommandOverlay.hg-inline .hg-dialog { height:auto;min-height:0; }
 #hashaDomestic #hashaCommandOverlay.hg-inline h2 { margin-bottom:10px;white-space:normal;overflow-wrap:anywhere; }
 #hashaDomestic #hashaCommandOverlay.hg-inline button { min-width:0;white-space:normal;overflow-wrap:anywhere; }
 #hashaDomestic #hashaCommandOverlay.hg-inline .hg-error:empty { display:none; }
 #hashaDomestic #hashaCommandOverlay.hg-inline .hg-actions { margin-top:10px;gap:10px; }
 #hashaDomestic .hd-report,
 #hashaDomestic .hd-report.hg-poach-report,
 #hashaDomestic .hd-report.hg-history-open,
 #hashaDomestic .hd-report.hg-cpu-war-detail { height:auto;min-height:0;max-height:280px;overflow-y:auto;margin-top:14px; }
 #hashaDomestic .hd-report:has(> p:empty):not(:has(.hg-advance:not([hidden]), .hd-capital-actions)) { display:none; }
 #hashaDomestic footer { margin-top:14px;gap:10px; }
 #hashaDomestic footer button { height:auto;min-height:48px;white-space:normal;overflow-wrap:anywhere;line-height:1.5; }
}
