:root{color-scheme:light;--paper:#f5f4f0;--ink:#272d2a;--muted:#747d76;--line:#dedfd8;--accent:#1b6e4f;--panel:#fffefa;--vh:100dvh;font-family:-apple-system,BlinkMacSystemFont,'PingFang SC',sans-serif;font-size:16px;color:var(--ink);background:var(--paper)}
*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit;color:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.5;cursor:default}button:focus-visible,a:focus-visible{outline:3px solid #849e8b;outline-offset:3px}a{color:#42634b;text-underline-offset:3px}svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}h1,h2,h3,p{margin:0}h2{font-size:22px;line-height:1.4}h3{font-size:18px;line-height:1.5}p{line-height:1.65}.muted,small{color:var(--muted)}small{line-height:1.6}button{border:0;background:transparent}input,textarea,select{width:100%;background:#fff;border:1px solid var(--line);border-radius:16px;padding:12px;min-height:46px}textarea{resize:vertical;line-height:1.6}label{display:block;font-size:14px;font-weight:600;margin:16px 0 7px}label.inline{display:flex;gap:10px;align-items:flex-start;font-weight:400}input[type=checkbox]{width:20px;min-height:20px;flex:none}button.primary,.primary{display:flex;align-items:center;justify-content:center;gap:8px;background:var(--accent);color:white;border-radius:18px;padding:14px 18px;font-weight:600;min-height:48px}.secondary{padding:12px 16px;border:1px solid var(--line);border-radius:16px;min-height:46px;background:var(--panel)}.link-button{padding:9px;color:#42634b;text-decoration:underline}.danger{color:#a34035}.row{display:flex;align-items:center;gap:10px}.between{justify-content:space-between}.wrap{flex-wrap:wrap}.stack{display:grid;gap:14px}.wide{width:100%}.badge{font-size:12px;padding:5px 9px;border-radius:10px;background:#e9ece5;color:#526453}.pill{background:#e9e9e3;border-radius:30px;padding:8px 13px}.icon-button{height:44px;width:44px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:#fffefa;flex:none}.icon-button:hover{background:#e8ebe4}.shell{max-width:980px;margin:auto;height:var(--vh);display:flex;flex-direction:column;position:relative;padding-top:env(safe-area-inset-top);overflow:hidden}.header{display:flex;align-items:center;gap:10px;padding:15px 16px 10px;flex:none}.heading{min-width:0;flex:1;text-align:left;padding:0}.heading strong{font-size:19px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.heading small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;font-size:12px;margin-top:4px}.screen{overflow:auto;overscroll-behavior:contain;flex:1;min-height:0;padding:16px 18px 24px;scroll-behavior:smooth;overflow-wrap:anywhere}.screen.content{padding-top:20px}.section-title{margin:20px 0 12px}.nav{display:flex;justify-content:space-around;gap:5px;padding:9px 12px max(10px,env(safe-area-inset-bottom));flex:none}.nav button{min-height:46px;display:flex;align-items:center;gap:7px;color:var(--muted);border-radius:28px;padding:8px 15px}.nav button.active{background:#e8e8e2;color:var(--ink);font-weight:600}.card{border:1px solid #e8e9e2;background:var(--panel);border-radius:23px;padding:19px}.card button.row{width:100%;text-align:left}.card+.card{margin-top:12px}.empty{max-width:520px;margin:9vh auto 0;text-align:center;display:grid;gap:16px;justify-items:center}.empty h2{font-weight:600;letter-spacing:.03em}.empty p{color:var(--muted);font-size:14px}.empty .portrait{width:76px;height:76px}.message{margin:12px 0 28px;max-width:100%;content-visibility:auto;contain-intrinsic-size:auto 160px}.message .byline{font-size:12px;color:var(--muted);margin-bottom:9px;display:flex;gap:9px;align-items:center}.message.user{margin-left:12%;}.message.user .bubble{background:#eeede8;border:1px solid #e4e3dd;border-radius:24px;padding:15px 18px}.message.assistant .bubble{padding:5px 3px}.message .body{line-height:1.85;white-space:pre-wrap;font-size:16px;overflow-wrap:anywhere}.message pre{white-space:pre-wrap}.message .actions{display:flex;gap:4px;margin-top:7px}.message .actions button{padding:8px;color:var(--muted);font-size:13px}.message .actions svg{height:18px;width:18px}.message .status{font-size:12px;margin-top:8px;color:#8a6741}.message details{font-size:13px;color:var(--muted);margin-bottom:10px}.message details p{white-space:pre-wrap}.composer-wrap{padding:8px 16px 4px;flex:none}.composer{display:flex;gap:7px;align-items:flex-end;padding:8px;background:#fffefa;border:1px solid #dadcd4;border-radius:32px;box-shadow:0 2px 10px #25362404}.composer textarea{background:transparent;border:0;resize:none;max-height:145px;min-height:42px;height:42px;line-height:1.55;padding:9px 0;outline:none;border-radius:0}.composer .icon-button{height:42px;width:42px;background:transparent}.composer .send{background:#363c37;color:#fff}.attachments{display:flex;gap:8px;flex-wrap:wrap;padding-bottom:7px}.attachment{display:inline-flex;gap:5px;align-items:center;max-width:100%;padding:5px 9px;background:#e6ebe3;border-radius:12px;font-size:12px}.attachment img{width:46px;height:46px;object-fit:cover;border-radius:8px}.attachment a{overflow:hidden;text-overflow:ellipsis;max-width:210px}.attachment button{padding:4px}.banner{padding:8px 16px;background:#e8ede4;font-size:12px;line-height:1.5;flex:none}.banner.warning{background:#f5ead6}.tabs{display:flex;gap:8px;margin-bottom:17px;overflow:auto}.tabs button{white-space:nowrap;min-height:42px;padding:10px 15px;border-radius:21px}.tabs .active{background:var(--accent);color:white}.list-row{padding:15px 4px;border-bottom:1px solid var(--line);display:flex;gap:12px;align-items:center}.list-row>div{min-width:0;flex:1}.list-row strong{display:block;line-height:1.6}.list-row p{font-size:13px;color:var(--muted)}.list-row button{min-height:44px;flex:none}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.grid .card{margin:0;display:grid;gap:8px;text-align:left;min-height:120px}.toolbar{display:flex;align-items:center;gap:10px;margin-bottom:20px}.toolbar h2{flex:1}.note-body{white-space:pre-wrap;line-height:1.8}.portrait{width:42px;height:42px;display:block;border-radius:50%;background:#faf7ee;flex:none}.orb{position:absolute;right:22px;bottom:calc(150px + env(safe-area-inset-bottom));border:2px solid #40483f;padding:3px;border-radius:50%;background:#fff;box-shadow:0 5px 18px #25372526;z-index:5}.orb .portrait{width:46px;height:46px}.orb-panel{position:absolute;right:16px;bottom:calc(150px + env(safe-area-inset-bottom));width:min(355px,calc(100% - 32px));max-height:46%;background:#fffefa;border:1px solid var(--line);border-radius:24px;padding:15px;box-shadow:0 12px 60px #35443330;z-index:10;display:flex;flex-direction:column;gap:10px}.orb-panel .orb-history{overflow:auto;min-height:40px;white-space:pre-wrap;line-height:1.7;font-size:14px}.orb-panel textarea{min-height:44px;height:44px;resize:none}.orb-panel .composer{border-radius:20px}.orb-dismiss{position:absolute;inset:0;z-index:8;background:transparent}.orb-panel .row .close{margin-left:auto}.pending-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#648c6c;margin-right:6px}.startup{height:100dvh;display:grid;align-content:center;justify-items:center;gap:20px;padding:30px;text-align:center}.startup img{border-radius:18px}dialog{border:1px solid var(--line);border-radius:26px;padding:23px;width:min(560px,calc(100% - 24px));max-height:calc(100dvh - 48px);background:var(--paper);color:var(--ink);overflow:auto}dialog::backdrop{background:#1d2b2759;backdrop-filter:blur(3px)}dialog .dialog-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:14px}dialog .dialog-head button{flex:none}dialog form>.primary{margin-top:20px}.menu{display:grid;gap:7px}.menu>button{min-height:48px;padding:11px 13px;border-radius:15px;display:flex;align-items:center;gap:10px;text-align:left;background:#fffefa}.menu>button small{margin-left:auto}.menu>button:hover{background:#e8ebe4}#toast{position:fixed;z-index:100;left:50%;transform:translateX(-50%);bottom:calc(95px + env(safe-area-inset-bottom));background:#303b33;color:white;padding:13px 18px;border-radius:15px;box-shadow:0 5px 25px #0002;max-width:min(90%,540px);font-size:14px;line-height:1.6}audio{width:100%;max-width:420px;display:block;margin:10px 0}video{width:100%;max-height:50vh;border-radius:16px}.recording{color:#a34035}.form-error{color:#a34035;margin:10px 0;font-size:14px;white-space:pre-wrap}.progress-copy{font-size:13px;color:var(--muted);white-space:pre-wrap}.split{display:grid;grid-template-columns:1fr 1fr;gap:12px}.word{font-size:22px;font-weight:600}.file-list{display:grid;gap:10px}.file-row{background:var(--panel);border:1px solid var(--line);border-radius:17px;padding:14px;overflow-wrap:anywhere}.file-row img{max-width:100%;max-height:240px;border-radius:12px}.hidden,[hidden]{display:none!important}
@media(min-width:760px){.shell{border-left:1px solid var(--line);border-right:1px solid var(--line)}.screen{padding-left:45px;padding-right:45px}.composer-wrap{padding-left:45px;padding-right:45px}.header{padding-left:25px;padding-right:25px}.orb-panel{right:30px}.grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:380px){.header{gap:6px;padding-left:10px;padding-right:10px}.heading strong{font-size:17px}.nav button{padding:8px 9px;font-size:14px}.nav svg{width:21px}.composer-wrap{padding-left:10px;padding-right:10px}.grid{gap:8px}.card{padding:15px}.screen{padding-left:12px;padding-right:12px}.split{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
@media(max-width:440px){.nav button{white-space:nowrap;flex:1;justify-content:center;padding:8px 6px;gap:6px;font-size:14px}.nav svg{width:21px}}
.focus-session{display:grid;gap:22px;justify-items:center;padding:35px 0}.focus-session>strong{font-size:40px;font-variant-numeric:tabular-nums}.focus-session .row{justify-content:center}

.dictionary-frame{display:block;width:100%;height:65dvh;min-height:280px;border:1px solid var(--line,#ddd);border-radius:12px;background:#fff;margin-top:12px}

.video-player{width:100%;max-height:48dvh;border:0;border-radius:14px;background:#151915}video.video-player,iframe.video-player{aspect-ratio:16/9}audio.video-player{height:54px;background:transparent}.cue{padding:14px 0;border-bottom:1px solid #ddd}.cue.current{background:#e8eee5}.note-body{white-space:pre-wrap;overflow-wrap:anywhere}fieldset{border:1px solid #ddd;border-radius:12px;padding:12px;margin:14px 0;min-width:0}legend{padding:0 8px}label.inline small,.list-row small{display:block}pre{max-width:100%;overflow:auto}

/* Keep dictionary navigation and the complete entry viewport visible on small iPhones. */
dialog[open]:has(> .dictionary-frame){height:calc(100dvh - 48px);display:flex;flex-direction:column;overflow:hidden}
dialog:has(> .dictionary-frame)>.dialog-head,dialog:has(> .dictionary-frame)>.dictionary-navigation,dialog:has(> .dictionary-frame)>small{flex:none}
dialog>.dictionary-frame{flex:1;min-height:0;height:auto}

/* Native 196 navigation: assistant hierarchy and original top actions. */
.assistant-group-label{font-size:13px;color:var(--muted);margin:20px 8px 9px;font-weight:500}
.assistant-groups{margin:16px 0}.assistant-group{border:1px solid var(--line);border-radius:20px;margin:9px 0;overflow:hidden;background:var(--panel)}
.assistant-group.selected{border-color:#b2bcb0;background:#ebeee8}.assistant-identity{display:flex;gap:3px;align-items:center;padding:6px}.assistant-name{display:flex;gap:12px;align-items:center;flex:1;text-align:left;min-height:52px;padding:8px;font-size:16px;font-weight:550}.assistant-name svg{width:25px;flex:none}.assistant-identity .icon-button{width:36px;height:40px;background:transparent}.assistant-caption{display:block;color:var(--muted);margin:-4px 16px 10px 48px;font-size:11px}.assistant-group details{padding:0 9px 9px}.assistant-group summary{cursor:pointer;font-size:12px;color:var(--muted);padding:8px}.assistant-group summary span{float:right}.history-row{display:flex;align-items:center}.history-row>button:first-child{padding:12px 10px;display:flex;gap:9px;flex:1;min-width:0;text-align:left;border-radius:10px}.history-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.history-row small{color:var(--muted);font-size:11px}.history-row button[aria-current]{background:#dce3d9}.history-row .icon-button{width:32px;background:none}.drawer-footer{display:flex;gap:8px;flex-wrap:wrap;position:sticky;bottom:-22px;padding:14px 0;background:var(--paper)}
#dialog[data-surface=drawer]{height:100dvh;max-height:100dvh;width:min(460px,100vw);max-width:100vw;margin:0 auto 0 0;border-radius:0;padding:calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));border-left:0}
#dialog[data-surface=drawer] .dialog-head{margin-bottom:14px}#dialog[data-surface=drawer] .dialog-head h2{font-size:20px}
.dialog-head{position:sticky;top:-24px;background:var(--paper);z-index:3;padding:12px 0}.dialog-head h2{flex:1;min-width:0}
@media(max-width:600px){#dialog[data-surface=page]{margin:0;width:100%;max-width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0;padding:calc(8px + env(safe-area-inset-top)) 18px calc(20px + env(safe-area-inset-bottom))}#dialog[data-surface=page] .dialog-head{top:calc(-8px - env(safe-area-inset-top));padding-top:calc(10px + env(safe-area-inset-top));margin-top:calc(-8px - env(safe-area-inset-top))}#dialog[data-surface=sheet]{margin:auto 0 0;width:100%;max-width:100%;border-radius:24px 24px 0 0;padding-bottom:calc(22px + env(safe-area-inset-bottom))}}
.header .heading{position:relative}.header .heading strong:after{content:'⌄';font-weight:400;font-size:16px;margin-left:8px}.header .icon-button{background:#fff9}.history-row .icon-button svg{width:18px}

.native-entry-list{display:grid;gap:2px}.native-entry{display:flex;align-items:center;gap:16px;width:100%;padding:19px 12px;text-align:left;border-radius:16px;min-height:78px}.native-entry:hover{background:#dfe4db66}.native-entry>svg{width:24px;height:24px;flex:none;color:var(--ink)}.native-entry>span:first-of-type{flex:1;min-width:0}.native-entry strong{display:block;font-size:16px;font-weight:550;line-height:1.5}.native-entry small{display:block;color:var(--muted);font-size:13px;line-height:1.6;margin-top:3px}.native-entry>span:last-child{color:var(--muted);font-size:22px}.native-tabs{position:sticky;top:0;background:var(--paper);z-index:2;flex:none;padding:7px 0}.native-tabs .active{color:var(--ink);background:#dfe3dc}.native-tabs button{font-size:14px;padding:8px 12px}.native-page{padding-bottom:24px}.english-navigation{display:flex;align-items:center;gap:4px;position:sticky;top:0;background:var(--paper);z-index:3}.english-navigation>.tabs{flex:1;min-width:0;margin:0}.english-navigation>.icon-button{flex:none;width:32px;background:transparent}.empty.compact{min-height:180px;padding:20px 8px}.tools-footer{display:flex;align-items:center;justify-content:space-between;margin-top:26px;color:var(--muted);font-size:12px}.chat-heading,.model-choice{display:block;width:100%;text-align:left;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-choice small{font-size:12px;color:var(--muted)}.screen.content{padding-top:calc(12px + env(safe-area-inset-top))}.screen.content:has(.english-navigation){padding-left:12px;padding-right:12px}.native-page>h2,.native-page .row>h2{font-size:22px}

.composition-frame{display:block;width:100%;height:68dvh;border:1px solid var(--line);border-radius:16px;margin:16px 0;background:var(--panel)}

.message .body.markdown{white-space:normal}.markdown p{margin:0 0 12px}.markdown pre{white-space:pre;overflow:auto;background:#eeede8;border-radius:12px;padding:14px}.markdown code{font-family:ui-monospace,monospace;font-size:.9em}.markdown table{display:block;overflow:auto;border-collapse:collapse;max-width:100%;margin:14px 0}.markdown th,.markdown td{border:1px solid var(--line);padding:8px 12px}.markdown blockquote{border-left:3px solid #aab5a4;padding-left:14px;margin:12px 0}.markdown h1,.markdown h2,.markdown h3{margin:18px 0 12px}.markdown ul,.markdown ol{padding-left:26px}

.native-chat-empty{height:100%;min-height:220px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:12px 0 10vh;text-align:center;gap:22px}.native-chat-empty .user-avatar{width:54px;height:54px;border:1px solid #dedbd3;border-radius:50%;display:grid;place-items:center;background:#d9e3db;color:#1b6e4f;font-size:26px;font-weight:600}.native-chat-empty h2{font-size:30px;letter-spacing:.01em}.native-chat-empty p{font-size:16px;color:#64716a}.header>.icon-button{color:#277a59;background:#f0f6ef}.composer .send{background:var(--accent)}.assistant-name strong{font-size:16px;font-weight:500}.assistant-name small{display:block;font-size:11px;color:var(--muted);margin-top:3px}.assistant-avatar{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#e0e9e0;color:var(--accent);flex:none}.assistant-avatar img{width:32px;height:32px;border-radius:9px}.history-chevron{font-size:0;width:30px;flex:none;color:var(--accent)}.history-chevron:after{content:'›';font-size:25px}.history-chevron[aria-expanded=true]:after{content:'⌄'}.assistant-history{padding:8px 14px 14px}.assistant-group{border-radius:25px}.assistant-identity .icon-button{color:var(--accent)}.focus-empty{display:grid;gap:14px;padding:20px;margin-top:12px}.focus-empty .primary{background:#e0ebe5;color:var(--ink);border-radius:28px}.shell[data-page=study]{background:var(--paper)}.shell[data-page=study] .native-tabs{background:var(--paper)}.shell[data-page=study]>.screen>.native-tabs{border:1px solid #dbe7df;border-radius:19px;padding:4px;gap:2px}.shell[data-page=study]>.screen>.native-tabs button{flex:1;padding:10px 4px}.shell[data-page=study]>.screen>.native-tabs .active{background:#e5f0ea;font-weight:600}.native-tabs button{scroll-margin-inline:40px}

.writing-images{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0}.writing-images img{width:100%;max-height:220px;object-fit:contain}.writing-images>div{display:grid;gap:6px}

@font-face{font-family:FocusSerif;src:url('./assets/focus/fonts/FocusSerif.ttf')}@font-face{font-family:FocusHanSerif;src:url('./assets/focus/fonts/FocusHanSerif.ttf')}
.shell[data-page=focus]{max-width:none;padding:0;background:#18231e}.shell[data-page=focus]>.nav,.shell[data-page=focus]>.orb{display:none}.shell[data-page=focus]>.screen{padding:0;margin:0;overflow:auto}.focus-scene{position:relative;min-height:var(--vh);overflow:hidden;color:var(--focus-color);text-align:center;padding:calc(18px + env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom));isolation:isolate}.focus-backdrop,.focus-tint{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2}.focus-tint{background:linear-gradient(#11211b50,#101e1766);z-index:-1}.focus-scene.font-serif{font-family:FocusSerif,FocusHanSerif,serif}.focus-scene.font-sans{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC',sans-serif}.focus-scene.font-mono{font-family:monospace}.focus-topbar{display:flex;justify-content:flex-end;gap:12px;max-width:960px;margin:auto}.focus-topbar>:first-child{margin-right:auto}.focus-topbar .icon-button,.focus-control{color:var(--focus-color);background:#1e2a2245;border:1px solid #eadbc066;backdrop-filter:blur(12px)}.focus-scene-content{position:relative;max-width:700px;margin:24px auto 0;display:flex;align-items:center;flex-direction:column;gap:15px}.focus-copy{white-space:pre-line}.focus-english{font:500 clamp(28px,5vw,56px)/1.03 FocusSerif,serif;letter-spacing:.08em}.focus-chinese{font-size:16px;letter-spacing:.15em;margin-top:18px}.focus-attribution{font-size:14px;margin-top:8px}.focus-divider{font-size:32px;min-height:34px}.focus-divider img{height:46px;max-width:180px;object-fit:contain}.focus-caption-image{max-width:90%;max-height:180px;object-fit:contain;display:block;margin:8px auto}.focus-timer-ring{border:1px solid #eadbc0aa;border-radius:50%;width:min(240px,60vw);aspect-ratio:1;display:flex;align-items:center;justify-content:center;flex-direction:column;box-shadow:0 0 0 8px #eadbc01c,0 0 32px #a8ac8222;background:radial-gradient(#10221930,#10221955)}.focus-timer-ring strong{font-size:clamp(36px,9vw,60px);font-weight:400;font-variant-numeric:tabular-nums}.focus-timer-ring p{font-family:-apple-system,sans-serif;font-size:13px;letter-spacing:.2em}.focus-scene h2{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC',sans-serif;font-size:17px;font-weight:400}.focus-controls{display:flex;gap:28px;align-items:center;justify-content:center;margin:12px auto}.focus-control{display:flex;align-items:center;justify-content:center;width:72px;min-height:60px;border-radius:50%;font-size:11px;flex-direction:column;gap:4px;padding:8px}.focus-control.primary-control{width:88px;height:88px}.focus-control svg{width:24px;height:24px}.focus-footer{font-size:15px;line-height:1.8;white-space:pre-line}.focus-capability{font-family:-apple-system,sans-serif;font-size:11px;color:inherit;opacity:.8}.focus-notice{font-family:-apple-system,sans-serif;background:#0e201b70;border-radius:12px;padding:8px 14px;font-size:13px}.focus-flow .focus-timer-ring{box-shadow:none;border-color:transparent;background:transparent;width:auto;min-height:110px}.focus-flow .focus-timer-ring strong{font-size:26px}.focus-flow .focus-scene-content{margin-top:8vh;gap:22px}.focus-task-card{background-size:cover;background-position:center}.completed-task>button strong{text-decoration:line-through;opacity:.6}.focus-task-card progress{width:100%;accent-color:var(--accent)}.focus-task-card [draggable=true]{cursor:grab}
@media (orientation:landscape) and (max-height:600px){.focus-scene-content{display:grid;grid-template-columns:1fr 1fr;gap:12px;max-width:920px;margin-top:6px}.focus-copy{grid-row:span 3}.focus-divider{display:none}.focus-timer-ring{width:170px;margin:auto}.focus-controls{margin:0}.focus-footer{grid-column:span 2}.focus-capability{grid-column:span 2}.focus-english{font-size:32px}.focus-flow .focus-scene-content{margin-top:12px}}
@media (max-width:500px){.focus-topbar{gap:5px}.focus-topbar .icon-button{width:38px;height:38px}.focus-scene-content{margin-top:22px}.focus-english{font-size:34px}.focus-scene .secondary{background:#1c2c22a0;color:var(--focus-color)}}
.focus-timer-ring{position:relative}.focus-timer-ring:before{content:'';position:absolute;inset:-5px;border-radius:50%;background:conic-gradient(var(--focus-color) calc(100% - var(--focus-progress)),transparent 0);mask:radial-gradient(farthest-side,transparent calc(100% - 2px),#000 0);pointer-events:none}.focus-flow .focus-timer-ring:before{display:none}
@media (orientation:landscape) and (max-height:900px){.focus-scene-content{display:grid;grid-template-columns:1fr 1fr;gap:12px;max-width:920px;margin-top:20px}.focus-copy{grid-row:span 3}.focus-divider{display:none}.focus-timer-ring{width:min(240px,32vh);margin:auto}.focus-controls{margin:0}.focus-footer{grid-column:span 2}.focus-capability{grid-column:span 2}.focus-english{font-size:clamp(28px,5.5vh,44px)}.focus-flow .focus-scene-content{margin-top:22px}}
@media (orientation:portrait) and (max-height:800px){.focus-scene-content{gap:9px;margin-top:12px}.focus-english{font-size:27px}.focus-chinese{margin-top:12px;font-size:14px}.focus-timer-ring{width:min(210px,27vh)}.focus-control.primary-control{height:68px;width:68px}.focus-control{min-height:48px;width:64px}.focus-footer{font-size:12px}.focus-controls{margin:5px auto}}

/* WebKit date/time controls must fit the same column as other form fields.
   Keep native pickers and values; only remove the intrinsic control width. */
input[type="date"],input[type="time"]{min-width:0;max-width:100%;-webkit-appearance:none;appearance:none}

/* Account balance updates only this small region; forms and keyboard stay mounted. */
.provider-balance{padding:8px 12px 14px;border-bottom:1px solid var(--line);font-size:13px;line-height:1.6;overflow-wrap:anywhere}.balance-currency strong,.balance-currency small{display:block}.balance-currency+.balance-currency{margin-top:8px}.provider-balance .link-button{padding:6px 0;min-height:40px}

/* iOS Safari's keyboard changes the visual viewport, not the layout viewport. */
#dialog{top:var(--vv-top,0px);bottom:calc(100% - var(--vv-top,0px) - var(--vh));margin-block:auto;max-height:calc(var(--vh) - 48px)}
#dialog[data-surface=drawer]{bottom:auto;margin-block:0;height:var(--vh);max-height:var(--vh)}
#dialog:has(> .dictionary-frame){height:calc(var(--vh) - 48px)}
@media(max-width:600px){#dialog[data-surface=page]{bottom:auto;margin-block:0;height:var(--vh);max-height:var(--vh)}#dialog[data-surface=sheet]{top:calc(var(--vv-top,0px) + var(--vh));bottom:auto;transform:translateY(-100%);margin-block:0;max-height:var(--vh)}}
body{overflow:hidden}#app{position:fixed;inset-inline:0;top:var(--vv-top,0px);height:var(--vh)}

/* App-local usage and opening notices preserve keyboard/safe-area layout. */
.usage-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;margin:16px 0}.usage-day{min-width:0;min-height:54px;display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px solid var(--line,#d8ded8);border-radius:9px;background:var(--surface,#fff)}.usage-day.has-usage{background:#d4e8dc}.usage-day small{font-size:10px;overflow-wrap:anywhere}.usage-detail{display:grid;grid-template-columns:1fr 1fr;gap:12px}.usage-detail dd{margin:0;text-align:right}.orb-panel .attachment{max-width:100%;overflow:hidden}

/* Skin gallery: role rows and compact exhibits share the actual four-frame atlas. */
.pet-gallery{display:grid;gap:16px}.pet-caption{font-size:12px;line-height:1.6}.pet-builtin-list{display:grid;gap:6px}.pet-builtin-row{display:flex;flex-direction:column;align-items:stretch;gap:0;border-radius:18px;overflow:hidden}.pet-builtin-row.is-selected{background:#e7ede6}.pet-role{display:flex;align-items:center;gap:14px;min-width:0;width:100%;text-align:left;min-height:74px;padding:10px 14px;border-radius:12px}.pet-role>.pet-preview{width:54px;height:54px}.pet-role-check{font-size:20px;line-height:1;color:var(--accent);flex:none}.pet-builtin-row:not(.is-selected)>.pet-role>.pet-preview{animation:none}.pet-role strong{display:block;font-size:16px;min-width:0;flex:1}.pet-role small{display:block;font-size:11px}.pet-role[aria-pressed=true]{color:var(--accent)}.pet-preview{display:block;flex:none;border-radius:14px;overflow:hidden;width:64px;height:64px;background-repeat:no-repeat;background-size:var(--pet-size-x,200%) var(--pet-size-y,200%);background-position:var(--pet-x0,0%) var(--pet-y0,0%);animation:pet-atlas-cycle var(--pet-cycle,3600ms) steps(1,end) infinite}.pet-preview-missing{display:grid;place-items:center;font-size:11px;color:var(--muted);background:#e8ebe5;border-radius:50%;animation:none}.pet-variant-control{display:flex;align-items:center;gap:4px;width:100%;min-width:0;padding:0 12px 10px}.pet-variant-control label{font-size:11px;margin:0 0 4px;color:var(--muted)}.pet-variant-control input[type=range]{accent-color:var(--accent);padding:0;min-height:44px;min-width:0;flex:1;width:auto;border:0;background:transparent}.pet-variant-control small{display:block;font-size:10px;line-height:1.4}.pet-gallery-heading{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-top:3px}.pet-gallery-heading h3{font-size:16px}.pet-exhibit-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:8px;align-items:stretch}.pet-exhibit{min-width:0;display:flex;flex-direction:column;border:1px solid transparent;border-radius:12px;padding:5px;background:transparent}.pet-exhibit.is-selected{border-color:#91ae99;background:#e5ede5}.pet-exhibit-select{display:flex;flex-direction:column;align-items:center;gap:4px;width:100%;min-width:0;padding:3px;border-radius:9px;text-align:center;flex:1}.pet-exhibit-select strong{font-size:12px;font-weight:500;overflow-wrap:anywhere;line-height:1.4}.pet-exhibit-select small{font-size:10px}.pet-exhibit .pet-preview{width:72px;height:72px;max-width:100%}.pet-exhibit-meta{display:flex;align-items:center;justify-content:center;gap:4px;flex-wrap:wrap;min-height:30px}.pet-exhibit-meta small{font-size:10px}.pet-remove{font-size:11px;color:var(--muted);padding:6px;min-height:30px;text-decoration:underline}.pet-gallery-tools,.pet-pages{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap}.pet-gallery-tools .secondary{padding:9px 12px}.pet-pages .secondary{min-height:38px;padding:7px 12px;font-size:12px}.pet-empty{font-size:13px;line-height:1.7}.pet-license-entry{border-bottom:1px solid var(--line);padding:12px 0;overflow-wrap:anywhere}.pet-license-entry p{font-size:12px;line-height:1.65;white-space:pre-wrap}.pet-license-entry strong{font-size:14px}.pet-gallery form>label{margin-top:0}.pet-gallery input[type=file]{font-size:12px;padding:9px}.pet-gallery form>small{font-size:11px}
.pet-variant-endpoint{display:grid;place-items:center;flex:none;width:44px;height:44px;padding:6px;border-radius:24px}.pet-variant-endpoint .pet-preview{width:32px;height:32px;border-radius:9px}.pet-variant-unavailable{font-size:10px;padding:0 18px 10px;color:var(--muted)}
@keyframes pet-atlas-cycle{0%{background-position:var(--pet-x0,0%) var(--pet-y0,0%)}22%{background-position:var(--pet-x1,100%) var(--pet-y0,0%)}32%{background-position:var(--pet-x0,0%) var(--pet-y1,100%)}58%{background-position:var(--pet-x1,100%) var(--pet-y1,100%)}72%{background-position:var(--pet-x0,0%) var(--pet-y1,100%)}86%{background-position:var(--pet-x0,0%) var(--pet-y0,0%)}100%{background-position:var(--pet-x0,0%) var(--pet-y0,0%)}}
@media(max-width:380px){.pet-exhibit-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.pet-exhibit .pet-preview{width:66px;height:66px}}
@media(prefers-reduced-motion:reduce){.pet-preview{animation:none}}
