/* A single understated edge; no inset/outset double highlight. */
#app :is(.home-glass,.life-glass,.clock-glass,.tb-glass,.music-glass,.maps-glass,.safari-glass,.tips-glass,.books-glass,.music-footer,.im-chat-header>button:not(.im-title),.im-sheet header>button,.glass-reactions,.glass-context,.liquid-card,.dock,.im-attachment-panel,.im-back,.im-title small,.im-list-header>button,.im-list-bottom>button,.im-list-bottom input,.im-composer>button,.im-composer>div,.recipient-field,.quote-draft,.message-selection-toolbar){box-shadow:0 2px 8px rgb(0 0 0 / 3%);border-width:.5px;border-color:rgb(255 255 255 / 22%);text-shadow:none}
#app :is(.life-glass,.home-glass,.clock-glass,.tb-glass,.maps-glass,.safari-glass,.tips-glass,.books-glass) :is(.life-glass,.home-glass,.clock-glass,.tb-glass,.maps-glass,.safari-glass,.tips-glass,.books-glass){backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none;border-color:transparent;background:transparent}
#app .time-widget.liquid-card{border:0;box-shadow:none}
.form-cell.multiline{height:auto;flex-shrink:0}.form-cell.multiline textarea{flex:none;display:block;box-sizing:border-box}
.settings-section>.section-note,.im-sheet .section-note{margin:12px 16px 20px;position:static}
.form-cell select{border-radius:12px;padding:10px 28px 10px 12px;background:#f2f2f7;min-height:42px}
.world-group-bar{display:flex;align-items:center;gap:10px;background:#fff;border-radius:22px;padding:10px 12px;margin:16px 0 22px}
.world-group-field{display:flex;align-items:center;gap:12px;flex:1;min-width:0}.world-group-field span{flex-shrink:0;font-size:14px;color:#8e8e93}.world-group-field select{flex:1;min-width:0;width:100%;border:0;border-radius:13px;background:#f2f2f7;color:#222;padding:12px;font:inherit;font-size:16px}
.world-manage{display:flex;align-items:center;gap:5px;border:0;border-radius:14px;padding:12px 8px;color:#666;background:transparent;font:inherit;font-size:14px}.world-manage svg{width:18px;height:18px}
.notes-meeting-tools{border-radius:26px;padding:6px 5px;background:rgba(248,248,250,.88);gap:4px}
.notes-meeting-tools button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;flex:1;min-width:0;padding:7px 3px;border-radius:19px;color:#726b58}
.notes-meeting-tools button svg{width:23px;height:23px}.notes-meeting-tools button span{font-size:11px;line-height:1.3}.notes-meeting-tools button:active{background:#e8bd2518}
.notes-user-entry{background:#f5f5f7;border-radius:21px}.notes-meeting-footer{gap:9px;padding-top:10px}
.soft-widget{height:100%;width:100%;border-radius:24px;padding:17px;display:flex;flex-direction:column;justify-content:space-between;text-align:left;text-shadow:none;box-sizing:border-box;overflow:hidden}
.soft-widget>small{font-size:10px;letter-spacing:.6px;line-height:1.5;opacity:.72;overflow-wrap:anywhere}.soft-widget strong{font-size:28px;font-weight:450;line-height:1.2;letter-spacing:-1px}.soft-widget em{font-size:13px;font-style:normal;letter-spacing:0;opacity:.5}.soft-widget p{font-size:15px;font-weight:450;line-height:1.65;margin:7px 0;white-space:pre-wrap;overflow:auto;overflow-wrap:anywhere;min-height:0}
.soft-widget.mood strong{font-size:25px}.soft-widget-gallery{display:grid;grid-template-columns:1fr;gap:9px;margin:15px 0}.launcher-menu .soft-widget-gallery button{border:0;border-radius:18px;padding:17px;background:#f5f0e8;color:#5f574e}.soft-widget-gallery button:nth-child(2){background:#e6ece5}.soft-widget-gallery button:nth-child(3){background:#eee6ec}.soft-widget-gallery small{display:block;font-size:12px;margin-top:5px;opacity:.7}
.launcher-menu textarea{width:100%;min-height:90px;box-sizing:border-box;border:0;border-radius:14px;background:#ffffff24;color:inherit;padding:12px;font:inherit;font-size:16px;resize:vertical}.launcher-menu:has(.soft-widget-gallery),.launcher-menu:has(textarea){background:rgba(248,248,246,.97);color:#3e4140;text-shadow:none}.launcher-menu:has(textarea) input:not([type=color]){background:#e9e9e7;color:#333}
@media(max-width:360px){.soft-widget{padding:12px;border-radius:20px}.soft-widget p{font-size:13px}.soft-widget strong{font-size:24px}.world-group-bar{gap:5px;padding:9px}.world-manage{font-size:12px}.notes-meeting-tools button span{font-size:10px}}
.book-theme-row,.home-page-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border-radius:16px;background:#ffffff16;margin:9px 0;min-width:0}
.book-theme-row button{border:0;border-radius:12px;background:#fff;padding:12px;color:inherit}.book-theme-row button:first-child{flex:1;min-width:0;text-align:left;overflow-wrap:anywhere}.home-page-row span{flex:1}.launcher-menu .home-page-row button{width:auto;flex-shrink:0;border:0;font-size:13px}
.soft-widget.photo{padding:10px;gap:7px;background:#f8f5ef}.soft-photo{width:100%;height:calc(100% - 22px);min-height:0;object-fit:cover;border-radius:17px;animation:soft-reveal .2s ease-out}.soft-photo-caption{flex:1;display:grid;place-items:center;text-align:center;padding:8px;animation:soft-reveal .2s ease-out}.soft-widget.photo>small{text-align:center;font-size:10px}.soft-widget.date strong{font-size:36px;font-weight:350;letter-spacing:-1px}
@keyframes soft-reveal{from{opacity:.2;transform:scale(.98)}to{opacity:1;transform:none}}
/* Animate content surfaces, not the root viewport or safe-area geometry. */
@keyframes app-content-enter{from{opacity:.35;transform:translateY(5px)}to{opacity:1;transform:none}}
#app .app-screen>:is(.life-app,.music-studio,.im-app,.clock-view,.shortcut-page){animation:app-content-enter .2s ease-out}
#app :is(.life-sheet,.im-sheet,.clock-sheet,.launcher-menu){animation:app-content-enter .2s ease-out}
#app :is(.life-glass,.books-glass,.tips-glass,.home-glass,.clock-glass,.maps-glass,.safari-glass){transition:background-color .18s,transform .18s,box-shadow .18s}
#app :is(.life-glass,.books-glass,.tips-glass,.home-glass,.clock-glass,.maps-glass,.safari-glass):is(button):active{transform:scale(.97)}
.life-row:only-of-type{border-radius:18px}.preset-panel input,.preset-panel select{border-radius:14px;min-width:0}.book-theme-row+ .life-row{border-radius:16px}
@media(prefers-reduced-motion:reduce){#app .app-screen>*,#app :is(.life-sheet,.im-sheet,.clock-sheet,.launcher-menu,.soft-photo,.soft-photo-caption){animation:none!important}#app :is(.life-glass,.books-glass,.tips-glass,.home-glass,.clock-glass,.maps-glass,.safari-glass){transition:none!important}}
.books-sheet .life-row{border-radius:16px;margin:8px 0;border-bottom:0;overflow-wrap:anywhere}
.books-sheet:has(.notes-css-editor)>h3{font-size:23px;font-weight:650;color:inherit;margin-top:10px}
.books-nav>.books-scope,.books-nav>b{order:1;flex:1;min-width:0}.books-nav>button[aria-label="图书外观"]{order:2;margin-left:auto}.books-nav>button[aria-label="更多"]{order:3}
/* Independent book settings rows are cards, not grouped-list separators. */
.books-sheet>.books-row,.books-sheet>.books-category{border:0;border-radius:18px;margin:9px 0;padding:15px;background:var(--book-card);min-width:0}
.books-sheet>.form-cell::after{display:none}.books-sheet>.books-row::after{display:none}
.books-sheet>.books-category button{border-radius:12px}.books-sheet>.books-row input[type=file]{min-width:0}
/* Dock-only stronger glass: one illuminated edge and one soft depth shadow. */
#app .launcher .dock.home-glass{background:linear-gradient(135deg,#ffffff38,#ffffff05 48%,#ffffff20),rgba(220,225,230,.25);border:1px solid #ffffff70;box-shadow:0 5px 18px #24344818;backdrop-filter:blur(30px) saturate(165%);-webkit-backdrop-filter:blur(30px) saturate(165%)}
.notes-done svg{width:27px;height:27px}.notes-done{display:grid;place-items:center}
.notes-user-entry .notes-send{width:38px;height:38px;min-height:38px;padding:7px;border-radius:50%;display:grid;place-items:center;background:#d4aa28;color:white;transition:transform .18s,background-color .18s}
.notes-send svg{width:24px;height:24px}.notes-send:active{transform:scale(.95)}
.launcher-item[data-widget-rows="1"] .soft-widget{padding:9px 12px;border-radius:18px;gap:2px}.launcher-item[data-widget-rows="1"] .soft-widget>template{min-height:0}
.launcher-item[data-widget-rows="1"] .soft-widget p{margin:0;font-size:12px;line-height:1.35}.launcher-item[data-widget-rows="1"] .soft-widget strong{font-size:20px}.launcher-item[data-widget-rows="1"] .soft-widget small:last-child{display:none}
.launcher-item[data-widget-cols="1"] .soft-widget{padding:8px;border-radius:18px}.launcher-item[data-widget-cols="1"] .soft-widget strong{font-size:20px}.launcher-item[data-widget-cols="1"] .soft-widget p{font-size:12px}.launcher-item[data-widget-cols="1"] .soft-widget small{font-size:9px;letter-spacing:0}
.launcher-item[data-widget-rows="1"] .launcher-clock{gap:2px}.launcher-item[data-widget-rows="1"] .launcher-clock strong{font-size:calc(28px * var(--widget-font-scale,1))}.launcher-item[data-widget-rows="1"] .launcher-clock small{font-size:calc(10px * var(--widget-font-scale,1))}.launcher-item[data-widget-cols="1"] .launcher-clock strong{font-size:calc(25px * var(--widget-font-scale,1))}.launcher-item[data-widget-cols="1"] .launcher-clock small:last-child{display:none}
@media(max-height:700px) and (orientation:portrait){.launcher-grid{gap:6px 8px}.launcher-tile>.dock-app-icon{width:42px;height:42px}.launcher-tile>small{font-size:10px;margin-top:3px}.launcher .dock .dock-app-icon{width:51px;height:51px}.launcher-toolbar{height:44px}}
/* Standalone controls are cards, not rows of an imaginary parent section. */
.scroll-page > .form-cell{background:#fff;border-radius:20px;margin:10px 0;min-width:0}
.scroll-page > .form-cell::after,.books-sheet > .form-cell::after{content:none}
.app-screen:has(>.mail-app){background:#fff}
/* Books: compact navigation and quieter rounded controls. */
.books-nav{gap:10px;padding:10px 18px}
.books-nav .books-scope,.books-nav>b{flex:1;text-align:left}
.books-nav .books-circle{width:42px;height:42px;flex:0 0 42px}
.books-nav .ui-icon{width:22px;height:22px}
.books-sheet>.form-cell{background:var(--book-card,#fff);border-radius:18px;margin:10px 0;padding:16px;gap:12px;flex-wrap:wrap}
.books-sheet>.form-cell::after{content:none}
.books-sheet>.form-cell select{background:var(--book-bg,#f3f3f6);border-radius:12px;padding:10px;min-width:110px}
.books-sheet>.form-cell input:not([type=range]):not([type=file]){border-radius:12px;padding:10px;background:var(--book-bg,#f3f3f6)}
.books-sheet .books-primary{border-radius:22px;min-height:46px}
.books-sheet>header .books-circle{width:40px;height:40px}
.books-sheet>header .ui-icon{width:20px;height:20px}
.maps-handle{height:36px;min-height:36px;cursor:ns-resize;user-select:none;-webkit-user-select:none}
.fullscreen-resume{position:absolute;z-index:120;top:calc(10px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:12px;padding:8px 10px 8px 16px;border-radius:24px;background:#fff;color:#222;box-shadow:0 4px 18px #0002;max-width:calc(100% - 24px);font-size:14px}
.fullscreen-resume button{background:transparent;color:#007aff;white-space:nowrap;padding:8px;border-radius:16px}
.books-sheet input[type=range]{appearance:none;-webkit-appearance:none;height:26px;background:transparent;padding:0;min-width:110px;accent-color:#438dd0}
.books-sheet input[type=range]::-webkit-slider-runnable-track{height:5px;background:#dedee4;border-radius:5px}
.books-sheet input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:23px;height:23px;border-radius:50%;background:#fff;border:1px solid #e5e5e9;box-shadow:0 1px 4px #0002;margin-top:-9px}
.books-sheet input[type=range]::-moz-range-track{height:5px;background:#dedee4;border-radius:5px}
.books-sheet input[type=range]::-moz-range-thumb{width:21px;height:21px;border-radius:50%;background:#fff;border:1px solid #e5e5e9;box-shadow:0 1px 4px #0002}
/* Boolean settings are trailing switches; selection checkboxes remain checkboxes. */
#app .form-cell>input[type=checkbox]:not([value]){
 appearance:none;-webkit-appearance:none;position:relative;flex:0 0 51px;width:51px;min-width:51px;height:31px;max-width:51px;margin:0 0 0 auto;padding:0;border:0;border-radius:20px;background:#e3e3e8;cursor:pointer;transition:background .18s;
}
#app .form-cell>input[type=checkbox]:not([value])::before{content:'';position:absolute;left:2px;top:2px;width:27px;height:27px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0002;transition:transform .18s}
#app .form-cell>input[type=checkbox]:not([value]):checked{background:#34c759}
#app .form-cell>input[type=checkbox]:not([value]):checked::before{transform:translateX(20px)}
#app .form-cell:has(>input[type=checkbox]:not([value])){display:flex;flex-direction:row;align-items:center;gap:16px;flex-wrap:nowrap}
#app .chapter-directory-actions>.books-row{border-radius:20px;background:var(--book-card,#fff);padding:14px 16px;min-height:48px;justify-content:center}
#app .chapter-directory-actions>.books-row::after{content:none}
/* Icon spacing belongs to each control, never to SVG :only-child (text nodes do not count). */
@media(prefers-reduced-motion:reduce){#app .form-cell>input[type=checkbox]:not([value]),#app .form-cell>input[type=checkbox]:not([value])::before{transition:none}}
/* Contact filter: a trailing SVG affordance, not a raw browser arrow. */
.contact-group-picker{display:flex;gap:12px;align-items:center}.contact-group-picker select{appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%238e8e93' d='M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;background-size:20px;padding-right:36px!important;min-width:0}.contact-group-manage{flex:0 0 40px;width:40px;height:40px;display:grid;place-items:center;border-radius:50%;background:#f2f2f7;color:#007aff}.books-scope{display:flex;align-items:center;gap:4px}.books-scope .ui-icon{width:18px;height:18px}
/* Inline reply threads: outlined source bubbles and an independent curved rail. */
.im-history{position:relative}.reply-thread-lines{position:absolute;left:0;top:0;width:100%;pointer-events:none;overflow:visible;z-index:0;fill:none;stroke:#e6e6e8;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}.im-history>.im-message,.im-history>.im-time{position:relative;z-index:1}.im-message:has(>.reply-link){margin-top:20px}.reply-link{padding-bottom:16px;min-height:40px}.reply-link .reply-mini{max-width:78%;padding:8px 12px;font-size:14px;line-height:1.4;border:1px solid #c9c9cc;border-radius:20px;color:#969699;background:transparent;opacity:1;-webkit-line-clamp:3}.reply-link.original-out .reply-mini{background:transparent;border-color:#9ed0eb;color:#69acd3}.thread-count{color:#168ccd;font-size:12px;padding:6px 0}.im-history .im-message:not(.out):has(.reply-link)>.im-message-content{margin-left:48px;max-width:calc(100% - 60px)}
.im-history .im-message.is-inline-reply:not(.out){margin-left:48px}.im-history .im-message.is-inline-reply:not(.out):has(.reply-link){margin-left:0}.im-history .im-message.is-inline-reply:not(.out):has(.reply-link)>.im-message-content{margin-left:48px}
/* The native safe-area and in-app status bar share the app's surface. */
#app>.app-screen[data-current-app="countdown"]{background:linear-gradient(to bottom,#1594d0 0 calc(var(--status-height,54px) + var(--safe-top)),#f8f8fa 0)}
#app>.app-screen[data-current-app="icity"]{background:#f4f3f3}
#app>.app-screen[data-current-app="maps"]{background:#eeefe9}
#app>.app-screen[data-current-app="camera"]{background:#050505;color:white}
#app>.app-screen[data-current-app="photos"]{background:#fff}
.app-screen[data-current-app="countdown"]>.status-bar{background:#1594d0;color:white}
.app-screen[data-current-app="icity"]>.status-bar{background:#f4f3f3}
.app-screen[data-current-app="maps"]>.status-bar{background:transparent}
.app-screen[data-current-app="camera"]>.status-bar{background:#050505;color:white}
.app-screen[data-current-app="photos"]>.status-bar{background:#fff}
.app-screen[data-current-app="maps"]{--map-top:calc(var(--status-height,54px) + var(--safe-top))}
.app-screen.status-hidden[data-current-app="maps"]{--map-top:var(--safe-top)}
.app-screen[data-current-app="maps"]>.status-bar{z-index:4;pointer-events:none}
.app-screen[data-current-app="maps"]>.page-motion-frame{margin-top:calc(-1 * var(--map-top))}
.app-screen[data-current-app="maps"] .maps-home{top:calc(14px + var(--map-top))}
.app-screen[data-current-app="maps"] .maps-caption{top:calc(16px + var(--map-top))}
.icity-books-strip button>b .ui-icon{width:24px;height:24px}
.notes-list-tools .ui-icon{width:14px;height:14px;vertical-align:middle}
.app-screen[data-current-app="camera"]>.home-indicator{background:#fff}
#app .books-scope{justify-content:flex-start;gap:4px}
#app .books-scope>.ui-icon{margin:0;flex:0 0 18px;color:var(--book-accent)}
/* Keep native select interaction and positioning; replace only the arrow artwork. */
#app select:not([multiple]):not([size]){
 appearance:none;-webkit-appearance:none;
 background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%238e8e93' d='M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z'/%3E%3C/svg%3E");
 background-repeat:no-repeat;background-position:right 8px center;background-size:18px 18px;padding-right:30px;
}
/* Center artwork inside controls without affecting neighboring text. */
#app .clock-plus{display:grid;place-items:center;padding:0}
#app .clock-plus>.ui-icon{margin:0;width:24px;height:24px;display:block}
#app .im-composer .im-send{display:grid;place-items:center;padding:0;flex-shrink:0}
#app .im-composer .im-send>.ui-icon{display:block;margin:0;width:22px;height:22px;transform:none}
/* The chat history scrolls under floating controls, not below an opaque header. */
#app>.messages-chat{--chat-top:calc(var(--status-height,54px) + var(--safe-top));background-color:#fff}
#app>.messages-chat.status-hidden{--chat-top:var(--safe-top)}
.messages-chat>.status-bar{z-index:6;background:transparent;pointer-events:none}
.messages-chat>.page-motion-frame{margin-top:calc(-1 * var(--chat-top));background:transparent}
.messages-chat .im-wallpaper{display:none}
.messages-chat .im-chat-header{position:absolute;top:var(--chat-top);left:0;right:0;z-index:5;background:transparent!important;border:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;pointer-events:none}
.messages-chat .im-chat-header>button{pointer-events:auto}
.messages-chat .im-chat-header>.im-title{pointer-events:none}
.messages-chat .im-chat-header>.im-title>*{pointer-events:auto}
.messages-chat .im-history{padding-top:calc(var(--chat-top) + 110px);scroll-padding-top:calc(var(--chat-top) + 110px)}
.messages-chat .thread-heading{position:absolute;top:calc(var(--chat-top) + 98px);left:0;right:0;z-index:5;background:var(--glass-bg)}
.messages-chat .im-app:has(.thread-heading) .im-history{padding-top:calc(var(--chat-top) + 154px)}
.reply-link .reply-mini{position:relative;overflow:visible;display:block;border-radius:19px;text-align:left}
.reply-mini>span{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.reply-mini:after{content:'';position:absolute;bottom:-4px;left:7px;width:9px;height:9px;border-left:1px solid #c9c9cc;border-bottom:1px solid #c9c9cc;border-radius:0 0 0 7px;transform:skewY(-25deg);background:transparent}
.original-out .reply-mini:after{left:auto;right:7px;border-left:0;border-right:1px solid #9ed0eb;border-bottom-color:#9ed0eb;border-radius:0 0 7px 0;transform:skewY(25deg)}
#app .notes-writing .life-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
#app .notes-writing .life-row>select,#app .notes-writing .life-row>input[type=checkbox]{margin-left:auto;flex-shrink:0}
#app .notes-writing .life-row>span{flex:1;min-width:80px;overflow-wrap:anywhere}
#app .notes-writing textarea{box-sizing:border-box;width:100%;resize:vertical;min-height:100px}
#app .notes-writing details{padding:14px;border-radius:18px;background:var(--glass-bg);line-height:1.65}
#app .notes-writing .life-search{margin:10px 0}
#app .notes-writing select{border:0;border-radius:12px;background-color:#f2f2f7;padding:10px 30px 10px 12px;font:inherit;max-width:65%}
#app .notes-writing input[type=checkbox]{appearance:none;-webkit-appearance:none;width:48px;height:29px;border:0;border-radius:20px;background:#e3e3e8;position:relative;cursor:pointer}
#app .notes-writing input[type=checkbox]:before{content:'';position:absolute;left:2px;top:2px;width:25px;height:25px;border-radius:50%;background:white;box-shadow:0 1px 3px #0002;transition:transform .16s}
#app .notes-writing input[type=checkbox]:checked{background:#34c759}
#app .notes-writing input[type=checkbox]:checked:before{transform:translateX(19px)}
#app .notes-writing input[type=checkbox]:focus-visible{outline:2px solid #007aff;outline-offset:3px}
#app .notes-folder-toggle{display:inline-flex;align-items:center;justify-content:flex-start;gap:5px;width:auto;min-width:0;white-space:nowrap}
#app .notes-folder-toggle>.ui-icon{display:block;flex:0 0 16px;width:16px;height:16px;margin:0;transition:transform .16s ease}
#app .notes-folder-toggle[aria-expanded=true]>.ui-icon{transform:rotate(180deg)}
#app .notes-writing{padding:16px 18px calc(24px + var(--safe-bottom,0px));border-radius:30px 30px 0 0;color:#1c1c1e}
#app .notes-writing header{padding:8px 0 16px;top:-16px}
#app .notes-writing header h2{font-size:20px;letter-spacing:-.4px;line-height:1.3}
#app .notes-writing button{font:inherit;cursor:pointer}
#app .notes-writing .writing-done{width:40px;height:40px;border:0;border-radius:50%;background:#e8bd25;color:#fff;display:grid;place-items:center;padding:0}
#app .notes-writing .writing-done svg{width:22px;height:22px}
#app .notes-writing .writing-caption{color:#8e8e93;margin:0 4px 24px;font-size:14px}
#app .notes-writing h3{font-size:13px;font-weight:500;color:#8e8e93;margin:24px 14px 8px}
#app .notes-writing .writing-group{border-radius:22px;background:#fff;overflow:hidden}
#app .notes-writing .writing-row{position:relative;display:flex;align-items:center;gap:10px;min-height:56px;width:100%;box-sizing:border-box;padding:12px 16px;border:0;background:transparent;text-align:left;color:inherit}
#app .notes-writing .writing-group>*+*:before{content:'';position:absolute;top:0;left:16px;right:0;height:.5px;background:#e5e5ea}
#app .notes-writing .writing-row>span{flex:1;min-width:0;overflow-wrap:anywhere}
#app .notes-writing .writing-row>select{margin-left:auto;max-width:58%;background-color:transparent;text-align:right;padding-top:6px;padding-bottom:6px;color:#8e8e93}
#app .notes-writing .writing-row>input:not([type=checkbox]){flex:1;min-width:0;border:0;background:transparent;text-align:right;padding:6px 0;outline-offset:3px}
#app .notes-writing .writing-row>input[type=checkbox]{margin:0 0 0 auto;flex:0 0 48px}
#app .notes-writing .writing-preview{position:relative;padding:0;background:transparent;border-radius:0;line-height:1.6}
#app .notes-writing .writing-preview summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:15px 16px;cursor:pointer}
#app .notes-writing .writing-preview summary::-webkit-details-marker{display:none}
#app .notes-writing .writing-preview summary svg{width:16px;height:16px;color:#8e8e93;flex-shrink:0;transition:transform .16s}
#app .notes-writing .writing-preview[open] summary svg{transform:rotate(180deg)}
#app .notes-writing .writing-preview p{white-space:pre-wrap;font-size:14px;color:#636366;margin:0;padding:0 16px 18px;overflow-wrap:anywhere}
#app .notes-writing .writing-action{color:#b18c00}
#app .notes-writing .writing-action svg{width:20px;height:20px}
#app .notes-writing .writing-note{font-size:12px;line-height:1.6;color:#8e8e93;margin:9px 14px 20px}
#app .notes-writing .writing-field{position:relative;display:block;padding:16px}
#app .notes-writing .writing-field>span{display:block;font-size:14px;color:#636366;margin-bottom:10px}
#app .notes-writing .writing-field textarea{display:block;width:100%;border:0;border-radius:14px;background:#f7f7fa;padding:12px;font:inherit;font-size:15px;line-height:1.65;color:inherit}
#app .notes-writing .writing-editor-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:12px}
#app .notes-writing .writing-editor-actions button{border:0;border-radius:18px;padding:12px 18px;background:#e9e9ed;color:#636366}
#app .notes-writing .writing-editor-actions .writing-save{background:#e8bd25;color:#252015}
#app .notes-writing .writing-preset button{display:grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-radius:50%;background:#f2f2f7;color:#8e8e93;flex-shrink:0}
#app .notes-writing .writing-preset button svg{width:18px;height:18px}
#app .notes-writing .writing-preset .writing-delete{color:#ff3b30}
#app .notes-writing .writing-error{font-size:13px;color:#ff3b30;margin:12px}
.notes-meeting-log .meeting-speech{display:block;width:100%;text-align:left;white-space:pre-wrap;line-height:1.7;padding:10px 0;border:0;background:transparent;color:inherit;font:inherit}
.meeting-speech svg{width:17px;height:17px;vertical-align:middle;color:#b18c00}
.meeting-choices{display:grid;gap:8px;margin:16px 0}
.meeting-choices button{border:0;border-radius:18px;background:#f2f2f7;color:#66521b;text-align:left;padding:13px 16px;font:inherit;line-height:1.5}
.notes-app .life-sheet .settings-section{border-radius:22px;overflow:hidden;margin:14px 0}
.notes-app .life-sheet .form-cell{min-height:54px}
.moments-heading{background:#fffaf6;border-radius:24px;padding:22px;margin-bottom:18px;color:#493d39}
.moments-heading>small{font-size:10px;letter-spacing:2px;color:#ab8f86}
.moments-heading h2{font-size:25px;margin:12px 0}
.moments-heading p{font-size:14px;line-height:1.6;color:#96867e}
.moments-heading .life-primary{background:#b77978;display:flex;align-items:center;justify-content:center;gap:8px}
.moments-heading svg{width:18px;height:18px}
.moment-card{background:#fff;border-radius:23px;overflow:hidden;margin:16px 0}
.moment-card>button{width:100%;display:block;border:0;padding:0;background:none;color:inherit;text-align:left;font:inherit}
.moment-card img{display:block;width:100%;max-height:260px;object-fit:cover}
.moment-card button>div{padding:19px}
.moment-card small{color:#a48d85;font-size:12px}
.moment-card h3{margin:10px 0;font-size:20px}
.moment-card p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7;font-size:15px}
.moment-preview{max-width:100%;max-height:260px;display:block;border-radius:20px;margin:12px auto}
.safari-phone-tabs{display:flex;flex-wrap:wrap;gap:8px}
.safari-phone-tabs>button{border-radius:16px;min-height:38px;padding:8px 12px}
/* Offline worldbook selection uses the same inset settings groups. */
.notes-world-heading{font-size:13px;color:#8e8e93;margin:22px 18px 9px;font-weight:500}
.notes-world-options .form-cell>span{flex:1;min-width:0;overflow-wrap:anywhere}
.notes-world-options b{display:block;font-size:15px;font-weight:500}
.notes-world-options small{display:block;color:#8e8e93;font-size:12px;margin-top:5px}
.notes-world-options input{flex:none;margin-left:auto}
.im-rewrite-sheet .settings-section{border-radius:22px;overflow:hidden;margin:14px 0}
.rewrite-field{display:block;padding:16px;background:#fff}
.rewrite-field span{display:block;font-size:15px;margin-bottom:12px}
.rewrite-field textarea{display:block;box-sizing:border-box;width:100%;border:0;background:#f2f2f7;border-radius:14px;padding:12px;resize:vertical;font:inherit;line-height:1.5}
.im-composer>.im-rewrite{display:grid;place-items:center}
.im-composer>.im-rewrite svg{width:22px;height:22px;display:block}
.contact-actions button>.ui-icon{stroke-width:1.8}
.im-service-label{display:block;width:100%;text-align:center;color:#8e8e93;font-size:13px;font-weight:600;line-height:1.5;margin:20px 0 0}
.im-service-label+.im-time{display:block;text-align:center;margin-top:5px}
.im-history .reply-link .reply-mini,.im-history .reply-link.original-out .reply-mini{border-color:transparent}
.reply-link .reply-mini::after{display:none}
.reply-link .reply-mini>.quote-outline{position:absolute;left:0;top:0;width:100%;height:calc(100% + 7px);overflow:visible;pointer-events:none;fill:none;stroke:#c9c9cc;stroke-width:1;stroke-linejoin:round;stroke-linecap:round}
.reply-link.original-out .reply-mini>.quote-outline{stroke:#9ed0eb}
.phone-shade-band{position:absolute;left:0;right:0;background:rgba(0,0,0,.2);pointer-events:none;z-index:9998;height:0}
.phone-shade-band.top{top:0}.phone-shade-band.bottom{bottom:0}
.phone-shade-band.picker{inset:0;height:auto;display:none}
.books-stat-grid strong{font-size:clamp(18px,5vw,28px);overflow-wrap:anywhere}
.icity-books-strip button>b{display:grid;place-items:center;box-sizing:border-box;padding:0;line-height:1}
.icity-books-strip>button>b>.ui-icon{display:block;width:22px;height:22px;margin:0;padding:0;flex:none}

/* iCity cover shares the shell's status area; interactive controls remain inset. */
.app-screen[data-current-app="icity"]:has(.icity-cover){--icity-top:calc(var(--status-height,54px) + var(--safe-top))}
.app-screen.status-hidden[data-current-app="icity"]:has(.icity-cover){--icity-top:var(--safe-top)}
.app-screen[data-current-app="icity"]:has(.icity-cover)>.page-motion-frame{margin-top:calc(-1 * var(--icity-top))}
.app-screen[data-current-app="icity"]:has(.icity-cover)>.status-bar{z-index:2;pointer-events:none;background:transparent}
.icity-cover{height:calc(215px + var(--icity-top,0px));padding-top:calc(14px + var(--icity-top,0px))}
.icity-profile-group{border-radius:20px;overflow:hidden;background:#fff;margin:12px 5px}
.icity-profile-group>.icity-profile-row:last-child{border-bottom:0}
#app>.icity-photo-preview{z-index:550;box-sizing:border-box;padding:var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left)}
#app>.icity-photo-preview button{top:calc(16px + var(--safe-top));right:calc(16px + var(--safe-right))}

.icity-design .icity-recent{border-radius:20px;overflow:hidden;margin:0 5px}

/* Wallpaper bubbles use one filled SVG silhouette, including the tail. */
.im-app[data-wallpaper="true"] .reply-link .reply-mini{color:var(--incoming-text);background:transparent}
.im-app[data-wallpaper="true"] .reply-link.original-out .reply-mini{color:var(--outgoing)}
.im-app[data-wallpaper="true"] .reply-mini>.quote-outline{fill:rgba(248,252,255,.78);stroke:rgba(120,132,145,.35)}
.im-app .im-bubble.glass-bubble,.im-app .im-bubble.thread-original{background:transparent}
.im-app .im-bubble.glass-bubble::before,.im-app .im-bubble.thread-original::before{display:none}
.im-bubble.glass-bubble>.quote-outline,.im-bubble.thread-original>.quote-outline{position:absolute;inset:0;width:100%;height:calc(100% + 7px);overflow:visible;pointer-events:none;z-index:-1;fill:rgba(239,247,252,.85);fill:color-mix(in srgb,var(--incoming) 78%,transparent);stroke:rgba(255,255,255,.55);stroke-width:1}
.im-app .im-bubble.thread-original{color:var(--incoming-text)}
.im-app .out .im-bubble.thread-original{color:var(--outgoing)}
.im-bubble.thread-original>.quote-outline{fill:rgba(255,255,255,.65);stroke:#c9c9cc}
.out .im-bubble.thread-original>.quote-outline{stroke:#9ed0eb}
.thread-count{display:flex;align-items:center;gap:2px}.thread-count .ui-icon{width:12px;height:12px}
.im-app[data-thread-open="true"]::before{content:'';position:absolute;inset:0;z-index:-1;background:rgba(247,248,250,.82);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);pointer-events:none}
.im-app[data-thread-open="true"] .im-chat-header>.im-title{margin-left:48px}
.im-app[data-thread-open="true"] .im-history::before,.im-app[data-thread-open="true"] .im-history::after{content:'';flex:1 0 35px}
.im-app[data-thread-open="true"] .im-history>*{flex-shrink:0}
.im-app[data-thread-open="true"] .im-history{padding-bottom:35px}
.im-app[data-thread-open="true"] .im-chat-header .thread-close{display:grid;place-items:center;width:44px;height:44px;padding:10px}
.im-app[data-thread-open="true"] .thread-close .ui-icon{width:25px;height:25px}
.im-app[data-wallpaper="true"] .im-time,.im-app[data-wallpaper="true"] .im-status,.im-app[data-wallpaper="true"] .im-service-label,.im-app[data-wallpaper="true"] .thread-count{color:white;text-shadow:0 1px 4px #0008}
.im-app[data-thread-open="true"] .im-time,.im-app[data-thread-open="true"] .im-status{color:#70757b;text-shadow:0 1px 2px #fff}

.messages-chat .im-app{background:transparent}
.reply-link .reply-mini{isolation:isolate}
.reply-link .reply-mini>.quote-outline{z-index:-1}

.days-editor .form-cell:not(.multiline){display:flex;align-items:center;justify-content:space-between;gap:16px}
.days-editor .form-cell>input,.days-editor .form-cell>select{margin-left:auto;min-width:0;flex:1;max-width:70%;text-align:right;text-align-last:right}
.days-editor{overflow:hidden;border-radius:26px 26px 0 0}
.icity-sheet>.icity-profile-row{border-radius:18px;margin:8px 0;overflow:hidden}

.books-reading-body{touch-action:pan-y;overscroll-behavior:contain;overflow-anchor:none}
.books-reading-body>p[data-read-block]{margin:0;white-space:pre-wrap}

.days-editor-fields{border-radius:20px;overflow:hidden;background:white}

/* Main settings uses clean grouped cards, without the legacy partial separators. */
/* Align separators with the label, including the compact-width row layout. */
.settings-page{--settings-row-inset:16px;--settings-row-gap:12px;--settings-hairline:1px}
.settings-page .settings-section>.settings-cell{padding-inline:var(--settings-row-inset);gap:var(--settings-row-gap)}
.settings-page .settings-section>.settings-cell:not(:last-child)::after{display:block;left:var(--settings-row-inset);right:0;bottom:1px;z-index:1;height:var(--settings-hairline);background:#3c3c4329;pointer-events:none}
.settings-page .settings-section>.settings-cell:has(>.setting-icon):not(:last-child)::after{left:calc(var(--settings-row-inset) + 29px + var(--settings-row-gap))}
@media(min-resolution:2dppx){.settings-page{--settings-hairline:.5px}}
@media(max-width:350px){.settings-page{--settings-row-inset:12px;--settings-row-gap:9px}}
.image-prompt-actions{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0 18px;clear:both}
.image-prompt-actions>button{flex:1 1 150px;min-height:44px;padding:11px 16px;border:0;border-radius:16px;background:#f2f2f7;color:#007aff;font:inherit;text-align:center}
.preset-panel>label{display:block}.preset-panel textarea{box-sizing:border-box;resize:vertical}
.temperature-control{display:flex;flex-direction:column;align-items:stretch;gap:12px}
.temperature-control>span,.temperature-control>small{display:flex;justify-content:space-between;width:100%}
.temperature-control input[type="range"]{width:100%;max-width:none;margin:0;padding:0;min-height:32px;accent-color:#007aff}
.temperature-control output{color:#007aff;font-variant-numeric:tabular-nums}
.temperature-control>small{font-size:12px;color:#8e8e93}.temperature-control>small>span{margin-left:auto}
.launcher{--launcher-icon-size:clamp(48px,15.5vw,64px)}
.launcher .dock-app-icon,.launcher .folder-icon{width:var(--launcher-icon-size);height:var(--launcher-icon-size);box-sizing:border-box;border-radius:calc(var(--launcher-icon-size)*.235)}
.launcher .dock .dock-app-icon{width:var(--launcher-icon-size);height:var(--launcher-icon-size)}
@media(max-height:700px){.launcher{--launcher-icon-size:clamp(40px,9vh,56px)}}

.books-reading-body.reading-horizontal{overflow:hidden;touch-action:pan-y;padding-top:16px;padding-bottom:16px;min-height:0;box-sizing:border-box}
.books-page-columns{height:100%;column-gap:0;column-fill:auto;white-space:pre-wrap;overflow-wrap:anywhere}
.books-page-columns>p{margin:0}

/* Sticker controls form one clipped, rounded group; artwork retains its aspect ratio. */
.sticker-manager .sticker-import-group{border-radius:20px;overflow:hidden;background:#fff;flex-shrink:0}
.sticker-import-group>.settings-cell{margin:0;border-radius:0;min-height:48px;padding:14px 16px}
.sticker-import-group>textarea{display:block;box-sizing:border-box;width:calc(100% - 24px);min-height:88px;margin:0 12px;padding:12px;border:0;border-radius:12px;background:#f2f2f7;font:inherit;resize:vertical}
.sticker-manager .sticker-grid{grid-template-columns:repeat(auto-fill,minmax(88px,1fr))}
.sticker-manager .sticker-grid img{display:block;width:64px;height:64px;max-width:100%;margin:0 auto 6px;object-fit:contain}
.im-sticker-image{width:104px;height:104px;max-width:104px;max-height:104px;object-fit:contain;display:block}

/* Keep dock slots equal to icon size so larger icons retain top/bottom breathing room. */
.launcher .dock{box-sizing:border-box;height:auto;min-height:calc(var(--launcher-icon-size) + 28px);padding:13px 8px;align-items:center}
.launcher .dock .launcher-item{height:var(--launcher-icon-size);min-height:var(--launcher-icon-size)}
.launcher:not(.editing) .launcher-toolbar{height:28px}
.launcher .launcher-grid{overflow:hidden}
.launcher:not(.editing) .launcher-grid .launcher-item,.launcher:not(.editing) .launcher-grid .launcher-tile{touch-action:pan-y}
.im-list-header h1 .im-heading-home{display:block;width:auto;height:auto;min-height:44px;padding:0;border:0;border-radius:0;background:transparent;color:inherit;font:inherit;letter-spacing:inherit;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.im-list-header h1 .im-heading-home:active{background:transparent;opacity:.65}

.books-page-window{height:100%;width:100%;overflow:hidden;position:relative;contain:paint}
.books-page-window>.books-page-columns{height:100%;column-gap:0;column-count:1;column-fill:auto;box-sizing:border-box;transform-origin:0 0}
.books-reading-body .books-page-columns>p{margin:0;padding:0;max-width:none}

.im-bubble .generation-status{display:block;font-size:11px;line-height:1.4;opacity:.65;margin-top:5px;white-space:normal}
.im-composer>.im-stop-generation{font-size:12px;color:#007aff;min-width:44px;white-space:nowrap}

.diagnostic-log{padding:16px;margin:12px 0;background:#fff;border-radius:18px;overflow-wrap:anywhere}.diagnostic-log small{color:#8e8e93}.diagnostic-log p{white-space:pre-wrap;font-size:14px}
