/* Retain mobile tap targets and legibility; enemy rows stay in table format. */
@media(max-width:800px){
 #bc-reader>.bc-discovery,#bc-reader>.public-intro:not([role=status]){display:none!important}
 main.shell#bc-reader{padding-top:8px;row-gap:8px}
 #bc-reader #bc-result>.map-head{margin-top:0;margin-bottom:10px}
 #bc-reader .stage-card{padding-top:14px}
}
.stage-detail-hint{display:block;font-size:13px;line-height:1.7;font-weight:400;margin-top:3px}
.stage-card h3 .stage-link{display:block;min-height:44px}
.stage-overview-help,.stage-table-help{font-size:13px;line-height:1.7;margin:8px 0 12px;color:var(--sub,#acbcb4)}
#bc-reader .reader-desktop-help{font-size:12px;line-height:1.7;margin:8px 0 12px;color:var(--sub)}
#bc-reader .stage-overview-wrap,#bc-reader .stage-overview-help,#bc-reader .stage-detail-hint{display:none}
#bc-reader .stage-card h3 .stage-link{min-height:0}
#bc-reader .reader-desktop-table{min-width:880px;font-size:13px}
#bc-reader .reader-desktop-table th,#bc-reader .reader-desktop-table td{padding:8px 9px;vertical-align:middle}
#bc-reader .reader-desktop-table .enemy-name{min-width:165px}
#bc-reader .reader-desktop-table .enemy-cell{gap:6px;flex-wrap:wrap;min-height:36px}
#bc-reader .reader-desktop-table .enemy-icon{width:56px;height:22px;flex:none}
#bc-reader .reader-desktop-table .enemy-text{white-space:normal;overflow-wrap:anywhere;line-height:1.5}
#bc-reader .reader-desktop-table .timing{min-width:105px;max-width:160px}
#bc-reader .reader-desktop-table .cell-sub{font-size:11px;line-height:1.6;white-space:normal}
#bc-reader .reader-desktop-table .stat-main{font-size:14px}
#bc-reader .stage-overview-table{width:100%;min-width:0;table-layout:fixed;font-size:14px}
#bc-reader .stage-overview-table th:last-child,#bc-reader .stage-overview-table td:last-child{width:102px}
#bc-reader .stage-overview-table th,#bc-reader .stage-overview-table td{padding:6px 8px;white-space:normal}
#bc-reader .stage-overview-table .enemy-cell{min-width:0;max-width:100%;width:100%;gap:8px;min-height:44px;white-space:normal}
#bc-reader .stage-overview-table .enemy-icon{width:56px;height:22px;flex:none}
#bc-reader .stage-overview-table .enemy-text{white-space:normal;overflow-wrap:anywhere;line-height:1.5}
.enemy-percent{font-variant-numeric:tabular-nums;white-space:nowrap;line-height:1.65}.enemy-percent>span:not([data-percent-hp]):not([data-percent-attack]){display:block}
.stage-table-title{font-size:16px;margin:14px 0 8px}
.stage-panel .stage-spawn-table{font-size:13px;min-width:880px;table-layout:auto}
.stage-panel .stage-spawn-table th,.stage-panel .stage-spawn-table td{padding:7px 8px}
.stage-panel .stage-spawn-table .enemy{min-width:150px;gap:7px;min-height:44px;line-height:1.5}
.stage-panel .stage-spawn-table .stage-enemy-name{max-width:130px;overflow-wrap:anywhere}
.stage-enemy-art{display:flex;flex-direction:column;align-items:flex-start;gap:2px;flex:none}
.stage-enemy-art .boss{font-size:9px;line-height:1.3;padding:1px 3px;white-space:nowrap}
.stage-panel .stage-spawn-table .enemy-sprite{zoom:.7}
.stage-panel .stage-spawn-table .small{font-size:12px;max-width:160px;line-height:1.6}
.stage-panel .stage-spawn-table td:nth-child(2),.stage-panel .stage-spawn-table td:nth-child(3),.stage-panel .stage-spawn-table td:nth-child(4),.stage-panel .stage-spawn-table td:last-child{white-space:nowrap}
.stage-panel .stage-spawn-table td:first-child,.stage-panel .stage-spawn-table th:first-child{position:sticky;left:0;z-index:2;background:var(--paper);box-shadow:2px 0 0 var(--line)}
.stage-panel .stage-spawn-table th:first-child{background:var(--bg)}
.stage-density{display:none}.stage-spawn-table abbr{text-decoration:none}
@media(max-width:600px){
 #bc-reader .stage-overview-table th:last-child,#bc-reader .stage-overview-table td:last-child{width:88px}
 #bc-reader .stage-overview-table .enemy-cell{flex-wrap:wrap;gap:3px 6px;font-size:14px}
 #bc-reader .stage-overview-table .enemy-text{flex:1 1 90px;text-align:left}
 .stage-controls .crowns a,.stage-controls .unit-switch button{min-height:44px;min-width:38px;font-size:14px}.stage-controls{gap:4px}.stage-controls .crowns{gap:3px}.stage-controls .crowns a{padding:5px}.stage-controls .unit-switch{padding:2px;gap:1px}
 #bc-navigation .series-button{min-height:44px;font-size:13px;padding:6px 8px}#bc-navigation input[type=search],#bc-navigation button.secondary{min-height:44px}#bc-navigation .enemy-filter>summary{min-height:44px;font-size:14px;align-content:center}#bc-navigation .units button,#bc-navigation .crown-button{min-height:44px;min-width:38px;font-size:14px}#bc-navigation select{font-size:16px;min-height:44px}#bc-navigation .map-picker-trigger{font-size:14px;min-height:44px}#bc-navigation .map-picker-label{font-size:12px}#bc-navigation .map-button{font-size:14px;min-height:44px}.reader-search-tools label,.reader-search-tools button,#bc-search-scope{font-size:14px}
 .stage-card .fact,.stage-panel .facts{font-size:14px;line-height:1.6}.stage-card .facts{row-gap:8px}.stage-card .table-title{flex-wrap:wrap}.stage-card .table-title .sub{font-size:13px}.stage-card .units button{min-height:44px;min-width:38px;font-size:14px}
 #bc-navigation #bc-search-scope{grid-column:1/-1;grid-row:3;width:100%;font-size:13px;line-height:1.5;margin:3px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 #bc-navigation .enemy-filter{grid-row:4}#bc-navigation .map-picker-trigger,#bc-navigation .selection label{grid-row:5}#bc-navigation .selection .crown-area,#bc-navigation .selection .map-units{grid-row:6}
}
@media(max-width:800px){
 #bc-reader .reader-desktop-wrap,#bc-reader .reader-desktop-help{display:none}
 #bc-reader .stage-overview-wrap,#bc-reader .stage-overview-help,#bc-reader .stage-detail-hint{display:block}
 #bc-reader .stage-card h3 .stage-link{min-height:44px}
}

/* Stage detail: desktop numbers stay visible; mobile retains the six spawn columns. */
.prototype-tool-links{display:flex;align-items:center;gap:7px;margin-left:auto;flex:none}.prototype-tool-links .prototype-catalog-link{margin-left:0}
@media(max-width:800px){
 #bc-navigation{position:static!important;isolation:auto}#bc-navigation-spacer{display:none!important;height:0!important}
 html{scroll-padding-top:12px!important}#bc-reader #bc-result,#bc-reader .stage-card{scroll-margin-top:12px!important}
 #bc-navigation .series-row{flex-wrap:wrap;gap:5px;padding:5px 0}.prototype-tool-links{margin-left:auto;gap:5px}.prototype-tool-links .prototype-catalog-link{min-height:38px;font-size:12px;padding:5px 8px}.prototype-tool-links .prototype-catalog-link svg{width:15px;height:15px}
 #bc-navigation .navigation-shell{padding:0 10px}#bc-navigation .search-row{padding-top:4px;padding-bottom:4px}#bc-navigation .selection{gap:6px}#bc-navigation .enemy-filter>summary{padding-top:6px;padding-bottom:6px}
 .bc-release-notice{padding:7px 10px!important;margin:6px 10px!important;gap:2px 8px!important;font-size:11px!important}.bc-release-notice time{display:none}.bc-release-notice a{display:block;flex:1 1 150px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px}.bc-release-notice strong{font-size:11px}.bc-release-notice-version{font-size:11px}
}
.mobile-controls-toggle{display:none}
.prototype-more-menu{position:relative;flex:none}.prototype-more-menu>summary{list-style:none;cursor:pointer;min-height:38px}.prototype-more-menu>summary::-webkit-details-marker{display:none}.prototype-more-menu[open]>summary{background:var(--soft);color:var(--accent)}
.prototype-more-menu>nav{position:absolute;right:0;top:calc(100% + 6px);z-index:50;width:240px;max-width:calc(100vw - 24px);padding:6px;border:1px solid var(--line);border-radius:9px;background:var(--paper);box-shadow:0 8px 24px #0005}
.prototype-more-menu>nav>a{display:flex;align-items:center;min-height:44px;padding:9px 12px;border-radius:5px;font-size:14px;line-height:1.5;text-decoration:none}.prototype-more-menu>nav>a:hover,.prototype-more-menu>nav>a:focus-visible{background:var(--soft)}
@media(max-width:800px){
 #bc-navigation .mobile-controls-toggle{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:6px 10px;border:1px solid var(--line);border-radius:7px;background:var(--paper);color:var(--ink);font-size:13px;cursor:pointer}
 #bc-navigation .mobile-controls-toggle[aria-expanded=true]{background:var(--soft);color:var(--accent)}
 #bc-navigation .series-label{display:none}
 #bc-navigation:not([data-mobile-controls=open]) .enemy-filter{display:none!important}
 #bc-navigation .series-row{grid-row:1;flex-wrap:wrap;padding:3px 0;gap:5px}
 #bc-navigation #bc-series{display:flex;flex-wrap:wrap;gap:4px}
 #bc-navigation .prototype-tool-links{margin-left:auto}
 #bc-navigation .search-row{grid-row:2}
 #bc-navigation .map-picker-trigger,#bc-navigation .selection label{grid-row:3;margin-top:3px;min-height:48px}
 #bc-navigation #bc-search-scope{grid-row:4}
 #bc-navigation .enemy-filter{grid-row:5}
 #bc-navigation .selection .crown-area,#bc-navigation .selection .map-units{grid-row:6}
 #bc-reader .stage-card{padding:22px 0 24px}
 #bc-reader #bc-middle-stages .stage-card,#bc-reader #bc-later-stages .stage-card{margin-top:24px}
 #bc-reader .stage-card h3{margin-bottom:14px}
}
.stage-stat-number{font-variant-numeric:tabular-nums;white-space:nowrap;font-size:14px}
.stage-panel .stage-spawn-table .stage-stat-column{white-space:nowrap}
@media(min-width:801px){.stage-panel .stage-spawn-table .enemy{min-width:165px}}
/* Mobile uses the same eight-column table, with compact typography and spacing. */
@media(max-width:800px){
 .stage-panel .stage-spawn-table,#bc-reader .reader-desktop-table{display:table;min-width:0;width:100%;table-layout:fixed;font-size:clamp(7px,2.15vw,10px);line-height:1.3;border-collapse:collapse}
 .stage-panel .stage-spawn-table thead,#bc-reader .reader-desktop-table thead{display:table-header-group}
 .stage-panel .stage-spawn-table tbody,#bc-reader .reader-desktop-table tbody{display:table-row-group}
 .stage-panel .stage-spawn-table tr,#bc-reader .reader-desktop-table tr{display:table-row}
 .stage-panel .stage-spawn-table th:nth-child(n),.stage-panel .stage-spawn-table td:nth-child(n),#bc-reader .reader-desktop-table th:nth-child(n),#bc-reader .reader-desktop-table td:nth-child(n){display:table-cell;position:static;min-width:0;max-width:none;padding:4px 2px;vertical-align:middle;box-shadow:none;font-size:inherit;line-height:1.3;text-align:center;border-right:1px solid var(--line);white-space:normal;overflow-wrap:anywhere}
 .stage-panel .stage-spawn-table th:last-child,.stage-panel .stage-spawn-table td:last-child,#bc-reader .reader-desktop-table th:last-child,#bc-reader .reader-desktop-table td:last-child{border-right:0}
 .stage-panel .stage-spawn-table th.spawn-enemy,.stage-panel .stage-spawn-table td.spawn-enemy{width:19%;text-align:left}
 .stage-panel .stage-spawn-table th.stage-stat-column,.stage-panel .stage-spawn-table td.stage-stat-column{width:15%}
 .stage-panel .stage-spawn-table th.spawn-percent,.stage-panel .stage-spawn-table td.spawn-percent{width:10%}
 .stage-panel .stage-spawn-table th.spawn-count,.stage-panel .stage-spawn-table td.spawn-count{width:4%}
 .stage-panel .stage-spawn-table th.spawn-castle,.stage-panel .stage-spawn-table td.spawn-castle{width:9%}
 .stage-panel .stage-spawn-table th.spawn-first,.stage-panel .stage-spawn-table td.spawn-first,.stage-panel .stage-spawn-table th.spawn-repeat,.stage-panel .stage-spawn-table td.spawn-repeat{width:14%}
 .stage-panel .stage-spawn-table .stage-stat-number,#bc-reader .reader-desktop-table .stat-main{font-size:.95em;line-height:1.3;white-space:nowrap;font-variant-numeric:tabular-nums}
 .stage-panel .stage-spawn-table .enemy{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0;min-height:0;font-size:inherit;line-height:1.3}
 .stage-panel .stage-spawn-table .stage-enemy-name{max-width:none;overflow-wrap:anywhere}
 .stage-panel .stage-spawn-table .stage-enemy-art{gap:1px}
 .stage-panel .stage-spawn-table .enemy-sprite{zoom:.36}
 .stage-panel .stage-spawn-table .stage-enemy-art .boss{font-size:.8em;line-height:1.2;padding:0 2px}
 .stage-panel .stage-spawn-table .small{font-size:.86em;line-height:1.35;max-width:none;white-space:normal;overflow-wrap:anywhere}
 .stage-panel .stage-spawn-table .enemy-percent{font-size:inherit;line-height:1.3;white-space:normal;overflow-wrap:anywhere}
 #bc-reader .reader-desktop-wrap,#bc-reader .reader-desktop-help{display:block}
 #bc-reader .stage-overview-wrap,#bc-reader .stage-overview-help,#bc-reader .stage-detail-hint{display:none}
 #bc-reader .reader-desktop-table th:nth-child(1),#bc-reader .reader-desktop-table td:nth-child(1){width:5%;padding:3px 0;font-size:.7em}
 #bc-reader .reader-desktop-table th:nth-child(2),#bc-reader .reader-desktop-table td:nth-child(2){width:19%;text-align:left}
 #bc-reader .reader-desktop-table th:nth-child(3),#bc-reader .reader-desktop-table td:nth-child(3),#bc-reader .reader-desktop-table th:nth-child(4),#bc-reader .reader-desktop-table td:nth-child(4){width:15%}
 #bc-reader .reader-desktop-table th:nth-child(5),#bc-reader .reader-desktop-table td:nth-child(5){width:9%}
 #bc-reader .reader-desktop-table th:nth-child(6),#bc-reader .reader-desktop-table td:nth-child(6){width:16%}
 #bc-reader .reader-desktop-table th:nth-child(7),#bc-reader .reader-desktop-table td:nth-child(7){width:5%}
 #bc-reader .reader-desktop-table th:nth-child(8),#bc-reader .reader-desktop-table td:nth-child(8){width:16%}
 #bc-reader .reader-desktop-table .enemy-name{min-width:0}
 #bc-reader .reader-desktop-table .enemy-cell{display:flex;flex-direction:column;align-items:flex-start;min-width:0;min-height:0;gap:2px;font-size:inherit}
 #bc-reader .reader-desktop-table .enemy-text{min-width:0;max-width:none;font-size:inherit;line-height:1.3;overflow-wrap:anywhere}
 #bc-reader .reader-desktop-table .enemy-icon{width:29px;height:12px}
 #bc-reader .reader-desktop-table .cell-sub,#bc-reader .reader-desktop-table details{font-size:.86em;line-height:1.35;max-width:none}
 #bc-reader .reader-desktop-table .boss-badge{font-size:inherit;padding:0}
 #bc-reader .reader-desktop-table summary{min-height:0}
}

/* Compact boss markers retain their accessible BOSS text and title. */
@media(max-width:800px){
 #bc-reader .reader-desktop-table th.boss-cell{font-size:0;line-height:1.2}
 #bc-reader .reader-desktop-table th.boss-cell::before{content:'ボス';font-size:clamp(6px,1.8vw,9px);white-space:nowrap}
 #bc-reader .reader-desktop-table .boss-mark,.stage-panel .stage-spawn-table .stage-enemy-art .boss{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;min-width:14px;padding:0;border:0;background:transparent;font-size:0;line-height:0;letter-spacing:0;vertical-align:middle}
 #bc-reader .reader-desktop-table .boss-mark::before,.stage-panel .stage-spawn-table .stage-enemy-art .boss::before{content:'';display:block;width:14px;height:14px;flex:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 16'%3E%3Cpath fill='%23e6b64f' stroke='%237b5518' stroke-width='1' stroke-linejoin='round' d='M2 4l4 3 3-6 3 6 4-3-2 9H4z'/%3E%3Cpath stroke='%237b5518' stroke-width='1' d='M4 15h10'/%3E%3C/svg%3E");background-size:contain;background-repeat:no-repeat;background-position:center}
}

@media(max-width:800px){#bc-reader #bc-stages .stage-card{padding-top:14px}#bc-more-menu>nav{max-height:65dvh;overflow:auto}}
/* Enemy conditions stay immediately below name search, in normal document flow. */
#bc-navigation #bc-enemy-filter{display:block!important;grid-column:1/-1;min-width:0;width:100%;margin:5px 0 7px;border:1px solid var(--line);border-radius:8px;background:var(--paper);overflow:hidden}
#bc-navigation #bc-enemy-filter>summary{box-sizing:border-box;min-height:44px;padding:9px 12px;gap:10px}
#bc-navigation #bc-enemy-filter>summary::after{content:'＋';font-size:17px;line-height:1}
#bc-navigation #bc-enemy-filter[open]>summary::after{content:'−'}
#bc-navigation #bc-enemy-filter[open]>summary{border-bottom:1px solid var(--line);background:var(--soft)}
#bc-navigation #bc-filter-form{position:static;inset:auto;width:100%;min-width:0;max-width:none;max-height:none;overflow:visible;border:0;border-radius:0;box-shadow:none;background:transparent}
#bc-navigation #bc-filter-form .reader-filter-scroll{overflow:visible;max-height:none}
#bc-navigation #bc-filter-form .filter-actions{padding:10px 12px}
@media(max-width:800px){
 #bc-navigation .series-row{display:grid;grid-template-columns:minmax(0,1fr);gap:6px}
 #bc-navigation #bc-series{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;width:100%}
 #bc-navigation #bc-series .series-button{min-width:0;min-height:40px;padding:5px 2px;font-size:12px;text-align:center;white-space:nowrap}
 #bc-navigation .prototype-tool-links{justify-self:end;margin-left:0;gap:5px}
 #bc-navigation #bc-enemy-filter{grid-row:3}
 #bc-navigation #bc-search-scope{grid-row:4}
 #bc-navigation .map-picker-trigger,#bc-navigation .selection label{grid-row:5}
 #bc-navigation .selection .crown-area,#bc-navigation .selection .map-units{grid-row:6}
}
@media(max-width:800px){#bc-navigation #bc-series-row #bc-series{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:800px){
 #bc-navigation #bc-series-row .tower-series-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;width:100%;align-items:stretch}
 #bc-navigation #bc-series-row #bc-series{grid-column:1/span 4;grid-template-columns:repeat(4,minmax(0,1fr));width:auto}
 #bc-navigation #bc-series-row .tower-series-nav .series-button{min-width:0;min-height:40px;padding:5px 0;font-size:clamp(10px,2.8vw,12px);justify-content:center}
}
