:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:#131518;background:#e8e8ec;font-synthesis:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
*{box-sizing:border-box}html{min-height:100%;}body{margin:0;min-height:100vh;background:radial-gradient(ellipse 78% 190px at 50% 96px,rgba(137,141,152,.27),transparent 95%),radial-gradient(ellipse 80% 220px at 35% 6%,rgba(255,255,255,.35),transparent 93%),#e8e8ec}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed}button:focus-visible,input:focus-visible{outline:3px solid #1c87f5;outline-offset:3px}.app-shell{width:min(100%,1050px);margin:0 auto;min-height:100dvh;padding:calc(env(safe-area-inset-top,0px) + 46px) clamp(20px,4vw,32px) calc(env(safe-area-inset-bottom,0px) + 70px)}.top-area{display:flex;flex-direction:column;gap:23px}.breadcrumb{background:rgba(255,255,255,.78);border:1.5px solid white;border-radius:23px;box-shadow:0 12px 20px rgba(32,40,55,.09);padding:12px 16px;display:inline-flex;align-items:center;gap:8px;align-self:flex-start;font-size:21px;font-weight:650;max-width:100%;text-align:left;white-space:nowrap}.breadcrumb span{overflow:hidden;text-overflow:ellipsis}.breadcrumb svg:nth-of-type(2){color:#168dfa;flex:none}.tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.tiles-folder{grid-template-columns:repeat(2,minmax(0,1fr));max-width:550px}.stat-tile,.action-tile{min-width:0;height:108px;border:1.5px solid rgba(255,255,255,.96);border-radius:29px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;background:rgba(255,255,255,.78);box-shadow:0 12px 23px rgba(55,57,69,.11),inset 0 0 18px rgba(255,255,255,.34);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}.stat-tile{gap:1px}.stat-number{font-size:34px;line-height:1;font-weight:700;letter-spacing:-.07em}.stat-label{font-size:14px;font-weight:550;color:#45464d}.action-tile{color:#141618;transition:transform .18s,background .18s}.action-tile:active{transform:scale(.97)}.action-tile:hover{background:#fff}.action-tile-icon{height:34px;display:grid;place-items:center}.action-tile-label{font-size:14px;font-weight:650;text-align:center;line-height:1.1}.content-area{position:relative;margin-top:47px}.section-card{border:1.5px solid var(--section-color);border-radius:8px;background:color-mix(in srgb,var(--section-color) 46%,#fff);padding:16px 17px;margin-bottom:24px;transition:box-shadow .2s}.section-card.drop-highlight{box-shadow:inset 0 0 0 5px var(--section-color);}.section-header{display:flex;align-items:center;gap:5px}.section-toggle{flex:1;display:flex;align-items:center;justify-content:space-between;gap:12px;border:0;background:transparent;color:#111b26;padding:2px 0;text-align:left;font-size:24px;font-weight:700;min-height:37px}.section-chevron{display:flex;align-items:center;transition:transform .2s}.section-chevron.up{transform:rotate(180deg)}.section-settings{border:0;background:rgba(255,255,255,.1);border-radius:10px;padding:7px;display:flex;align-items:center;justify-content:center;color:#182338;opacity:.73}.section-settings:hover{background:rgba(255,255,255,.36);opacity:1}.section-body{padding-top:19px}.section-hint{font-size:14px;line-height:1.5;margin:0 0 7px;color:#233548}.folder-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 16px}.loose-grid{margin:24px 0 0}.folder-tile{min-width:0;position:relative;transition:transform .16s;touch-action:pan-y}.folder-preview{display:block;position:relative;aspect-ratio:.71;width:100%;max-height:380px;border:0;background:transparent;margin:0 0 10px;padding:0;isolation:isolate}.folder-stack{position:absolute;inset:5px 7px 5px 7px;border:2px dashed var(--folder-color);border-radius:4px;opacity:.6;pointer-events:none}.stack-rear{transform:translate(-8px,-7px);opacity:.37}.stack-middle{transform:translate(0,-3px);opacity:.47}.stack-front{transform:translate(5px,0);opacity:.58}.folder-preview:hover .stack-front{opacity:.84}.folder-bottom{display:flex;align-items:center;justify-content:space-between;gap:4px;padding-left:4px}.folder-title{overflow-wrap:anywhere;text-align:left;min-width:0;color:#18181e;background:transparent;border:0;padding:0;font-size:17px;font-weight:500;line-height:1.25}.folder-menu{background:rgba(255,255,255,.34);border:0;border-radius:50%;width:27px;height:27px;display:grid;place-items:center;flex-shrink:0;color:#303743}.folder-menu:active{background:#fff}.folder-count{display:flex;align-items:center;gap:5px;padding-left:4px;color:#2f3338;font-size:12px;margin:5px 0 0}.folder-count svg{flex:none}.touch-dragging{z-index:50;filter:drop-shadow(0 8px 12px rgba(0,0,0,.2));pointer-events:none}.drop-root-label{display:none}.empty-state{margin:clamp(75px,16vh,150px) auto 0;max-width:410px;display:flex;align-items:center;flex-direction:column;text-align:center;color:#4c505c;gap:14px}.empty-state svg{color:#9295a0;stroke-width:1.1}.empty-state h2{margin:0;font-size:23px;font-weight:650;color:#33353b}.empty-state p{margin:0;line-height:1.5;font-size:15px}.demo-note{margin-top:32px;display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:center;font-size:12px;color:#6d717a}.demo-note button{color:#236ec4;border:0;background:transparent;text-decoration:underline;font-size:12px}.dialog-backdrop{position:fixed;inset:0;background:rgba(48,52,63,.32);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);z-index:500;display:flex;align-items:center;justify-content:center;padding:20px}.dialog-panel{width:min(100%,520px);background:linear-gradient(125deg,rgba(255,249,242,.96),rgba(237,244,255,.96));border:1px solid rgba(255,255,255,.9);box-shadow:0 22px 65px rgba(42,40,56,.26);border-radius:38px;padding:25px 25px 28px;max-height:min(85dvh,700px);overflow:auto}.section-panel{width:min(100%,475px)}.dialog-header{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:6px;margin-bottom:30px}.dialog-header h2{text-align:center;font-size:19px;margin:0;white-space:nowrap;letter-spacing:-.02em}.dialog-header-spacer{width:80px}.pill-button{justify-self:start;border:1.5px solid rgba(255,255,255,.9);border-radius:26px;padding:10px 18px;background:rgba(255,255,255,.72);font-weight:500;font-size:15px;color:#282a30}.collection-dialog-brand{display:flex;gap:14px;align-items:center;margin:5px 0 28px}.collection-dialog-brand>svg{color:#777a85;background:#e3e3e7;border:1px solid #d2d2d9;border-radius:12px;width:57px;height:57px;padding:11px}.collection-dialog-brand div{display:flex;flex-direction:column;gap:6px}.collection-dialog-brand strong{font-size:19px}.collection-dialog-brand span{font-size:14px;color:#737781}.name-input{width:100%;border-radius:19px;border:1px solid #d4d4d8;background:rgba(207,208,217,.52);padding:16px 17px;font-size:19px;color:#16171b;outline:none}.name-input::placeholder{color:#a6a7b1}.name-input:focus{border-color:#2187f4;outline:2px solid rgba(33,135,244,.16)}.color-palette{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:16px 13px;margin:28px 0 26px;align-items:center}.color-swatch{appearance:none;border:none;width:min(100%,44px);aspect-ratio:1;border-radius:50%;background:var(--swatch);position:relative;margin:auto;box-shadow:0 4px 12px rgba(0,0,0,.07)}.color-swatch.selected:after{content:"";inset:-5px;position:absolute;border-radius:50%;border:2px solid white;box-shadow:0 0 0 2px var(--swatch)}.color-custom{position:relative;width:44px;height:44px;border:1.7px solid #acafb5;border-radius:50%;display:grid;place-items:center;overflow:hidden;margin:auto;cursor:pointer}.color-custom input{position:absolute;opacity:0;inset:0;width:100%;height:100%;cursor:pointer}.editor-footer{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:15px 0}.secondary-button,.delete-button{display:inline-flex;gap:5px;align-items:center;justify-content:center;border:1px solid rgba(255,255,255,.83);background:rgba(255,255,255,.59);color:#333;font-size:13px;border-radius:18px;padding:8px 12px}.delete-button{color:#c33a45}.primary-button{width:100%;border:none;border-radius:20px;padding:16px;background:#2587f9;color:#fff;font-size:17px;font-weight:650;box-shadow:0 5px 12px rgba(36,130,239,.15)}.primary-button:disabled{background:#cacbd1;color:#f0f0f2;box-shadow:none}.move-panel .move-intro{font-size:15px;color:#565b66}.move-option{display:flex;gap:12px;align-items:center;width:100%;padding:14px 12px;border:0;border-bottom:1px solid rgba(84,91,108,.17);background:transparent;text-align:left;font-size:16px;color:#222;min-height:53px}.move-option:hover{background:rgba(255,255,255,.35)}.move-color{width:19px;height:19px;border-radius:50%;flex:none}.move-hint{font-size:12px;color:#7b7e88}.confirm-panel{max-width:385px}.confirm-panel h2{margin:0 0 14px}.confirm-panel p{line-height:1.5;color:#53545b}.confirm-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.danger-action{border:0;border-radius:24px;background:#e34c59;color:#fff;padding:11px 19px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}#toast{position:fixed;bottom:calc(env(safe-area-inset-bottom,0px) + 28px);left:50%;transform:translate(-50%,15px);opacity:0;pointer-events:none;background:rgba(25,28,33,.9);color:white;padding:11px 17px;border-radius:20px;font-size:13px;z-index:800;transition:opacity .16s,transform .16s;text-align:center;max-width:80vw}#toast.visible{opacity:1;transform:translate(-50%,0)}
@media(min-width:650px){.app-shell{padding-top:65px}.tiles{max-width:650px;margin:0 auto}.tiles-folder{max-width:440px;margin:0}.content-area{margin-top:70px}.folder-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}.section-card{padding:20px 24px;border-radius:10px}.section-body{padding-top:25px}.folder-preview{max-height:420px}.section-toggle{font-size:26px}.folder-title{font-size:17px}}
@media(min-width:940px){.folder-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.section-card{max-width:980px}}
@media(max-width:410px){.app-shell{padding-left:16px;padding-right:16px;padding-top:calc(env(safe-area-inset-top,0px) + 34px)}.tiles{gap:9px}.tiles .stat-tile,.tiles .action-tile{height:92px;border-radius:24px}.stat-number{font-size:30px}.action-tile-label{font-size:12px}.action-tile-icon svg{width:27px}.content-area{margin-top:40px}.section-card{padding:14px 12px}.section-toggle{font-size:21px}.folder-title{font-size:15px}.folder-grid{gap:20px 12px}.dialog-panel{padding:21px 19px 24px;border-radius:30px}.color-palette{gap:15px 9px}}
@media(max-width:620px){.dialog-backdrop{align-items:flex-end;padding:0}.dialog-panel{border-radius:34px 34px 0 0;max-height:calc(95dvh - env(safe-area-inset-bottom,0px));padding-bottom:calc(27px + env(safe-area-inset-bottom,0px));width:100%}.section-panel{border-radius:34px;align-self:center;width:calc(100% - 28px);padding-bottom:26px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important}}
/* Publication features — preview 0.2 */
.import-toolbar{display:flex;justify-content:flex-end;margin:-13px 0 26px}.import-button,.empty-import{border:1px solid rgba(255,255,255,.95);background:rgba(255,255,255,.82);border-radius:30px;box-shadow:0 7px 19px rgba(60,68,80,.08);padding:11px 19px;display:inline-flex;gap:8px;align-items:center;color:#188bfa;font-size:16px;font-weight:650}.empty-import{margin-top:8px}.publication-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:23px 17px;margin-bottom:32px}.publication-tile{position:relative;border:0;padding:0;margin:0;width:100%;aspect-ratio:.715;background:#dbdce3;display:block;border-radius:5px;overflow:hidden;text-align:left;box-shadow:0 6px 13px rgba(32,32,44,.15)}.publication-tile:active{transform:scale(.99)}.publication-cover-image{display:block;width:100%;height:100%;object-fit:cover}.publication-placeholder{display:flex;align-items:center;justify-content:center;width:100%;height:100%;background:linear-gradient(160deg,#6e94c7,#354f79);padding:14px;color:white;overflow-wrap:anywhere;text-align:center;font-weight:650;font-size:clamp(15px,3.9vw,23px);line-height:1.3}.reading-track{position:absolute;bottom:9px;left:5%;right:5%;height:4px;border-radius:6px;background:rgba(146,153,162,.43);box-shadow:0 0 5px rgba(0,0,0,.12);overflow:hidden}.reading-fill{display:block;height:100%;background:#168bff;transition:width .22s ease;border-radius:6px}.folder-preview.has-covers{overflow:visible}.preview-stacked-cover{position:absolute;inset:5px 13px 7px 13px;display:block;overflow:hidden;border-radius:4px;box-shadow:0 4px 11px rgba(25,27,37,.16);background:#f0f0f1}.preview-stacked-cover.stack-0{transform:translate(11px,-7px);z-index:1}.preview-stacked-cover.stack-1{transform:translate(5px,-3px);z-index:2}.preview-stacked-cover.stack-2{transform:translate(-2px,3px);z-index:3}.preview-stacked-cover:only-child{transform:translate(-2px,3px)}.preview-stacked-cover .publication-placeholder{font-size:17px}
body.publication-open{overflow:hidden}.publication-screen{position:fixed;inset:0;background:linear-gradient(140deg,#fff6ed,#f4eced 72%,#eeeff5);z-index:200;overflow:auto;-webkit-overflow-scrolling:touch;padding:calc(env(safe-area-inset-top,0px) + 24px) 22px calc(env(safe-area-inset-bottom,0px) + 60px)}.publication-header{position:sticky;top:-2px;z-index:3;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;margin:0 auto 22px;max-width:650px;min-height:55px;padding:4px 0 10px;isolation:isolate}.publication-header:before{content:'';position:absolute;inset:-30px -18px 0;z-index:-1;background:linear-gradient(#fff6ed 70%,rgba(255,246,237,.91));backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}.publication-header h2{margin:0;font-size:18px;font-weight:700;white-space:nowrap}.publication-header .item-save{justify-self:end;color:#147cf0;font-weight:680}.publication-header .item-save:disabled{color:#a9a9ac;background:rgba(255,255,255,.5);box-shadow:none}.publication-inner{max-width:540px;margin:0 auto}.publication-cover-area{position:relative;width:min(100%,315px);aspect-ratio:.78;margin:0 auto 31px}.publication-cover-large{width:100%;height:100%;border-radius:18px;overflow:hidden;background:#d8d6e2;box-shadow:0 13px 26px rgba(34,41,54,.16)}.publication-cover-large .publication-placeholder{font-size:25px}.cover-modify{position:absolute;right:14px;top:14px;display:grid;place-items:center;border:0;background:rgba(57,59,68,.68);color:#fff;border-radius:50%;width:39px;height:39px;box-shadow:0 3px 11px rgba(0,0,0,.2)}.publication-field-label{display:block;color:#3c3d43;font-size:15px;font-weight:700;margin:25px 0 11px}.publication-field{display:block;width:100%;border:1px solid rgba(175,173,182,.3);background:rgba(207,200,204,.24);color:#28282f;border-radius:21px;padding:15px 17px;font-size:17px;line-height:1.45;outline:none}.publication-field::placeholder{color:#a5a2a9}.publication-field:focus{border-color:#168bff;box-shadow:0 0 0 3px rgba(22,139,255,.15)}.publication-title-field{font-size:24px;font-weight:660}.publication-title-view{margin:0;font-size:27px;line-height:1.22;overflow-wrap:anywhere}.text-area{min-height:95px;resize:vertical}.publication-readonly-text{font-size:16px;color:#30313b;white-space:pre-wrap;line-height:1.55;overflow-wrap:anywhere;margin:0}.muted-hint{color:#86838e;font-size:15px}.publication-source{color:#147ee5;font-size:16px;font-weight:600;display:inline-flex;align-items:center;gap:7px;overflow-wrap:anywhere;text-decoration:none;padding:7px 0}.publication-source:hover{text-decoration:underline}.publication-status{margin:30px 0 36px;padding-top:2px}.publication-status .publication-field-label{margin:0 0 12px}.status-buttons{display:grid;grid-template-columns:1fr 1fr;gap:12px}.status-button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:59px;border-radius:23px;background:rgba(255,255,255,.65);border:1.5px solid rgba(255,255,255,.95);color:#303642;font-weight:650}.status-button.selected{border:1.5px solid #188bfa;color:#097ce3;background:#d9ebfe}.status-help{font-size:12px;color:#787783;margin:11px 0 0;line-height:1.45}.publication-delete{display:flex;justify-content:center;align-items:center;gap:8px;margin:36px auto 22px;border:1px solid rgba(224,79,89,.3);background:rgba(255,255,255,.53);color:#bd3941;border-radius:23px;min-width:190px;padding:15px 25px;font-weight:680}.choice-panel{max-width:425px}.choice-panel .dialog-header{margin-bottom:20px}.choice-actions{display:flex;flex-direction:column;gap:6px}.choice-action{display:flex;gap:16px;align-items:center;width:100%;text-align:left;border:0;border-radius:20px;background:rgba(215,211,217,.43);padding:18px 16px;color:#1b1b20;font-size:17px}.choice-action:active{background:rgba(185,205,230,.8)}.choice-action svg{flex:none}.link-panel .dialog-header{margin-bottom:15px}.link-panel .dialog-header h2{font-size:17px}.link-panel .link-help{font-size:16px;color:#686672;line-height:1.5;margin:0 0 21px}.link-panel .primary-button{margin-top:20px}.loading-panel{width:min(100%,360px);text-align:center}.loading-panel h2{margin:3px 0 12px}.loading-panel p{color:#626473;font-size:14px;line-height:1.5}
@media (min-width:650px){.publication-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:28px 21px}.publication-screen{padding-top:55px}.publication-cover-area{width:310px}.import-toolbar{margin-top:-25px}}
@media (min-width:940px){.publication-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media (max-width:410px){.publication-screen{padding-left:17px;padding-right:17px}.publication-grid{gap:18px 12px}.publication-cover-area{width:min(85%,280px)}.publication-header h2{font-size:16px}.publication-header .pill-button{padding:10px 14px}.publication-title-view{font-size:23px}.import-toolbar{margin-top:-12px}}
@media (max-width:620px){.choice-panel,.link-panel{width:calc(100% - 28px);border-radius:34px;align-self:center;padding-bottom:26px}}

/* Android 0.4: compact editor, non-cropping covers, reliable touch dragging. */
@media (max-width:620px) {
  .collection-panel,.section-panel {
    align-self:center;
    width:calc(100% - 28px);
    border-radius:34px;
    max-height:min(85dvh,520px);
    padding-bottom:26px;
  }
  .dialog-backdrop:has(.collection-panel), .dialog-backdrop:has(.section-panel) {
    align-items:center;
    padding:14px 0;
  }
}
.folder-preview {touch-action:none;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none;}
.folder-tile.touch-dragging{pointer-events:none;will-change:transform;}
.publication-cover-image {object-fit:contain;object-position:center;background:transparent;}
.publication-tile {background:rgba(245,245,248,.9);}
.preview-stacked-cover {background:#f9f9fa;}
.preview-stacked-cover .publication-cover-image {object-fit:contain;object-position:center;}

/* Android v0.1 — respect the intrinsic dimensions of every publication image.
   The publication view remains unchanged; only folder grids and stacked previews
   change. A letterboxed fixed-aspect frame was creating artificial white bands. */
.publication-tile.with-cover {
  aspect-ratio:auto;
  height:auto;
  background:transparent;
  overflow:visible;
  box-shadow:none;
}
.publication-tile.with-cover > .publication-cover-image {
  display:block;
  width:100%;
  height:auto;
  object-fit:contain;
  border-radius:5px;
  box-shadow:0 6px 13px rgba(32,32,44,.15);
}
.folder-preview.has-covers {
  display:block;
  height:auto;
  aspect-ratio:auto;
  max-height:none;
  overflow:visible;
}
.folder-preview.has-covers .preview-stacked-cover {
  position:absolute;
  inset:0 13px auto 13px;
  height:auto;
  max-height:calc(100% - 5px);
  overflow:hidden;
}
.folder-preview.has-covers .preview-stacked-cover:last-child {
  position:relative;
  inset:auto;
  display:block;
  height:auto;
  max-height:none;
  margin:0 13px;
  transform:translate(-2px,3px);
}
.folder-preview.has-covers .preview-stacked-cover .publication-cover-image {
  display:block;
  width:100%;
  height:auto;
  object-fit:contain;
}
/* Grid children must not stretch shorter, naturally proportioned covers to the
   height of neighboring, taller magazine covers in the same row. */
.publication-grid { align-items:start; }
.publication-tile.with-cover { align-self:start; }

/* Android v0.4: one Import control, centered section delete and custom swatch picker. */
.extra-import-area{display:flex;justify-content:center;margin:28px 0}
.section-delete-only{margin:20px 0 18px;justify-content:center}
.section-delete-only .delete-button{min-width:175px;padding:12px 25px;font-size:15px;border-radius:24px;font-weight:600;gap:9px}
/* 0.5: show accurate binary cover size in edit mode only. */
.cover-details{text-align:center;font-size:13px;color:#777986;margin:-17px 0 22px;letter-spacing:.01em;font-variant-numeric:tabular-nums}
.collection-panel .section-delete-only .delete-button{min-width:175px;padding:12px 25px;font-size:15px}

/* Android 0.6: editor dialogs follow the visible viewport above the keyboard,
   never the full page behind it. Normal-height design is preserved. */
.dialog-backdrop:has(.editor-panel){position:fixed;inset:auto 0 auto 0;align-items:center;justify-content:center;padding:8px 0;overflow:hidden}
.editor-panel{width:calc(100% - 28px);max-height:calc(100% - 8px);overflow:auto;overscroll-behavior:contain;}
.dialog-backdrop.editor-keyboard-open .editor-panel{
  width:calc(100% - 28px);max-height:calc(100% - 8px);
  overflow:visible;border-radius:28px;padding:13px 18px 14px;
}
.editor-keyboard-open .dialog-header{margin-bottom:10px;min-height:36px}
.editor-keyboard-open .dialog-header .pill-button{padding:7px 13px}
.editor-keyboard-open .name-input{padding:10px 14px;font-size:17px;border-radius:15px;min-height:44px}
.editor-keyboard-open .color-palette{gap:9px 11px;margin:16px 0 12px}
.editor-keyboard-open .color-swatch{width:min(100%,35px)}
.editor-keyboard-open .section-delete-only{margin:7px 0 10px}
.editor-keyboard-open .section-delete-only .delete-button{min-width:155px;padding:8px 16px}
.editor-keyboard-open .primary-button{padding:11px;border-radius:17px}
.editor-very-tight .editor-panel{padding:9px 14px 10px}
.editor-very-tight .dialog-header{margin-bottom:5px;min-height:32px}
.editor-very-tight .name-input{padding:8px 12px;min-height:39px}
.editor-very-tight .color-palette{margin:9px 0 7px;gap:6px 9px}
.editor-very-tight .color-swatch{width:min(100%,28px)}
.editor-very-tight .section-delete-only{margin:4px 0 6px}
.editor-very-tight .section-delete-only .delete-button{padding:6px 13px}
.editor-very-tight .primary-button{padding:8px}

/* 0.8: native WebView long-press gestures must not steal one-finger dragging.
   Only the poster/preview is a dedicated touch drag handle. */
.folder-preview,.folder-preview *{
  touch-action:none;-webkit-touch-callout:none;-webkit-user-drag:none;
  user-select:none;-webkit-user-select:none;
}
.folder-tile.touch-dragging{
  position:relative;z-index:20;opacity:.96;
  filter:drop-shadow(0 12px 14px rgba(32,46,64,.24));
}

/* Android 0.9.8: three bottom tabs. The approved Reading styles above are unchanged. */
.app-shell{padding-bottom:calc(env(safe-area-inset-bottom,0px) + 112px)}
.bottom-tabs{position:fixed;z-index:100;inset:auto 0 0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;gap:4px;padding:8px max(12px,env(safe-area-inset-left,0px)) calc(8px + env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-right,0px));border-top:1px solid rgba(255,255,255,.92);background:rgba(249,249,252,.94);box-shadow:0 -6px 24px rgba(50,54,70,.09);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.bottom-tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:63px;padding:6px 2px;border:0;border-radius:18px;color:#666a74;background:transparent;transition:background .16s,color .16s}
.bottom-tab svg{display:block;width:32px;height:32px;flex:none}
.bottom-tab span{font-size:12.5px;font-weight:650;line-height:1.15;white-space:nowrap}
.bottom-tab.active{background:rgba(24,139,250,.12);color:#147cf0}
.bottom-tab:active{background:rgba(24,139,250,.18)}
.bottom-tab:focus-visible{outline:3px solid #1c87f5;outline-offset:-2px}
.empty-tab-shell{min-height:100dvh}


/* Android v0.10.0: four independent trackers, keeping the approved Reading design. */
.bottom-tabs{grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;padding-left:max(5px,env(safe-area-inset-left,0px));padding-right:max(5px,env(safe-area-inset-right,0px))}
.bottom-tab{padding:6px 0;min-height:62px;gap:5px;border-radius:16px}
.bottom-tab span{font-size:11px}
.bottom-tab svg{width:29px;height:29px}
.stat-select{cursor:pointer;color:#131518;padding:4px}
.stat-select:active{background:#fff}
.stat-value-row{display:flex;align-items:baseline;justify-content:center;gap:4px;max-width:100%;white-space:nowrap}
.stat-value-row .stat-number{font-size:clamp(20px,5.9vw,34px);letter-spacing:-.055em}
.stat-minor{font-size:13px;font-weight:550;color:#686b77}
.activities-shell .top-area{gap:18px}
.activity-card{position:relative;min-width:0}
.activity-open{width:100%;display:flex;flex-direction:column;align-items:center;text-align:center;gap:9px;border:1.5px solid color-mix(in srgb,var(--activity-color) 62%,#fff);background:rgba(255,255,255,.8);border-radius:17px;padding:24px 13px 19px;min-height:173px;box-shadow:0 8px 20px rgba(45,49,68,.08);color:#20242d}
.activity-open:active{transform:scale(.98)}
.activity-symbol{width:72px;height:74px;display:grid;place-items:center;background:color-mix(in srgb,var(--activity-color) 15%,#fff);border-radius:16px;color:var(--activity-color)}
.activity-title{font-size:17px;font-weight:650;overflow-wrap:anywhere;line-height:1.2}
.activity-kind{font-size:12px;font-weight:550;color:#777b87}
.activity-menu{position:absolute;right:8px;top:8px}
.activity-detail{max-width:650px;margin:40px auto 0}
.tracking-panel{background:rgba(255,255,255,.82);border:1.5px solid white;border-radius:28px;padding:24px 17px;box-shadow:0 12px 23px rgba(55,57,69,.08)}
.tracker-type{display:flex;align-items:center;justify-content:center;gap:8px;color:#6b6e78;font-size:14px;font-weight:600;margin-bottom:25px}
.tracker-type svg{color:#188bfa}
.timer-display{text-align:center;font-size:clamp(38px,10vw,68px);font-weight:700;letter-spacing:-.045em;font-variant-numeric:tabular-nums;line-height:1.35;margin:34px 0 42px}
.timer-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.timer-primary,.timer-secondary{min-height:51px;border-radius:16px;border:1.5px solid rgba(255,255,255,.95);display:flex;align-items:center;justify-content:center;gap:6px;font-size:14px;font-weight:650}
.timer-primary{background:#2587f9;color:#fff}
.timer-secondary{background:#e9edf5;color:#303745}
.timer-buttons button:disabled{opacity:.39}
.activity-stats-hint{font-size:13px;text-align:center;color:#717783;margin:25px 5px}
.calendar-head{display:flex;align-items:center;justify-content:space-between;gap:6px;margin:5px 0 24px}
.calendar-head strong{font-size:20px;letter-spacing:-.03em}
.calendar-head button{height:40px;width:40px;display:grid;place-items:center;border:0;border-radius:14px;background:#e9edf5;color:#303845}
.calendar-head button:last-child svg{transform:rotate(180deg)}
.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.calendar-weekday{font-size:12px;color:#7c7f89;font-weight:650;text-align:center;margin:3px 0 9px}
.calendar-empty{min-width:0}
.calendar-day{aspect-ratio:1;display:grid;place-items:center;min-width:0;border:1.5px solid transparent;border-radius:11px;font-size:clamp(12px,3.6vw,16px);font-weight:600;font-variant-numeric:tabular-nums}
.calendar-day.done{background:#ddf4e5;color:#247b4a}
.calendar-day.missed{background:#fbe7e7;color:#b94949}
.calendar-day.outside{background:#eff0f3;color:#a5a8af}
.calendar-day.selected{border:2.5px solid #2587f9}
.day-editor{border-top:1px solid #e2e5eb;margin-top:25px;padding-top:18px;text-align:center}
.day-editor-title{font-weight:650;font-size:17px;margin-bottom:12px}
.day-status{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.day-status button{border-radius:14px;min-height:44px;border:1.5px solid #e0e3e8;display:flex;align-items:center;justify-content:center;gap:8px;background:#f1f2f4;font-size:15px;font-weight:650}
.day-status .day-done{color:#247b4a}
.day-status .day-missed{color:#b94949}
.day-status .day-done.chosen{background:#ddf4e5;border-color:#62c18a}
.day-status .day-missed.chosen{background:#fbe7e7;border-color:#eaa1a1}
.calendar-total{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #e2e5eb;margin-top:22px;padding-top:15px;color:#656a75;font-weight:550}
.calendar-total strong{color:#141618;font-size:30px;font-weight:700;letter-spacing:-.05em}
.calendar-total small{color:#71747c;font-size:16px;font-weight:500;letter-spacing:0}
.activity-field-label{display:block;color:#414752;font-size:14px;font-weight:650;margin:15px 0 9px}
.activity-editor-panel .color-palette{margin:20px 0 20px}
.activity-type-choices{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.activity-choice{display:flex;align-items:center;justify-content:center;gap:9px;min-height:51px;border:1.5px solid rgba(130,138,152,.26);border-radius:15px;background:rgba(255,255,255,.65);color:#4b5260;font-weight:650}
.activity-choice.active{background:#e1efff;border-color:#2587f9;color:#147cf0}
.stat-select-input{width:100%;min-height:49px;border:1.5px solid #d8dbe4;border-radius:14px;background:rgba(255,255,255,.83);color:#333844;font-size:15px;padding:11px 12px}
.activity-editor-panel .primary-button{margin-top:22px}
.activity-editor-panel .publication-delete{position:relative;width:100%;margin:19px 0 1px}
.activity-pick{width:100%;padding:14px 12px;display:flex;align-items:center;gap:11px;text-align:left;border:0;border-bottom:1px solid #e1e3e9;background:transparent;font-size:16px}
.activity-pick.selected{color:#188bfa;font-weight:700}
.statistics-shell{max-width:720px}
.stats-title{font-size:27px;margin:0 0 22px;letter-spacing:-.03em}
.statistics-panel{border:1.5px solid #fff;background:rgba(255,255,255,.63);padding:20px;border-radius:26px;box-shadow:0 12px 23px rgba(55,57,69,.06)}
.statistics-panel>h2{font-size:16px;color:#30343b;margin:3px 0 18px}
.stats-categories{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.stats-category{border:1.5px solid rgba(130,138,152,.25);border-radius:16px;min-height:76px;background:rgba(255,255,255,.82);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;color:#505764;font-size:13px;font-weight:650}
.stats-category.active{border-color:#2587f9;background:#e1efff;color:#147cf0}
.stat-periods{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;padding:5px;background:#e8ebf1;border-radius:17px}
.stat-periods button{border:0;border-radius:13px;min-height:45px;color:#5b626e;background:transparent;font-size:14px;font-weight:650}
.stat-periods button.active{background:#fff;color:#147cf0;box-shadow:0 2px 7px rgba(36,60,80,.12)}
.stats-result{display:flex;flex-direction:column;align-items:center;gap:5px;background:#fff;border-radius:19px;margin:20px 0 25px;padding:23px 10px;min-height:135px}
.stats-result-period{color:#747984;font-size:12px;font-weight:550}
.stats-result-value{display:flex;align-items:baseline;gap:4px}
.stats-result-value strong{color:#15171b;font-size:42px;letter-spacing:-.05em;line-height:1.25}
.stats-result-value small{color:#696d75;font-size:18px}
.stats-result-label{font-size:14px;color:#4b5058;font-weight:550}
.stats-breakdown-title{font-size:16px;margin:5px 0 17px}
.stats-breakdown{display:flex;flex-direction:column;gap:13px;padding:0 2px 9px}
.stat-bar-row{display:grid;grid-template-columns:37px 1fr 58px;align-items:center;gap:8px;color:#70757f;font-size:12px;font-variant-numeric:tabular-nums}
.stat-bar-row strong{text-align:right;color:#454b53;font-size:12px}
.stat-bar-track{height:11px;background:#e7ebf2;border-radius:8px;overflow:hidden}
.stat-bar-track div{height:100%;background:#2587f9;border-radius:8px}
@media(max-width:410px){
 .bottom-tab span{font-size:10px}.bottom-tab svg{width:27px;height:27px}
 .tracking-panel{padding:23px 12px}
 .statistics-panel{padding:16px 13px}
 .stats-category{font-size:12px}
}


/* v0.10.1 — only the opened Watching card uses the original poster aspect ratio.
   The grid thumbnails, folder cover stacks and Reading publication view are unchanged. */
.watching-screen .publication-cover-area.watching-poster {
  aspect-ratio: auto;
  height: auto;
}
.watching-screen .publication-cover-area.watching-poster .publication-cover-large {
  height: auto;
}
.watching-screen .publication-cover-area.watching-poster .publication-cover-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Keep Activities' dashboard number and caption on exactly the same rows
   as the Read and Watched counters when switching between tabs. */
.stat-select .stat-value-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex: none;
  gap: 4px;
  height: 34px;
  line-height: 1;
}
.stat-select .stat-value-row .stat-number {
  font-size: 34px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.07em;
}
.stat-select .stat-value-row .stat-number-long {
  font-size: clamp(15px, 3.65vw, 23px);
  line-height: 34px;
}
.stat-select .stat-label {
  font-size: 14px;
  font-weight: 550;
  line-height: normal;
}
@media (max-width:410px) {
  .stat-select .stat-value-row {height: 30px;}
  .stat-select .stat-value-row .stat-number {font-size: 30px;}
  .stat-select .stat-value-row .stat-number-long {font-size: clamp(15px, 3.65vw, 23px);line-height: 30px;}
}


/* v0.10.2 — compact navigation and empty-state chrome, approx. 60% of the
   approved previous visuals. Never scale user-created folders, sections,
   poster/book tiles or the publication/movie editor. */
.app-shell{
  padding-top:calc(env(safe-area-inset-top,0px) + 28px);
  padding-bottom:calc(env(safe-area-inset-bottom,0px) + 60px);
}
.app-shell .top-area{gap:14px}
.app-shell .tiles{
  width:60%;
  max-width:390px;
  margin-left:auto;
  margin-right:auto;
  gap:8px;
}
.app-shell .tiles.tiles-folder{max-width:330px;gap:8px}
.app-shell .tiles .stat-tile,
.app-shell .tiles .action-tile{
  height:65px;
  border-radius:18px;
  gap:4px;
}
.app-shell .tiles .stat-tile{gap:1px}
.app-shell .tiles .stat-number{font-size:20px;line-height:1;letter-spacing:-.07em}
.app-shell .tiles .stat-label{font-size:8.4px;line-height:1.2}
.app-shell .tiles .action-tile-icon{height:21px}
.app-shell .tiles .action-tile-icon svg{width:18px;height:18px}
.app-shell .tiles .action-tile-label{font-size:8.4px;line-height:1.1}
.app-shell .stat-select .stat-value-row{height:20px;gap:2px}
.app-shell .stat-select .stat-value-row .stat-number{
  font-size:20px;line-height:1
}
.app-shell .stat-select .stat-value-row .stat-number-long{
  font-size:clamp(10px,2.3vw,14px);line-height:20px
}
.app-shell .stat-select .stat-minor{font-size:8px}
.app-shell .breadcrumb{
  border-radius:14px;padding:7px 10px;gap:5px;font-size:13px
}
.app-shell .breadcrumb svg{width:14px;height:14px}
.app-shell .content-area{margin-top:28px}
.app-shell .import-toolbar{margin-top:-8px;margin-bottom:16px}
.app-shell .import-button,.app-shell .empty-import{
  padding:7px 12px;border-radius:19px;font-size:10px;gap:5px
}
.app-shell .import-button svg,.app-shell .empty-import svg{width:12px;height:12px}
.app-shell .extra-import-area{margin:17px 0}
.app-shell .empty-state{
  margin:clamp(45px,10vh,90px) auto 0;
  gap:8px;
  max-width:320px
}
.app-shell .empty-state > svg{width:37px;height:37px}
.app-shell .empty-state h2{font-size:14px}
.app-shell .empty-state p{font-size:9px;line-height:1.5}
.bottom-tabs{
  padding:5px max(5px,env(safe-area-inset-left,0px))
    calc(5px + env(safe-area-inset-bottom,0px))
    max(5px,env(safe-area-inset-right,0px));
  gap:1px
}
.bottom-tab{
  min-height:40px;
  gap:2px;
  padding:3px 0;
  border-radius:10px
}
.bottom-tab svg{width:17px;height:17px}
.bottom-tab span{font-size:7px;line-height:1.1}
@media (max-width:410px){
  .app-shell{
    padding-top:calc(env(safe-area-inset-top,0px) + 21px);
  }
  .app-shell .tiles{
    width:64%;
    gap:6px
  }
  .app-shell .tiles .stat-tile,.app-shell .tiles .action-tile{
    height:55px;border-radius:14px
  }
  .app-shell .tiles .stat-number{font-size:18px}
  .app-shell .tiles .stat-label{font-size:8px}
  .app-shell .tiles .action-tile-icon{height:18px}
  .app-shell .tiles .action-tile-icon svg{width:16px;height:16px}
  .app-shell .tiles .action-tile-label{font-size:7.2px}
  .app-shell .stat-select .stat-value-row{height:18px}
  .app-shell .stat-select .stat-value-row .stat-number{font-size:18px}
  .app-shell .stat-select .stat-value-row .stat-number-long{font-size:10px;line-height:18px}
  .app-shell .stat-select .stat-minor{font-size:7px}
  .bottom-tab svg{width:16px;height:16px}
  .bottom-tab span{font-size:7px}
}
@media (min-width:650px){
  .app-shell .content-area{margin-top:42px}
}


/* v0.10.4: Action and Time cards are 30% smaller than previously,
   without touching Reading/Watching folders or section containers. */
.activities-shell .folder-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 10px}
.activities-shell .activity-open{min-height:121px;padding:15px 5px 13px;gap:6px;border-radius:13px}
.activities-shell .activity-symbol{width:50px;height:52px;border-radius:11px}
.activities-shell .activity-symbol svg{width:29px;height:29px}
.activities-shell .activity-title{font-size:12px;line-height:1.2}
.activities-shell .activity-kind{font-size:9px}
.activities-shell .activity-menu{width:22px;height:22px;top:4px;right:4px}
.activities-shell .activity-menu svg{width:14px;height:14px}
.activities-shell .activity-card{touch-action:pan-y}
.activities-shell .activity-card.touch-dragging{z-index:100}
@media(min-width:650px){
 .activities-shell .folder-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
}
@media(min-width:940px){
 .activities-shell .folder-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
}
.activity-featured-label{display:flex;align-items:center;gap:12px;margin:18px 1px 24px;padding:11px 12px;
 background:rgba(255,255,255,.64);border:1px solid #e0e2eb;border-radius:15px;color:#343a48;font-size:14px}
.activity-featured-label input{accent-color:#188bfa;width:21px;height:21px}
/* Compact Action activity week + progress heatmaps. */
.habit-panel{--activity-color:#188bfa;padding:22px 15px}
.habit-month-head{display:flex;align-items:center;justify-content:space-between;margin:18px 0 20px}
.habit-month-head strong{font-size:19px;letter-spacing:-.03em}
.habit-month-head button{border:0;border-radius:13px;background:#e9edf4;color:#343d4a;display:grid;place-items:center;width:35px;height:35px}
.habit-month-head button:last-child svg{transform:rotate(180deg)}
.habit-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}
.habit-day{min-width:0;min-height:58px;border:2px solid transparent;border-radius:12px;display:flex;flex-direction:column;
 align-items:center;justify-content:center;gap:7px;background:#eff0f5;color:#404653;transition:transform .15s}
.habit-day span{font-size:10px;font-weight:650;color:#7b8190}
.habit-day strong{font-size:14px;font-variant-numeric:tabular-nums}
.habit-day.done{background:color-mix(in srgb,var(--activity-color) 26%,#fff)}
.habit-day.today{box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--activity-color) 42%,transparent)}
.habit-day.selected{border-color:var(--activity-color);transform:scale(1.055)}
.habit-day:disabled{opacity:.40}
.habit-selected-label{text-align:center;font-weight:600;font-size:12px;color:#666d79;margin:24px 0 11px}
.habit-status button{font-size:13px;min-height:40px}
.habit-status .day-done.chosen{background:color-mix(in srgb,var(--activity-color) 22%,#fff);border-color:var(--activity-color);color:#232b35}
.habit-status .day-missed.chosen{background:#edf0f4;border-color:#9ca4b3;color:#414957}
.habit-periods{display:flex;justify-content:center;gap:19px;margin:29px 0 14px}
.habit-periods button{background:none;border:none;color:#9ba0ab;font-size:10px;font-weight:550;padding:4px 3px}
.habit-periods button.active{color:var(--activity-color);font-weight:750;border-bottom:2px solid var(--activity-color)}
.habit-heatmap{display:grid;justify-content:center;gap:3px;margin:16px auto}
.habit-heatmap.month{grid-template-columns:repeat(7,minmax(0,18px));gap:5px}
.habit-heatmap.year{grid-template-rows:repeat(7,5px);grid-auto-columns:5px;grid-auto-flow:column;gap:2px;max-width:100%;overflow-x:auto;justify-content:start;padding:0 1px 9px}
.heatmap-cell,.heatmap-blank{aspect-ratio:1;width:100%;display:block;border:0;border-radius:3px;background:color-mix(in srgb,var(--activity-color) 13%,#fff)}
.heatmap-cell.done{background:var(--activity-color)}
.heatmap-cell.missed{opacity:.55}
.heatmap-cell.inactive{background:#d7dbe4;opacity:.6}
.heatmap-cell.selected{outline:2px solid var(--activity-color);outline-offset:1px}
.heatmap-blank{background:transparent}
.habit-total{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #e2e5eb;margin-top:23px;padding-top:13px;
 font-size:12px;color:#737885}
.habit-total strong{color:#222633;font-size:20px}
.habit-total small{font-size:12px;font-weight:500;color:#777e8b}


/* v0.10.5 – grow top controls and empty text 15%; KEEP bottom navigation fixed. */
.app-shell .tiles{width:69%;max-width:449px;gap:9px}
.app-shell .tiles.tiles-folder{max-width:380px;gap:9px}
.app-shell .tiles .stat-tile,.app-shell .tiles .action-tile{height:75px;border-radius:20px;gap:5px}
.app-shell .tiles .stat-tile{gap:1px}
.app-shell .tiles .stat-number,.app-shell .stat-select .stat-value-row .stat-number{font-size:23px}
.app-shell .stat-select .stat-value-row{height:23px}
.app-shell .stat-select .stat-value-row .stat-number-long{font-size:clamp(11px,2.6vw,16px);line-height:23px}
.app-shell .stat-select .stat-minor{font-size:9px}
.app-shell .tiles .stat-label,.app-shell .tiles .action-tile-label{font-size:9.7px}
.app-shell .tiles .action-tile-icon{height:24px}
.app-shell .tiles .action-tile-icon svg{width:21px;height:21px}
.app-shell .empty-state h2{font-size:16.1px}
.app-shell .empty-state p{font-size:10.4px}
.app-shell .empty-state > svg{width:42.5px;height:42.5px}
@media(max-width:410px){
 .app-shell .tiles{width:73.6%;gap:7px}
 .app-shell .tiles .stat-tile,.app-shell .tiles .action-tile{height:63px;border-radius:16px}
 .app-shell .tiles .stat-number,.app-shell .stat-select .stat-value-row .stat-number{font-size:20.7px}
 .app-shell .stat-select .stat-value-row{height:21px}
 .app-shell .stat-select .stat-value-row .stat-number-long{font-size:11.5px;line-height:21px}
 .app-shell .stat-select .stat-minor{font-size:8px}
 .app-shell .tiles .stat-label{font-size:9.2px}
 .app-shell .tiles .action-tile-label{font-size:8.3px}
 .app-shell .tiles .action-tile-icon{height:21px}
 .app-shell .tiles .action-tile-icon svg{width:18.4px;height:18.4px}
}
/* Activity editor: same swatch/control size; only eliminate excess whitespace. */
.activity-editor-panel{padding:18px 19px 19px;max-height:calc(100% - 6px)}
.activity-editor-panel .dialog-header{margin-bottom:13px}
.activity-editor-panel .color-palette{margin:18px 0 12px;gap:11px 9px}
.activity-editor-panel .activity-field-label{margin:8px 0 7px}
.activity-editor-panel .activity-featured-label{margin:13px 1px 13px;padding:10px 12px}
.activity-editor-panel .primary-button{margin-top:12px}
.dialog-backdrop.editor-keyboard-open .activity-editor-panel{padding:12px 17px 14px;overflow:auto}
.editor-keyboard-open .activity-editor-panel .color-swatch{width:min(100%,44px)}
.editor-keyboard-open .activity-editor-panel .color-palette{margin:10px 0 9px;gap:7px 8px}
.editor-keyboard-open .activity-editor-panel .activity-field-label{margin:5px 0}
.editor-keyboard-open .activity-editor-panel .activity-featured-label{margin:9px 1px 9px;padding:8px 10px}
.editor-keyboard-open .activity-editor-panel .primary-button{margin-top:8px}
.editor-keyboard-open .activity-editor-panel .name-input{font-size:19px;padding:12px 15px}
.editor-keyboard-open .activity-editor-panel .activity-choice{min-height:51px}
@media(max-height:540px){
 .dialog-backdrop:has(.activity-editor-panel){align-items:center}
 .activity-editor-panel{max-height:calc(100% - 8px);overflow-y:auto}
}
/* Habit week: active day = tall pill; completed day = strong circular ring. */
.habit-panel{overflow:hidden}
.habit-month-head{justify-content:center;margin:6px 0 14px}
.habit-month-head strong{font-size:19px}
.habit-week-swipe{width:100%;touch-action:pan-y;user-select:none;-webkit-user-select:none;overflow:hidden}
.habit-week{gap:3px}
.habit-day{min-width:0;min-height:82px;padding:7px 0;border:1.5px solid transparent;border-radius:999px;
 background:transparent;display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:9px;transition:background .16s,border-color .16s;color:#505866}
.habit-day .habit-weekday{font-size:10px;font-weight:600;color:#717887}
.habit-day .habit-date{box-sizing:border-box;width:33px;height:33px;display:flex;align-items:center;justify-content:center;
 font-size:13px;font-weight:500;border:2px solid color-mix(in srgb,var(--activity-color) 18%,#e7e9ed);border-radius:50%;background:transparent}
.habit-day.done{background:transparent}
.habit-day.done .habit-date{border-color:var(--activity-color);border-width:2.5px;color:#222a34;font-weight:700}
.habit-day.today:not(.selected){box-shadow:none}
.habit-day.selected{transform:none;border-color:color-mix(in srgb,var(--activity-color) 30%,#fff);background:color-mix(in srgb,var(--activity-color) 5%,#fff)}
.habit-day.selected .habit-weekday{color:#283240}
.habit-day.selected .habit-date{box-shadow:0 0 0 1px color-mix(in srgb,var(--activity-color) 15%,transparent)}
.habit-day:disabled{opacity:.43}
.habit-selected-label{margin:15px 0 10px}
.habit-periods{margin:24px 0 13px}
.habit-heatmap.month{gap:5px} /* preserve existing month grid */
/* 7 weekdays x 52–54 columns; all real dates visible on any phone, no sideways scroll. */
.habit-heatmap.year{width:100%;max-width:100%;box-sizing:border-box;overflow:visible;
 display:grid;grid-template-columns:repeat(var(--year-columns),minmax(0,1fr));
 grid-template-rows:repeat(7,minmax(0,1fr));grid-auto-flow:column;
 gap:1.5px;justify-content:stretch;margin:15px 0 10px;padding:0;align-items:start}
.habit-heatmap.year .heatmap-cell,.habit-heatmap.year .heatmap-blank{
 width:100%;min-width:0;min-height:0;aspect-ratio:1;max-width:100%;
 border-radius:1px;padding:0;box-shadow:none}
.habit-heatmap.year .heatmap-cell.missed{background:#e3e6eb;opacity:1}
.habit-heatmap.year .heatmap-cell.inactive{background:#e7e9ed;opacity:.8}
.habit-heatmap.year .heatmap-cell.done{background:var(--activity-color);opacity:1}
.habit-heatmap.year .heatmap-cell.selected{outline:1px solid var(--activity-color);outline-offset:0}

/* v0.10.6: Increase only the three upper dashboard controls by 20%.
   Reading/Watching/Activities share these rules; bottom tabs stay frozen. */
.app-shell .tiles{width:82.8%;max-width:539px;gap:10.8px}
.app-shell .tiles.tiles-folder{max-width:456px;gap:10.8px}
.app-shell .tiles .stat-tile,.app-shell .tiles .action-tile{height:90px;border-radius:24px;gap:6px}
.app-shell .tiles .stat-tile{gap:1px}
.app-shell .tiles .stat-number,.app-shell .stat-select .stat-value-row .stat-number{font-size:27.6px}
.app-shell .stat-select .stat-value-row{height:28px}
.app-shell .stat-select .stat-value-row .stat-number-long{font-size:clamp(13px,3.1vw,19px);line-height:28px}
.app-shell .stat-select .stat-minor{font-size:10.8px}
.app-shell .tiles .stat-label,.app-shell .tiles .action-tile-label{font-size:11.6px}
.app-shell .tiles .action-tile-icon{height:29px}
.app-shell .tiles .action-tile-icon svg{width:25.2px;height:25.2px}
@media(max-width:410px){
  .app-shell .tiles{width:88.32%;gap:8.4px}
  .app-shell .tiles .stat-tile,.app-shell .tiles .action-tile{height:75.6px;border-radius:19px}
  .app-shell .tiles .stat-number,.app-shell .stat-select .stat-value-row .stat-number{font-size:24.8px}
  .app-shell .stat-select .stat-value-row{height:25px}
  .app-shell .stat-select .stat-value-row .stat-number-long{font-size:13.8px;line-height:25px}
  .app-shell .stat-select .stat-minor{font-size:9.6px}
  .app-shell .tiles .stat-label{font-size:11px}
  .app-shell .tiles .action-tile-label{font-size:10px}
  .app-shell .tiles .action-tile-icon{height:25px}
  .app-shell .tiles .action-tile-icon svg{width:22.1px;height:22.1px}
}

/* v0.10.6: One compact editor layout before AND after keyboard activation.
   Keep the visual top fixed on phones, so resizing VisualViewport never
   recenters a dialog and makes it jump upward. Tiny viewports may scroll
   inside the dialog instead of losing the Save/Delete controls. */
.dialog-backdrop .editor-panel,
.dialog-backdrop.editor-keyboard-open .editor-panel{
  width:min(calc(100% - 46px),455px);
  padding:14px 17px 15px;
  border-radius:27px;
  max-height:calc(100% - 10px);
  overflow-y:auto;
  overscroll-behavior:contain;
}
.dialog-backdrop .editor-panel .dialog-header{margin-bottom:9px;min-height:32px}
.dialog-backdrop .editor-panel .dialog-header h2{font-size:17px}
.dialog-backdrop .editor-panel .dialog-header .pill-button{padding:7px 12px;font-size:14px}
.dialog-backdrop .editor-panel .name-input{min-height:42px;padding:9px 12px;font-size:17px;border-radius:14px}
.dialog-backdrop .editor-panel .color-palette{margin:11px 0 10px;gap:8px 9px}
.dialog-backdrop .editor-panel .color-swatch{width:min(100%,37px)}
.dialog-backdrop .editor-panel .section-delete-only{margin:5px 0 7px}
.dialog-backdrop .editor-panel .section-delete-only .delete-button{min-width:148px;padding:8px 13px}
.dialog-backdrop .editor-panel .primary-button{padding:11px 12px;border-radius:16px;font-size:16px}
.dialog-backdrop .activity-editor-panel .activity-field-label{margin:4px 0 5px;font-size:13px}
.dialog-backdrop .activity-editor-panel .activity-choice{min-height:43px;font-size:14px}
.dialog-backdrop .activity-editor-panel .activity-type-choices{gap:8px}
.dialog-backdrop .activity-editor-panel .activity-featured-label{
  margin:7px 0;padding:7px 9px;gap:9px;font-size:13px;
}
.dialog-backdrop .activity-editor-panel .activity-featured-label input{width:19px;height:19px}
.activity-editor-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin-top:9px}
.activity-editor-actions.with-delete{grid-template-columns:repeat(2,minmax(0,1fr))}
.dialog-backdrop .activity-editor-panel .activity-editor-actions .primary-button{
  min-width:0;margin:0;min-height:43px;
}
.dialog-backdrop .activity-editor-panel .activity-editor-actions .publication-delete{
  width:100%;min-width:0;min-height:43px;margin:0;padding:8px 10px;
  border-radius:16px;font-size:14px;
}
@media(max-width:620px){
  .dialog-backdrop:has(.editor-panel){
    align-items:flex-start;
    padding:calc(env(safe-area-inset-top,0px) + 22px) 0 8px;
  }
  .dialog-backdrop .editor-panel,
  .dialog-backdrop.editor-keyboard-open .editor-panel{
    max-height:calc(100% - 30px - env(safe-area-inset-top,0px));
  }
}

/* v0.10.7: Folder-level controls occupy the same three-column slots as the
   approved root controls. With two buttons, leave the third slot empty instead
   of stretching both to half the row. Dimensions and icon sizes stay exact. */
.app-shell .tiles.tiles-folder{
  grid-template-columns:repeat(3,minmax(0,1fr));
  max-width:539px;
}

/* Every editable dialog opens near the top at its natural height, whether the
   keyboard is hidden or shown. The visible-height constraint permits internal
   scrolling without shrinking fields, swatches or action buttons. */
.dialog-backdrop:has(.editor-panel,.link-panel){
  align-items:flex-start;
  justify-content:center;
  padding:calc(env(safe-area-inset-top,0px) + 12px) 0 8px;
}
.dialog-backdrop .editor-panel,
.dialog-backdrop.editor-keyboard-open .editor-panel,
.dialog-backdrop .link-panel{
  align-self:flex-start;
  max-height:calc(100% - 20px - env(safe-area-inset-top,0px));
  overflow-y:auto;
  overscroll-behavior:contain;
}
.dialog-backdrop .link-panel{
  width:min(calc(100% - 46px),455px);
  border-radius:27px;
}
@media(max-width:620px){
  .dialog-backdrop:has(.editor-panel,.link-panel){
    padding-top:calc(env(safe-area-inset-top,0px) + 12px);
  }
}

/* Action calendar belongs directly to the activity page, not to a white
   floating sheet. Internal day controls and heatmap retain their own styling. */
.activities-shell .habit-panel{
  background:transparent;
  border:none;
  border-radius:0;
  box-shadow:none;
}

/* v0.10.8: Time and Action share the approved flat, integrated activity page. */
.activities-shell .timer-panel{
  background:transparent;border:0;border-radius:0;box-shadow:none;
}
.timer-display-edit{
  display:block;width:100%;border:0;padding:0;background:transparent;color:inherit;
  cursor:pointer;touch-action:manipulation;
}
.timer-display-edit:active{opacity:.72}
.time-history{margin:36px auto 0;padding:22px 4px 0;border-top:1px solid rgba(98,107,123,.24)}
.time-history-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:14px}
.time-history-head h2{font-size:18px;letter-spacing:-.025em;margin:0;color:#252b38}
.time-history-switch{display:flex;gap:3px;background:rgba(205,212,226,.46);border-radius:14px;padding:3px}
.time-history-switch button{padding:8px 13px;border:0;border-radius:11px;background:transparent;color:#677182;font-size:13px;font-weight:600}
.time-history-switch button.active{color:#126cca;background:#fff;box-shadow:0 1px 4px rgba(27,33,44,.09)}
.time-history-list{max-height:450px;overflow-y:auto;overscroll-behavior:contain}
.time-history-row{display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:51px;padding:11px 3px;border-bottom:1px solid rgba(105,116,135,.2);font-size:14px;color:#434e5e}
.time-history-row strong{font-variant-numeric:tabular-nums;color:#1d2938;font-size:16px}
.time-history-empty{margin:18px 0;color:#747d8d;font-size:14px;text-align:center}
.timer-adjust-dialog .dialog-header{margin-bottom:12px}
.timer-adjust-hint{text-align:center;font-size:13px;color:#707885;line-height:1.5;margin:12px 0 21px}
.timer-adjust-mode{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:0 0 23px}
.timer-adjust-mode button{min-height:46px;border:1px solid #d5dcea;border-radius:17px;background:#eff1f6;color:#4b5668;font-weight:650}
.timer-adjust-mode button.selected{border-color:#188bfa;color:#0872da;background:#dcecff}
.timer-adjust-wheels{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:25px}
.timer-adjust-wheels label{display:flex;align-items:center;flex-direction:column;gap:9px;color:#707987;font-size:14px;font-weight:600}
.timer-adjust-wheels input{width:100%;min-width:0;min-height:72px;border-radius:20px;border:1.5px solid #a7c8f6;background:#e5efff;color:#1d2531;font-size:32px;font-weight:700;text-align:center;font-variant-numeric:tabular-nums;outline:none;appearance:none}
.timer-adjust-wheels input:focus{border-color:#188bfa;box-shadow:0 0 0 2px rgba(24,139,250,.13)}
.timer-adjust-dialog .primary-button{width:100%}
.habit-divider{height:1px;background:rgba(94,105,124,.24);margin:27px 0 8px}
.habit-panel .habit-periods{margin:20px 0 20px}
.habit-panel .habit-total{border-top:1px solid rgba(94,105,124,.24);padding-top:18px;margin-top:18px}
.habit-heatmap.month .heatmap-cell.missed{background:#bac0cc;opacity:1;border:1px solid rgba(71,81,103,.2)}
.habit-heatmap.month .heatmap-cell.inactive{background:#e1e4e9;opacity:1}
.year-overview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:25px 16px;margin-top:22px}
.year-month{min-width:0;border-top:1px solid rgba(95,103,123,.2);padding-top:10px}
.year-month h3{font-size:13px;font-weight:700;color:#505a6a;margin:0 0 10px}
.year-month-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.year-day{display:block;width:100%;aspect-ratio:1;border-radius:3px;background:#abb3c0;box-shadow:inset 0 0 0 1px rgba(78,87,106,.15)}
.year-day.done{background:var(--activity-color);box-shadow:none}
.year-day.future{background:#dfe2e8;box-shadow:none}
.year-day.blank{background:transparent;box-shadow:none}

/* v0.10.8: one consistent dense flow for Reading, Watching and Activities.
   Widths/positions are calculated after image dimensions are available. */
.content-flow{display:block!important;position:relative;min-width:0;min-height:0;margin-top:15px;margin-bottom:28px}
.content-flow>.flow-item{position:absolute!important;margin:0!important;min-width:0;max-width:none;transition:box-shadow .2s ease}
.content-flow>.publication-tile{height:auto;align-self:auto}
.content-flow>.section-card{height:auto;align-self:auto}
.content-flow>.section-card{padding-bottom:12px}
.content-flow .section-card .section-body{padding-top:12px}
.content-flow .section-card .section-body>.content-flow{margin-top:0;margin-bottom:0}
.content-flow .section-card .section-body-empty{min-height:44px}
.content-flow .section-card,.content-flow .section-card *{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.section-collapse{width:34px;height:36px;flex:none;display:grid;place-items:center;border:0;border-radius:9px;background:transparent;color:#182338;padding:0;touch-action:manipulation}
.section-collapse:active{background:rgba(255,255,255,.3)}
/* Delete confirmation replaces the visible editor *in place*: same bounds,
   no autofocus/keyboard dismissal and no bottom sheet jump. */
.editor-confirm-parent{position:relative;isolation:isolate}
.editor-confirm-overlay{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;justify-content:space-between;gap:18px;padding:23px 24px 20px;border-radius:inherit;background:linear-gradient(125deg,#fff9f2,#edf4ff);box-shadow:inset 0 0 0 1px rgba(255,255,255,.9)}
.editor-confirm-overlay h2{margin:0;font-size:20px;font-weight:700;color:#191b22}
.editor-confirm-overlay .confirm-actions{margin-top:auto}
.publication-confirm-overlay{position:fixed;inset:0;z-index:700;display:flex;align-items:flex-start;justify-content:center;padding:calc(env(safe-area-inset-top,0px) + 22px) 22px 18px;background:rgba(36,43,53,.32);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
.publication-confirm-overlay .confirm-panel{width:min(100%,455px);min-height:170px;display:flex;flex-direction:column;justify-content:space-between}
.editor-confirm-backdrop{align-items:flex-start;padding-top:calc(env(safe-area-inset-top,0px) + 22px)}
.editor-confirm-backdrop .confirm-panel{width:min(calc(100% - 46px),455px);min-height:170px}
.confirm-panel p{display:none}
/* Year: one compact, crisp 7-row strip (53 columns for ordinary years).
   Every non-completed date has the same appearance; no today/future state. */
.habit-heatmap.year{width:100%;max-width:100%;display:grid;grid-template-columns:repeat(var(--year-columns),minmax(0,1fr));grid-template-rows:repeat(7,minmax(0,1fr));grid-auto-flow:column;gap:1.5px;justify-content:stretch;overflow:visible;margin:15px 0 10px;padding:0}
.habit-heatmap.year .heatmap-cell{width:100%;min-width:0;aspect-ratio:1;border:0.8px solid #b8c0cb;border-radius:1px;box-shadow:none;opacity:1;background:#bac0cc;outline:none}
.habit-heatmap.year .heatmap-cell.missed,.habit-heatmap.year .heatmap-cell.inactive{background:#bac0cc;opacity:1;border-color:#b8c0cb}
.habit-heatmap.year .heatmap-cell.done{background:var(--activity-color);border-color:var(--activity-color);opacity:1}
.habit-heatmap.year .heatmap-blank{width:100%;min-width:0;aspect-ratio:1;background:transparent;border:0;box-shadow:none;opacity:0}
.content-flow>.activity-card{height:auto;align-self:auto}
.content-flow.flow-dragging>.flow-item{transition:none}
.content-flow>.flow-drag-source{opacity:.24;filter:grayscale(.3)}
/* The dragged cover must not intercept hit-testing of its neighbours after a
   live reorder; its floating drag label is already pointer-inert. */
.drag-active .content-flow>.flow-drag-source[data-flow-kind="publication"]{pointer-events:none}
.flow-drag-ghost{position:fixed!important;z-index:1200!important;pointer-events:none!important;
  padding:13px 18px;border:1px solid #9abbec;border-radius:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  background:#f2f7ff;color:#183c6a;font-size:16px;font-weight:700;opacity:.96;
  box-shadow:0 12px 28px rgba(25,35,58,.2);transition:none!important;touch-action:none}
.flow-drag-target{outline:2px dashed #188bfa;outline-offset:5px}
.content-flow .publication-tile.with-cover img{user-select:none;-webkit-user-drag:none}
.content-flow .publication-tile,.content-flow .activity-open,.content-flow .section-toggle{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.content-flow .folder-tile,.content-flow .activity-card,.content-flow .section-card{touch-action:pan-y}
@media(pointer:coarse){.content-flow .flow-item,.content-flow .flow-item *{-webkit-user-drag:none}}
.content-flow .section-header,.content-flow .section-toggle,
.content-flow .publication-tile,.content-flow .activity-open,
.content-flow .folder-title{touch-action:none}
@media(prefers-reduced-motion:reduce){.content-flow>.flow-item{transition:none}}
@media(min-width:650px){.year-overview{grid-template-columns:repeat(3,minmax(0,1fr));gap:28px 20px}}

/* v0.10.13: quiet pencil controls retain a generous invisible touch target. */
.content-flow .edit-trigger,.activities-shell .edit-trigger{
 width:40px;height:40px;min-width:40px;min-height:40px;flex:none;
 border:0;border-radius:10px;padding:0;background:transparent;
 display:grid;place-items:center;color:#777e8a;opacity:.84
}
.content-flow .edit-trigger svg,.activities-shell .edit-trigger svg{width:17px;height:17px}
.content-flow .edit-trigger:hover,.content-flow .edit-trigger:active,
.activities-shell .edit-trigger:hover,.activities-shell .edit-trigger:active{
 background:transparent;color:#4c5868;opacity:1
}
.activities-shell .activity-menu.edit-trigger{top:0;right:0}

/* Retain the full original editor node (and focused Android text field) but
   show only a compact confirmation card at precisely the editor's top edge. */
.dialog-panel.editor-confirm-parent{
 background:transparent!important;border-color:transparent!important;
 box-shadow:none!important;overflow:visible!important
}
.dialog-panel.editor-confirm-parent > :not(.editor-confirm-overlay){
 opacity:0!important;pointer-events:none!important
}
.editor-confirm-overlay{
 inset:0 0 auto!important;height:172px;min-height:172px;
 padding:21px 18px 22px;justify-content:center!important;align-items:center;
 gap:23px;background:linear-gradient(125deg,#fff9f2,#edf4ff);
 border:1px solid rgba(255,255,255,.9);
 box-shadow:0 22px 65px rgba(42,40,56,.26)
}
.editor-confirm-overlay h2,.confirm-panel h2{
 width:100%;margin:0!important;text-align:center;font-size:21px
}
.editor-confirm-overlay .confirm-actions,.confirm-panel .confirm-actions{
 margin:0!important;width:100%;display:flex;justify-content:center;
 align-items:center;gap:12px
}
.editor-confirm-overlay .confirm-actions button,.confirm-panel .confirm-actions button{
 box-sizing:border-box;width:112px;min-height:43px;
 display:inline-flex;align-items:center;justify-content:center;
 border-radius:24px;padding:9px 15px
}
.confirm-panel{height:172px;min-height:172px!important;max-height:172px!important;
 padding:21px 18px 22px;display:flex;flex-direction:column;
 align-items:center;justify-content:center!important;gap:23px}
.publication-confirm-overlay .confirm-panel{min-height:172px}

/* v0.10.14: put the count on the SAME line as the folder name. A completely
   empty folder has no count at all, and its approved edit pencil stays put. */
.folder-label{display:flex;align-items:baseline;gap:5px;min-width:0;flex:1}
.content-flow .folder-label{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.folder-label .folder-title{flex:0 1 auto}
.folder-inline-count{flex:none;white-space:nowrap;color:#818995;font-size:13px;font-weight:500;line-height:1.3}

/* A shared seven-column coordinate grid keeps the weekday labels exactly
   above Month cells; Year intentionally receives none of these changes. */
.habit-month-calendar{width:max-content;max-width:100%;margin:16px auto}
.habit-month-weekdays{display:grid;grid-template-columns:repeat(7,minmax(0,18px));
 gap:5px;justify-content:center;margin:0 0 8px;text-align:center}
.habit-month-weekdays span{display:block;min-width:0;color:#778190;
 font-size:9px;font-weight:650;line-height:12px;letter-spacing:-.04em;white-space:nowrap}
.habit-month-calendar .habit-heatmap.month{margin:0}
/* Keep unarrived dates muted but readable, unlike the former near-transparent
   weekday pills and almost white inactive Month cells. */
.habit-day:disabled{opacity:.77}
.habit-day:disabled .habit-date{border-color:#bec5d0;color:#737b88}
.habit-day:disabled .habit-weekday{color:#77818f}
.habit-heatmap.month .heatmap-cell.inactive{background:#d1d6df;opacity:1;
 border:1px solid #b9c0cc}


