/* Presentation only: never alter printed worksheets or canvas coordinates. */
@media screen {
    :root { --primary: #0071e3; --primary-dark: #005bb5; --bg-viewport: #f5f5f7; }
    body { background: #f5f5f7; color: #1d1d1f; font-family: -apple-system, BlinkMacSystemFont, 'Pretendard', 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
    .modoo-navbar { background: rgba(255,255,255,.9); color: #1d1d1f; border-color: #dedee3; }
    @supports (backdrop-filter: blur(20px)) {
        .modoo-navbar { background: rgba(250,250,252,.82); backdrop-filter: saturate(150%) blur(20px); -webkit-backdrop-filter: saturate(150%) blur(20px); }
    }
    .brand-logo-badge { background: #1d1d1f; color: white; border-radius: 14px; }
    .brand-logo-badge svg { width: 27px; height: 27px; }
    .brand-title { color: #1d1d1f; font-weight: 700; }
    .brand-desc, .brand-sub-badge { color: #616166; }
    .nav-actions { border-color: #e5e5e9; gap: 7px; }
    .nav-actions .nav-btn { background: transparent; border-color: transparent; color: #424247; border-radius: 12px; min-height: 44px; font-weight: 500; }
    .nav-actions .nav-btn:hover { background: #eaeaee; border-color: transparent; }
    .nav-actions .btn-account { background: #1d1d1f; color: white; }
    .nav-actions .btn-account:hover { background: #38383c; color: white; }
    .nav-actions .btn-storage { background: #e9eef5; color: #005bb5; }
    .nav-actions .btn-icon { display: inline-flex; align-items: center; justify-content: center; }
    .nav-actions .btn-icon svg { width: 17px; height: 17px; flex: none; }
    .auto-save-pill { background: #edf4ef; color: #366246; border-color: transparent; }
    .studio-welcome { background: #fff; border: 0; border-radius: 32px; padding: 64px 56px; margin-top: 28px; gap: 40px; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); }
    .studio-eyebrow { color: #66666b; letter-spacing: 2.1px; font-weight: 600; }
    .studio-intro h1 { color: #1d1d1f; font-size: clamp(32px,4.2vw,56px); font-weight: 700; letter-spacing: -2.4px; line-height: 1.2; margin: 20px 0; word-break: keep-all; }
    .studio-intro h1 em { color: #0071e3; }
    .studio-intro p { font-size: 16px; color: #616166; line-height: 1.8; }
    .studio-start { background: #0071e3; border-radius: 999px; padding: 14px 23px; font-weight: 500; box-shadow: none; gap: 20px; min-height: 48px; }
    .studio-start:hover { background: #0077ed; }
    .studio-tags { color: #68686d; font-size: 12px; }
    .studio-tags span::before { color: #0071e3; }
    .studio-art { min-height: 300px; background: radial-gradient(ellipse, #e9eff8, transparent 70%); }
    .studio-orbit, .studio-spark { display: none; }
    .studio-note { width: min(285px,100%); border: 1px solid #e5e5eb; border-radius: 24px; transform: rotate(-4deg); box-shadow: 0 22px 55px #1d1d1f12, 0 2px 8px #1d1d1f06; padding: 30px; }
    .note-caption { color: #6b6b72; }
    .studio-note strong, .note-equation { color: #1d1d1f; }
    .note-equation b { color: #0071e3; }
    .studio-float { background: #fff; color: #424247; border: 1px solid #e8e8ed; border-radius: 18px; box-shadow: 0 12px 30px #1d1d1f0a; }
    .toolbar-toggle-bar, .modoo-toolbar-bar { border-color: #e5e5ea; box-shadow: none; }
    .toolbar-toggle-bar { border-radius: 24px 24px 0 0; padding: 20px 24px; }
    .modoo-toolbar-bar { border-radius: 0 0 24px 24px; padding: 24px; }
    .tool-group > .tool-label { color: #616166; font-size: 12px; font-weight: 600; }
    .modoo-select { background: #f5f5f7; border-color: #e4e4e9; border-radius: 12px; color: #1d1d1f; }
    .level-btn-group { background: #ededf0; border-radius: 12px; padding: 4px; gap: 3px; }
    .level-btn-group .level-chip { background: transparent; border: 1px solid transparent; color: #505055; border-radius: 9px; box-shadow: none; min-height: 40px; }
    .level-btn-group .level-chip.active { background: #fff; color: #1d1d1f; border-color: #e2e2e7; box-shadow: 0 2px 5px #0000000b; }
    .summary-badge { background: #eaf2fc; color: #005bb5; }
    .toggle-actions button { border-radius: 12px; min-height: 44px; }
    .toggle-actions .btn-quick-regen { background: #0071e3; color: #fff; border-color: #0071e3; box-shadow: none; }
    .toggle-actions .btn-quick-ipad, .toggle-actions .btn-toggle-toolbar { background: #f5f5f7; color: #424247; border-color: #e5e5ea; }
    .a4-sheet-wrapper { border-color: #e5e5ea; box-shadow: 0 8px 32px #1d1d1f05; }
    .modal-card { border-radius: 24px; border-color: #e5e5ea; box-shadow: 0 24px 80px #00000020; }
    .modal-header { background: #fafafa; }
    .modal-header h3 { color: #1d1d1f; }
    :is(button,a,input,select,textarea):focus-visible { outline: 3px solid #0071e3; outline-offset: 3px; }
}
/* Account actions: visual hierarchy without shrinking touch targets. */
@media screen {
    #authModal .auth-panel { background: #fff; border: 1px solid #e5e5ea; border-radius: 20px; padding: 24px; min-width: 0; }
    #authModal .account-request-panel { background: #f5f7fc; }
    #authModal .auth-panel h4 { font-size: 20px; letter-spacing: -.5px; margin-bottom: 12px; }
    #authModal .auth-panel p { color: #555560; font-size: 14px; line-height: 1.65; margin-bottom: 18px; }
    #authModal .account-button {
        box-sizing: border-box; font-family: inherit; font-weight: 600; line-height: 1.4;
        border: 1px solid transparent; border-radius: 14px; cursor: pointer;
        display: inline-flex; align-items: center; justify-content: center; text-align: center;
        max-width: 100%; white-space: normal; overflow-wrap: anywhere;
        transition: background-color .15s, box-shadow .15s;
    }
    #authModal .account-button--large { min-height: 56px; padding: 16px 20px; font-size: 16px; width: 100%; }
    #authModal .account-button--medium { min-height: 48px; padding: 12px 18px; font-size: 15px; width: 100%; }
    #authModal .account-button--small { min-height: 44px; min-width: 64px; padding: 10px 14px; font-size: 13px; width: auto; }
    #authModal .account-button--primary { background: #0066cc; color: #fff; box-shadow: 0 3px 8px #0066cc18; }
    #authModal .account-button--dark { background: #1d1d1f; color: #fff; }
    #authModal .account-button--quiet { background: #f0f0f3; color: #414148; border-color: #dcdce2; }
    #authModal .account-button:hover:not(:disabled) { box-shadow: 0 4px 12px #00000020; }
    #authModal .account-button:focus-visible { outline: 3px solid #0066cc; outline-offset: 3px; }
    #authModal .account-button:disabled { opacity: .5; cursor: wait; }
    #authModal fieldset { min-width: 0; border: 0; padding: 0; margin: 24px 0 0; }
    #authModal legend { font-size: 17px; font-weight: 700; padding: 0; margin-bottom: 16px; }
    #authModal .auth-panel input:not([type="checkbox"]) { min-height: 48px; font-size: 16px; border-radius: 12px; }
    #authModal .auth-panel input[type="checkbox"] { width: 20px; height: 20px; margin: 0 8px 0 0; vertical-align: middle; accent-color: #0066cc; }
    #authModal .family-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
    #authModal .family-actions .account-button--large { flex: 1; min-width: 0; }
    #authModal [hidden] { display: none !important; }
}
@media screen and (max-width: 420px) {
    #authModal .auth-panel { padding: 18px; border-radius: 16px; }
    #authModal .family-actions { flex-direction: column-reverse; align-items: stretch; }
    #authModal .family-actions .account-button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    #authModal .account-button { transition: none; }
}
@media screen and (max-width: 900px) {
    .studio-welcome { padding: 40px 32px; gap: 24px; }
    .studio-intro h1 { font-size: 38px; }
    .studio-note { padding: 23px; }
    .studio-float { right: 0; padding: 12px 16px; }
}
@media screen and (max-width: 600px) {
    .studio-welcome { grid-template-columns: minmax(0,1fr); padding: 30px 24px; border-radius: 24px; margin-top: 16px; }
    .studio-intro h1 { font-size: clamp(30px,8.6vw,40px); letter-spacing: -1.4px; }
    .studio-intro p { font-size: 14px; }
    .studio-eyebrow { font-size: 9px; letter-spacing: 1.3px; }
    .studio-start { margin-top: 20px; font-size: 14px; }
    .studio-tags { font-size: 11px; gap: 8px 12px; }
    .nav-actions .nav-btn { font-size: 11px; }
    .toolbar-toggle-bar, .modoo-toolbar-bar { padding: 16px; }
    .level-btn-group { max-width: 100%; }
}