
*{box-sizing:border-box}body{margin:0;background:#0d172a;color:#f0f5ff;font:15px system-ui,sans-serif}button,a{font:inherit;color:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible{outline:3px solid #ffd38a;outline-offset:3px}button{border:0;background:none}#shell{max-width:520px;margin:auto;min-height:100dvh;display:flex;flex-direction:column;padding: max(14px,env(safe-area-inset-top)) 16px max(12px,env(safe-area-inset-bottom));background:radial-gradient(ellipse at 75% 10%,#274563,#142943 48%,#101b30 90%)}header{display:flex;align-items:center;justify-content:space-between;gap:8px}header h1{font-size:18px;margin:0}header small{display:block;color:#b9c9df;font-size:11px;margin-top:3px}.edit{padding:10px 12px;border:1px solid #75849c;border-radius:12px}#pageTitle{font-size:17px;margin:28px 0 12px}.preview-note{color:#b9c9df;font-size:12px;line-height:1.5}#page{flex:1;touch-action:pan-y;min-height:280px}.tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px 7px;align-content:start}.tile{min-width:0;text-align:center;position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;padding:3px 0;text-decoration:none;min-height:88px}.symbol{display:grid;place-items:center;width:min(100%,60px);aspect-ratio:1;border-radius:17px;background:linear-gradient(145deg,#365f80,#213b57);border:1px solid #829cb666;box-shadow:0 4px 8px #0003;font-size:27px;font-weight:700;overflow:hidden}.symbol img{width:100%;height:100%;object-fit:cover}.symbol.folder{background:#ffffff18;grid-template-columns:1fr 1fr;gap:3px;padding:8px}.symbol.folder i{font-style:normal;display:grid;place-items:center;border-radius:5px;background:#355878;font-size:12px;aspect-ratio:1}.tile span:last-child{font-size:12px;line-height:1.25;overflow-wrap:anywhere}.tile[data-edit=true] .symbol{border:1px dashed #ffca80}.pages{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px;margin:12px 0}.original-name{font-size:12px;color:#c4d2e4;margin:0}.name-actions{margin-top:8px!important}.tile span:last-child{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-width:100%}.pages button{min-width:44px;min-height:44px;border-radius:14px}.pages button[aria-current=true]{background:#ffffff24;font-weight:700}.dock{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:12px 8px 4px;border-radius:25px;background:#cbdcff20;border:1px solid #b8d7ef32}.dock .symbol{width:min(100%,53px);border-radius:15px}.dock .tile{min-height:75px}.edit-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.edit-actions button,.dialog-actions button{background:#ffffff17;border:1px solid #75849c;border-radius:10px;min-height:44px;padding:8px 12px}.edit-actions[hidden],button[hidden]{display:none}dialog{color:#f0f5ff;background:#1b304a;border:1px solid #8195ad;border-radius:20px;width:min(94%,470px);padding:18px}dialog::backdrop{background:#0009}dialog h2{margin-top:0;font-size:19px}dialog label{display:block;margin:12px 0}dialog select,dialog input{color:#101b30;background:#f1f5fb;padding:10px;border-radius:8px;width:100%;font:inherit}dialog .dialog-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.folder-head{display:flex;align-items:center;justify-content:space-between}.folder-head button{padding:12px}.legacy{display:block;text-align:center;font-size:12px;color:#c4d2e4;padding:10px}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}@media(max-width:340px){#shell{padding-inline:10px}.tiles{gap:14px 4px}.symbol{width:52px}.tile span:last-child{font-size:11px}}
.tile{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.tile img{pointer-events:none;-webkit-user-drag:none}.tile.is-held .symbol{transform:scale(1.1);box-shadow:0 0 0 3px #f0c477}.drag-ghost{position:fixed!important;z-index:9999;pointer-events:none!important;opacity:.92;transform:translate(-50%,-50%);width:84px;filter:drop-shadow(0 6px 12px #0008)}.drag-ghost .symbol{transform:scale(1.12)}.drag-source{opacity:.35}.drop-target{outline:2px solid #f1c681!important;outline-offset:2px;border-radius:14px;background:#ffffff15!important}.folder-drop{display:none;text-align:center;padding:12px;border:1px dashed #a8c0d9;border-radius:12px;margin-top:14px;color:#d4e6f8}.folder-drop.active{display:block}#dragHint{font-size:12px;color:#f4ce94;min-height:18px;margin:4px 0}#rulePane{position:fixed;inset:0;z-index:500;background:#fff;display:flex;flex-direction:column;color:#162b43}#rulePane[hidden]{display:none}#ruleFrame{width:100%;flex:1;min-height:0;border:0;background:#fff}.rule-homebar{display:flex;align-items:center;justify-content:center;gap:12px;background:#142943;color:white;padding:6px 12px max(6px,env(safe-area-inset-bottom));box-shadow:0 -2px 8px #0002}.rule-homebar button{min-height:44px;flex:1;font-weight:700;background:#ffffff15;border-radius:12px}.rule-homebar a{font-size:12px;padding:8px;color:#d3e1ee}.rule-homebar button:focus-visible{outline:2px solid #ffd38a}body.rule-open{overflow:hidden}.pages button[data-page-id]{touch-action:none}dialog{max-height:90dvh;overflow:auto}#folderTiles{min-height:88px}.tile[disabled]{opacity:.5}
#tiles{grid-auto-rows:88px;gap:12px 7px;position:relative;min-height:388px}#tiles .home-slot{min-width:0;min-height:88px;display:flex;align-items:stretch;justify-content:stretch;border-radius:16px;position:relative}#tiles .home-slot>.tile{width:100%;height:100%;min-height:0}#tiles .home-slot[data-empty="true"]{border:1px dashed transparent}#shell.is-dragging #tiles .home-slot[data-empty="true"],#shell.is-editing #tiles .home-slot[data-empty="true"]{border-color:#829cb644;background:#ffffff08}.home-slot.drop-target{background:#fff2!important}.tile.folder-ready .symbol{box-shadow:0 0 0 3px #82e0b0;transform:scale(1.08)}#shell.is-dragging .pages button[aria-current=true]{outline:2px solid #f0c477}.drag-ghost{height:88px;min-height:0!important}.tile:active .symbol{filter:brightness(1.1)}#page{min-height:0}#pageTitle{margin-top:16px}#dragHint{position:fixed;z-index:10000;left:50%;top:66px;transform:translateX(-50%);max-width:90vw;padding:7px 12px;background:#1c324d;border:1px solid #b39c75;border-radius:12px;pointer-events:none;margin:0;text-align:center}#dragHint[hidden]{display:none}
[hidden]{display:none!important}.page-controls{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;margin:5px 0 8px}.page-controls .pages{margin:0;gap:2px}.drawer-toggle{min-height:44px;white-space:nowrap;font-size:12px;border:1px solid #75849c;border-radius:12px;padding:8px 12px}.folder-tools{display:flex;align-items:center;gap:2px}.folder-head h2{margin-bottom:0;min-width:0;overflow-wrap:anywhere}.muted-note{font-size:12px;color:#c4d2e4;line-height:1.5}.danger-action{color:#ffc0b9!important}.drawer-row,.manager-row{display:flex;align-items:center;gap:8px;padding:7px 0;border-bottom:1px solid #ffffff20}.drawer-row .drawer-open,.manager-row .manager-open{flex:1;text-align:left;min-width:0;display:flex;align-items:center;gap:10px;padding:8px 0;min-height:48px}.drawer-symbol{display:grid;place-items:center;width:42px;height:42px;flex:none;background:#365f80;border-radius:12px;font-size:20px}.drawer-copy{display:flex;flex-direction:column;gap:3px;min-width:0;overflow-wrap:anywhere}.drawer-copy small{font-size:11px;color:#bfd0e3}.drawer-row .drawer-place,.manager-row .manager-arrow{min-height:44px;min-width:44px;border:1px solid #7387a0;border-radius:10px;padding:6px;font-size:12px}.manager-arrow:disabled{opacity:.3}.manager-number{min-width:28px;font-weight:700;color:#ffd38a}.page-enter{animation:page-in .16s ease-out}@keyframes page-in{from{opacity:.45;transform:translateX(var(--page-shift,8px))}to{opacity:1;transform:translateX(0)}}@media(prefers-reduced-motion:reduce){.page-enter{animation:none}}
#tiles{grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:88px}.home-widget{position:relative;min-width:0;min-height:0;display:flex;flex-direction:column;border:1px solid #8da5c47a;border-radius:17px;background:linear-gradient(150deg,#254a67,#1a304c);padding:9px 10px;color:#f4f7fe;box-shadow:0 4px 8px #0002;overflow:hidden}.home-widget .widget-handle{display:flex;align-items:center;justify-content:space-between;gap:6px;text-align:left;flex:none;padding:3px 0 7px;min-height:32px;font-weight:700;touch-action:none;user-select:none;-webkit-touch-callout:none}.widget-handle span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.widget-handle span:last-child{font-size:15px;color:#c0d0e2}.widget-list{min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;display:flex;flex-direction:column;gap:3px}.widget-list button{flex:none;text-align:left;min-height:32px;display:flex;align-items:center;justify-content:space-between;gap:4px;background:#ffffff10;border-radius:7px;padding:5px 7px;font-size:12px;line-height:1.3}.widget-list button span:first-child{min-width:0;overflow-wrap:anywhere}.widget-list button span:last-child{color:#a8bfdc}.widget-note{font-size:10px;line-height:1.4;margin:0 0 5px;color:#c6d6e8}.widget-choice{width:100%;text-align:left;min-height:50px;padding:9px;border-bottom:1px solid #ffffff22;display:block}.widget-choice small{display:block;color:#c6d6e8;margin-top:4px}.widget-ghost{width:min(260px,70vw)!important;height:150px!important;min-height:0!important;overflow:hidden;pointer-events:none!important}.widget-ghost *{pointer-events:none!important}.widget-drop-mark{position:absolute;pointer-events:none;z-index:9;border:2px dashed #ffd38a;border-radius:16px;background:#ffd38a16}.widget-drop-mark.invalid{border-color:#ffa7a2;background:#ff8b841a}.page-controls{gap:5px}.drawer-toggle{padding:7px 9px}.home-slot[data-empty="true"]{min-height:0}

/* Keep the dock and navigation visible; only the home grid scrolls. */
#shell{height:100dvh;min-height:0;overflow:hidden}#shell>header,#shell>.preview-note,#shell>#pageTitle,#shell>#actions,#shell>.page-controls,#shell>#dock,#shell>.legacy,#storageWarning{flex:none}#page{overflow-y:auto;overflow-x:hidden;min-height:0;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#7289a260 transparent;padding:2px 1px 8px}#tiles{min-height:0;align-content:start}.preview-note{margin:8px 0 4px}#pageTitle{margin:6px 0 10px}.page-controls{margin:4px 0}.legacy{padding:7px}.edit-actions{max-height:25dvh;overflow:auto;margin-bottom:5px}.edit-actions button{font-size:12px;padding:6px 8px}.storage-warning{font-size:12px;color:#ffce99;margin:3px 0}.rule-loading{font-size:12px;text-align:center;padding:5px;color:#364d67;background:#eef4fc}.home-slot .tile{touch-action:none}@media(max-height:630px){.preview-note{display:none}#pageTitle{margin:4px 0}.dock{padding:6px 6px 2px}.dock .tile{min-height:60px}.dock .symbol{width:42px}.legacy{padding:4px}}
.brand{display:flex;align-items:center;gap:9px;min-width:0}.brand img{border-radius:10px;flex:none}.brand h1{font-size:17px}.brand small{font-size:11px}
.rule-homebar{gap:6px}.rule-homebar #ruleBack{flex:0 0 68px}.rule-homebar #ruleBack:disabled{opacity:.4}.rule-homebar #homeReturn{flex:1}.rule-homebar a{font-size:11px;white-space:nowrap}.rule-loading button{color:#164b72;text-decoration:underline;min-height:30px}