
  :root {
    --bg: #0b0b10; --panel: #17171f; --panel2: #22222c; --text: #f4f4f7; --muted: #a3a3b2;
    --accent: #ff4d7e; --accent2: #ffb84d; --ok: #4ade80; --line: #2c2c38; --gold: #ffd166;
  }
  * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; overscroll-behavior: none; }
  button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
  .hidden { display: none !important; }

  /* ---------- feed ---------- */
  #topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 5; display: flex; justify-content: space-between;
    align-items: center; padding: calc(env(safe-area-inset-top) + 12px) 18px 12px; pointer-events: none;
    background: linear-gradient(rgba(0,0,0,.55), transparent); }
  #topbar .logo { font-weight: 800; font-size: 20px; letter-spacing: -.3px; }
  #topbar .logo b { color: var(--accent); }
  #topbar .right { display: flex; align-items: center; gap: 10px; }
  #lang { pointer-events: auto; appearance: none; -webkit-appearance: none; padding: 7px 12px; border-radius: 999px; border: 0;
    background: rgba(255,255,255,.16); backdrop-filter: blur(10px); color: #fff; font: inherit; font-size: 14px; font-weight: 600; }
  #lang option { color: #000; }
  #feed { height: 100dvh; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; }
  #feed::-webkit-scrollbar { display: none; }
  .card { position: relative; height: 100dvh; scroll-snap-align: start; overflow: hidden; background: #000; }
  .card .media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .card .media.blur { filter: blur(18px) brightness(.55); transform: scale(1.1); }
  .card .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 90px 20px calc(env(safe-area-inset-bottom) + 110px);
    background: linear-gradient(transparent, rgba(0,0,0,.8)); }
  .card h2 { margin: 0 0 6px; font-size: 26px; font-weight: 800; line-height: 1.15; }
  /* Share and Save on every finished story, always visible (2026-10-11) */
  .acts { position: absolute; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 130px); z-index: 3;
    display: flex; flex-direction: column; gap: 16px; }
  .acts button { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0;
    color: #fff; font-size: 12px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.7); padding: 0; cursor: pointer; }
  .acts button span { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 24px; background: rgba(0,0,0,.42); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.25); }
  .acts button.sh span { background: linear-gradient(135deg, var(--accent), var(--accent2)); border: 0; box-shadow: 0 4px 18px rgba(0,0,0,.35); }
  .card .info { padding-right: 84px; }
  .tile .tacts { display: flex; gap: 8px; margin-top: 8px; }
  .tile .tacts button { flex: 1; padding: 8px 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2);
    color: var(--text); font-weight: 700; font-size: 13px; cursor: pointer; }
  .tile .tacts button.sh { background: linear-gradient(135deg, var(--accent), var(--accent2)); border: 0; color: #fff; }
  .card .meta { color: #e2e2ea; font-size: 15px; }
  .pill { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 14px; border-radius: 999px;
    background: rgba(255,255,255,.14); backdrop-filter: blur(10px); font-size: 14px; font-weight: 600; }
  .pill.fail { background: rgba(255,77,77,.25); }
  #making .mprog { height: 8px; background: var(--panel2); border-radius: 99px; overflow: hidden; margin: 6px 0 8px; }
  #making .mprog i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 99px; transition: width .8s; }
  #making .mstep { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; min-height: 20px; }
  #making .mstage { position: relative; aspect-ratio: 3/4; max-height: 60vh; margin: 14px auto 0; border-radius: 18px; overflow: hidden; background: var(--panel); }
  #making .mstage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  #making .mstage img.cart { opacity: 0; transition: opacity 1.4s; }
  #making .mstage img.cart.on { opacity: 1; }
  #making .mstage .wait { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    background: rgba(0,0,0,.35); font-weight: 700; }
  #making .mstage .wait .spin { width: 30px; height: 30px; border-width: 3px; }
  #making .mstage .b { position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: 99px; background: rgba(0,0,0,.6); font-size: 13px; font-weight: 700; }
  #making .mstage .cnt { position: absolute; right: 10px; top: 10px; padding: 4px 10px; border-radius: 99px; background: rgba(0,0,0,.6); font-size: 13px; font-weight: 700; }
  #making .mstrip { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; padding-bottom: 4px; scrollbar-width: none; }
  #making .mstrip img { width: 54px; height: 72px; flex: none; object-fit: cover; border-radius: 8px; opacity: .55; }
  #making .mstrip img.on { opacity: 1; outline: 2px solid var(--accent); }
  #making .meta2 { margin-top: 12px; text-align: center; font-weight: 700; font-size: 15px; }
  #making .mstage { touch-action: pan-y; user-select: none; }
  #making .mnote { margin-top: 16px; color: var(--muted); font-size: 14px; text-align: center; }
  #making .mnote .primary { width: 100%; }
  .making { display: inline-block; margin-bottom: 10px; padding: 6px 12px; border-radius: 99px; background: rgba(255,77,126,.14);
    color: var(--accent); font-size: 13px; font-weight: 700; }
  #paybar { position: fixed; top: calc(env(safe-area-inset-top) + 60px); left: 12px; right: 12px; z-index: 7; padding: 10px 14px;
    border-radius: 14px; background: #ffb84d; color: #221a00; font-weight: 700; font-size: 14px; cursor: pointer; }
  #plans { position: fixed; inset: 0; z-index: 60; background: var(--bg); overflow-y: auto; padding: 18px 16px 40px; }
  #plans .x { position: absolute; right: 14px; top: 12px; font-size: 22px; background: none; color: var(--text); }
  #plans .trialbn { background: rgba(255,77,126,.14); border: 1px solid rgba(255,77,126,.45); border-radius: 14px; padding: 12px 14px; margin: 10px 0 14px; font-weight: 700; }
  #plans .trialbn small { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; }
  #plans .pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
  #plans .plan { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center;
    border: 2px solid var(--line); border-radius: 16px; padding: 18px 6px 12px; background: var(--panel); }
  #plans .plan.on { border-color: var(--accent); background: rgba(255,77,126,.10); }
  #plans .tag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--accent);
    color: #fff; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 99px; }
  #plans .radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--muted); margin-bottom: 4px; }
  #plans .plan.on .radio { border-color: var(--accent); background: radial-gradient(var(--accent) 45%, transparent 50%); }
  #plans .pname { font-weight: 800; font-size: 15px; }
  #plans .price { font-size: 21px; font-weight: 800; margin-top: 4px; }
  #plans .per { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
  #plans .pl { font-size: 14px; font-weight: 600; }
  #plans .cta { width: 100%; margin-top: 18px; padding: 17px; border-radius: 16px; background: var(--accent); color: #fff;
    font-size: 17px; font-weight: 800; box-shadow: 0 8px 26px rgba(255,77,126,.35); }
  #plans .cta:disabled { opacity: .6; }
  .pload { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.25); pointer-events: none; z-index: 2; }
  .pload .spin { width: 44px; height: 44px; border-width: 4px; }
  .spin { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%;
    animation: spin 1s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .tapplay { position: absolute; inset: 0; }
  #fab { position: fixed; z-index: 6; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 24px); transform: translateX(-50%);
    width: 68px; height: 68px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent2));
    box-shadow: 0 8px 28px rgba(255,77,126,.45); font-size: 38px; font-weight: 300; line-height: 68px; color: #fff; }
  .empty { height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 30px; gap: 14px; }
  .empty h1 { margin: 0; font-size: 30px; }
  .empty p { margin: 0; color: var(--muted); font-size: 16px; max-width: 320px; line-height: 1.45; }

  /* ---------- overlays ---------- */
  .overlay { position: fixed; inset: 0; z-index: 20; background: var(--bg); display: flex; flex-direction: column; }
  .overlay, .overlay .body { overscroll-behavior: contain; }   /* no pull-to-refresh inside the wizard or the account page (2026-10-08) */
  .bar { display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 10px) 14px 10px; }
  .bar .x { width: 42px; height: 42px; border-radius: 50%; background: var(--panel); font-size: 22px; }
  .bar .title { flex: 1; font-weight: 700; font-size: 17px; }
  .dots { display: flex; gap: 6px; }
  .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
  .dots i.on { background: var(--accent); width: 22px; border-radius: 4px; }
  .body { flex: 1; overflow-y: auto; padding: 6px 18px 120px; }
  .body h1 { font-size: 26px; margin: 8px 0 4px; }
  .body .sub { color: var(--muted); margin: 0 0 18px; font-size: 15px; }
  .foot { position: fixed; left: 0; right: 0; bottom: 0; padding: 14px 18px calc(env(safe-area-inset-bottom) + 16px);
    background: linear-gradient(transparent, var(--bg) 30%); }
  .big { width: 100%; height: 58px; border-radius: 16px; font-size: 18px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent2)); }
  .big:disabled { opacity: .35; }
  .ghost { width: 100%; height: 50px; border-radius: 14px; background: var(--panel); font-weight: 700; margin-top: 10px; }

  /* step 1: photos */
  .picker { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 170px;
    border: 2px dashed #3a3a48; border-radius: 20px; color: var(--muted); font-size: 16px; text-align: center; }
  .picker b { color: var(--text); font-size: 19px; }
  .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 14px; }
  .grid .t { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--panel); }
  .grid.reorder .t { touch-action: none; cursor: grab; outline: 2px dashed rgba(255,255,255,.25); outline-offset: -2px; }
  .grid .t.dragging { opacity: .55; transform: scale(.94); outline: 2px solid var(--accent); }
  .grid .t .n { position: absolute; left: 4px; top: 4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: rgba(0,0,0,.65);
    color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
  .grid .t img, .grid .t video { width: 100%; height: 100%; object-fit: cover; }
  .grid .t button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%;
    background: rgba(0,0,0,.65); font-size: 14px; line-height: 24px; }
  .grid .t .v { position: absolute; left: 6px; bottom: 4px; font-size: 13px; text-shadow: 0 1px 3px #000; }
  .field { width: 100%; margin-top: 16px; padding: 15px 16px; border-radius: 14px; border: 1px solid var(--line);
    background: var(--panel); color: var(--text); font-size: 17px; }
  .count { color: var(--muted); font-size: 14px; margin-top: 10px; }

  /* step 2: look */
  .styles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .style { position: relative; border-radius: 18px; overflow: hidden; background: var(--panel); aspect-ratio: 3/4;
    border: 3px solid transparent; text-align: left; padding: 0; }
  .style.on { border-color: var(--accent); }
  /* "Mix of styles" (2026-10-11): a full-width tile above the single styles */
  .style.mix { width: 100%; aspect-ratio: 2.2/1; margin-bottom: 12px; display: block; }
  .style.mix .mixrow { display: flex; height: 100%; }
  .style.mix .mixrow img { flex: 1; min-width: 0; height: 100%; object-fit: cover; }
  .style.mix span small { display: block; font-weight: 500; font-size: 13px; opacity: .9; margin-top: 2px; }
  .style img.after { width: 100%; height: 100%; object-fit: cover; }
  .style img.before { position: absolute; top: 8px; left: 8px; width: 34%; aspect-ratio: 3/4; object-fit: cover;
    border-radius: 8px; border: 2px solid #fff; }
  .style span { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; font-weight: 800; font-size: 17px;
    background: linear-gradient(transparent, rgba(0,0,0,.75)); }
  .style .check { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent);
    display: none; align-items: center; justify-content: center; font-weight: 900; }
  .style.on .check { display: flex; }
  .toggle { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 16px; border-radius: 18px;
    background: var(--panel); width: 100%; text-align: left; }
  .toggle .txt { flex: 1; }
  .toggle .txt b { display: block; font-size: 17px; }
  .toggle .txt small { color: var(--muted); font-size: 14px; }
  .star { color: var(--gold); font-weight: 800; font-size: 12px; padding: 2px 8px; border-radius: 999px;
    background: rgba(255,209,102,.15); margin-left: 6px; vertical-align: 2px; }
  .sw { width: 52px; height: 32px; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: .2s; }
  .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: .2s; }
  .toggle.on .sw { background: var(--accent); }
  .toggle.on .sw::after { left: 23px; }
  /* (2026-10-23) premium animation: a check card at the top of the animation step, like "Bring it to life" was */
  .premcheck { display: flex; align-items: center; gap: 14px; width: 100%; margin: 6px 0 14px; padding: 16px; text-align: left;
    border-radius: 16px; border: 2px solid rgba(255,209,102,.45); background: linear-gradient(135deg, rgba(255,209,102,.12), rgba(255,122,26,.08));
    color: inherit; font: inherit; cursor: pointer; }
  .premcheck.on { border-color: var(--gold); background: linear-gradient(135deg, rgba(255,209,102,.24), rgba(255,122,26,.16)); }
  .premcheck .box { flex: none; width: 30px; height: 30px; border-radius: 9px; border: 2px solid var(--gold); display: grid;
    place-items: center; font-weight: 900; font-size: 18px; color: transparent; }
  .premcheck.on .box { background: var(--gold); color: #1a1430; }
  .premcheck .txt b { display: block; font-size: 18px; }
  .premcheck .txt small { color: var(--muted); font-size: 14px; }
  .premcheck[disabled] { opacity: .55; cursor: default; }

  /* step 3: transition */
  .trs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .tr { position: relative; border-radius: 12px; overflow: hidden; background: var(--panel); aspect-ratio: 3/4; padding: 0;
    border: 3px solid transparent; }
  .tr.on { border-color: var(--accent); }
  .tr video { width: 100%; height: 100%; object-fit: cover; display: block; }
  .tr span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 6px 6px; font-size: 12px; font-weight: 700;
    line-height: 1.2; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
  .tr .check { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent);
    display: none; align-items: center; justify-content: center; font-weight: 900; font-size: 13px; }
  .tr.on .check { display: flex; }

  /* step 4: music */
  .track { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 16px; background: var(--panel);
    margin-bottom: 10px; border: 2px solid transparent; text-align: left; }
  .track.on { border-color: var(--accent); }
  .track .play { width: 46px; height: 46px; border-radius: 50%; background: var(--panel2); font-size: 18px; flex: none; }
  .track .play.playing { background: var(--accent); }
  .track .name { flex: 1; font-weight: 700; font-size: 16px; }
  .track .name small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; margin-top: 2px; }
  .track .ico { width: 46px; height: 46px; border-radius: 50%; background: var(--panel2); display: flex; align-items: center;
    justify-content: center; font-size: 20px; flex: none; }
  .uploadnote { color: var(--muted); font-size: 13px; text-align: center; margin-bottom: 8px; min-height: 18px; }

  /* ---------- player ---------- */
  /* The video gets the top of the screen and the info sits below it: controls never cover the picture. */
  /* The player scrolls: video, then title, music and buttons on the first screen, the drawings gallery below. */
  #player { background: #000; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
  #stage { position: relative; flex: none; height: 100dvh; background: #000; overflow: hidden; }
  #stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
  /* Like Reels/TikTok: the video fills the screen (a little cropped at the edges) when its shape is close to the
     screen's; a vertical video on a turned phone keeps its whole picture (user, 2026-10-08). */
  #stage video.fill { object-fit: cover; }
  #pause { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 70px;
    pointer-events: none; opacity: 0; transition: opacity .2s; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
  #pause.show { opacity: .9; }
  /* save on the right edge of the video, like Reels */
  #stage .rail { position: absolute; right: 10px; bottom: calc(env(safe-area-inset-bottom) + 118px); display: flex;
    flex-direction: column; gap: 18px; z-index: 2; }
  #stage .rail button { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #fff;
    font-size: 12px; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
  #stage .rail button span { width: 48px; height: 48px; border-radius: 50%; background: rgba(40,40,48,.55); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
  /* title, meta and a thin scrubber over a soft fade at the bottom of the video */
  #stage .cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 70px 76px calc(env(safe-area-inset-bottom) + 10px) 16px;
    background: linear-gradient(transparent, rgba(0,0,0,.72)); pointer-events: none; }
  #stage .cap h2 { margin: 0 0 3px; font-size: 19px; text-shadow: 0 1px 4px rgba(0,0,0,.7); }
  #stage .cap h2:empty { display: none; }
  #stage .cap .meta { color: #e6e6ee; font-size: 13px; text-shadow: 0 1px 4px rgba(0,0,0,.7); }
  #seekbar { display: flex; align-items: center; gap: 10px; margin: 8px -60px 0 0; pointer-events: auto; }
  #seektime { font-size: 12px; color: #ddd; font-variant-numeric: tabular-nums; flex: none; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
  .morehint { text-align: center; color: #cfcfd8; font-size: 12px; margin: 6px -60px 0 0; }
  /* play/pause, a big scrubber and the time, right under the video (never on top of it) */
  #seek { flex: 1; height: 28px; -webkit-appearance: none; appearance: none; background: transparent; touch-action: none; }
  #seek::-webkit-slider-runnable-track { height: 4px; border-radius: 2px;
    background: linear-gradient(to right, #fff var(--p, 0%), rgba(255,255,255,.3) var(--p, 0%)); }
  #seek::-moz-range-track { height: 6px; border-radius: 3px; background: #3a3a48; }
  #seek::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--accent); }
  #seek::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.5); }
  #seek::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #fff; }
  #pgallery { padding: 4px 16px calc(env(safe-area-inset-bottom) + 24px); background: var(--bg); }
  #pgallery h3 { margin: 10px 0 2px; font-size: 18px; }
  #pgallery .sub { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
  .dgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .dtile { position: relative; display: block; aspect-ratio: 3/4; border-radius: 10px; overflow: hidden; background: var(--panel); }
  .dtile img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .dtile .rate { position: absolute; right: 6px; top: 6px; display: flex; gap: 6px; }
  .dtile .rate button { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; font-size: 16px; line-height: 1;
    background: rgba(0,0,0,.55); opacity: .85; }
  .dtile .rate button.on { background: var(--accent); opacity: 1; }
  .dtile .still { position: absolute; left: 6px; bottom: 6px; width: 28px; height: 28px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; background: rgba(0,0,0,.6); font-size: 14px; text-decoration: none; }
  .dtile .still.print { left: 40px; }
  .dtile span { position: absolute; right: 6px; bottom: 6px; width: 28px; height: 28px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; background: rgba(0,0,0,.6); color: #fff; font-size: 15px; }
  #player .x { position: fixed; z-index: 3; top: calc(env(safe-area-inset-top) + 12px); left: 14px; width: 44px; height: 44px;
    border-radius: 50%; background: rgba(0,0,0,.5); font-size: 22px; }
  #pause.show { opacity: .85; }
  #sheet { position: relative; z-index: 2; padding: 16px 16px 8px; background: var(--bg); }
  .musicrow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.12);
    backdrop-filter: blur(10px); }
  .musicrow select { flex: 1; background: transparent; color: #fff; border: 0; font-size: 16px; font-weight: 600; outline: none; }
  .musicrow select option { color: #000; }
  .actions { display: flex; gap: 8px; margin-top: 12px; }
  .actions button { flex: 1; padding: 11px 4px; border-radius: 14px; background: rgba(255,255,255,.12); font-size: 13px; font-weight: 600; }
  .actions button span { display: block; font-size: 20px; margin-bottom: 2px; }
  .busy { margin-top: 10px; font-size: 14px; color: #ddd; display: flex; align-items: center; gap: 8px; }

  /* Desktop and tablets: the app is a phone-width column in the middle (full-screen videos were huge). */
  @media (min-width: 600px) {
    body { background: #050507; }
    #topbar, .overlay { left: 50%; right: auto; width: 460px; transform: translateX(-50%); }
    #feed { width: 460px; margin: 0 auto; border-left: 1px solid #1d1d26; border-right: 1px solid #1d1d26; }
    #topbar { position: fixed; }
    .overlay { box-shadow: 0 0 0 100vmax rgba(0,0,0,.75); }
    #fab { left: 50%; }
  }
  /* Desktop: a YouTube-like grid (phones keep the vertical feed). */
  #grid, #newbtn { display: none; }
  @media (min-width: 900px) {
    body { overflow-y: auto; }
    #feed, #fab { display: none !important; }
    #topbar { position: sticky; top: 0; left: auto; right: auto; width: auto; transform: none; pointer-events: auto;
      background: rgba(11,11,16,.92); backdrop-filter: blur(10px); border-bottom: 1px solid #1d1d26; padding: 14px 28px; }
    #newbtn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; font-weight: 700;
      background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; }
    #grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px 18px; padding: 24px 28px 60px; }
    .tile { cursor: pointer; }
    .thumb { position: relative; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; background: #000; }
    .thumb .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(16px) brightness(.5); transform: scale(1.15); }
    .thumb .fg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
    .thumb .badge { position: absolute; right: 8px; bottom: 8px; padding: 3px 8px; border-radius: 6px; font-size: 12px;
      font-weight: 700; background: rgba(0,0,0,.75); }
    .tile:hover .thumb { outline: 2px solid var(--accent); }
    .tile h3 { margin: 10px 2px 2px; font-size: 16px; line-height: 1.3; }
    .tile .meta { margin: 0 2px; color: var(--muted); font-size: 14px; }
    .tile .pill { margin-top: 8px; font-size: 13px; padding: 6px 12px; }
    .gridempty { grid-column: 1 / -1; text-align: center; padding: 80px 20px; color: var(--muted); font-size: 17px; }
    .overlay { left: 50%; right: auto; width: min(1000px, 94vw); transform: translateX(-50%); }
    #wiz.overlay { width: 560px; }
    #player { flex-direction: column; }
    #pgallery { width: 100%; max-width: 760px; margin: 0 auto; padding: 4px 28px 30px; }
    .dgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    #player.portrait { width: min(520px, 94vw); }   /* a vertical video: a phone-shaped player, like Reels on the web */
    #player #sheet { position: relative; padding: 14px 28px 20px; background: var(--bg); width: 100%; max-width: 760px; margin: 0 auto; }
  }

  /* sign-in and account */
  .check { display: flex; gap: 10px; align-items: flex-start; text-align: left; margin-top: 14px; font-size: 14px; color: var(--muted); }
  .check input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--accent); }
  .check a, .linkbtn { color: var(--accent); }
  .linkbtn { background: none; border: 0; font-size: 14px; margin-top: 14px; text-decoration: underline; }
  .gbtn { width: 100%; height: 54px; border-radius: 16px; background: #fff; color: #1f1f1f; font-weight: 700; font-size: 17px;
    display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 6px; }
  .or { color: var(--muted); font-size: 13px; margin: 18px 0 2px; }
  .chip { padding: 8px 12px; border-radius: 999px; background: var(--panel2); font-size: 13px; font-weight: 600; text-align: left; }
  .chip.on { background: var(--accent); color: #fff; }   /* a picked theme (2026-10-14: had no style, picks were invisible) */
  #occasions .cta { width: 100%; margin-top: 6px; padding: 16px; border-radius: 16px; background: var(--accent); color: #fff; font-size: 16px; font-weight: 800; }
  .pw { position: relative; }
  .pw .field { padding-right: 52px; }
  .row2 .pw { flex: 1; } .row2 .pw .field { width: 100%; }
  .pw .eye { position: absolute; right: 6px; bottom: 6px; width: 44px; height: 44px; border-radius: 10px; font-size: 20px;
    color: var(--muted); display: flex; align-items: center; justify-content: center; }
  #account .body h2 { font-size: 17px; margin: 22px 0 8px; }
  #account .atabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--panel); padding: 4px;
    border-radius: 14px; margin: 4px 0 16px; position: sticky; top: 0; z-index: 2; }
  #account .atabs button { padding: 10px 2px; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
  #account .atabs button.on { background: var(--accent); color: #fff; }
  #account .acard { background: var(--panel); border-radius: 16px; padding: 6px 14px 12px; margin-bottom: 12px; }
  #account .acard .kv:last-child { border-bottom: 0; }
  #account .badge { margin-left: 8px; padding: 2px 8px; border-radius: 99px; background: rgba(255,77,126,.18); color: var(--accent);
    font-size: 12px; font-weight: 800; }
  #account .usage { margin-top: 6px; }
  #account .meter { height: 8px; background: var(--panel2); border-radius: 99px; overflow: hidden; margin: 2px 0 8px; }
  #account .meter i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
  #account .cta { width: 100%; margin-top: 6px; padding: 16px; border-radius: 16px; background: var(--accent); color: #fff;
    font-size: 16px; font-weight: 800; }
  #account details { margin-top: 18px; background: var(--panel); border-radius: 16px; padding: 14px; }
  #account details summary { font-weight: 700; cursor: pointer; }
  #account .danger-zone summary { color: #ff7b7b; }
  #account .row2 { display: flex; gap: 8px; align-items: center; }
  #account .row2 .field { margin: 0; flex: 1; }
  #account .row2 button { padding: 14px 16px; border-radius: 14px; background: var(--panel2); font-weight: 700; flex: none; }
  #account .kv { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
  #account .kv span:first-child { color: var(--muted); }
  #account .note { color: var(--muted); font-size: 13px; margin-top: 6px; min-height: 18px; }
  .danger { width: 100%; height: 50px; border-radius: 14px; background: rgba(255,77,77,.16); color: #ff9a9a; font-weight: 700; margin-top: 10px; }
  #signin { z-index: 40; align-items: center; justify-content: center; text-align: center; padding: 30px 24px; }
  #signin .box { width: 100%; max-width: 380px; }
  #signin .logo { font-weight: 800; font-size: 30px; margin-bottom: 18px; }
  #signin .logo b { color: var(--accent); }
  #signin h1 { font-size: 24px; margin: 0 0 8px; }
  #signin p { color: var(--muted); font-size: 15px; line-height: 1.45; margin: 0 0 18px; }
  #signin .err { color: #ff8080; font-size: 14px; min-height: 20px; margin-top: 10px; }
  #acct { pointer-events: auto; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.16);
    font-weight: 800; font-size: 15px; display: none; }
  #acctmenu { position: fixed; z-index: 30; top: calc(env(safe-area-inset-top) + 58px); right: 14px; background: var(--panel);
    border-radius: 14px; padding: 14px; min-width: 220px; box-shadow: 0 10px 30px rgba(0,0,0,.5); font-size: 14px; }
  #acctmenu .who { color: var(--muted); margin-bottom: 10px; word-break: break-all; }
  #acctmenu button { width: 100%; padding: 10px; border-radius: 10px; background: var(--panel2); font-weight: 700; }
  .toast { position: fixed; z-index: 50; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 110px); transform: translateX(-50%);
    background: #fff; color: #111; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 15px; max-width: 90vw;
    box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.pfb{position:absolute;left:50%;transform:translateX(-50%);bottom:132px;z-index:6;display:flex;align-items:center;gap:8px;
  background:rgba(15,15,22,.82);backdrop-filter:blur(8px);color:#fff;border-radius:999px;padding:8px 10px 8px 16px;font-size:15px;max-width:92%}
.pfb button{font-size:22px;line-height:1;background:transparent;border:1px solid rgba(255,255,255,.25);border-radius:999px;padding:6px 12px;color:#fff;cursor:pointer}
.pfb .fbx{font-size:14px;border:none;padding:6px 8px;opacity:.7}
.pfb.col{flex-direction:column;align-items:stretch;border-radius:18px;padding:14px;width:min(420px,92%)}
.pfb.col textarea{border-radius:12px;padding:10px;font:inherit;background:rgba(255,255,255,.08);color:#fff;border:1px solid rgba(255,255,255,.2)}
.pfb.col button{font-size:15px;background:var(--accent,#ff4d7e);border:none}
#themesBox{position:fixed;inset:0;z-index:60;background:rgba(0,0,0,.75);display:flex;align-items:center;justify-content:center;padding:16px}
#themesBox .tbox{background:var(--panel,#17171f);border-radius:22px;width:100%;max-width:520px;max-height:90vh;overflow-y:auto;padding:20px;position:relative}
#themesBox .tx{position:absolute;right:12px;top:8px;background:none;border:none;color:inherit;font-size:22px;cursor:pointer}
#themesBox.hidden{display:none}
