  html, body { height: 100%; overflow: hidden; }
  body { background: var(--bg); }

  /* ======================= App shell ======================= */
  .app { display: grid; grid-template-columns: 232px 1fr; height: 100vh; }

  .sidebar {
    background: var(--sidebar);
    -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
    border-right: .5px solid var(--separator);
    display: flex; flex-direction: column; padding: 12px 10px 10px; gap: 2px; min-height: 0;
  }
  .brand { display: flex; align-items: center; gap: 9px; padding: 6px 8px 14px; }
  .app-icon {
    width: 28px; height: 28px; border-radius: 7px; flex: none; position: relative; overflow: hidden;
    background: linear-gradient(145deg, #5ac8fa 0%, #007aff 45%, #5e5ce6 100%);
    box-shadow: inset 0 0 0 .5px rgba(255,255,255,.3), 0 1px 3px rgba(0,0,0,.2);
    display: grid; place-items: center; color: #fff;
  }
  .app-icon svg { width: 62%; height: 62%; }
  .brand .name { font-weight: 700; font-size: 14px; letter-spacing: -0.01em; }
  .brand .sub { font-size: 11px; color: var(--label-2); margin-top: -1px; }

  .side-h { font-size: 11px; font-weight: 600; color: var(--label-3); padding: 12px 10px 4px; }
  .side-item {
    display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; border-radius: 7px;
    color: var(--label); font-size: 13px; cursor: default; transition: background .12s;
  }
  .side-item:hover { background: var(--fill-3); }
  .side-item.on { background: var(--fill); }
  .side-item .i { font-size: 16px; color: var(--blue); }
  .side-item .badge { margin-left: auto; color: var(--label-3); font-size: 12px; font-variant-numeric: tabular-nums; }
  .side-item .badge.hot { color: #fff; background: var(--orange); border-radius: 9px; padding: 0 6px; height: 17px; line-height: 17px; font-weight: 600; font-size: 11px; }
  .side-item .thumb { width: 18px; height: 18px; border-radius: 4px; flex: none; }
  .side-spacer { flex: 1; }

  .storage { margin: 6px 4px 8px; padding: 10px 10px 11px; border-radius: 10px; background: var(--fill-3); }
  .storage .srow { display: flex; justify-content: space-between; font-size: 11px; color: var(--label-2); }
  .storage .srow b { color: var(--label); font-weight: 600; }
  .meter { height: 5px; border-radius: 3px; background: var(--fill); margin-top: 7px; overflow: hidden; }
  .meter > i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--blue), #5e5ce6); }
  .side-foot { display: flex; gap: 2px; }
  .side-foot .side-item { flex: 1; }

  /* ======================= Main ======================= */
  .main { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
  .view { display: none; flex-direction: column; min-height: 0; flex: 1; }
  .view.on { display: flex; }

  .toolbar {
    height: 52px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 16px 0 20px;
    background: var(--toolbar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-bottom: .5px solid var(--separator); position: relative; z-index: 2;
  }
  .toolbar .title { font-size: 15px; font-weight: 700; letter-spacing: -0.012em; }
  .toolbar .subtitle { font-size: 11px; color: var(--label-2); }
  .toolbar .grow { flex: 1; }
  .tb-group { display: flex; align-items: center; gap: 6px; }

  .scroll { flex: 1; overflow-y: auto; overflow-x: hidden; }
  .scroll::-webkit-scrollbar { width: 12px; }
  .scroll::-webkit-scrollbar-thumb { background: var(--fill); border-radius: 6px; border: 3px solid transparent; background-clip: content-box; }

  /* ======================= Library ======================= */
  .lib { padding: 22px 28px 120px; }
  .lib-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 18px; }

  .callout {
    display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 14px; margin-bottom: 28px;
    background: linear-gradient(100deg, color-mix(in srgb, var(--green) 12%, var(--bg)) 0%, var(--bg-2) 70%);
    box-shadow: 0 0 0 .5px color-mix(in srgb, var(--green) 30%, var(--separator));
  }
  .callout .stack { position: relative; width: 64px; height: 48px; flex: none; }
  .callout .stack div { position: absolute; inset: 0; border-radius: 8px; box-shadow: var(--shadow-md), 0 0 0 1.5px var(--bg); }
  .callout .stack div:nth-child(1) { transform: rotate(-8deg) translate(-4px, 2px); }
  .callout .stack div:nth-child(2) { transform: rotate(6deg) translate(5px, 1px); }
  .callout h4 { margin: 0; font-size: 14px; font-weight: 600; }
  .callout p { margin: 2px 0 0; color: var(--label-2); font-size: 12px; }
  .callout .grow { flex: 1; }

  .sec-h { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 12px; }
  .sec-h h3 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.015em; }
  .sec-h span { color: var(--label-3); font-size: 12px; }

  .albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 28px 22px; margin-bottom: 36px; }
  .album-card { cursor: default; }
  .album-card .cover {
    aspect-ratio: 1; border-radius: 12px; position: relative; overflow: hidden;
    box-shadow: 0 0 0 .5px rgba(0,0,0,.08), var(--shadow-sm);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease);
  }
  .album-card:hover .cover { transform: translateY(-3px); box-shadow: 0 0 0 .5px rgba(0,0,0,.08), var(--shadow-lg); }
  .album-card .cover .ph { position: absolute; inset: 0; transition: transform .6s var(--ease); }
  .album-card:hover .cover .ph { transform: scale(1.04); }
  .album-card .cover .over {
    position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; justify-content: space-between; align-items: center;
  }
  .album-card .cover .chip {
    height: 22px; padding: 0 8px; border-radius: 11px; font-size: 11px; font-weight: 600; color: #fff;
    background: rgba(0,0,0,.38); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    display: inline-flex; align-items: center; gap: 4px;
  }
  .album-card .cover .progress-ring { width: 22px; height: 22px; }
  .album-card h5 { margin: 10px 0 1px; font-size: 13px; font-weight: 600; }
  .album-card .meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--label-2); }

  .new-card .cover {
    background: transparent; box-shadow: none; border: 1.5px dashed var(--separator-strong);
    display: grid; place-items: center; color: var(--label-3); transition: all .25s var(--ease);
  }
  .new-card:hover .cover { border-color: var(--blue); color: var(--blue); background: color-mix(in srgb, var(--blue) 5%, transparent); transform: none; box-shadow: none; }
  .new-card .plus { width: 44px; height: 44px; border-radius: 50%; background: var(--fill-2); display: grid; place-items: center; font-size: 22px; transition: inherit; }
  .new-card:hover .plus { background: var(--blue); color: #fff; transform: scale(1.06); }

  /* ======================= Album detail ======================= */
  .album-top { padding: 22px 28px 6px; }
  .status-card {
    display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
    padding: 14px 16px; border-radius: 14px; background: var(--bg-2); box-shadow: 0 0 0 .5px var(--separator);
  }
  .avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 15px; background: linear-gradient(145deg, #34c759, #30b0c7); position: relative; }
  .avatar .ok { position: absolute; right: -2px; bottom: -2px; width: 17px; height: 17px; border-radius: 50%; background: var(--green); border: 2px solid var(--bg-2); display: grid; place-items: center; font-size: 9px; }
  .status-card h4 { margin: 0; font-size: 14px; font-weight: 600; }
  .status-card p { margin: 1px 0 0; font-size: 12px; color: var(--label-2); }
  .stats { display: flex; gap: 2px; }
  .stat { padding: 4px 14px; text-align: right; border-left: .5px solid var(--separator); }
  .stat:first-child { border-left: 0; }
  .stat b { display: block; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
  .stat span { font-size: 11px; color: var(--label-2); }

  .first-row { margin: 22px 0 6px; }
  .first-row .sec-h h3 { font-size: 15px; }
  .first-strip { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 10px; height: 168px; }
  .first-strip .slot { border-radius: 12px; position: relative; overflow: hidden; box-shadow: 0 0 0 .5px rgba(0,0,0,.08); }
  .first-strip .slot .ph { position: absolute; inset: 0; }
  .first-strip .num {
    position: absolute; top: 8px; left: 8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
    background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center;
  }
  .first-strip .cover-tag { background: var(--yellow); color: #3a2a00; display: inline-flex; gap: 4px; align-items: center; padding: 0 8px 0 6px; }

  .grid-bar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 12px 28px; background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
  .grid-bar .grow { flex: 1; }
  .legend { display: flex; gap: 14px; font-size: 11px; color: var(--label-2); }
  .legend span { display: inline-flex; align-items: center; gap: 5px; }
  .legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

  .zoom { display: flex; align-items: center; gap: 8px; color: var(--label-3); }
  .zoom .i { font-size: 14px; }
  input[type=range].slider { -webkit-appearance: none; appearance: none; width: 96px; height: 4px; border-radius: 2px; background: var(--fill); outline: 0; }
  input[type=range].slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3), 0 0 0 .5px rgba(0,0,0,.1); }

  .photo-grid { --tile: 132px; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tile), 1fr)); gap: 3px; padding: 0 28px 120px; }
  .tile { aspect-ratio: 1; position: relative; overflow: hidden; border-radius: 3px; cursor: default; }
  .tile .ph { position: absolute; inset: 0; transition: transform .4s var(--ease), filter .3s, opacity .3s; }
  .tile:hover .ph { transform: scale(1.03); }
  .tile.out .ph { opacity: .32; filter: grayscale(.8); }
  .tile .mark { position: absolute; right: 6px; bottom: 6px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; }
  .tile.in .mark { background: var(--blue); box-shadow: 0 0 0 1.5px #fff, 0 1px 3px rgba(0,0,0,.3); }
  .tile .star { position: absolute; left: 6px; top: 6px; height: 20px; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--yellow); color: #3a2a00; font-size: 10px; font-weight: 700; display: flex; align-items: center; gap: 3px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
  .tile:focus-visible, .tile.focus { outline: 3px solid var(--blue); outline-offset: 1px; }
  .tile .hover-zoom { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.4); color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity .2s; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .tile:hover .hover-zoom { opacity: 1; }

  /* ======================= Sheet ======================= */
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.24); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 50; }
  .scrim.on { opacity: 1; pointer-events: auto; }
  @media (prefers-color-scheme: dark) { .scrim { background: rgba(0,0,0,.5); } }
  .sheet {
    position: fixed; z-index: 60; left: calc(50% + 116px); top: 52px; width: 680px; max-width: calc(100vw - 280px);
    background: var(--bg-elevated); border-radius: 0 0 14px 14px; box-shadow: var(--shadow-sheet);
    transform: translate(-50%, calc(-100% - 80px)); visibility: hidden; transition: transform .45s var(--ease), visibility 0s .45s; max-height: calc(100vh - 80px);
    display: flex; flex-direction: column; overflow: hidden;
  }
  .sheet.on { transform: translate(-50%, 0); visibility: visible; transition: transform .45s var(--ease), visibility 0s; }
  .sheet.wide { width: 760px; }

  .steps { display: flex; justify-content: center; gap: 6px; padding: 18px 0 2px; }
  .step { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--label-3); font-weight: 500; }
  .step .n { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--fill-2); color: var(--label-2); transition: all .3s; }
  .step.done .n { background: var(--blue); color: #fff; }
  .step.cur { color: var(--label); }
  .step.cur .n { background: var(--blue); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 20%, transparent); }
  .step-line { width: 34px; height: 1.5px; background: var(--separator); align-self: center; border-radius: 1px; }
  .step-line.done { background: var(--blue); }

  .pane { display: none; padding: 22px 32px 0; overflow-y: auto; }
  .pane.on { display: block; }
  .pane-h { text-align: center; margin-bottom: 20px; }
  .pane-h h2 { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
  .pane-h p { margin: 6px auto 0; color: var(--label-2); font-size: 13px; max-width: 440px; }

  .sheet-foot { display: flex; align-items: center; gap: 8px; padding: 14px 20px; margin: 22px -32px 0; position: sticky; bottom: 0; border-top: .5px solid var(--separator); background: var(--bg-elevated); flex: none; }
  .sheet-foot .grow { flex: 1; }
  .sheet-foot .info { font-size: 12px; color: var(--label-2); display: flex; align-items: center; gap: 6px; }

  /* Drop zone */
  .drop {
    border: 2px dashed var(--separator-strong); border-radius: 18px; padding: 40px 20px 34px; text-align: center;
    background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--blue) 6%, transparent), transparent 70%);
    transition: all .25s var(--ease);
  }
  .drop:hover { border-color: var(--blue); background-color: color-mix(in srgb, var(--blue) 4%, transparent); }
  .folder-art { width: 104px; height: 84px; margin: 0 auto 16px; position: relative; }
  .folder-art .back { position: absolute; inset: 0; border-radius: 10px; background: linear-gradient(180deg, #6cb8ff, #3c9bff); }
  .folder-art .back::before { content: ""; position: absolute; left: 0; top: -8px; width: 42px; height: 16px; border-radius: 6px 10px 0 0; background: #5aaeff; }
  .folder-art .paper { position: absolute; left: 14px; right: 14px; top: 8px; height: 50px; border-radius: 6px; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.15); transform: rotate(-4deg); overflow: hidden; }
  .folder-art .paper.p2 { transform: rotate(5deg); left: 20px; right: 10px; }
  .folder-art .front { position: absolute; left: 0; right: 0; bottom: 0; height: 58px; border-radius: 10px; background: linear-gradient(180deg, #8fcbff, #4aa6ff); box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
  .drop h3 { margin: 0; font-size: 16px; font-weight: 600; }
  .drop p { margin: 4px 0 18px; color: var(--label-2); }

  .tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
  .tip { display: flex; gap: 10px; padding: 12px; border-radius: 12px; background: var(--bg-2); font-size: 12px; color: var(--label-2); }
  .tip .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; font-size: 15px; color: #fff; }
  .tip b { display: block; color: var(--label); font-weight: 600; font-size: 12px; margin-bottom: 1px; }

  /* Name pane */
  .name-field { width: 100%; height: 46px; font-size: 20px; font-weight: 600; padding: 0 14px; border-radius: 10px; letter-spacing: -0.015em; }
  .form-grid { display: grid; grid-template-columns: 1fr 180px; gap: 12px; }
  .label { display: block; font-size: 12px; font-weight: 500; color: var(--label-2); margin: 0 0 6px 2px; }
  .folder-chip { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); margin-top: 14px; }
  .folder-chip .mini-folder { width: 34px; height: 28px; border-radius: 5px; background: linear-gradient(180deg, #8fcbff, #4aa6ff); flex: none; position: relative; }
  .folder-chip .mini-folder::before { content: ""; position: absolute; top: -4px; left: 0; width: 14px; height: 7px; border-radius: 3px 4px 0 0; background: #5aaeff; }
  .folder-chip b { font-weight: 600; }
  .folder-chip .path { font-size: 11px; color: var(--label-3); font-family: var(--mono); }
  .folder-chip .grow { flex: 1; }

  .quality { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
  .q-opt { padding: 11px 12px; border-radius: 10px; box-shadow: 0 0 0 .5px var(--separator-strong); cursor: default; transition: all .15s; position: relative; }
  .q-opt b { display: block; font-size: 13px; font-weight: 600; }
  .q-opt span { font-size: 11px; color: var(--label-2); }
  .q-opt .size { display: block; margin-top: 6px; font-size: 12px; color: var(--label); font-weight: 600; font-variant-numeric: tabular-nums; }
  .q-opt.on { box-shadow: 0 0 0 2px var(--blue); background: color-mix(in srgb, var(--blue) 5%, transparent); }
  .q-opt .rec { position: absolute; top: 9px; right: 9px; font-size: 9px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .04em; }

  .pick-head { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 0 8px; }
  .pick-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; max-height: 172px; overflow: hidden; border-radius: 8px; position: relative; }
  .pick-grid::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: linear-gradient(transparent, var(--bg-elevated)); pointer-events: none; }
  .pick-grid .tile { border-radius: 2px; }
  .pick-grid .tile.x .ph { opacity: .25; }
  .pick-grid .tile.x::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top right, transparent calc(50% - 1px), var(--red) calc(50% - 1px), var(--red) calc(50% + 1px), transparent calc(50% + 1px)); opacity: .7; }

  /* Upload pane */
  .upload-hero { display: flex; align-items: center; gap: 28px; padding: 8px 6px 4px; }
  .ring { width: 132px; height: 132px; position: relative; flex: none; }
  .ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
  .ring circle { fill: none; stroke-width: 9; }
  .ring .track { stroke: var(--fill-2); }
  .ring .bar { stroke: url(#ringGrad); stroke-linecap: round; stroke-dasharray: 364.4; stroke-dashoffset: 364.4; transition: stroke-dashoffset .3s linear; }
  .ring .lbl { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
  .ring .lbl b { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; display: block; line-height: 1; }
  .ring .lbl span { font-size: 11px; color: var(--label-2); }
  .up-info { flex: 1; }
  .up-info h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
  .up-info p { margin: 3px 0 0; color: var(--label-2); }
  .saving { display: grid; grid-template-columns: 1fr auto 1fr 1fr; gap: 0; margin-top: 16px; border-radius: 12px; background: var(--bg-2); align-items: center; }
  .saving > div { padding: 12px 14px; }
  .saving .arrow { color: var(--label-3); font-size: 16px; padding: 0; }
  .saving b { display: block; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
  .saving span { font-size: 11px; color: var(--label-2); }
  .saving .strike b { color: var(--label-3); text-decoration: line-through; text-decoration-thickness: 1.5px; }
  .saving .good b { color: var(--green); }
  .saving .good { border-left: .5px solid var(--separator); }

  .live-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; margin-top: 18px; }
  .live-grid .tile { border-radius: 3px; }
  .live-grid .tile.pending .ph { opacity: .15; filter: blur(2px); }
  .live-grid .tile.active::after { content: ""; position: absolute; inset: 0; border-radius: 3px; box-shadow: inset 0 0 0 2px var(--blue); animation: pulse 1.2s ease-in-out infinite; }
  .live-grid .tile.active .ph { opacity: .6; }
  @keyframes pulse { 50% { opacity: .35; } }
  .bg-note { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 12px; color: var(--label-2); padding: 9px 12px; border-radius: 10px; background: color-mix(in srgb, var(--blue) 7%, transparent); }
  .bg-note .i { color: var(--blue); font-size: 15px; }

  /* Share pane */
  .success-badge { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 32px; box-shadow: 0 8px 24px color-mix(in srgb, var(--green) 40%, transparent); animation: pop .6s var(--ease-spring); }
  @keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
  .link-box { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 12px; background: var(--bg-2); box-shadow: 0 0 0 .5px var(--separator); }
  .link-box .i { color: var(--label-3); font-size: 16px; }
  .link-box .url { flex: 1; font-family: var(--mono); font-size: 13px; }
  .link-box .url b { font-weight: 600; color: var(--blue); }
  .share-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; margin-top: 16px; }
  .wa-card { border-radius: 14px; overflow: hidden; background: #efeae2; position: relative; padding: 14px; min-height: 186px; }
  [data-theme="dark"] .wa-card { background: #0b141a; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wa-card { background: #0b141a; } }
  .wa-bubble { margin-left: auto; max-width: 92%; background: #d9fdd3; color: #111b21; border-radius: 10px 2px 10px 10px; padding: 6px 8px 4px; font-size: 12.5px; box-shadow: 0 1px .5px rgba(0,0,0,.13); }
  [data-theme="dark"] .wa-bubble { background: #005c4b; color: #e9edef; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wa-bubble { background: #005c4b; color: #e9edef; } }
  .wa-preview { display: flex; gap: 8px; background: rgba(0,0,0,.05); border-radius: 6px; overflow: hidden; margin-bottom: 5px; }
  .wa-preview .ph { width: 64px; height: 64px; flex: none; }
  .wa-preview div { padding: 6px 6px 6px 0; font-size: 11.5px; line-height: 1.3; }
  .wa-preview div b { display: block; font-size: 12px; }
  .wa-bubble .link { color: #027eb5; }
  [data-theme="dark"] .wa-bubble .link { color: #53bdeb; }
  .wa-bubble .time { text-align: right; font-size: 10px; opacity: .55; margin-top: 2px; }
  .wa-label { position: absolute; top: 10px; left: 14px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: rgba(0,0,0,.4); }
  .share-actions { display: flex; flex-direction: column; gap: 8px; }
  .share-btn { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; box-shadow: 0 0 0 .5px var(--separator-strong); transition: all .15s; text-align: left; }
  .share-btn:hover { background: var(--fill-3); }
  .share-btn .ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-size: 17px; flex: none; }
  .share-btn b { display: block; font-size: 13px; font-weight: 600; }
  .share-btn span { font-size: 11px; color: var(--label-2); }
  .share-btn.wa { background: #25d366; color: #fff; box-shadow: 0 2px 8px rgba(37,211,102,.35); }
  .share-btn.wa:hover { background: #20bd5a; }
  .share-btn.wa span { color: rgba(255,255,255,.85); }
  .share-btn.wa .ic { background: rgba(255,255,255,.2); }

  /* Inset grouped list (build sheet) */
  .group { border-radius: 12px; background: var(--bg-2); box-shadow: 0 0 0 .5px var(--separator); overflow: hidden; }
  .group + .group { margin-top: 14px; }
  .row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 52px; }
  .row + .row { border-top: .5px solid var(--separator); margin-left: 54px; padding-left: 0; }
  .row .ic { width: 30px; height: 30px; border-radius: 8px; color: #fff; display: grid; place-items: center; font-size: 16px; flex: none; }
  .row .txt { flex: 1; min-width: 0; }
  .row .txt b { display: block; font-weight: 500; font-size: 13px; }
  .row .txt span { display: block; font-size: 11px; color: var(--label-2); }
  .row .txt .path { font-family: var(--mono); font-size: 11px; color: var(--label-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .row .ok { color: var(--green); font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
  .group-note { font-size: 11px; color: var(--label-3); padding: 6px 14px 0; }
  .group-title { font-size: 11px; font-weight: 600; color: var(--label-2); text-transform: uppercase; letter-spacing: .04em; margin: 16px 0 6px 14px; }

  .build-progress { padding: 4px 0 6px; }
  .bp-now { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 12px; background: var(--bg-2); margin-bottom: 18px; }
  .bp-now .ph { width: 56px; height: 56px; border-radius: 8px; flex: none; }
  .bp-now b { display: block; font-family: var(--mono); font-size: 12px; font-weight: 500; }
  .bp-now span { font-size: 11px; color: var(--label-2); }
  .pbar { height: 8px; border-radius: 4px; background: var(--fill-2); overflow: hidden; }
  .pbar > i { display: block; height: 100%; width: 61%; border-radius: 4px; background: linear-gradient(90deg, var(--blue), #5e5ce6); position: relative; overflow: hidden; }
  .pbar > i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent); animation: shimmer 1.6s infinite; }
  @keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
  .bp-meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--label-2); font-variant-numeric: tabular-nums; }
  .zero-data { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; font-size: 12px; color: var(--green); font-weight: 600; }

  .done-folder { width: 132px; height: 104px; margin: 4px auto 18px; position: relative; animation: pop .7s var(--ease-spring); }
  .done-folder .back { position: absolute; inset: 0; border-radius: 12px; background: linear-gradient(180deg, #6cb8ff, #3c9bff); }
  .done-folder .back::before { content: ""; position: absolute; left: 0; top: -10px; width: 52px; height: 20px; border-radius: 7px 12px 0 0; background: #5aaeff; }
  .done-folder .ph { position: absolute; width: 74px; height: 56px; border-radius: 5px; border: 3px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.2); }
  .done-folder .ph.a { left: 12px; top: 2px; transform: rotate(-9deg); }
  .done-folder .ph.b { right: 12px; top: 0; transform: rotate(8deg); }
  .done-folder .ph.c { left: 30px; top: -8px; transform: rotate(-1deg); }
  .done-folder .front { position: absolute; left: 0; right: 0; bottom: 0; height: 66px; border-radius: 12px; background: linear-gradient(180deg, rgba(143,203,255,.96), #4aa6ff); box-shadow: inset 0 1px 0 rgba(255,255,255,.5); display: grid; place-items: center; }
  .done-folder .front .check { width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--green); display: grid; place-items: center; font-size: 20px; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
  .path-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 8px 7px 12px; border-radius: 10px; background: var(--bg-2); font-family: var(--mono); font-size: 12px; }
  .done-stats { display: flex; justify-content: center; gap: 28px; margin: 18px 0 4px; }
  .done-stats div { text-align: center; }
  .done-stats b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
  .done-stats span { font-size: 11px; color: var(--label-2); }

  /* ======================= Viewer ======================= */
  .viewer { position: fixed; inset: 0; z-index: 80; background: #0a0a0b; color: #fff; display: none; grid-template-rows: 52px 1fr 92px; }
  .viewer.on { display: grid; animation: fadeIn .25s ease; }
  @keyframes fadeIn { from { opacity: 0; } }
  .v-top { display: flex; align-items: center; gap: 12px; padding: 0 14px; }
  .v-top .grow { flex: 1; }
  .v-btn { height: 30px; min-width: 30px; padding: 0 10px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: rgba(255,255,255,.85); font-size: 13px; font-weight: 500; }
  .v-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
  .v-btn .i { font-size: 17px; }
  .v-title b { font-weight: 600; font-size: 13px; font-family: var(--mono); }
  .v-title span { display: block; font-size: 11px; color: rgba(255,255,255,.5); }
  .v-chip { height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
  .v-stage { position: relative; overflow: hidden; display: grid; place-items: center; cursor: grab; }
  .v-stage .photo { width: min(78vw, 1100px); aspect-ratio: 3/2; border-radius: 2px; transform: scale(1.6) translate(6%, 4%); transition: transform .4s var(--ease); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
  .v-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.1); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); display: grid; place-items: center; font-size: 20px; color: #fff; }
  .v-nav.l { left: 18px; } .v-nav.r { right: 18px; }
  .zoom-pill { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 12px; background: rgba(40,40,44,.72); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: 0 0 0 .5px rgba(255,255,255,.12); }
  .zoom-pill .pct { width: 54px; text-align: center; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
  .zoom-pill .sep { width: 1px; height: 16px; background: rgba(255,255,255,.15); margin: 0 4px; }
  .minimap { position: absolute; right: 18px; bottom: 16px; width: 120px; aspect-ratio: 3/2; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.2), 0 8px 24px rgba(0,0,0,.5); }
  .minimap .ph { position: absolute; inset: 0; opacity: .6; }
  .minimap .vp { position: absolute; left: 34%; top: 30%; width: 62%; height: 62%; border: 1.5px solid #fff; border-radius: 2px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
  .filmstrip { display: flex; gap: 4px; align-items: center; justify-content: center; padding: 0 20px; overflow: hidden; }
  .filmstrip .f { width: 52px; height: 52px; border-radius: 5px; flex: none; position: relative; opacity: .5; transition: all .2s; }
  .filmstrip .f.on { width: 64px; height: 64px; opacity: 1; box-shadow: 0 0 0 2px #fff; }
  .filmstrip .f.in::after { content: ""; position: absolute; right: 3px; bottom: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 1.5px #fff; }

  /* ======================= Lock ======================= */
  .lock { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; overflow: hidden; background: #000; }
  .lock.on { display: grid; }
  .lock-mosaic { position: absolute; inset: -40px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; transform: rotate(-6deg) scale(1.15); filter: blur(28px) saturate(1.3) brightness(.7); }
  .lock-mosaic .ph { aspect-ratio: 1; border-radius: 10px; }
  .lock-card { position: relative; width: 340px; padding: 36px 32px 28px; border-radius: 26px; text-align: center; color: #fff; background: rgba(255,255,255,.12); -webkit-backdrop-filter: blur(40px) saturate(1.6); backdrop-filter: blur(40px) saturate(1.6); box-shadow: 0 0 0 .5px rgba(255,255,255,.25), 0 30px 80px rgba(0,0,0,.4); }
  .lock-card .app-icon { width: 72px; height: 72px; border-radius: 17px; margin: 0 auto 16px; box-shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 0 0 .5px rgba(255,255,255,.3); }
  .lock-card h1 { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
  .lock-card p { margin: 4px 0 24px; color: rgba(255,255,255,.7); font-size: 13px; }
  .pass { display: flex; justify-content: center; gap: 14px; margin-bottom: 22px; }
  .pass i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.8); transition: all .15s; }
  .pass i.f { background: #fff; border-color: #fff; }
  .pass-field { width: 100%; height: 44px; border-radius: 12px; border: 0; outline: 0; padding: 0 44px 0 16px; font-size: 15px; color: #fff; background: rgba(255,255,255,.14); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.25); letter-spacing: .3em; }
  .pass-wrap { position: relative; }
  .pass-wrap .go { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center; font-size: 16px; }
  .remember { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; font-size: 12px; color: rgba(255,255,255,.75); }
  .remember .box { width: 15px; height: 15px; border-radius: 4px; background: var(--blue); display: grid; place-items: center; font-size: 10px; }
  .lock-foot { position: absolute; bottom: 28px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.55); font-size: 12px; }

  /* Toast */
  .toast { position: fixed; z-index: 70; left: calc(50% + 116px); top: 64px; transform: translateX(-50%); display: none; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; background: var(--glass-strong); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: var(--shadow-lg); }
  .toast.on { display: flex; animation: drop .5s var(--ease-spring); }
  .toast .i { color: var(--green); font-size: 16px; }
  @keyframes drop { from { transform: translate(-50%, -20px); opacity: 0; } }

  /* ======================= Micro-animations (media) ======================= */
  .view.on { animation: m-fade .35s ease both; }
  .pane.from-r { animation: m-in-r .45s var(--out) both; }
  .pane.from-l { animation: m-in-l .45s var(--out) both; }
  .step .n { transition: background-color .3s, color .3s, box-shadow .4s; }
  .step.cur .n { animation: m-bump .5s var(--spring); }
  .step-line { background: var(--separator) linear-gradient(var(--blue), var(--blue)) no-repeat left / 0% 100%; transition: background-size .5s var(--out); }
  .step-line.done { background: var(--separator) linear-gradient(var(--blue), var(--blue)) no-repeat left / 100% 100%; }

  .side-item { transition: background-color .15s, transform .3s var(--spring); }
  .side-item:active { transform: scale(.97); }
  .side-item .i, .side-item .thumb { transition: transform .35s var(--spring); }
  .side-item:hover .i, .side-item:hover .thumb { transform: scale(1.12); }
  .meter > i { transform-origin: left; animation: meter 1.2s .3s var(--out) both; }
  @keyframes meter { from { transform: scaleX(0); } }

  .search { transition: min-width .4s var(--out), background-color .2s, box-shadow .2s; }
  .search:focus-within { min-width: 280px; background: var(--bg-elevated); box-shadow: 0 0 0 .5px var(--blue), 0 0 0 3.5px color-mix(in srgb, var(--blue) 30%, transparent); }

  .callout .stack div { transition: transform .5s var(--spring); }
  .callout:hover .stack div:nth-child(1) { transform: rotate(-15deg) translate(-11px, 3px); }
  .callout:hover .stack div:nth-child(2) { transform: rotate(13deg) translate(12px, 1px); }
  .callout:hover .stack div:nth-child(3) { transform: translateY(-3px); }

  .album-card .cover .chip { transition: transform .35s var(--spring); }
  .album-card:hover .cover .chip { transform: translateY(-2px); }
  .album-card:active .cover { transform: scale(.97); transition-duration: .1s; }
  .new-card .plus { transition: transform .4s var(--spring), background-color .25s, color .25s; }
  .new-card:hover .plus { transform: scale(1.1) rotate(90deg); }

  .play .avatar .ok { animation: m-pop .5s .5s var(--spring) both; }
  .first-strip .slot .ph { transition: transform .6s var(--out); }
  .first-strip .slot:hover .ph { transform: scale(1.05); }
  .play .first-strip .cover-tag { animation: m-pop .5s .6s var(--spring) both; }
  .tile { transition: opacity .3s, transform .3s var(--out); }
  .tile:active { transform: scale(.96); }
  .tile .hover-zoom { transition: opacity .2s, transform .3s var(--spring); transform: scale(.7); }
  .tile:hover .hover-zoom { transform: scale(1); }
  .photo-grid .tile.hiding { opacity: 0; transform: scale(.88); animation: none !important; }
  .photo-grid .tile.gone { display: none; }

  .drop { cursor: pointer; transition: border-color .25s, background-color .25s, transform .4s var(--spring); }
  .folder-art .paper { transition: transform .5s var(--spring); }
  .folder-art .front { transition: transform .5s var(--spring); transform-origin: bottom; }
  .drop:hover .folder-art .paper, .drop.over .folder-art .paper { transform: translateY(-14px) rotate(-9deg); }
  .drop:hover .folder-art .paper.p2, .drop.over .folder-art .paper.p2 { transform: translateY(-11px) rotate(10deg); }
  .drop:hover .folder-art .front, .drop.over .folder-art .front { transform: perspective(300px) rotateX(-16deg); }
  .drop.over { border-color: var(--blue); border-style: solid; transform: scale(1.015); background-color: color-mix(in srgb, var(--blue) 8%, transparent); }

  .pick-grid .tile { cursor: pointer; }
  .pick-grid .tile .ph { transition: opacity .3s, transform .35s var(--spring); }
  .pick-grid .tile.x .ph { transform: scale(.86); }
  .pick-grid .tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top right, transparent calc(50% - 1px), var(--red) calc(50% - 1px), var(--red) calc(50% + 1px), transparent calc(50% + 1px)); opacity: 0; transform: scale(.4); transition: opacity .25s, transform .35s var(--spring); }
  .pick-grid .tile.x::after { opacity: .75; transform: none; }

  .live-grid .tile .ph { transition: opacity .45s, filter .45s, transform .55s var(--spring); }
  .live-grid .tile.pending .ph { transform: scale(.82); }
  .ring.done .lbl b { color: var(--green); }
  .ring.done { animation: m-bump .6s var(--spring); }
  .m-glow { animation: m-glow 1.6s ease-in-out infinite; }
  #upMB, #upPct, #upN, #bpN { font-variant-numeric: tabular-nums; }

  .play .success-badge { animation: m-pop .7s var(--spring) both; }
  .play .link-box { animation: m-rise .6s .15s var(--out) both; }
  .play .wa-bubble { animation: m-in-r .6s .55s var(--spring-soft) both; }
  .wa-bubble .ticks { transition: color .4s; }
  .wa-bubble .ticks.read { color: #53bdeb; }
  .js-copy.copied { background: var(--green) !important; color: #fff !important; }

  #scanOk.checking { color: var(--label-2); font-weight: 500; }
  #scanOk.found { animation: m-pop .45s var(--spring); }
  .pbar > i { transition: width .25s linear; }

  .play .done-folder .ph.a { --r: -9deg; animation: m-drop-in .6s .35s var(--spring-soft) both; }
  .play .done-folder .ph.b { --r: 8deg; animation: m-drop-in .6s .5s var(--spring-soft) both; }
  .play .done-folder .ph.c { --r: -1deg; animation: m-drop-in .6s .65s var(--spring-soft) both; }
  .play .done-folder .front .check { animation: m-pop .55s .95s var(--spring) both; }

  /* Viewer */
  @keyframes m-up-c { from { opacity: 0; transform: translate(-50%, 18px); } }
  .viewer.on .v-top { animation: m-down .45s .1s var(--out) both; }
  .viewer.on .filmstrip { animation: m-up .5s .15s var(--out) both; }
  .viewer.on .zoom-pill { animation: m-up-c .5s .22s var(--out) both; }
  .viewer.on .v-nav { animation: m-fade .5s .3s both; }
  .v-stage .photo-wrap { width: min(78vw, 1100px); aspect-ratio: 3/2; overflow: hidden; border-radius: 2px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
  .v-stage .photo { width: 100%; height: 100%; aspect-ratio: auto; box-shadow: none; transform: scale(var(--z, 1)) translate(var(--px, 0%), var(--py, 0%)); transition: transform .5s var(--out); }
  .v-stage { cursor: zoom-in; }
  .v-stage.zoomed { cursor: zoom-out; }
  .minimap { transition: opacity .3s, transform .4s var(--spring); }
  .minimap.hidden { opacity: 0; transform: scale(.85); pointer-events: none; }
  .minimap .vp { transition: all .5s var(--out); }
  .filmstrip .f { transition: all .35s var(--spring); cursor: pointer; }
  .filmstrip .f:hover { opacity: .85; transform: translateY(-2px); }
  .v-chip { transition: transform .35s var(--spring), opacity .3s; }

  /* Lock */
  .lock-mosaic { animation: drift 40s linear infinite alternate; }
  @keyframes drift { to { transform: rotate(-6deg) scale(1.25) translate(-3%, -2%); } }
  .lock.leaving { animation: m-fade .5s .1s ease reverse forwards; }
  .lock.leaving .lock-card { animation: m-blur-out .45s var(--out) forwards; }
  @keyframes m-blur-out { to { opacity: 0; filter: blur(10px); transform: scale(1.06); } }
  .pass-wrap .go { transition: transform .35s var(--spring); }
  .pass-wrap .go:hover { transform: scale(1.1); }
  .pass-wrap .go:active { transform: scale(.9); }
  .pass-field { transition: box-shadow .2s, background-color .2s; }
  .pass-field:focus { background: rgba(255,255,255,.2); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.4), 0 0 0 4px rgba(255,255,255,.12); }
  .remember { cursor: pointer; }
  .remember .box { transition: transform .35s var(--spring), background-color .2s; }
  .remember .box svg { transition: opacity .2s; }
  .remember.off .box { background: rgba(255,255,255,.2); }
  .remember.off .box svg { opacity: 0; }
  .remember:active .box { transform: scale(.8); }

