/* Interaction surfaces and built-in tools. No third-party assets or UI libraries. */
.wallpaper { background-image: url('os-assets/blue-flow-vivid.png'); }
.workspace-label, .local-status, .glass-button, .desktop-icon .icon-label { font-size: 13px; }
.store-nav button { font-size: 14px; }
.tool-copy p, .store-top p, .install-button, .feature-copy p { font-size: 12px; }
.tool-name { font-size: 14px; font-weight: 600; padding: 0; text-align: left; margin-bottom: 5px; }
.tool-name:hover { color: var(--accent); }
.tool-open { padding: 0; display: flex; border-radius: 12px; }
.store-storage-note { color: #91a0b4; display: flex; gap: 5px; align-items: center; font-size:12px; margin: 16px 0 0; }
.store-storage-note svg { width: 13px; height: 13px; }
.tool-grid > .empty-state { grid-column: 1 / -1; }
.add-art { width: 56px; height: 56px; border: 1px dashed #bad4ff5c; border-radius: 15px; display: grid; place-items: center; color: #d2e6ff9c; }
.add-tool-icon { opacity: .75; }
.add-tool-icon:hover { opacity: 1; }
.remove-dot { display: none; position: absolute; top: 2px; left: calc(50% - 37px); width: 23px; height: 23px; border-radius: 50%; background: #e6edf7ed; color: #506784; font-size: 22px; line-height: 20px; z-index: 2; box-shadow: 0 1px 4px #09224c30; }
.editing .remove-dot { display: block; }
.drag-source { opacity: .25; }
.drag-ghost { position: fixed; width: 104px !important; height: 112px !important; z-index: 5500; pointer-events: none; opacity: .95; transform: scale(1.08); background: none !important; }
.drag-ghost .app-art { animation: none !important; box-shadow: 0 18px 30px #03153860; }
.drag-ghost .remove-dot { display: none; }
.drop-target { background: #ffffff25; outline: 1px solid #d3eaff60; }
.merge-ready .app-art { outline: 5px solid #bcdfff75; transform: scale(1.12); }
.window-moving { user-select: none; }
.window-moving iframe { pointer-events: none; }
.window-content { container-type: inline-size; }
#overlay-root { position: fixed; inset: 0; z-index: 3000; pointer-events: none; }
#overlay-root > * { pointer-events: auto; }
.overlay-backdrop, .context-dismiss { position: absolute; inset: 0; background: #071a403d; backdrop-filter: blur(8px); }
.start-backdrop, .context-dismiss { background: transparent; backdrop-filter: none; }
.overlay-panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 520px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 100px); background: #f3f7fdf0; border: 1px solid #ffffffa0; border-radius: 20px; box-shadow: var(--shadow); backdrop-filter: blur(35px); overflow: auto; animation: panel-in .16s ease-out; }
@keyframes panel-in { from { opacity: 0; margin-top: 8px; } to { opacity: 1; margin-top: 0; } }
.folder-panel { padding: 28px; width: 470px; }
.folder-heading { display: flex; align-items: center; gap: 10px; }
.folder-heading input { font-size: 24px; font-weight: 600; background: transparent; border: 0; width: 100%; min-width: 0; padding: 5px 0; color: #294161; }
.folder-heading input:focus { outline: 0; border-bottom: 1px solid #75a8ef; }
.folder-heading > button, .modal-heading > button { flex-shrink: 0; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #dce6f47d; color: #6882a5; }
.folder-heading svg, .modal-heading > button svg { width: 18px; height: 18px; }
.folder-description { color: #8295b0; font-size: 12px; margin: 5px 0 25px; }
.folder-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 12px; }
.folder-item { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.folder-app { display: flex; align-items: center; flex-direction: column; gap: 10px; font-size: 13px; max-width: 100%; }
.folder-app > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ungroup-button { font-size:12px; color: #8193ab; border-radius: 4px; padding: 5px; }
.ungroup-button:hover { color: #3269d7; background: #dee9f7; }
.organize-panel { padding: 28px; }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.modal-heading h2 { margin: 0 0 10px; font-size: 22px; }
.modal-heading p { font-size: 13px; color: #8494aa; margin: 0; line-height: 1.7; }
.field-label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.field-label input, .custom-form input:not([type=radio]), .custom-form select { border: 1px solid #dce5f1; border-radius: 8px; padding: 11px 12px; width: 100%; background: #fff; color: #3b4f6c; outline-offset: 1px; font-size: 14px; }
.organize-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 22px 0; max-height: 290px; overflow: auto; }
.organize-list label { display: flex; align-items: center; gap: 9px; background: #ffffff91; border: 1px solid #e3eaf3; border-radius: 10px; padding: 11px; cursor: pointer; font-size: 13px; }
.organize-list input { accent-color: #397be7; width: 16px; height: 16px; }
.organize-list .app-art { width: 33px; height: 33px; border-radius: 9px; }
.organize-list .app-art > svg { width: 20px; height: 20px; }
.organize-list .folder-art { gap: 2px; padding: 4px; }
.organize-list .folder-art .app-art { width: 11px; height: 11px; border-radius: 3px; }
.organize-list .folder-art svg { width: 8px; height: 8px; }
.organize-list label > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.modal-footer > span { font-size: 12px; color: #8296b2; }
.context-menu { position: absolute; width: 215px; background: #f4f8fef5; padding: 6px; border: 1px solid #fff; border-radius: 10px; backdrop-filter: blur(30px); box-shadow: 0 12px 40px #06183740; }
.context-menu button { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; font-size: 13px; padding: 11px 9px; border-radius: 5px; }
.context-menu button:hover { background: #dee8f7; }
.context-menu svg { width: 16px; height: 16px; color: #6580a4; }
.tutorial-panel { width:460px; padding:34px; text-align:center; }
.tutorial-mark { width:58px; height:58px; border-radius:18px; margin:0 auto 18px; display:grid; place-items:center; color:white; background:linear-gradient(145deg,#65b9ff,#385fe1); box-shadow:0 10px 28px #3269ed42; }
.tutorial-mark svg { width:30px; height:30px; }
.tutorial-kicker { margin:0 0 8px!important; color:#4778d0!important; font-size:11px!important; font-weight:700; letter-spacing:1.4px; text-transform:uppercase; }
.tutorial-panel h2 { margin:0 0 12px; font-size:25px; letter-spacing:-.5px; }
.tutorial-panel>p:not(.tutorial-kicker) { color:#72839b; line-height:1.75; margin:0 auto; max-width:360px; }
.tutorial-actions { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:28px; }
.tutorial-actions button { min-height:42px; padding:0 18px; }
.tutorial-actions .primary-button { margin-left:auto; }
.tutorial-progress { display:flex; justify-content:center; gap:6px; margin:-10px 0 24px; }
.tutorial-progress i { width:24px; height:4px; border-radius:5px; background:#d9e2ef; }
.tutorial-progress i.active { background:#4779df; }
.tutorial-finish { color:#6f84a2; font-size:12px; margin-top:16px; padding:8px; }
html[data-ui=touch] .tutorial-panel { width:calc(100% - 28px); padding:28px 22px; }
.menu-divider { height: 1px; background: #dee6f0; margin: 4px; }
.start-panel { top: auto; bottom: calc(var(--taskbar-height) + 14px); transform: translateX(-50%); width: 570px; padding: 27px 28px 0; border-radius: 15px; }
.start-search { border: 1px solid #d8e3f1; border-bottom: 2px solid #4485e8; background: #fff; border-radius: 6px; display: flex; gap: 10px; align-items: center; padding: 11px 13px; }
.start-search > svg { width: 18px; height: 18px; color: #8196b3; }
.start-search input { background: none; border: 0; outline: 0; width: 100%; min-width: 0; font-size: 14px; }
.start-search kbd { font-size:12px; color: #a4afc0; border: 1px solid #e1e7ef; border-radius: 4px; padding: 2px 4px; }
.start-heading { display: flex; align-items: center; justify-content: space-between; margin: 26px 2px 20px; font-size: 14px; }
.start-heading button { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #7590b1; }
.start-heading svg { width: 15px; height: 15px; }
.start-apps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px 8px; padding: 0 0 28px; max-height: 380px; overflow: auto; }
.start-app { display: flex; align-items: center; flex-direction: column; gap: 9px; padding: 10px 5px; border-radius: 10px; font-size: 12px; min-width: 0; }
.start-app:hover { background: #fff9; }
.start-app .app-art { width: 43px; height: 43px; border-radius: 12px; }
.start-app .app-art svg { width: 26px; height: 26px; }
.start-app > span:last-child { max-width: 100%; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.start-apps > .empty-state { grid-column: 1 / -1; }
.start-footer { display: flex; align-items: center; justify-content: space-between; margin: 0 -28px; padding: 17px 29px; background: #dee7f394; font-size: 12px; color: #647d9f; }
.start-footer svg { width: 16px; height: 16px; }
.start-footer button { display: flex; gap: 6px; align-items: center; font-size: 12px; }
.custom-form { background: #f6f8fc; border: 1px solid #e6ecf4; border-radius: 11px; padding: 22px; }
.custom-form [hidden]{display:none!important}.custom-form [data-custom-icon-builtins]>label,.custom-icon-upload{display:flex;flex-direction:column;gap:8px;margin-bottom:17px;font-size:13px;color:#667c9c}.custom-icon-upload small{color:#8797ad}.custom-icon-upload .app-art{margin-top:4px}
.custom-form > label, .form-columns > label { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: #667c9c; margin-bottom: 17px; }
.form-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 21px; }
.form-label-row h2 { font-size: 15px; color: #344967; margin: 0; }
.form-label-row > span { font-size:12px; color: #91a1b7; }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.color-picker { display: flex; border: 0; padding: 0; gap: 10px; margin: 0; }
.color-picker legend { font-size: 13px; color: #667c9c; padding: 0 0 9px; }
.color-option { width: 29px; height: 29px; border-radius: 50%; position: relative; display: grid; place-items: center; color: white; }
.color-option input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.color-option > span { display: none; height: 18px; pointer-events: none; }
.color-option svg { width: 18px; height: 18px; }
.color-option:has(input:checked) { outline: 2px solid #96afd2; outline-offset: 3px; }
.color-option input:checked + span { display: block; }
.color-option:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.form-help { font-size: 12px; color: #8a9ab0; line-height: 1.8; margin-top: 18px; }
.form-error { font-size: 13px; color: #bf4955; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.custom-list { display: flex; flex-direction: column; gap: 9px; }
.custom-row { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); padding: 13px; border-radius: 10px; }
.custom-row > .app-art { width: 36px; height: 36px; border-radius: 10px; }
.custom-row > .app-art svg { width: 22px; height: 22px; }
.custom-row > div { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.custom-row strong { font-size: 13px; font-weight: 500; }
.custom-row > div > span { color: #8b9ab0; font-size:12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custom-row > button { padding: 6px; color: #8a9bb3; }
.custom-row > button:hover { color: var(--accent); }
.custom-row > button > svg { width: 16px; height: 16px; }
.web-tool { position:relative; height: 100%; display: flex; flex-direction: column; }
.web-tool-bar { display: flex; align-items: center; gap: 8px; background: #f6f8fb; border-bottom: 1px solid var(--line); font-size: 12px; padding: 11px 16px; color: #8696ad; }
.web-tool-bar > span { margin-right: auto; }
.web-tool-bar svg { width: 15px; height: 15px; }
.web-tool-bar a { text-decoration: none; display: flex; align-items: center; gap: 6px; color: #497dc7; }
.web-tool iframe { flex: 1; width: 100%; border: 0; background: white; }

/* Notes */
.notes-shell { height: 100%; display: grid; grid-template-columns: 210px 1fr; }
.notes-sidebar { background: #faf8f0; padding: 22px 12px 14px; display: flex; flex-direction: column; border-right: 1px solid #ebe7d8; min-height: 0; }
.notes-heading { display: flex; align-items: center; justify-content: space-between; font-size: 14px; margin: 0 8px 18px; }
.notes-heading button { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 6px; background: #eee7cd; color: #948259; }
.notes-heading button svg { width: 18px; height: 18px; }
.notes-list { flex: 1; overflow: auto; }
.note-list-item { display: flex; flex-direction: column; gap: 7px; text-align: left; padding: 15px 13px; border-radius: 9px; margin-bottom: 6px; width: 100%; min-width: 0; }
.note-list-item.selected { background: #f2e8bb; }
.note-list-item strong { font-size: 13px; font-weight: 550; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: 100%; color: #5a523e; }
.note-list-item span { font-size: 12px; color: #a2987b; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: 100%; }
.note-list-item time { font-size:12px; color: #a59873; margin-top: 2px; }
.notes-local { display: flex; align-items: center; justify-content: center; gap: 5px; padding-top: 20px; font-size:12px; color: #a89d7e; }
.notes-local svg { width: 12px; height: 12px; }
.notes-editor { min-width: 0; display: flex; flex-direction: column; background: #fffef9; }
.notes-toolbar { padding: 14px 22px; display: flex; align-items: center; justify-content: space-between; }
.notes-toolbar > span { display: flex; align-items: center; gap: 5px; font-size:12px; color: #a9a58f; }
.notes-toolbar > span svg { width: 12px; height: 12px; }
.notes-toolbar > div { display: flex; gap: 5px; }
.notes-toolbar button { color: #aa9b77; padding: 6px; }
.notes-toolbar button:hover { background: #f4efd9; border-radius: 5px; }
.notes-toolbar button svg { width: 17px; height: 17px; }
.note-textarea { flex: 1; width: 100%; border: 0; resize: none; background: none; outline: 0 !important; padding: 16px 32px; font-size: 17px; line-height: 1.95; color: #655d47; min-height: 200px; }
.note-textarea::placeholder { color: #bbb39d; }
.note-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size:12px; color: #b1a98f; padding: 17px 26px; }

/* Calculator */
.calculator-shell { padding: 20px 16px 13px; height: 100%; display: flex; flex-direction: column; background: #f3f6fb; }
.calculator-heading { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: #7d8da5; margin: 0 7px; }
.calculator-heading svg { width: 18px; height: 18px; opacity: .6; }
.calc-expression { text-align: right; color: #9aa6b8; font-size: 13px; height: 22px; margin: 22px 8px 2px; }
.calc-display { display: block; text-align: right; padding: 0 5px 18px; font-size: 43px; font-weight: 400; letter-spacing: -1.5px; overflow: hidden; font-variant-numeric: tabular-nums; }
.calc-display.small-result { font-size: 27px; letter-spacing: -1px; }
.calculator-keys { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(5, minmax(42px, 1fr)); gap: 6px; flex: 1; }
.calc-key { background: white; border: 1px solid #e4eaf3; border-radius: 8px; font-size: 21px; box-shadow: 0 2px 2px #18325d04; }
.calc-key:hover { background: #e4edfd; }
.calc-key:active { transform: scale(.96); }
.calc-key.operator { color: #3472dd; background: #e9f0fc; font-size: 23px; }
.calc-key.function { color: #7687a1; background: #eef2f8; font-size: 17px; }
.calc-key.equals { color: white; background: #3979e9; }
.calc-hint { font-size:12px; color: #a4b0c3; text-align: center; padding-top: 13px; }

/* Focus timer */
.focus-shell { background: #fffaf6; padding: 33px 28px 24px; height: 100%; min-height: 510px; text-align: center; color: #795c54; }
.focus-eyebrow { font-size:12px; letter-spacing: 3px; color: #bd9c91; }
.focus-shell h1 { font-size: 20px; font-weight: 500; letter-spacing: 1px; margin: 15px 0 23px; }
.focus-tabs { display: inline-flex; gap: 3px; background: #f5eae4; border-radius: 9px; padding: 4px; }
.focus-tabs button { padding: 9px 18px; border-radius: 6px; font-size: 12px; color: #ae8a7c; }
.focus-tabs button.selected { background: #fffaf7; color: #c16f59; box-shadow: 0 2px 6px #81513e0a; }
.timer-ring { width: 236px; height: 236px; margin: 25px auto 21px; position: relative; display: grid; place-items: center; }
.timer-ring > svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke-width: 4; transform: rotate(-90deg); }
.ring-track { stroke: #f0dfd6; }
.ring-progress { stroke: #db9d87; stroke-linecap: round; transition: stroke-dasharray .5s linear; }
.timer-value { display: block; font-size: 57px; font-weight: 350; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.timer-status { display: block; margin-top: 8px; color: #b29b91; font-size: 12px; }
.timer-actions { display: flex; justify-content: center; gap: 10px; }
.timer-start { background: #cb8a73; min-width: 140px; }
.timer-start:hover { background: #b77660; }
.timer-reset { background: #f3e6de; color: #b18b7b; padding: 10px 13px; }
.timer-reset:hover { background: #ebd8cc; }
.focus-footer { color: #bcaa9d; font-size:12px; margin-top: 26px; }

/* Calendar */
.calendar-shell { display: grid; grid-template-columns: 220px 1fr; height: 100%; min-height: 370px; }
.calendar-today { background: #edf6f3; padding: 38px 33px; color: #487d71; }
.calendar-today > span { font-size: 14px; }
.calendar-today > strong { font-size: 92px; line-height: 1.2; font-weight: 250; display: block; letter-spacing: -6px; margin: 16px 0 7px; }
.calendar-today > p { font-size: 14px; margin: 0; color: #8caca3; }
.calendar-quote { border-top: 1px solid #d8e8e2; margin-top: 32px; padding-top: 22px; color: #8eaaa1; font-size: 13px; line-height: 1.9; letter-spacing: 1px; }
.calendar-main { padding: 29px 26px 18px; }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 25px; }
.calendar-toolbar h2 { font-size: 17px; font-weight: 600; margin: 0; }
.calendar-toolbar > div { display: flex; align-items: center; gap: 7px; }
.calendar-toolbar button { padding: 5px; font-size: 12px; color: #8195a9; display: grid; place-items: center; border-radius: 5px; }
.calendar-toolbar button:hover { background: #e8f0f5; }
.calendar-toolbar svg { width: 16px; height: 16px; }
.calendar-toolbar [data-cal=next] svg { transform: rotate(180deg); }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; text-align: center; }
.calendar-weekdays { font-size:12px; color: #9aa8b8; margin-bottom: 13px; }
.calendar-day { min-height: 35px; border-radius: 50%; font-size: 13px; aspect-ratio: 1.15; border: 1px solid transparent; }
.calendar-day:hover { background: #e7f2ed; }
.calendar-day.outside { color: #c5cdd7; }
.calendar-day.today { color: #349a7e; font-weight: 700; }
.calendar-day.selected { background: #58ab94; color: white; box-shadow: 0 3px 8px #58ab9426; }
.calendar-foot { font-size:12px; color: #a0b1bb; display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 18px; }
.calendar-foot svg { width: 13px; height: 13px; }

/* Personalization */
.settings-shell { padding: 28px 35px; background: #fcfdff; }
.settings-heading { display: flex; align-items: center; gap: 17px; padding-bottom: 26px; }
.settings-logo { font-size: 40px; font-weight: 700; color: #4e8ce7; background: #e7f0fd; border-radius: 17px; width: 65px; height: 65px; display: flex; justify-content: center; position: relative; padding-top: 1px; }
.settings-logo span { position: absolute; top: -10px; right: 13px; color: #90bcec; font-size: 29px; }
.settings-heading h1 { font-size: 21px; margin: 0; font-weight: 600; }
.settings-heading p { font-size: 12px; color: #97a4b8; margin: 9px 0 0; }
.settings-section { margin-bottom: 25px; }
.settings-section h2 { font-size: 14px; font-weight: 600; margin: 0 0 14px; }
.settings-default-apps { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px; }
.settings-default-apps label { display:grid;gap:6px;color:#7d90a7;font-size:12px; }
.settings-default-apps select { height:36px;border:1px solid #dfe7f0;border-radius:9px;background:#fff;color:#4d637d;padding:0 10px;min-width:0; }
[data-theme="night"] .settings-default-apps select { background:#30343a;color:#edf3fb;border-color:#4b5159; }
.theme-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.theme-option { padding: 5px; border: 2px solid transparent; border-radius: 11px; text-align: left; }
.theme-option.selected { border-color: #76a4ed; background: #f3f7ff; }
.theme-preview { display: block; height: 88px; background: url('os-assets/blue-flow-vivid.png') center / cover; border-radius: 6px; }
.theme-option > span:last-child { font-size: 12px; padding: 9px 3px 3px; display: flex; justify-content: space-between; align-items: center; color: #8093ad; }
.theme-option.selected > span:last-child { color: #4d7cc1; }
.theme-option svg { width: 13px; height: 13px; }
.mode-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mode-option { display: flex; flex-direction: column; text-align: left; gap: 7px; padding: 15px 13px; border: 1px solid #e4eaf4; border-radius: 9px; }
.mode-option strong { font-size: 13px; font-weight: 500; color: #70849e; }
.mode-option span { font-size:12px; color: #99a8bb; }
.mode-option.selected { background: #f0f6ff; border-color: #7eacf0; }
.mode-option.selected strong { color: #487fcf; }
.setting-help { font-size:12px; color: #9aa9bc; margin: 11px 0 0; }
.storage-info { display: flex; gap: 13px; padding: 17px; border: 1px solid #e5edf5; border-radius: 9px; background: #f6f9fc; margin-bottom: 18px; }
.storage-info > svg { color: #8ca4c3; width: 22px; height: 22px; margin-top: 1px; flex-shrink: 0; }
.storage-info h2 { margin: 0 0 7px; font-size: 13px; }
.storage-info p { font-size: 12px; color: #8d9db3; margin: 0; line-height: 1.8; }
.settings-tips { display: flex; flex-direction: column; gap: 9px; }
.settings-tips > span { display: flex; align-items: center; gap: 7px; font-size:12px; color: #9cabc0; line-height: 1.5; }
.settings-tips svg { width: 13px; height: 13px; flex-shrink: 0; }

/* Small, resized desktop windows keep all controls reachable. */
@container (max-width: 640px) {
  .store-shell { display: flex; flex-direction: column; height: auto; }
  .store-sidebar { padding: 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-heading, .sidebar-footer { display: none; }
  .store-nav { flex-direction: row; gap: 3px; }
  .store-nav button { flex: 1; justify-content: center; padding: 10px 5px; font-size: 12px; gap: 6px; }
  .store-nav button svg { width: 15px; height: 15px; }
  .store-main { padding: 22px 20px; overflow: visible; }
  .store-feature { flex-wrap: wrap; gap: 13px; padding: 20px; }
  .feature-link { margin-left: auto; }
  .feature-copy { min-width: 150px; }
  .store-top { flex-wrap: wrap; }
  .search-field { max-width: none; flex: 1; min-width: 140px; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 93px; padding: 17px; }
  .tool-copy p { font-size: 12px; }
  .install-button { padding: 9px 10px; }
  .custom-strip { align-items: flex-start; flex-direction: column; gap: 12px; padding: 17px; }
  .notes-shell { grid-template-columns: 137px 1fr; }
  .notes-sidebar { padding: 18px 8px; }
  .notes-heading { margin: 0 3px 15px; font-size: 12px; }
  .note-list-item { padding: 12px 8px; }
  .notes-local { font-size:12px; gap: 3px; }
  .notes-local svg { display: none; }
  .notes-toolbar { padding: 11px; flex-wrap: wrap; }
  .note-textarea { padding: 15px; font-size: 16px; }
  .note-bottom { padding: 12px; }
  .note-bottom > span:last-child { display: none; }
  .calendar-shell { grid-template-columns: 1fr; height: auto; }
  .calendar-today { padding: 22px 28px; display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .calendar-today > strong { grid-column: 2; grid-row: 1 / 3; margin: 0; font-size: 62px; letter-spacing: -3px; }
  .calendar-today > p { grid-column: 1; grid-row: 2; margin-top: 10px; }
  .calendar-quote { display: none; }
  .calendar-main { padding: 28px 25px; }
  .calendar-day { max-height: 50px; }
  .settings-shell { padding: 26px 22px; }
  .settings-heading h1 { font-size: 20px; }
  .theme-options { gap: 7px; }
  .theme-preview { height: 68px; }
  .mode-options { gap: 6px; }
  .mode-option { padding: 14px 8px; }
  .mode-option span { font-size:12px; }
}

/* iOS-inspired main screen on phones and tablets. Desktop positions stay saved. */
html[data-ui=touch] .wallpaper { background-position: 60% center; }
html[data-ui=touch] .wallpaper:after { background: none; }
html[data-ui=touch] .desktop-header { position: absolute; top: calc(45px + env(safe-area-inset-top)); right: 20px; height: 38px; padding: 0; z-index: 3; }
html[data-ui=touch] .os-brand, html[data-ui=touch] .local-status { display: none; }
html[data-ui=touch] .glass-button { border: 0; background: #ffffff15; padding: 7px 11px; border-radius: 20px; }
html[data-ui=touch] .glass-button svg { display: none; }
html[data-ui=touch] .mobile-status { display:none; }
html[data-ui=touch] .mobile-status time { font-size: 14px; font-weight: 650; }
html[data-ui=touch] .mobile-status > div { display: flex; gap: 7px; align-items: center; }
html[data-ui=touch] .mobile-status svg { width: 17px; height: 17px; }
html[data-ui=touch] .mobile-status [data-icon=battery] svg { width: 23px; }
html[data-ui=touch] #desktop { inset: calc(45px + env(safe-area-inset-top)) 20px calc(112px + env(safe-area-inset-bottom)); overflow:hidden;display:flex;flex-direction:column;scrollbar-width:none; }
html[data-ui=touch] .clock-widget { position: relative; top: auto; right: auto; text-align: left; padding: 33px 9px 32px; }
html[data-ui=touch] .clock-widget p { font-size: 14px; letter-spacing: .6px; margin-bottom: 6px; }
html[data-ui=touch] .clock-widget > time { font-size: 73px; line-height: 1.08; letter-spacing: -3px; font-weight: 300; }
html[data-ui=touch] .clock-widget > span { display: none; }
html[data-ui=touch] .desktop-grid { display:flex;flex:1 1 auto;min-height:198px;height:auto;width:100%;overflow-x:auto;overflow-y:hidden;padding-top:4px;gap:0;scroll-snap-type:x mandatory;scroll-behavior:smooth;overscroll-behavior-x:contain;touch-action:pan-x; }
html[data-ui=touch] .desktop-grid::-webkit-scrollbar{display:none;width:0;height:0}
html[data-ui=touch] .desktop-page{display:grid;grid-template-columns:repeat(var(--mobile-columns,4),minmax(0,1fr));grid-template-rows:repeat(var(--mobile-page-rows,4),minmax(0,1fr));grid-auto-flow:row;min-width:100%;width:100%;height:100%;scroll-snap-align:start;scroll-snap-stop:always;align-content:start}
html[data-ui=touch] .desktop-page-dots{display:flex;align-items:center;justify-content:center;gap:7px;height:18px;flex:0 0 18px}
html[data-ui=touch] .desktop-page-dots[hidden]{display:none}
html[data-ui=touch] .desktop-page-dots button{width:6px;height:6px;padding:0;border:0;border-radius:999px;background:#eaf3ff66;transition:width .15s,background .15s}
html[data-ui=touch] .desktop-page-dots button.active{width:18px;background:#fff}
html[data-ui=touch] .desktop-icon { grid-column: auto !important; grid-row: auto !important; width: 100%; height: 108px; padding: 6px 0; gap: 9px; touch-action: pan-x; background: none; }
html[data-ui=touch] .desktop-icon > .app-art, html[data-ui=touch] .add-art { width: 60px; height: 60px; border-radius: 17px; }
html[data-ui=touch] .desktop-icon > .app-art > svg { width: 33px; height: 33px; }
html[data-ui=touch] .desktop-icon .icon-label { font-size: 12px; }
html[data-ui=touch] .folder-art { gap: 6px; padding: 9px; }
html[data-ui=touch] .folder-art .app-art { width: 18px; height: 18px; border-radius: 5px; }
html[data-ui=touch] .folder-art .app-art svg { width: 12px; height: 12px; }
html[data-ui=touch] .desktop-caption { display: none; }
html[data-ui=touch] .mobile-search { display:flex;flex:0 0 auto;align-items:center;justify-content:center;gap:5px;margin:6px auto 5px;padding:8px 13px;background:#bfd9ff26;color:#e8f2ff;border:1px solid #ffffff0b;border-radius:20px;font-size:12px; }
html[data-ui=touch] .mobile-search svg { width: 13px; height: 13px; }
html[data-ui=touch] .taskbar { height: 64px; left: 18px; right: 18px; width: calc(100% - 36px); max-width: 470px; margin: auto; bottom: calc(24px + env(safe-area-inset-bottom)); border-radius: 21px; background: #e2edff40; border: 1px solid #ffffff22; backdrop-filter: blur(30px); box-shadow: 0 8px 30px #02103920; }
html[data-ui=touch] .taskbar-home, html[data-ui=touch] .system-tray, html[data-ui=touch] .start-button, html[data-ui=touch] .search-dock, html[data-ui=touch] .dock-divider { display: none; }
html[data-ui=touch] .dock { width: 100%; justify-content: space-around; padding: 6px 9px; gap: 7px; overflow-x: auto; scrollbar-width: none; }
html[data-ui=touch] .dock-button { width: 54px; height: 50px; flex-shrink: 0; background: none; }
html[data-ui=touch] .dock-button .app-art { width: 44px; height: 44px; border-radius: 13px; }
html[data-ui=touch] .dock-button .app-art svg { width: 26px; height: 26px; }
html[data-ui=touch] .dock-button:after { display: none; }
html[data-ui=touch] .home-indicator { display: flex; position: fixed; bottom: max(3px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: 155px; height: 20px; align-items: center; justify-content: center; z-index: 2200; }
html[data-ui=touch] .home-indicator > span { display: block; width: 122px; height: 4px; border-radius: 5px; background: #eef5ff; }
html[data-ui=touch] .window, html[data-ui=touch] .window.maximized { left: 0 !important; top: env(safe-area-inset-top) !important; width: 100% !important; height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important; max-height: none; max-width: none; min-width: 0; min-height: 0; border: 0; border-radius: 0; box-shadow: none; background: var(--touch-surface,#fcfdff); color:var(--touch-ink,#20304b); animation: touch-window-in .2s ease-out; }
@keyframes touch-window-in { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
html[data-ui=touch] .window:not(.focused) { display: none; }
html[data-ui=touch] .window-titlebar { height: 50px; background: var(--touch-chrome,#f7f9fd); color:var(--touch-ink,#20304b); border-bottom: 1px solid var(--touch-border,#edf0f6); justify-content: center; }
html[data-ui=touch] .window-title { font-size: 15px; gap: 7px; }
html[data-ui=touch] .window-title .app-art { display: none; }
html[data-ui=touch] .window-controls { display: flex; }
html[data-ui=touch] .window-controls [data-window-action=maximize]{display:none}
html[data-ui=touch] .window-controls [data-window-action=minimize]{display:grid;place-items:center;width:38px;min-width:38px;height:100%;color:var(--touch-ink,#20304b)}
html[data-ui=touch] .window-controls [data-window-action=close]{display:grid;place-items:center;width:42px;min-width:42px;height:100%;color:var(--touch-ink,#20304b)}
html[data-ui=touch] .mobile-back { position: absolute; left: 10px; top: 5px; display: grid; place-items: center; width: 40px; height: 40px; color: #5183cb; }
html[data-ui=touch] .resize-handle { display: none; }
html[data-ui=touch] .app-open .wallpaper:after { background: #f7f9fd; }
html[data-ui=touch] .app-open .mobile-status { color: #263a57; }
html[data-ui=touch] .app-open .home-indicator > span { background: #8c9bad; }
html[data-ui=touch] .app-open .taskbar, html[data-ui=touch] .app-open .desktop-header { display: none; }
html[data-ui=touch] .app-open .home-indicator{display:none}
html[data-ui=touch] body.app-open{background:var(--touch-surface,#fcfdff);color:var(--touch-ink,#20304b)}
html[data-ui=touch] .edit-tip { position: fixed; left: 50%; bottom: calc(104px + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); width: 340px; justify-content: space-between; gap: 10px; font-size: 12px; }
html[data-ui=touch] .edit-tip > span { display: none; }
html[data-ui=touch] .editing .desktop-icon { touch-action: none; }
html[data-ui=touch] .remove-dot { top: -1px; }
html[data-ui=touch] .start-panel { bottom: calc(101px + env(safe-area-inset-bottom)); width: calc(100% - 30px); padding: 24px 20px 0; }
html[data-ui=touch] .start-footer { margin: 0 -20px; padding: 18px 22px; }
html[data-ui=touch] .toast { bottom: calc(106px + env(safe-area-inset-bottom)); width: max-content; }
html[data-ui=touch] .calculator-shell { max-width: 480px; margin: auto; padding: 28px 20px 18px; min-height: 445px; }
html[data-ui=touch] .calc-expression { margin-top: 20px; }
html[data-ui=touch] .calc-display { font-size: 56px; padding-bottom: 22px; }
html[data-ui=touch] .calc-display.small-result { font-size: 30px; }
html[data-ui=touch] .calculator-keys { gap: 9px; }
html[data-ui=touch] .focus-shell { padding-top: 38px; }
html[data-ui=touch] .focus-shell h1 { font-size: 20px; }
html[data-ui=touch] .settings-shell { max-width: 740px; margin: auto; }
.settings-action-row{display:flex;gap:10px;flex-wrap:wrap}.settings-action-row button{display:inline-flex;align-items:center;justify-content:center;gap:7px}.settings-action-row svg{width:16px;height:16px}.settings-reset-card{display:flex;align-items:center;justify-content:space-between;gap:18px;border:1px solid #dfe7f0;border-radius:12px;padding:14px;background:#f7faff}.settings-reset-card strong{font-size:13px}.settings-reset-card p{margin:5px 0 0;color:#8191a7;font-size:12px;line-height:1.5}.settings-reset-card button{flex:0 0 auto}[data-theme=night] .settings-reset-card{background:#292e35;border-color:#444b55}
html[data-ui=touch] .calendar-shell { max-width: 760px; margin: auto; }
@media (min-width: 700px) {
  html[data-ui=touch] #desktop { left: max(40px, calc((100vw - 820px) / 2)); right: max(40px, calc((100vw - 820px) / 2)); }
  html[data-ui=touch] .clock-widget { padding: 60px 15px 55px; }
  html[data-ui=touch] .clock-widget > time { font-size: 91px; }
  html[data-ui=touch] .desktop-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px 0; }
  html[data-ui=touch] .desktop-icon { height: 123px; }
  html[data-ui=touch] .desktop-icon > .app-art, html[data-ui=touch] .add-art { width: 67px; height: 67px; border-radius: 19px; }
  html[data-ui=touch] .desktop-icon > .folder-art { padding: 10px; gap: 7px; }
  html[data-ui=touch] .folder-art .app-art { width: 20px; height: 20px; }
  html[data-ui=touch] .desktop-icon .icon-label { font-size: 13px; }
  html[data-ui=touch] .mobile-search { margin-top: 35px; }
}
@media (max-width: 370px) {
  html[data-ui=touch] #desktop { left: 12px; right: 12px; }
  html[data-ui=touch] .desktop-icon > .app-art, html[data-ui=touch] .add-art { width: 54px; height: 54px; border-radius: 15px; }
  html[data-ui=touch] .desktop-icon { height: 99px; }
  html[data-ui=touch] .desktop-icon > .folder-art { padding: 7px; gap: 4px; }
  .organize-panel { padding: 20px; }
  .organize-list { gap: 7px; }
  .organize-list label { padding: 9px 6px; gap: 6px; }
  .form-columns { grid-template-columns: 1fr; gap: 0; }
  .theme-preview { height: 53px; }
  .mode-options { grid-template-columns: 1fr; }
  .settings-default-apps { grid-template-columns:1fr; }
  .mode-option { flex-direction: row; align-items: center; justify-content: space-between; }
}
@media (max-height: 660px) {
  html[data-ui=touch] .clock-widget { padding-top: 22px; padding-bottom: 25px; }
  html[data-ui=touch] .clock-widget > time { font-size: 61px; }
  html[data-ui=touch] .desktop-grid { gap: 0; }
  .clock-widget > time { font-size: 52px; }
  .desktop-caption { display: none; }
}
/* Touch applications occupy the device viewport and use their own close button. */
html[data-ui=touch] body:has(.window.maximized) .window.maximized{top:env(safe-area-inset-top)!important;height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;background:var(--touch-surface,#f7f9fd);min-height:0}
html[data-ui=touch] body.app-open .taskbar,html[data-ui=touch] body:has(.window.maximized) .taskbar{display:none!important}
