/* utono — mobile-first skin layered over stable v1.1.3 styles */
:root{--lime:#deef75;--lilac:#a795ff;--rose:#f8c9ef;--mint:#a4edcb;--accent:#a795ff;--accent-soft:rgba(167,149,255,.14)}
html,body,#app{width:100%;max-width:100%;overscroll-behavior-x:none;overflow-x:hidden;-webkit-text-size-adjust:100%}
body{overscroll-behavior-x:none}
button,input,textarea,select{max-width:100%}
.page,.editor-page,.workspace,.main-content{min-width:0;max-width:100%}
.theme-dark{--bg:#141416;--sidebar:#1b1b1d;--surface:#242426;--surface-hover:#333336;--line:#333338;--muted:#a7a5ad}
.theme-light{--bg:#f9f9f9;--sidebar:#fff;--surface:#fff;--surface-hover:#f2f2f5;--line:#ededf0;--text:#202024}
.app-logo{background:#a795ff;color:#19171e;box-shadow:0 10px 30px rgba(167,149,255,.22);border-radius:13px;font-size:18px}
.logo-text span{letter-spacing:0;font-weight:500;text-transform:lowercase}
.primary-new{border-radius:13px;min-height:45px}
.notes-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,234px),1fr))}
.note-card{border-radius:18px}
.card-menu,.note-card .card-star{opacity:1}
.mobile-bottom-nav{display:none}
.welcome-label,.remember-kicker{font-weight:750;letter-spacing:.14em;font-size:10px;color:var(--accent)}
.home-page{max-width:1080px}
.home-heading{font-size:clamp(31px,5vw,55px);margin:15px 0 10px;max-width:720px;line-height:1.08;letter-spacing:-.05em}
.home-heading span{color:var(--lilac)}
.home-tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:32px 0}
.home-tile{position:relative;border:0;border-radius:24px;padding:23px;min-height:172px;display:flex;flex-direction:column;text-align:left;color:#18191a;overflow:hidden}
.home-tile.lavender{background:linear-gradient(135deg,#d6a9fa,#a795ff)}.home-tile.lime{background:linear-gradient(145deg,#f1ffad,#d5eb72)}
.home-tile>span{position:absolute;top:17px;right:17px;border-radius:50%;background:rgba(20,20,20,.14);padding:9px;display:grid;place-items:center}
.home-tile strong{font-size:24px;letter-spacing:-.05em;margin-top:auto}.home-tile small{font-size:12px;margin-top:5px;color:#2e2a38}
.home-section-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:31px 0 14px}
.home-section-heading h2{margin:0;font-size:18px;letter-spacing:-.04em}.home-section-heading button{background:none;border:0;color:var(--muted);display:flex;gap:6px;align-items:center;font-size:12px}
.home-note-list,.task-stack{display:grid;gap:9px}
.home-note,.task-tile{width:100%;min-width:0;display:flex;align-items:center;gap:13px;text-align:left;padding:15px 16px;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--text)}
.home-note>.ico:last-child,.task-tile>.ico:last-child{color:var(--muted);flex:none}.home-note-copy{min-width:0;flex:1;display:grid;gap:5px}.home-note-copy strong{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.home-note-copy small,.task-open small{color:var(--muted);font-size:11px}
.mini-doc-icon{width:42px;height:42px;border-radius:13px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;flex:none}
.task-tile{gap:12px}.task-checkbox{width:28px;height:28px;flex:none;border-radius:50%;border:1.5px solid var(--muted);background:transparent;color:var(--text);display:grid;place-items:center}.task-checkbox.complete{background:var(--lime);border-color:var(--lime);color:#181a16}
.task-open{flex:1;min-width:0;text-align:left;display:grid;gap:6px;background:none;color:var(--text);border:0;padding:0}.task-open strong{font-size:13px;overflow-wrap:anywhere}.task-open .struck{text-decoration:line-through;color:var(--muted)}
.quiet-empty{padding:20px;color:var(--muted);font-size:13px;border:1px dashed var(--line);border-radius:17px;margin:0}
.remember-tile{background:linear-gradient(130deg,rgba(166,149,255,.15),var(--surface) 75%);border:1px solid var(--line);border-radius:23px;padding:23px;margin:18px 0;display:flex;flex-direction:column;gap:8px;text-align:left;color:var(--text);width:100%}
.remember-tile h3{font-size:19px;margin:0}.remember-tile p{color:var(--muted);margin:0;font-size:12px}.remember-tile button{align-self:flex-start;background:var(--accent);color:#16151b;border:0;border-radius:12px;padding:10px 13px;font-weight:750}.remember-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr));gap:14px;margin-top:30px}
.capture-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:100;display:flex;align-items:flex-end;justify-content:center;padding:16px}
.capture-sheet{width:min(560px,100%);border:1px solid var(--line);border-radius:28px;background:var(--surface);padding:18px 21px 25px;box-shadow:0 25px 75px rgba(0,0,0,.3);max-height:min(85dvh,720px);overflow-y:auto}
.capture-handle{width:41px;height:5px;border-radius:10px;background:var(--muted);opacity:.35;margin:0 auto 22px}
.capture-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.capture-heading small{letter-spacing:.13em;color:var(--muted);font-size:10px;font-weight:800}.capture-heading h2{font-size:23px;letter-spacing:-.04em;margin:7px 0 20px}
.capture-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.capture-options>button{min-width:0;min-height:136px;text-align:left;display:flex;flex-direction:column;align-items:flex-start;gap:7px;background:var(--bg);border:1px solid var(--line);border-radius:18px;color:var(--text);padding:17px}.capture-options>button>.ico{color:var(--accent);margin-bottom:auto}.capture-options>button strong{font-size:14px}.capture-options>button small{font-size:11px;color:var(--muted)}
.format-toolbar{display:flex;align-items:center;gap:5px;max-width:100%;overflow-x:auto;overflow-y:hidden;padding:8px;border:1px solid var(--line);border-radius:13px;background:var(--surface);margin-top:22px;scrollbar-width:none}.format-toolbar::-webkit-scrollbar{display:none}
.format-action{height:37px;min-width:39px;flex:none;padding:0 10px;color:var(--text);border:0;border-radius:9px;background:transparent;display:flex;align-items:center;justify-content:center;gap:7px;font-size:13px}.format-action:hover{background:var(--surface-hover)}.format-spacer{flex:1}
.formatted-preview{min-height:260px;line-height:1.8;font-size:15px;overflow-wrap:anywhere;padding:12px 0 25px}.formatted-preview[hidden],.editor-body[hidden]{display:none!important}.formatted-preview p{margin:0 0 5px}.md-heading{font-weight:800;letter-spacing:-.035em;line-height:1.3;margin:10px 0!important}.md-h1{font-size:26px}.md-h2{font-size:21px}.md-h3{font-size:17px}.md-check{color:var(--accent);font-weight:800}.md-check.checked{color:var(--success)}.formatted-preview code{background:var(--surface);padding:2px 5px;border-radius:5px}
.task-editor-options{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:19px}.task-editor-options label{color:var(--muted);display:flex;align-items:center;gap:8px;font-size:12px}.task-editor-options input{border:1px solid var(--line);background:var(--surface);color:var(--text);padding:8px;border-radius:9px;min-width:0}
.media-strip{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,180px),1fr));gap:11px;margin-top:18px}.media-strip:empty{display:none}.media-card{border:1px solid var(--line);border-radius:16px;overflow:hidden;background:var(--surface)}.media-display{height:145px;display:flex;align-items:center;justify-content:center;gap:8px;color:var(--muted);flex-direction:column;font-size:11px}.media-display img{height:100%;width:100%;object-fit:cover}.media-display audio{max-width:100%;width:100%;padding:5px}.media-meta{display:flex;align-items:center;gap:7px;padding:10px}.media-meta span{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;color:var(--muted)}.media-meta button{border:0;background:transparent;color:var(--muted)}
.note-add-actions{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 15px}.note-add-actions .action-btn{min-height:39px;border-radius:12px}.editor-body{min-height:205px;flex:0 1 auto}.editor-page{overflow-wrap:anywhere}
@media(max-width:720px){html,body,#app{height:100%;height:100dvh}.workspace{height:100dvh}.main-content{overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;padding-bottom:calc(76px + env(safe-area-inset-bottom))}.mobile-bottom-nav{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:45;min-height:calc(67px + env(safe-area-inset-bottom));padding:8px 14px calc(8px + env(safe-area-inset-bottom));background:var(--sidebar);border-top:1px solid var(--line);align-items:center;justify-content:space-around;gap:4px}.mobile-bottom-nav>button{background:none;border:0;color:var(--muted);min-width:0;flex:1;padding:7px 3px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;font-size:10px;letter-spacing:-.02em}.mobile-bottom-nav>button.current{color:var(--accent)}.mobile-bottom-nav>button.capture-fab{background:var(--lime);color:#181b17;width:51px;height:51px;min-width:51px;flex:0 0 51px;border-radius:18px;margin-top:-22px;box-shadow:0 8px 25px rgba(217,239,115,.2)}.mobile-bottom-nav>button.capture-fab .ico{width:25px;height:25px}.mobile-bottom-nav>button.capture-fab span{display:none}.topbar{z-index:5}.topbar .avatar{display:none}.topbar-right .icon-btn.strong{display:none}.page{padding:25px 19px 40px}.editor-page{padding:15px 18px 35px}.editor-title{font-size:30px;margin:29px 0 18px}.editor-actions{padding-bottom:14px}.editor-bottom{padding-top:15px}.capture-backdrop{padding:0;z-index:70;align-items:flex-end}.capture-sheet{border-radius:27px 27px 0 0;padding-bottom:calc(26px + env(safe-area-inset-bottom));width:100%;max-height:92dvh}.format-toolbar{margin-top:15px}.home-tiles{margin:28px 0 24px}.home-tile{min-height:164px;padding:16px}.home-tile strong{font-size:22px}.home-section-heading{margin:26px 0 14px}.home-heading{font-size:35px}.home-note{min-height:69px}}
@media(max-width:450px){.topbar{padding-inline:13px;min-width:0}.topbar-left .breadcrumb{display:flex}.page-header h1{font-size:30px}.notes-grid{grid-template-columns:minmax(0,1fr)}.note-card{height:190px}.home-heading{font-size:32px}.home-tile strong{font-size:20px}.home-tile{min-height:160px}.format-action{min-width:39px}.note-add-actions .action-btn{flex:1;font-size:11px;padding:0 10px}.editor-body{font-size:16px;line-height:1.7}.modal{max-width:calc(100vw - 14px)}.toast-container{bottom:calc(75px + env(safe-area-inset-bottom))}}
@media(max-width:330px){.home-tiles{grid-template-columns:1fr}.home-tile{min-height:130px}.home-tile strong{font-size:22px}.capture-options>button{padding:12px}.mobile-bottom-nav{padding-left:4px;padding-right:4px}.page{padding-left:12px;padding-right:12px}}

/* The mobile keyboard should never share the viewport with a second bottom toolbar. */
@media(max-width:720px){body.keyboard-open .mobile-bottom-nav{display:none}body.keyboard-open .main-content{padding-bottom:15px}.format-toolbar{touch-action:pan-x}}

@media(max-width:720px){body.sidebar-drawer-open .mobile-bottom-nav{display:none}}

/* v1.2.2 — Quiet background sync and a stable, flowing document editor */
.cloud-pill.cloud-quiet{width:87px;min-width:87px;max-width:87px;justify-content:center;color:var(--muted);font-size:11px;gap:7px;transition:background .15s,border-color .15s;animation:none!important}
.cloud-pill.cloud-quiet .ico{flex:none;animation:none!important}
.cloud-pill.cloud-quiet.cloud-alert{color:var(--danger);border-color:color-mix(in srgb,var(--danger) 45%,var(--line))}
.cloud-alert-dot{width:6px;height:6px;background:var(--danger);border-radius:50%;flex:none}
.breadcrumb-link{border:0;background:transparent;color:var(--muted);font:inherit;cursor:pointer;padding:5px 2px;border-radius:5px;white-space:nowrap}
.breadcrumb-link:hover,.breadcrumb-link:focus-visible{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.topbar .avatar{cursor:pointer;padding:0;flex:none}
.topbar .avatar:hover{border-color:var(--accent);filter:brightness(1.1)}
.account-popover{max-width:min(340px,calc(100vw - 20px));width:310px;padding:9px;border-radius:16px}
.account-summary{display:flex;gap:11px;align-items:center;padding:12px 10px 15px;min-width:0}
.account-avatar{display:grid;place-items:center;width:41px;height:41px;flex:none;border-radius:50%;background:var(--accent-soft);color:var(--accent);font-weight:800}
.account-summary>div:last-child{flex:1;min-width:0;display:grid;gap:5px}.account-summary strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.account-summary span{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.account-sync{background:var(--input);border-radius:11px;margin:0 4px 10px;padding:10px;display:flex;align-items:center;gap:8px;color:var(--muted);font-size:11px;flex-wrap:wrap}
.account-sync span{flex:1;min-width:0}.account-sync small{font-size:10px;width:100%;padding-left:24px;color:var(--subtle)}
.document-blocks{display:flex;flex-direction:column;align-items:stretch;gap:10px;min-width:0;padding:16px 0 7px}
.document-blocks[hidden]{display:none!important}
.document-blocks>.doc-textarea{width:100%;min-height:72px;resize:none;overflow:hidden;height:auto;box-sizing:border-box;background:transparent;border:0;border-radius:6px;padding:8px 2px;color:var(--text);line-height:1.75;font-size:15px;outline:0;display:block;flex:none;overflow-wrap:anywhere;white-space:pre-wrap}
.document-blocks>.doc-textarea:focus{background:transparent;box-shadow:none}
.document-blocks>.doc-textarea::placeholder{color:var(--subtle)}
.doc-embed{width:100%;min-width:0;max-width:760px;display:block;border-radius:16px;margin:3px 0 9px;position:relative}
.doc-embed-card .media-card{border-radius:17px;overflow:hidden;max-width:100%;background:var(--surface)}
.doc-embed-card .media-display{height:auto;min-height:95px;max-height:none;padding:12px;line-height:1.5}
.doc-embed-card .media-display img{width:auto;max-width:100%;height:auto;max-height:660px;object-fit:contain;border-radius:9px}
.doc-embed-card .media-display audio{width:100%;max-width:100%}
.doc-embed-card .media-meta{padding:8px 12px;min-height:35px}
.doc-embed .media-meta span{font-size:11px}
.doc-embed.doc-video{padding:11px;border:1px solid var(--line);background:var(--surface);overflow:hidden}
.video-responsive{width:100%;aspect-ratio:16/9;border-radius:10px;overflow:hidden;background:#0d0d0f}
.video-responsive iframe{display:block;border:0;width:100%;height:100%}
.doc-video>a{color:var(--muted);text-decoration:none;display:inline-block;font-size:11px;margin:10px 32px 1px 4px;overflow-wrap:anywhere}
.doc-video>a:hover{color:var(--accent)}
.doc-remove{position:absolute;bottom:6px;right:6px;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--muted);width:29px;height:29px;display:grid;place-items:center}
.doc-link{display:flex;align-items:center;gap:4px;background:var(--surface);border:1px solid var(--line);padding:10px 42px 10px 13px;min-height:52px}
.doc-link>a{display:flex;align-items:center;gap:9px;color:var(--text);text-decoration:none;min-width:0;font-size:12px}.doc-link>a span{word-break:break-word;overflow-wrap:anywhere}.doc-link>a:hover{color:var(--accent)}
.doc-link .doc-remove{bottom:auto;top:50%;transform:translateY(-50%);right:9px}
.doc-missing{padding:12px;color:var(--muted);border:1px dashed var(--line);border-radius:10px;font-size:12px}
.doc-preview-text{padding:6px 0;min-height:30px;overflow-wrap:anywhere}
.doc-preview-text p{margin:2px 0}.document-blocks~.note-add-actions{margin-top:15px}
/* Give editors room on mobile without allowing horizontal page movement */
@media(max-width:720px){.topbar .avatar{display:grid!important;width:30px;height:30px}.topbar .cloud-pill.cloud-quiet{min-width:31px;max-width:32px;width:32px;padding:0}.topbar .cloud-pill.cloud-quiet span{display:none}.topbar-right{gap:4px}.document-blocks>.doc-textarea{font-size:16px;min-height:72px;padding:10px 1px}.doc-embed-card .media-display img{max-height:440px}.account-popover{max-width:calc(100vw - 20px)}.editor-page{max-width:100%;overflow-x:hidden}.document-blocks,.doc-embed{max-width:100%;min-width:0}}

/* v1.2.3 — moveable media blocks, microphone activity and Craft-inspired sharing */
.doc-embed{padding-top:30px}
.doc-embed.doc-video{padding-top:40px}
.embed-controls{position:absolute;right:6px;top:2px;z-index:2;display:flex;align-items:center;gap:5px}
.embed-controls button{border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--text);min-width:29px;height:27px;padding:3px 7px;cursor:pointer;display:grid;place-items:center;font-size:16px}
.embed-controls button:hover{border-color:var(--accent);color:var(--accent)}
.doc-link{padding-top:42px}
.recorder-live-meter{position:fixed;left:50%;bottom:calc(28px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:120;border:1px solid var(--line);background:var(--sidebar);color:var(--text);border-radius:14px;box-shadow:0 8px 45px rgba(0,0,0,.3);display:flex;align-items:center;gap:9px;padding:13px 15px;font-size:12px;max-width:calc(100vw - 24px);min-width:280px;flex-wrap:wrap}
.recorder-live-meter #utono-recorder-level{color:var(--muted);flex:1;min-width:120px}.recorder-live-dot{background:#f25465;width:9px;height:9px;border-radius:50%;box-shadow:0 0 0 4px #f2546522;flex:none}
.share-modal{width:min(520px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow-y:auto}
.utono-share-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;background:var(--input);padding:4px;border-radius:12px;margin:2px 0 17px}
.utono-share-tabs button{border:0;border-radius:9px;min-height:36px;background:transparent;color:var(--muted);font:inherit;font-size:13px;cursor:pointer}
.utono-share-tabs button.selected{background:var(--surface);color:var(--text);box-shadow:0 2px 9px #0002;font-weight:700}
.share-section-heading{display:flex;align-items:center;gap:9px;font-size:15px;font-weight:760;margin:10px 0}
.share-hint{font-size:12px;line-height:1.65;color:var(--muted);margin:4px 0 15px}
.share-placeholder{border:1px solid var(--line);background:var(--surface);padding:17px;border-radius:13px;display:grid;gap:10px;margin-bottom:14px}
.share-placeholder input:disabled{opacity:.55}.share-muted,.share-placeholder p{color:var(--muted);font-size:11px;line-height:1.6;margin:0}
.share-publish-icon{width:45px;height:45px;border-radius:14px;display:grid;place-items:center;background:var(--input);color:var(--accent)}
.share-placeholder .action-btn:disabled{opacity:.5;cursor:not-allowed}
.export-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.export-choice{position:relative;min-width:0;min-height:76px;border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:13px;display:flex;align-items:flex-start;flex-direction:column;gap:6px;padding:14px 40px 13px 12px;cursor:pointer;text-align:left}
.export-choice strong{font-size:13px;font-weight:700}.export-choice small{font-size:10px;color:var(--muted);line-height:1.3}.export-choice .ico{position:absolute;right:12px;top:13px;color:var(--muted)}.export-choice:hover:not(:disabled){border-color:var(--accent);background:var(--input)}.export-choice:disabled{opacity:.46;cursor:not-allowed}
@media(max-width:420px){.export-grid{grid-template-columns:1fr}.export-choice{min-height:64px}.share-modal{max-width:calc(100vw - 14px)}.recorder-live-meter{bottom:calc(84px + env(safe-area-inset-bottom))}}
@media(hover:hover){.doc-embed[draggable]{cursor:grab}.doc-embed.dragging-media{opacity:.55;cursor:grabbing}.doc-embed.drop-media-target{outline:2px dashed var(--accent);outline-offset:4px}}
/* v1.3 revision history: tap-friendly on mobile, safe scroll in modals */
.version-history-list { display:flex; flex-direction:column; gap:8px; max-height:min(48vh,440px); overflow:auto; overscroll-behavior:contain; margin:12px 0; }
.version-entry { display:flex; flex-direction:column; align-items:flex-start; width:100%; gap:5px; padding:13px 14px; border:1px solid var(--border, #34343b); background:var(--surface, #252529); border-radius:12px; color:inherit; text-align:left; cursor:pointer; }
.version-entry:hover,.version-entry:focus-visible { border-color:#9b89fa; outline:none; }
.version-entry strong { font-size:13px; }
.version-entry small { opacity:.72; font-size:11px; }
.version-entry span { font-size:12px; overflow-wrap:anywhere; }
