@charset "UTF-8";
/* A compact mobile screen; the shared stylesheet still owns game visuals. */
html { -webkit-text-size-adjust:100%; }
body.sacheon-mobile { min-width:0; }
.sacheon-mobile .app {
  max-width:480px;
  padding:0 max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
.sacheon-mobile .topbar { height:64px; gap:8px; padding-top:env(safe-area-inset-top); box-sizing:content-box; }
.mobile-home { flex:none; display:grid; place-items:center; width:44px; height:44px; border:1px solid var(--line); border-radius:14px; }
.mobile-home svg { width:22px; height:22px; }
.sacheon-mobile .mobile-title { flex:1; min-width:0; margin:0; font-size:18px; line-height:1.3; letter-spacing:-.5px; }
.mobile-title span { display:block; margin-top:4px; font-size:10px; font-weight:400; letter-spacing:.3px; color:var(--muted); }
.sacheon-mobile .header-actions { gap:6px; }
.sacheon-mobile .icon-button { width:44px; height:44px; flex:none; }
.sacheon-mobile .game-layout { display:block; padding:14px 0 0; }
.sacheon-mobile .stage-heading { padding:0; }
.sacheon-mobile .stage-heading h2 { margin-top:4px; font-size:21px; }
.sacheon-mobile .stage-heading .eyebrow { font-size:10px; letter-spacing:1.4px; }
.mobile-journey { display:flex; justify-content:space-between; align-items:center; gap:12px; color:var(--muted); font-size:11px; }
.mobile-journey b { color:var(--mint); font-weight:600; }
.mobile-journey .text-button { width:auto; min-height:44px; gap:6px; padding:0 2px 0 12px; font-size:12px; }
.sacheon-mobile .difficulty-picker { margin:0; padding:3px; gap:4px; }
.sacheon-mobile .difficulty-picker button { min-height:44px; padding:8px; }
.sacheon-mobile .difficulty-note { margin:8px 0 0; line-height:1.5; font-size:11px; }
.sacheon-mobile .game-meta { margin:10px 0 8px; gap:6px; font-size:11px; }
.sacheon-mobile .meta-divider { margin:0 5px; }
.sacheon-mobile .progress-track { margin:0; }
.sacheon-mobile .board-wrap { margin:7px 0 10px; padding:4px; }
.sacheon-mobile .board { max-width:420px; margin:auto; }
.sacheon-mobile .tile { padding:6px; border-radius:9px; }
.sacheon-mobile .tray-label { margin:0 0 8px; font-size:12px; }
.sacheon-mobile #tray-message { max-width:62%; font-size:10px; line-height:1.4; }
.sacheon-mobile .tray { grid-template-columns:repeat(var(--tray-columns,7),minmax(0,1fr)); gap:4px; padding:7px; min-height:0; border-radius:12px; }
.sacheon-mobile .slot { min-width:0; width:100%; min-height:40px; }
.sacheon-mobile .slot .tile { padding:4px; border-radius:7px; }
.sacheon-mobile .tools { gap:7px; margin-top:14px; }
.sacheon-mobile .tool { min-height:48px; flex-direction:row; gap:5px; padding:10px 5px; font-size:12px; }
.sacheon-mobile .tool-icon { width:17px; height:17px; }
.sacheon-mobile .tool-count { position:static; width:16px; height:16px; flex:none; }
.sacheon-mobile .reserve-panel { margin-top:12px; padding:0 10px; }
.sacheon-mobile .reserve-panel summary { min-height:48px; font-size:12px; }
.sacheon-mobile .reserve-panel p { margin:2px 0 10px; font-size:11px; }
.sacheon-mobile .reserve-grid { gap:6px; padding-bottom:12px; }
.sacheon-mobile .reserve-slot { height:48px; }
.sacheon-mobile .reserve-tile img, .sacheon-mobile .reserve-tile svg { width:34px; height:34px; }
.sacheon-mobile .game-footnote { margin:12px 0 18px; font-size:11px; }
.sacheon-mobile footer { padding:14px 0 6px; margin-top:0; }
.sacheon-mobile footer>span { display:none; }
.sacheon-mobile .save-controls { flex-direction:column; gap:6px; font-size:10px; }
.sacheon-mobile .reset-progress { min-height:44px; padding:10px 16px; font-size:12px; }
.sacheon-mobile .mini-tiles[hidden] { display:none; }
.sacheon-mobile dialog { max-width:420px; width:calc(100% - 24px); max-height:calc(100dvh - 24px); border-radius:20px; overflow-y:auto; overscroll-behavior:contain; }
.sacheon-mobile .modal-body { padding:22px; }
.sacheon-mobile .modal-header { margin-bottom:14px; }
.sacheon-mobile .modal-header h2 { font-size:21px; }
.sacheon-mobile .modal-header .icon-button { width:44px; height:44px; margin:-10px -10px 0 0; }
.sacheon-mobile .modal-body p { font-size:13px; }
.sacheon-mobile .modal-body ul { font-size:13px; }
.sacheon-mobile .primary, .sacheon-mobile .secondary { min-height:44px; font-size:14px; }
.sacheon-mobile .level-grid { gap:8px; }
.sacheon-mobile .toast { font-size:12px; bottom:max(16px, env(safe-area-inset-bottom)); }
/* Keep dialogs within the phone viewport even when the host iframe grows. */
.sacheon-embedded dialog { position:fixed; top:var(--sacheon-dialog-top, 50%); bottom:auto; margin:0 auto; transform:translateY(-50%); max-height:calc(var(--sacheon-visible-height, 100dvh) - 24px); }
.sacheon-embedded .toast { top:var(--sacheon-toast-top); bottom:auto; transform:translate(-50%, -100%); }
.sacheon-embedded .toast.show { transform:translate(-50%, -100%); }
@media(max-width:350px) {
  .sacheon-mobile .app { padding-left:8px; padding-right:8px; }
  .sacheon-mobile .mobile-title { font-size:16px; }
  .sacheon-mobile .tile { padding:5px; border-radius:7px; }
  .sacheon-mobile .tool { min-width:0; flex:1 1 0; flex-direction:column; min-height:58px; font-size:11px; gap:4px; }
  .sacheon-mobile .tool-count { position:absolute; top:6px; right:6px; }
  .sacheon-mobile .tray-count { margin-left:4px; }
}
@media(hover:none) {
  .sacheon-mobile .tile.available:hover { transform:none; box-shadow:0 5px 0 #97aaa5,0 8px 10px #031b2940; }
  .sacheon-mobile .tile.available:active { transform:translateY(2px); }
}

/* Keep the board, seven slots and tools together in the visible phone screen. */
.sacheon-mobile .topbar { height:44px; gap:6px; }
.sacheon-mobile .mobile-home, .sacheon-mobile .header-actions .icon-button { width:36px; height:36px; }
.sacheon-mobile .mobile-title { font-size:16px; }
.sacheon-mobile .mobile-title span { display:none; }
.sacheon-mobile .game-layout { padding-top:4px; }
.sacheon-mobile .play-area { display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:8px; }
.sacheon-mobile .play-area > * { grid-column:1 / -1; min-width:0; }
.sacheon-mobile .stage-heading { grid-column:1; grid-row:1; }
.sacheon-mobile .stage-heading h2 { font-size:14px; margin-top:2px; }
.sacheon-mobile .stage-heading .eyebrow { font-size:9px; letter-spacing:1px; }
.sacheon-mobile .stage-heading .icon-button { width:32px; height:32px; }
.sacheon-mobile .mobile-journey { grid-column:2; grid-row:1; }
.sacheon-mobile .mobile-journey > span:first-child { display:none; }
.sacheon-mobile .mobile-journey .text-button { min-height:32px; padding-left:4px; font-size:11px; }
.sacheon-mobile .difficulty-picker { margin-top:4px; padding:2px; }
.sacheon-mobile .difficulty-picker button { min-height:30px; padding:4px 8px; font-size:12px; }
.sacheon-mobile .difficulty-note { display:none; }
.sacheon-mobile .game-meta { margin:5px 0 4px; line-height:14px; font-size:10px; }
.sacheon-mobile .progress-track { height:2px; }
.sacheon-mobile .board-wrap { margin:4px 0; padding:2px; }
.sacheon-mobile .board { width:min(100%, var(--sacheon-board-size, 420px)); }
.sacheon-mobile .tile { padding:clamp(2px, calc(var(--sacheon-board-size, 360px) * .016), 6px); border-radius:clamp(4px, calc(var(--sacheon-board-size, 360px) * .02), 8px); }
.sacheon-mobile .tray-label { margin:0 0 4px; line-height:14px; font-size:11px; }
.sacheon-mobile #tray-message { font-size:9px; }
.sacheon-mobile .tray { padding:5px; gap:3px; }
.sacheon-mobile .slot { min-height:36px; max-height:48px; }
.sacheon-mobile .tools { margin-top:6px; gap:6px; }
.sacheon-mobile .tool { min-height:44px; padding:6px 4px; }
@media(max-width:350px) {
  .sacheon-mobile .tool { flex-direction:row; gap:3px; font-size:11px; }
  .sacheon-mobile .tool-icon { display:none; }
  .sacheon-mobile .tool-count { position:static; }
}

.sacheon-mobile .round-timer{margin:2px 0 5px;padding:5px 8px;font-size:10px;gap:8px}
.sacheon-mobile .round-timer strong{font-size:19px}



.sacheon-mobile .reserve-grid{max-height:calc(var(--reserve-rows,3) * 54px + 6px);overflow-y:auto;scrollbar-width:thin}


.sacheon-mobile .slot .tile{padding:3px}
.sacheon-mobile .reserve-transfer{margin-top:6px;min-height:40px;padding:7px 9px;font-size:11px}
