/* build 41b: Video to Photos (Photos tab, Add video, the photo viewer) + the new look (ruby first, a small violet tail,
   pure black / pure white pages, every corner rounded). No colour values here: they live in tokens.css. */

/* ===== the new look ===== */
/* Pages are plain black / plain white: the build 20 dots, scan lines and band are off (a chosen wallpaper still shows). */
#app:not([data-route="home"]):not([data-route="clip"])::before{background:none}
#app:not([data-route="home"]):not([data-route="clip"])::after{background:none;animation:none}
.ptabs{gap:40px}
.ptab{position:relative}
.ptab[aria-selected="true"]{box-shadow:none}
.ptab[aria-selected="true"]::after{content:"";position:absolute;left:14%;right:14%;bottom:-1px;height:2.5px;border-radius:999px;background:var(--accent-line);box-shadow:var(--accent-glow)}
.ptab-n{color:var(--ruby-text)}
.ppane-ph{margin-left:-26px;margin-right:-26px}
/* Clip tiles: rounded, with room between them (no square corners anywhere). */
.grid3{gap:6px;padding:0 10px}
.grid3 .tile{border-radius:14px}

/* ===== the photo frame: ruby light rim ending in a touch of violet, a lit top edge, a soft ruby glow ===== */
.pfr{position:relative;display:block;padding:1.5px;border-radius:18px;background:var(--pf-rim);box-shadow:var(--pf-shadow)}
.pfr-in{position:relative;display:block;overflow:hidden;border-radius:16.5px;background:var(--pf-in)}
.pfr-in img,.pfr-in canvas{display:block;width:100%;height:100%;object-fit:cover}
.pfr-lit{position:absolute;left:18px;right:18px;top:0;height:1.5px;border-radius:999px;background:var(--pf-lit);pointer-events:none}
.pf-no{position:absolute;right:9px;top:8px;z-index:1;font:11px/1 var(--head);letter-spacing:.5px;color:var(--pf-num);text-shadow:var(--pf-num-glow)}
.pf-first,.pf-bd{position:absolute;z-index:1;display:inline-flex;align-items:center;gap:5px;border-radius:999px;font:700 11px/1 var(--body);color:var(--pf-badge-text);background:var(--pf-badge-bg)}
.pf-first{left:10px;top:10px;padding:6px 10px;border:1px solid var(--pf-badge-hot);box-shadow:var(--pf-badge-glow)}
.pf-bd{left:7px;bottom:7px;padding:5px 8px;border:1px solid var(--pf-badge-line);font-weight:600;font-size:10px}
.pf-first .ic,.pf-bd .ic{width:12px;height:12px;stroke:var(--pf-badge-text);stroke-width:2}

/* ===== Photos tab ===== */
.pf-pane{padding:14px 16px 26px}
.pf-row{display:flex;align-items:center;gap:12px;margin:0 0 14px}
.pf-row-t{margin:0;font-size:12px;line-height:1.45;color:var(--dim)}
.vp-addw{display:contents}
.btn.vp-add{flex:none;width:auto;height:46px;padding:0 18px;border-radius:999px;font-size:14px;display:inline-flex;align-items:center;gap:8px}
.btn.vp-add .ic,.btn-line .ic{width:19px;height:19px}
.btn.vp-add .ic{stroke:currentColor}
.pf-feat{position:relative}
.pf-car{display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;-webkit-overflow-scrolling:touch;margin:-8px -6px;padding:8px 0}
.pf-car::-webkit-scrollbar{display:none}
.pf-slide{flex:0 0 100%;scroll-snap-align:center;display:block;padding:0 6px;border:0;background:none;text-align:left}
.pfr-big .pfr-in{aspect-ratio:6/5}
.pfr-big img{object-position:50% 38%}
.pf-no-big{right:16px;top:14px;font-size:11.5px}
.pf-dots{position:absolute;left:0;right:0;bottom:14px;z-index:1;display:flex;justify-content:center;gap:5px;pointer-events:none}
.pf-dots i{width:6px;height:6px;border-radius:999px;background:var(--pf-dot);transition:width .2s ease}
.pf-dots i.on{width:18px;background:var(--accent-line);box-shadow:var(--accent-glow)}
.pf-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:14px}
.pf-tile{display:block;padding:0;border:0;background:none;text-align:left}
.pf-tile .pfr-in{aspect-ratio:4/5}
.pf-empty{display:flex;flex-direction:column;align-items:center;gap:10px;padding:16px 6px 4px;text-align:center}
.pf-empty .t2{margin:4px 0 0}
.pf-empty .sub{max-width:300px;margin:0}
.pf-empty-i{display:grid;place-items:center;width:64px;height:64px;border-radius:22px;background:var(--pf-icon-bg);box-shadow:var(--pf-shadow)}
.pf-empty-i .ic{width:30px;height:30px;stroke:var(--on-ruby)}

