/* App captures occupy their original 430 × 932 coordinate system between the
   phone's two system bars. Buttons remain real DOM controls at every size. */
.sim-stage .sim-appbar { display:none; }
.sim-stage .sim-display { height:auto; background:#050820; }
.sim-display .sim-system { height:32px; background:#060a20; }
.sim-display .sim-homebar { background:#07091d; height:12px; }
.sim-display .sim-pane {
  container-type:inline-size; position:relative; flex:none; width:100%; height:auto;
  aspect-ratio:430 / 932; padding:0; scrollbar-width:thin;
  background:linear-gradient(165deg,#0c1132,#03061c 68%,#211054);
}
.native-stage,.ios-files { position:absolute; inset:0; overflow:hidden; font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.native-shot { display:block; width:100%; height:100%; pointer-events:none; user-select:none; }
.native-stage .native-sr {
  position:absolute; width:1px; height:1px; padding:0; margin:0; overflow:hidden;
  clip-path:inset(50%); white-space:nowrap; border:0;
}
.sim-pane button.native-hotspot {
  position:absolute; z-index:1; min-height:0; min-width:0; border:0; padding:0;
  background:transparent; color:transparent; border-radius:6px; cursor:pointer;
  -webkit-tap-highlight-color:rgba(151,161,255,.21);
}
.sim-pane button.native-hotspot:hover { background:rgb(144 160 255 / .09); }
.sim-pane button.native-hotspot:focus-visible { outline:3px solid #9ce2ff; outline-offset:-3px; }
.native-installed-cover { position:absolute; pointer-events:none; border-radius:5px; object-fit:cover; }
.native-resume-meta { position:absolute; display:flex; flex-direction:column; justify-content:center; gap:4%; padding:0 2px; background:linear-gradient(#191a40,#10112e); }
.native-resume-meta b { font-size:max(12px,3.5cqw); line-height:1.12; }
.native-resume-meta small { color:#c6cce7; font-size:max(10px,2.85cqw); }
.native-shelf { position:absolute; inset-inline:0; bottom:0; padding:2.4% 3%; overflow:auto; }
.native-shelf h4 { margin:0 0 3%; font:800 3.4cqw/1.25 Inter,system-ui,sans-serif; text-transform:uppercase; }
.native-shelf>div { display:flex; gap:3.5%; }
.native-shelf button { display:grid; align-content:start; gap:4px; width:25%; box-shadow:none; padding:0; border:0; background:transparent; text-align:start; }
.native-shelf button:hover { background:#151b3b; }
.native-shelf .native-cover { width:64%; border-radius:4px; }
.native-shelf b { font-size:max(10px,2.7cqw); overflow-wrap:anywhere; }
.native-progress,.native-percent,.native-log,.native-eta { position:absolute; }
.native-stage .native-progress progress { appearance:none; display:block; margin:0; width:100%; height:100%; background:#090a21; color:#6773ff; border:1px solid #343675; border-radius:100px; overflow:hidden; }
.native-progress progress::-webkit-progress-bar { background:#090a21; }
.native-progress progress::-webkit-progress-value { background:#6975ff; transition:width .2s linear; }
.native-progress progress::-moz-progress-bar { background:#6975ff; }
.native-percent,.native-eta { display:flex; align-items:center; font-size:2.7cqw; color:#dbdffc; background:#191c40; }
.native-eta { justify-content:flex-end; }
.native-log { padding:2%; color:#d8dcfa; font-size:2.8cqw; background:#0b0f29; border-radius:8px; }
.sim-display[data-screen="picker"] :is(.sim-system,.sim-homebar) { background:#1c1c1e; }
.ios-files { padding:5% 5.6% 9%; background:#1c1c1e; color:#fff; }
.ios-navigation { display:flex; justify-content:space-between; align-items:center; color:#bbbcc2; font-size:3.5cqw; font-weight:600; }
.ios-navigation button { background:none; border:0; color:#66adff; font:500 max(14px,3.8cqw)/1 system-ui,sans-serif; }
.ios-files .ios-location { margin-top:7%; color:#aaaab4; font-size:3.4cqw; }
.sim-pane .ios-files h3 { margin:2% 0 4%; color:#fff; font:700 7.3cqw/1.14 -apple-system,BlinkMacSystemFont,system-ui,sans-serif; letter-spacing:-.035em; }
.sim-pane h3[tabindex="-1"]:focus { outline:0; }
.ios-search { margin:0 0 6%; display:flex; align-items:center; padding:0 3%; min-height:34px; border-radius:9px; background:#333336; }
.ios-search svg { width:3.7cqw; fill:none; stroke:#b1b1b8; stroke-width:2; stroke-linecap:round; }
.ios-search input { flex:1; min-width:0; padding:7px; border:0; background:transparent; color:#fff; font:400 max(13px,3.65cqw)/1.2 system-ui,sans-serif; }
.ios-search input::placeholder { color:#a9a9b2; }
.ios-search button { border:0; background:none; min-height:28px; padding:0 4px; color:#c1c1ca; font-size:19px; }
.ios-files [hidden] { display:none!important; }
.ios-file-list { background:#2b2b2e; border-radius:14px; overflow:hidden; }
.ios-file-list button {
  width:100%; display:flex; gap:4.5%; align-items:center; text-align:start; padding:4%;
  min-height:46px; border:0; background:transparent; border-radius:0;
}
.ios-file-list button+button { border-top:1px solid #454548; }
.ios-file-list button:hover { background:#37373a; }
.ios-file-list img { width:12%; height:auto; border-radius:2px; box-shadow:0 1px 3px #0009; }
.ios-file-list span { min-width:0; }
.ios-file-list b,.ios-file-list small { display:block; font-family:-apple-system,BlinkMacSystemFont,system-ui,sans-serif; }
.ios-file-list b { font-size:max(13px,3.6cqw); font-weight:550; overflow-wrap:anywhere; }
.ios-file-list small,.ios-files .ios-count { color:#b9b9c0; font-size:max(11px,3cqw); font-weight:400; }
.ios-files .ios-count { margin-top:5%; text-align:center; }
.native-reader-title { position:absolute; display:flex; justify-content:center; background:#04091c; }
.native-reader-title { flex-direction:column; padding-right:3px; }
.native-reader-title b,.native-reader-title small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.native-reader-title b { color:#ececfc; font-size:3.1cqw; }
.native-reader-title small { color:#aab1cc; font-size:2.55cqw; }
.sim-pane .native-puzzle-index { position:absolute; min-height:0; border:0; border-radius:0; padding:0; background:#04091c; }
.native-icon { display:block; margin:auto; width:max(15px,4.4cqw); height:max(15px,4.4cqw); color:inherit; }
.native-board,.native-ranks,.native-files { position:absolute; }
.native-ranks,.native-files { display:flex; background:#071129; color:#d6e2ec; }
.native-ranks { flex-direction:column; }
.native-ranks i,.native-files i { flex:1; display:grid; place-items:center; font:700 2cqw/1 system-ui,sans-serif; }
.native-board .s-board { width:100%; height:100%; border:0; }
.native-board .s-cell { background:#cedae7; }
.native-board .s-cell.s-dark { background:#6084a8; }
.native-board .s-cell.s-hit { background:#e6d14b; }
.native-board .s-cell.s-dark.s-hit { background:#cdaa37; }
.native-board .s-piece { width:100%; height:100%; object-fit:contain; }
.native-board .s-cell i { display:none; }
.native-reader-body { position:absolute; inset-inline:0; bottom:0; display:flex; flex-direction:column; align-items:stretch; min-height:0; padding:0 1%; background:linear-gradient(#10132e,#06091c 65%,#251057); }
.native-divider { flex:none; height:3.6cqw; border-block:1px solid #2f3459; display:grid; place-items:center; }
.native-divider::before { content:""; width:11%; height:3px; border-radius:5px; background:#484a74; }
.native-reader-tools,.native-transport,.native-puzzle-nav { display:flex; align-items:center; gap:2%; }
.native-reader-tools { min-height:9cqw; background:#131737; border:1px solid #303367; padding-inline:1.5%; }
.native-reader-tools button { flex:1; min-height:28px; padding:2px 4px; border:0; background:transparent; color:#dfd9ff; font-size:max(15px,4.4cqw); }
.native-reader-tools button[aria-pressed=true] { background:#434185; }
.native-text,.native-puzzle-panel { min-height:0; overflow:auto; overscroll-behavior:auto; scrollbar-width:thin; }
.native-text { flex:1; padding:2% 3%; background:#111430; border-radius:8px; margin-top:1%; }
.native-chapter-preview { display:block; width:100%; height:auto; }
.native-chapter-diagram { display:block; width:62%; height:auto; margin:1% auto 4%; padding:4px; border:2px solid #3962c4; border-radius:8px; background:#0c112a; }
.native-text .s-note { font:600 max(12px,3.25cqw)/1.51 Georgia,serif; padding:0; border:0; color:#e5e1ef; }
.native-text .s-moves { display:flex; gap:1px; }
.native-text .s-moves button { font:700 max(12px,3.3cqw)/1.3 Georgia,serif; background:transparent; padding:2px 4px; border:0; min-height:27px; }
.native-text .s-moves button[aria-current=step] { background:#5040e4; }
.native-transport { border:1px solid #303367; border-radius:9px; margin-top:1%; padding:1.5%; background:#1d1c45; }
.native-transport span { flex:1; text-align:center; font-weight:600; font-size:3.1cqw; }
.native-transport button { min-width:12%; min-height:max(37px,10cqw); padding:0; background:#282e68; border:0; font-size:4.6cqw; }
.native-puzzle-panel { flex:1; padding:2% 1%; }
.native-control-crop { width:100%; height:auto; display:block; }
.native-puzzle-tabs { display:grid; grid-template-columns:1fr 1fr; gap:1.5%; }
.native-puzzle-tabs button { padding:0; border:none; min-height:0; border-radius:9px; background:transparent; }
.native-puzzle-tools { display:flex; gap:4%; padding:3% 1.5%; }
.native-puzzle-tools button { display:grid; place-items:center; width:10.5%; aspect-ratio:1; min-height:0; padding:0; border-radius:50%; background:#252a63; border:0; }
.native-puzzle-nav button { flex:1; }
.native-puzzle-panel .s-tools { margin:2% 0; }
.native-puzzle-side { display:block; color:white; margin:3% 0 0; font-size:3.6cqw; }
.native-puzzle-panel .s-response { min-height:0; color:#d8def5; font-size:max(12px,3.1cqw); }
.native-puzzle-panel button[data-action="hint"] { color:#231b03; background:#f6cc22; }
.sim-display:is([data-screen="index"],[data-screen="original"]) .sim-pane { padding:3% 4%; }
@media(prefers-reduced-motion:reduce) { .native-progress progress::-webkit-progress-value { transition:none; } }