/* ===== Edit profile: Add video ===== */
.vp-edit{display:flex;align-items:center;gap:8px}
.btn-line.vp-add-line{width:auto;height:40px;padding:0 14px;border-radius:999px;display:inline-flex;align-items:center;gap:6px;border-color:var(--ruby);color:var(--text)}
.btn-line.vp-add-line .ic{stroke:var(--ruby-text)}
.vp-new{padding:4px 8px;border-radius:999px;font:700 10.5px/1 var(--body);letter-spacing:.06em;text-transform:uppercase;color:var(--on-ruby);background:var(--pf-icon-bg)}
.vp-edit-hint{margin:-4px 0 6px}

/* ===== choice buttons (Who can see) ===== */
.segs{display:flex;gap:8px}
.seg{flex:1;min-height:44px;padding:0 6px;border:1.5px solid var(--line);border-radius:14px;background:var(--soft);font:600 13.5px/1.2 var(--body);color:var(--text)}
.seg[aria-checked="true"]{border-color:transparent;background:linear-gradient(var(--seg-on),var(--seg-on)) padding-box,var(--accent-line) border-box;box-shadow:var(--sel-shadow)}

/* ===== Add video screen ===== */
.vp{padding-bottom:30px}
.vp-choose,.vp-making{display:flex;flex-direction:column;align-items:center;gap:12px;padding-top:14px;text-align:center}
.vp-choose .t2,.vp-making .t2{margin:4px 0 0}
.vp-choose .sub,.vp-choose .msg{max-width:320px;margin:0}
.vp-choose .btn,.vp-choose .btn-line,.vp-making .btn-line{width:100%;max-width:320px;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.vp-choose .btn .ic{stroke:currentColor}
.vp-stays{display:flex;align-items:center;justify-content:center;gap:6px}
.vp-stays .ic{flex:none;width:15px;height:15px;stroke:var(--faint)}
.pfr-prev{width:168px}
.pfr-prev .pfr-in{aspect-ratio:4/5}
.vp-scan{position:absolute;left:0;right:0;top:0;height:22%;background:var(--pf-scan);animation:vp-scan 1.6s linear infinite;pointer-events:none}
@keyframes vp-scan{from{transform:translateY(-100%)}to{transform:translateY(460%)}}
@media (prefers-reduced-motion:reduce){.vp-scan{animation:none;opacity:0}}
.vp-status{margin:0;font-size:13.5px;color:var(--dim)}
.vp-bar{width:100%;max-width:300px;height:5px;overflow:hidden;border-radius:999px;background:var(--line-soft)}
.vp-bar i{display:block;height:100%;border-radius:999px;background:var(--accent-line);transition:width .2s ease}
.vp-cks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px;width:100%;max-width:320px;margin:6px 0 2px;padding:0;list-style:none;text-align:left}
.vp-ck{display:flex;align-items:center;gap:8px;font-size:13.5px;color:var(--dim)}
.vp-ckb{flex:none;display:grid;place-items:center;width:22px;height:22px;border:1.5px solid var(--line);border-radius:999px}
.vp-ckb .ic{width:13px;height:13px;opacity:0;stroke:var(--on-ruby);stroke-width:3}
.vp-ck.on{color:var(--text)}
.vp-ck.on .vp-ckb{border-color:transparent;background:var(--pf-icon-bg)}
.vp-ck.on .vp-ckb .ic{opacity:1}
.vp-pick .t2{margin:6px 0 4px}
.vp-pick .sub{margin:0}
.vp-note{margin:8px 0 0}
.vp-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:16px 0 4px}
.vp-shot{position:relative;display:block;padding:0;border:0;background:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.vp-shot .pfr-in{aspect-ratio:4/5}
.vp-shot .pf-first{left:6px;top:6px;padding:4px 7px;font-size:10px}
.vp-shot.off .pfr{background:var(--line);box-shadow:none}
.vp-shot.off img{opacity:.32}
.vp-tick{position:absolute;right:6px;bottom:6px;z-index:1;display:grid;place-items:center;width:24px;height:24px;border-radius:999px;background:var(--pf-icon-bg)}
.vp-tick .ic{width:14px;height:14px;stroke:var(--on-ruby);stroke-width:2.8}
.vp-shot.off .vp-tick{background:var(--pf-off)}
.linkbtn.vp-another{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:100%;color:var(--ruby-text)}
.linkbtn.vp-another .ic{width:18px;height:18px;stroke:var(--ruby-text)}
.vp-whob{min-height:2.9em}
.vp-room:empty{display:none}
.vp-pick .btn{margin-top:14px}

/* ===== the photo viewer (dark in both themes, like the clip screens) ===== */
.pv{position:fixed;inset:0;z-index:19;display:flex;flex-direction:column;padding-bottom:env(safe-area-inset-bottom);animation:pv-in .16s ease-out both}
@keyframes pv-in{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){.pv{animation:none}}
.pv.out{opacity:0;transition:opacity .15s ease}
.pv-top{flex:none;display:flex;align-items:center;justify-content:space-between;height:58px;padding:env(safe-area-inset-top) 6px 0}
.pv-n{font:600 14px/1 var(--body);color:var(--text)}
.pv-sp{width:44px}
.pv-ib .ic{stroke:var(--text)}
.pv-stage{position:relative;flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:6px 16px;touch-action:pan-y}
.pfr-view{width:min(100%,calc((100dvh - 290px) * .8));max-width:460px}
.pfr-view .pfr-in{aspect-ratio:4/5}
.pv-side{position:absolute;top:50%;width:44px;height:44px;margin-top:-22px;display:grid;place-items:center;border-radius:999px;background:var(--glass);border:1px solid var(--glass-line)}
.pv-side .ic{width:22px;height:22px;stroke:var(--text)}
.pv-prev{left:6px}.pv-next{right:6px}
.pv-side[hidden]{display:none}
.pv-bot{flex:none;padding:8px 16px 16px}
.pv-meta{margin:0 0 6px;text-align:center;font-size:12.5px;color:var(--dim)}
.pv-cap{margin:6px 0 8px}
.pv-acts .acts{display:flex;gap:10px;margin-top:12px}
.pv-acts .acts .btn-line{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:6px}
.btn-line.hot{border-color:var(--ruby);color:var(--ruby-text)}
.pv-acts .btn-line .ic{stroke:currentColor}
.rv-pic{display:block;width:120px;aspect-ratio:4/5;object-fit:cover;border-radius:14px;box-shadow:var(--pf-shadow)}

/* build 41c: app text is not selectable by a tap or long press (Firefox showed COPY / SELECT ALL on the self-test page).
   Fields stay selectable so people can edit and paste. */
body{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
input,textarea,[contenteditable="true"]{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
.vp-code{margin:0;font-size:11.5px;opacity:.85}

/* build 41g: Add video and Add photos side by side */
.pf-row{flex-direction:column;align-items:stretch;gap:8px}
.pf-btns{display:flex;gap:10px;width:100%}
.pf-btns .btn.vp-add,.pf-btns .btn-line.vp-add{flex:1;justify-content:center;min-width:0;padding:0 12px}
.btn-line.vp-add{height:46px;border-radius:999px;display:inline-flex;align-items:center;gap:8px;font-size:14px;border-color:var(--ruby);color:var(--text)}
.btn-line.vp-add .ic{stroke:var(--ruby-text)}
.pf-empty .pf-btns{max-width:340px}
.vp-edit{flex-wrap:wrap}

/* build 41i (owner approved): the big first photo shows the whole 4:5 photo, no cut forehead or chin */
.pfr-big .pfr-in{aspect-ratio:4/5}
.pfr-big img{object-position:50% 50%}
/* build 41i: a long press on a photo must not open the browser's View / Save / Share image menu (Huawei Browser did).
   The picture lets taps fall through to its button; nothing to drag or save from the page. */
.pfr img,.pv-img,.rv-pic{pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}
.pfr,.pf-slide,.pf-tile,.pv-stage{-webkit-touch-callout:none}
/* build 41i: Make first gives a clear sign: the frame glows for a moment */
.pfr-view.pv-flash{animation:pv-flash 1.1s ease-out}
@keyframes pv-flash{0%{box-shadow:var(--pf-shadow)}25%{box-shadow:0 0 0 3px rgba(240,106,138,.9),0 0 38px 8px rgba(224,32,79,.75)}100%{box-shadow:var(--pf-shadow)}}
@media (prefers-reduced-motion:reduce){.pfr-view.pv-flash{animation:none}}
