/* Legacy - family album. Look and feel follows dayblazer.app/cruise */
:root {
  --navy: #213763; --ink: #1c2f5a; --ocean1: #27557f; --ocean2: #3f8bab;
  --teal: #4aaed0; --teal-dark: #2f93b6; --bg: #eff3f9; --line: #e1e9f4; --muted: #7f8ea6; --danger: #c0453a;
  --lav-bg: #eceef6; --lav-line: #cfd4e6; --lav-ink: #5b6588;
  --aqua-bg: #e3f4f9; --aqua-line: #b7e0ee; --aqua-ink: #2f93b6;
  --peach-bg: #fdf1e6; --peach-line: #f3cfa8; --peach-ink: #cf7a30;
  --shadow: 0 2px 12px rgba(33, 55, 99, .08);
  --head: 'Montserrat', 'Avenir Next', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Lato', 'Avenir Next', 'Helvetica Neue', Arial, sans-serif;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.4; -webkit-text-size-adjust: 100%; }
body.locked { overflow: hidden; }
body::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: var(--sat); background: var(--navy); z-index: 60; }
button { font-family: inherit; color: inherit; cursor: pointer; }
img { display: block; }
a { color: var(--teal-dark); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
#app { min-height: 100vh; }
#app.home { padding-bottom: calc(120px + var(--sab)); }
#printBox { display: none; }

/* ---------- hero (home) ---------- */
.hero { position: relative; background: linear-gradient(160deg, var(--navy) 0%, var(--ocean1) 45%, var(--ocean2) 100%); color: #fff; padding: calc(var(--sat) + 18px) 20px 70px; overflow: hidden; }
.hero::after { content: ''; position: absolute; left: -12%; right: -12%; bottom: -1px; height: 46px; background: var(--bg); border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.hero-top { display: flex; align-items: center; justify-content: space-between; }
.brand { font-family: var(--head); font-weight: 800; font-size: 32px; letter-spacing: .01em; line-height: 1; }
.brand small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: rgba(255,255,255,.72); margin-top: 7px; }
.me-btn { width: 54px; height: 54px; border-radius: 50%; border: 3px solid rgba(255,255,255,.7); background: rgba(255,255,255,.16); font-size: 27px; line-height: 1; display: grid; place-items: center; padding: 0; }
.crew { display: flex; gap: 16px; overflow-x: auto; margin: 0 -20px; padding: 22px 24px 4px; scrollbar-width: none; }
.crew::-webkit-scrollbar { display: none; }
.crew button { background: none; border: 0; padding: 0; text-align: center; flex: 0 0 auto; min-width: 66px; }
.crew .av { width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 8px; display: grid; place-items: center; font-size: 30px; background: rgba(255,255,255,.18); border: 3px solid rgba(255,255,255,.35); }
.crew .on .av { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(74,174,208,.35); background: rgba(255,255,255,.28); }
.crew .nm { display: block; font-family: var(--head); font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.78); max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crew .on .nm { color: #fff; }

/* ---------- tabs ---------- */
.tabs { position: sticky; top: var(--sat); z-index: 40; display: flex; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 2px 8px rgba(33,55,99,.05); }
.tab { flex: 1; background: none; border: 0; border-bottom: 4px solid transparent; padding: 17px 6px 13px; font-family: var(--head); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tab.on { color: var(--navy); border-bottom-color: var(--teal); }
.wrap { padding: 22px 16px 0; max-width: 720px; margin: 0 auto; }

/* ---------- headings, pills ---------- */
.section-title { font-family: var(--head); font-weight: 800; font-size: 34px; color: var(--navy); margin: 0 0 2px; line-height: 1.12; overflow-wrap: anywhere; }
.section-sub { font-family: var(--head); font-weight: 600; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: #6a7c99; margin-bottom: 18px; }
.lbl { font-family: var(--head); font-weight: 700; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); }
.pill { display: inline-block; font-family: var(--head); font-weight: 700; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; border: 2px solid; white-space: nowrap; }
.pill.lav { background: var(--lav-bg); border-color: var(--lav-line); color: var(--lav-ink); }
.pill.aqua { background: var(--aqua-bg); border-color: var(--aqua-line); color: var(--aqua-ink); }
.pill.peach { background: var(--peach-bg); border-color: var(--peach-line); color: var(--peach-ink); }
.empty { text-align: center; color: var(--muted); padding: 36px 20px; font-size: 17px; }
.empty .ic { font-size: 44px; margin-bottom: 8px; }
.link { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 15px; color: var(--teal-dark); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- cards ---------- */
.add-card { display: block; width: 100%; background: #fff; border: 3px dashed #cfe3ee; border-radius: 28px; padding: 24px 16px; text-align: center; margin-bottom: 18px; }
.add-card .ic { font-size: 40px; line-height: 1; }
.add-card .t { font-family: var(--head); font-weight: 800; font-size: 20px; letter-spacing: .06em; color: var(--teal); margin-top: 10px; }
.add-card .s { color: var(--muted); font-size: 16px; margin-top: 4px; }
.album-card { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 26px; padding: 14px 16px 14px 14px; margin-bottom: 14px; box-shadow: var(--shadow); cursor: pointer; }
.album-card .cover { flex: 0 0 76px; width: 76px; height: 76px; border-radius: 20px; background: linear-gradient(135deg, #dbe8f5, #c5dcee); overflow: hidden; display: grid; place-items: center; font-size: 32px; }
.album-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.album-card .mid { flex: 1; min-width: 0; }
.album-card .ttl { font-family: var(--head); font-weight: 800; font-size: 21px; line-height: 1.2; color: var(--navy); margin: 3px 0 5px; overflow-wrap: anywhere; }
.album-card .who { color: var(--muted); font-size: 15px; }
.album-card .side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.album-card .chev { color: var(--muted); font-size: 24px; line-height: 1; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (min-width: 620px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); text-align: left; cursor: pointer; min-width: 0; }
.pcard .im { aspect-ratio: 1 / 1; background: #dbe6f2; overflow: hidden; position: relative; }
.pcard .im img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.pcard .badge { position: absolute; right: 8px; bottom: 8px; background: rgba(33,55,99,.8); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.pcard .tx { padding: 12px 14px 14px; }
.pcard .cap { font-size: 17px; line-height: 1.3; color: var(--ink); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.pcard .cap.none { color: var(--muted); font-style: italic; }
.pcard .meta { color: #a2afc2; font-size: 14px; margin-top: 4px; }
.install { display: flex; align-items: center; gap: 12px; background: var(--aqua-bg); border: 2px solid var(--aqua-line); border-radius: 22px; padding: 12px 14px; margin-bottom: 18px; }
.install .ic { font-size: 28px; }
.install .tx { flex: 1; font-size: 15px; line-height: 1.3; }
.install .tx b { display: block; font-family: var(--head); font-size: 15px; color: var(--navy); }
.install .x { background: none; border: 0; font-size: 18px; color: var(--muted); padding: 8px; }
.built { text-align: center; margin: 34px 0 10px; font-size: 14px; }
.built a { color: var(--muted); text-decoration: none; }
.fab { position: fixed; right: 16px; bottom: calc(18px + var(--sab)); z-index: 50; border: 0; border-radius: 999px; padding: 0 24px; height: 58px; background: linear-gradient(135deg, var(--teal-dark), var(--ocean2)); color: #fff; font-family: var(--head); font-weight: 800; font-size: 16px; letter-spacing: .04em; box-shadow: 0 8px 22px rgba(33,55,99,.35); }
.fab span { font-size: 22px; margin-right: 6px; vertical-align: -2px; }

/* ---------- filters ---------- */
.fld { width: 100%; font: inherit; font-size: 17px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); -webkit-appearance: none; appearance: none; }
.fld:focus { outline: none; border-color: var(--teal); }
textarea.fld { resize: vertical; min-height: 88px; line-height: 1.4; }
.fld.search { border-radius: 999px; padding-left: 20px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; font-family: var(--head); font-weight: 700; font-size: 13px; letter-spacing: .06em; padding: 9px 16px; border-radius: 999px; border: 2px solid var(--line); background: #fff; color: var(--muted); }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.frow { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 16px; gap: 10px; }
.count { color: var(--muted); font-size: 15px; }
.sel { font: inherit; font-size: 15px; padding: 9px 12px; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--ink); max-width: 60%; }

/* ---------- album screen ---------- */
.screen { position: fixed; inset: 0; z-index: 70; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; transform: translateX(100%); transition: transform .22s ease; padding-bottom: calc(120px + var(--sab)); }
.screen.in { transform: none; }
.abar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; background: var(--navy); color: #fff; padding: calc(var(--sat) + 8px) 10px 10px; min-height: calc(var(--sat) + 60px); }
.abar-t { flex: 1; text-align: center; font-family: var(--head); font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .15s; }
.abar.scrolled .abar-t { opacity: 1; }
.bar-btn { background: rgba(255,255,255,.14); border: 0; color: #fff; border-radius: 999px; min-height: 44px; padding: 0 18px; font-family: var(--head); font-weight: 700; font-size: 15px; letter-spacing: .03em; }
.bar-btn.ic { width: 48px; padding: 0; font-size: 24px; line-height: 1; }
.a-meta { display: flex; align-items: center; gap: 12px; margin: -6px 0 12px; flex-wrap: wrap; }
.adesc { margin: 0 0 14px; color: #4a5c80; font-size: 17px; overflow-wrap: anywhere; }

/* ---------- sheets ---------- */
.sh-back { position: fixed; inset: 0; z-index: 100; background: rgba(15,25,50,0); display: flex; align-items: flex-end; justify-content: center; transition: background .2s; }
.sh-back.in { background: rgba(15,25,50,.5); }
.sh { background: #fff; width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; border-radius: 28px 28px 0 0; display: flex; flex-direction: column; transform: translateY(100%); transition: transform .22s ease; }
.sh-back.in .sh { transform: none; }
.sh-grab { width: 44px; height: 5px; border-radius: 3px; background: #d5deeb; margin: 10px auto 0; }
.sh-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 20px 4px; }
.sh-head h2 { font-family: var(--head); font-weight: 800; font-size: 22px; color: var(--navy); margin: 0; }
.sh .x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #eef2f8; font-size: 18px; color: var(--muted); }
.sh-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 20px calc(26px + var(--sab)); }
.lb { display: block; font-family: var(--head); font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #6a7c99; margin: 16px 0 7px; }
.lead { color: #4a5c80; margin: 4px 0 12px; }
.hint { color: var(--muted); font-size: 15px; margin: 12px 0 0; }
.hint.warn { color: var(--peach-ink); }
.err { color: var(--danger); font-size: 15px; min-height: 20px; margin: 8px 0 0; }
.btn { font-family: var(--head); font-weight: 700; font-size: 16px; letter-spacing: .04em; padding: 14px 22px; border: 0; border-radius: 999px; background: var(--navy); color: #fff; min-height: 52px; }
.btn.block { display: block; width: 100%; }
.btn.ghost { background: #fff; color: var(--navy); border: 2px solid var(--line); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.ghost.danger { background: #fff; color: var(--danger); border-color: #efc6c1; }
.btn.sm { padding: 9px 16px; min-height: 42px; font-size: 14px; }
.btn:disabled { opacity: .55; }
.btns { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 24px 0 8px; }
.h3 { font-family: var(--head); font-weight: 800; font-size: 18px; color: var(--navy); margin: 14px 0 0; }
.emo { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.emo button { height: 52px; border-radius: 16px; border: 2px solid var(--line); background: #fff; font-size: 28px; padding: 0; }
.emo button.on { border-color: var(--teal); background: var(--aqua-bg); }
.msel { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; width: 100%; min-height: 54px; padding: 8px 40px 8px 12px; border: 2px solid var(--line); border-radius: 16px; background: #fff; text-align: left; position: relative; font-size: 16px; }
.msel .car { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.msel .ph { color: #9aa8bd; padding: 4px; }
.msel .mchip { background: var(--aqua-bg); border: 1.5px solid var(--aqua-line); color: var(--navy); border-radius: 999px; padding: 4px 12px; font-size: 15px; font-weight: 700; }
.plist { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 16px; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: 18px; background: #fff; text-align: left; font-size: 17px; min-height: 56px; }
.row.on { border-color: var(--teal); background: var(--aqua-bg); }
.row .re { font-size: 24px; width: 30px; text-align: center; }
.row .rl { flex: 1; overflow-wrap: anywhere; }
.row .ck { color: var(--teal-dark); font-weight: 800; font-size: 20px; width: 22px; text-align: center; }
.row.plus { color: var(--teal-dark); font-family: var(--head); font-weight: 800; border-style: dashed; margin-top: 10px; }
.row-tools { display: flex; gap: 18px; margin-top: 10px; }
.big-btn { display: grid; grid-template-columns: 52px 1fr; column-gap: 12px; align-items: center; width: 100%; text-align: left; padding: 16px; margin-top: 12px; background: #fff; border: 2px solid var(--line); border-radius: 22px; }
.big-btn span { grid-row: span 2; font-size: 36px; text-align: center; }
.big-btn b { font-family: var(--head); font-size: 17px; color: var(--navy); }
.big-btn small { color: var(--muted); font-size: 15px; }
.up-list { display: flex; flex-direction: column; gap: 12px; max-height: 42vh; overflow-y: auto; padding: 2px 0; }
.up-item { display: flex; gap: 12px; align-items: flex-start; background: #f6f8fc; border-radius: 18px; padding: 10px; }
.up-item img { width: 84px; height: 84px; object-fit: cover; border-radius: 14px; flex: 0 0 84px; }
.up-f { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.up-f .fld { padding: 10px 12px; font-size: 16px; border-radius: 12px; }
.up-f textarea.fld { min-height: 60px; }
.prog { height: 10px; border-radius: 6px; background: #e3ebf5; overflow: hidden; margin: 14px 0 6px; }
.prog .bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--ocean2)); transition: width .25s; }
.member { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
.member.off { opacity: .6; }
.member .av { width: 48px; height: 48px; border-radius: 50%; background: #e9f1f9; display: grid; place-items: center; font-size: 26px; flex: 0 0 48px; }
.member .mid { flex: 1; min-width: 0; }
.member .nm { font-family: var(--head); font-weight: 800; color: var(--navy); overflow-wrap: anywhere; }
.member .s { color: var(--muted); font-size: 14px; }
.member .bar-btn { background: #eef2f8; color: var(--navy); min-height: 40px; padding: 0 14px; font-size: 13px; }
.invite-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.invite-card .t { font-family: var(--head); font-weight: 800; color: var(--navy); }
.invite-card .s { color: var(--muted); font-size: 14px; margin: 2px 0 10px; }
.invite-card .btns { flex-direction: row; flex-wrap: wrap; margin-top: 0; }
.linkbox { background: #f2f6fb; border: 2px dashed #cfe3ee; border-radius: 16px; padding: 14px; font-size: 15px; word-break: break-all; color: var(--navy); margin: 8px 0 4px; }

/* ---------- viewer ---------- */
.viewer { position: fixed; inset: 0; z-index: 90; background: #0d1a33; color: #fff; }
.v-top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: calc(var(--sat) + 10px) 14px 10px; pointer-events: none; }
.v-top > * { pointer-events: auto; }
.v-count { font-family: var(--head); font-weight: 700; font-size: 13px; letter-spacing: .12em; background: rgba(255,255,255,.16); padding: 9px 15px; border-radius: 999px; }
.v-x { width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.2); color: #fff; font-size: 22px; }
.v-track { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior-x: contain; }
.v-track::-webkit-scrollbar { display: none; }
.v-slide { flex: 0 0 100%; width: 100%; height: 100%; overflow-y: auto; overflow-x: hidden; scroll-snap-align: start; scroll-snap-stop: always; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.v-hero { height: calc(100% - 112px - var(--sab)); padding: calc(var(--sat) + 64px) 10px 8px; display: flex; align-items: center; justify-content: center; }
.v-hero img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 14px; background: #16264a; }
.v-acts { height: calc(76px + var(--sab)); padding: 8px 12px calc(12px + var(--sab)); display: flex; gap: 10px; align-items: center; justify-content: center; }
.vb { flex: 1; max-width: 170px; height: 52px; border-radius: 999px; border: 2px solid rgba(255,255,255,.28); background: rgba(255,255,255,.1); color: #fff; font-family: var(--head); font-weight: 700; font-size: 14px; letter-spacing: .04em; }
.v-panel { background: #fff; color: var(--ink); border-radius: 28px 28px 0 0; padding: 26px 20px calc(70px + var(--sab)); min-height: 72%; max-width: 720px; margin: 0 auto; }
.v-title { font-family: var(--head); font-weight: 800; font-size: 26px; line-height: 1.2; color: var(--navy); margin: 0 0 8px; overflow-wrap: anywhere; }
.v-by { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.v-by .av { font-size: 22px; }
.v-by b { color: var(--ink); }
.v-story { font-size: 18px; line-height: 1.55; color: #26375f; overflow-wrap: anywhere; }
.v-story.none { color: var(--muted); font-style: italic; }
.v-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.tag { border: 2px solid var(--aqua-line); background: var(--aqua-bg); color: var(--aqua-ink); border-radius: 999px; padding: 6px 14px; font-family: var(--head); font-weight: 700; font-size: 13px; }
.tag.alb { background: var(--lav-bg); border-color: var(--lav-line); color: var(--lav-ink); }
.v-panel .btn.sm { margin-top: 14px; }
.v-ch { font-family: var(--head); font-weight: 800; font-size: 20px; color: var(--navy); margin: 28px 0 8px; padding-top: 20px; border-top: 1px solid var(--line); }
.cm { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eef2f8; }
.cm .av { font-size: 26px; flex: 0 0 34px; text-align: center; }
.cm-b { flex: 1; min-width: 0; }
.cm-h { display: flex; align-items: baseline; gap: 8px; }
.cm-h b { font-family: var(--head); color: var(--navy); }
.cm-h .t { color: var(--muted); font-size: 13px; flex: 1; }
.cm-x { background: none; border: 0; color: #a2afc2; font-size: 16px; padding: 6px; }
.cm-t { font-size: 17px; overflow-wrap: anywhere; }
.cm-none { color: var(--muted); padding: 10px 0 4px; }
.cm-form { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.v-gone { padding: 30vh 24px 0; text-align: center; color: rgba(255,255,255,.7); }

/* ---------- auth ---------- */
#app.auth { min-height: 100vh; background: linear-gradient(160deg, var(--navy) 0%, var(--ocean1) 50%, var(--ocean2) 100%); }
.auth-wrap { max-width: 460px; margin: 0 auto; padding: calc(var(--sat) + 30px) 18px 30px; }
.auth-card { background: #fff; border-radius: 30px; padding: 26px 22px 26px; box-shadow: 0 14px 40px rgba(10,20,50,.35); }
.auth-card .brand { color: var(--navy); font-size: 38px; }
.auth-card .brand-sub { font-family: var(--head); font-weight: 700; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--teal); margin: 6px 0 18px; }
.auth-card h2 { font-family: var(--head); font-weight: 800; font-size: 24px; color: var(--navy); margin: 0 0 6px; }
.auth-wrap .built a { color: rgba(255,255,255,.75); }

/* ---------- toast, busy ---------- */
#toast { position: fixed; left: 16px; right: 16px; bottom: calc(96px + var(--sab)); z-index: 200; margin: 0 auto; max-width: 420px; background: var(--navy); color: #fff; padding: 14px 18px; border-radius: 18px; font-size: 16px; text-align: center; box-shadow: 0 8px 26px rgba(10,20,50,.35); opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .2s, transform .2s; }
#toast.on { opacity: 1; transform: none; }
.busy { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; background: rgba(239,243,249,.9); font-family: var(--head); font-weight: 700; color: var(--navy); }

@media (prefers-reduced-motion: reduce) { .screen, .sh, .sh-back, #toast, .prog .bar { transition: none; } }

/* ---------- printing ---------- */
@media print {
  html, body { background: #fff !important; overflow: visible !important; }
  body::before { display: none !important; }
  body > *:not(#printBox) { display: none !important; }
  #printBox { display: block !important; padding: 0; color: #000; }
  #printBox img { display: block; max-width: 100%; max-height: 82vh; margin: 0 auto; object-fit: contain; }
  #printBox .pr-cap { margin: 14px auto 0; max-width: 90%; font-family: Georgia, serif; }
  #printBox h2 { font-size: 20px; margin: 0 0 6px; }
  #printBox p { font-size: 14px; margin: 0 0 8px; white-space: pre-wrap; }
  #printBox small { color: #555; }
}
select.fld { background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'><path d='M1 1l6 6 6-6' fill='none' stroke='%237f8ea6' stroke-width='2'/></svg>") no-repeat right 16px center; padding-right: 40px; }
.add-card.slim { display: flex; align-items: center; gap: 16px; text-align: left; padding: 14px 20px; border-radius: 24px; }
.add-card.slim .ic { font-size: 34px; }
.add-card.slim .t { margin-top: 0; font-size: 18px; }
.add-card.slim .s { margin-top: 1px; font-size: 15px; }
.viewer .v-top { z-index: 10; }
.viewer .v-track { position: relative; z-index: 1; }
.viewer.over .v-count, .viewer.over .v-x { background: var(--navy); box-shadow: 0 2px 10px rgba(10,20,50,.35); }
.v-panel { scroll-margin-top: calc(var(--sat) + 72px); }
.v-panel { padding-top: 30px; }
.h2-sec { font-family: var(--head); font-weight: 800; font-size: 19px; color: var(--navy); margin: 26px 0 12px; }
.subs { border-left: 3px solid var(--aqua-line); padding-left: 12px; margin-left: 2px; }
.subs .h2-sec { margin-top: 20px; }
.album-card.sub { border-radius: 22px; }
.album-card.sub .cover { flex: 0 0 60px; width: 60px; height: 60px; border-radius: 16px; font-size: 26px; }
.album-card.sub .ttl { font-size: 18px; }
.crumb { font-family: var(--head); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 4px; }
.branch { margin-bottom: 14px; }
.branch .album-card { margin-bottom: 0; }
.expander { display: block; width: 100%; background: none; border: 0; padding: 10px 16px 4px; text-align: left; font-family: var(--head); font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-dark); }
.expander .ar { font-size: 15px; }
.branch.open .expander { color: var(--navy); }
.kids { border-left: 3px solid var(--aqua-line); margin: 6px 0 0 18px; padding-left: 12px; }
.kids .album-card:last-child { margin-bottom: 0; }
/* tidy-up editor */
.up-thumb { position: relative; flex: 0 0 84px; }
.up-thumb img { width: 84px; height: 84px; object-fit: cover; border-radius: 14px; }
.tidy { display: block; width: 84px; margin-top: 6px; padding: 6px 2px; border: 0; border-radius: 10px; background: #e7eef7; color: var(--navy); font-family: var(--head); font-weight: 700; font-size: 11px; line-height: 1.2; }
.ed { position: relative; background: #0d1a33; border-radius: 18px; padding: 10px; display: flex; align-items: center; justify-content: center; min-height: 180px; overflow: hidden; touch-action: none; }
.ed canvas { display: block; max-width: 100%; border-radius: 8px; }
.crop { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(10,20,40,.5); touch-action: none; cursor: move; }
.crop .hd { position: absolute; width: 34px; height: 34px; background: transparent; }
.crop .hd::after { content: ''; position: absolute; width: 18px; height: 18px; border: 3px solid #fff; }
.crop .tl { left: -17px; top: -17px; } .crop .tl::after { left: 8px; top: 8px; border-right: 0; border-bottom: 0; }
.crop .tr { right: -17px; top: -17px; } .crop .tr::after { right: 8px; top: 8px; border-left: 0; border-bottom: 0; }
.crop .bl { left: -17px; bottom: -17px; } .crop .bl::after { left: 8px; bottom: 8px; border-right: 0; border-top: 0; }
.crop .br { right: -17px; bottom: -17px; } .crop .br::after { right: 8px; bottom: 8px; border-left: 0; border-top: 0; }
.ed-row { display: flex; gap: 8px; margin: 14px 0 4px; }
.ed-row .btn { flex: 1; }
.slider { width: 100%; height: 40px; accent-color: var(--teal-dark); background: none; }
.chips.people .chip { text-transform: none; letter-spacing: .01em; font-size: 14px; }
.frow { flex-wrap: wrap; }
.frow .sel { max-width: none; flex: 1 1 44%; }
/* note under the photo, pointing to the story and comments */
.v-more { display: block; width: calc(100% - 24px); margin: 0 12px; padding: 8px 4px; background: none; border: 0; color: rgba(255,255,255,.82); font-family: var(--head); font-weight: 700; font-size: 13px; letter-spacing: .06em; }
/* small indented sub-album rows inside an album */
.wrap.tight { padding-top: 14px; }
.section-title.sm { font-size: 27px; margin-bottom: 6px; }
.wrap.tight .a-meta { margin: 0 0 10px; gap: 10px; }
.wrap.tight .adesc { font-size: 16px; margin-bottom: 12px; }
.subs { border-left: 3px solid var(--aqua-line); padding-left: 10px; margin: 0 0 16px 2px; }
.subrow { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 8px 12px 8px 8px; margin-bottom: 8px; box-shadow: 0 1px 6px rgba(33,55,99,.06); }
.subrow .sc { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 12px; overflow: hidden; background: #e9f1f9; display: grid; place-items: center; font-size: 20px; }
.subrow .sc img { width: 100%; height: 100%; object-fit: cover; }
.subrow .st { flex: 1; min-width: 0; display: block; }
.subrow .st b { display: block; font-family: var(--head); font-weight: 700; font-size: 16px; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subrow .st small { color: var(--muted); font-size: 13px; }
.subrow .chev { color: var(--muted); font-size: 20px; }
.subadd { display: block; width: 100%; text-align: left; background: none; border: 2px dashed #cfe3ee; border-radius: 16px; padding: 10px 12px; color: var(--teal-dark); font-family: var(--head); font-weight: 700; font-size: 14px; }
.fbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 12px; }
.fbtn { background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 8px 16px; font-family: var(--head); font-weight: 700; font-size: 13px; letter-spacing: .06em; color: var(--navy); }
.fbtn.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.fpanel { margin-bottom: 8px; }
.fpanel .frow { margin-bottom: 8px; }
/* stop the browser restoring a scrolled position when a slide is rebuilt after an edit */
.v-slide { overflow-anchor: none; }
/* keep the toast clear of the photo buttons while the viewer is open */
body.vopen #toast { bottom: calc(150px + var(--sab)); }
.more-wrap { padding: 16px 0 4px; }
.btn.block.ghost { font-size: 15px; }
/* what is new */
.newbar { background: linear-gradient(135deg, #eef7fb, #e3f4f9); border: 2px solid var(--aqua-line); border-radius: 22px; padding: 14px 16px; margin-bottom: 16px; }
.nb-t { font-family: var(--head); font-weight: 800; font-size: 17px; color: var(--navy); line-height: 1.3; }
.nb-b { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.album-card.fresh .cover::after, .subrow.fresh .sc::after { content: ''; position: absolute; right: -3px; top: -3px; width: 14px; height: 14px; border-radius: 50%; background: var(--teal); border: 2px solid #fff; }
.album-card.fresh .cover, .subrow.fresh .sc { position: relative; overflow: visible; }
.album-card.fresh .cover img, .subrow.fresh .sc img { border-radius: inherit; }
/* keep the floating button from covering the last card */
#app.home { padding-bottom: calc(150px + var(--sab)); }
.screen { padding-bottom: calc(150px + var(--sab)); }
/* long album names stop at two lines instead of pushing the card tall */
.album-card .ttl { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fab { transition: padding .18s, width .18s; overflow: hidden; white-space: nowrap; }
.fab.mini { width: 58px; padding: 0; }
.fab.mini span { margin: 0; }
.fab.mini .lbl-txt { opacity: 0; }
/* the photo area can never collapse, whatever the image does */
.v-hero { min-height: 40vh; }

/* ---------- Select mode ---------- */
.fbtns { display: flex; gap: 8px; }
.selbar { position: sticky; top: calc(var(--sat) + 60px); z-index: 4; background: var(--navy); color: #fff; border-radius: 18px; padding: 12px 14px; margin: 0 0 14px; box-shadow: 0 4px 14px rgba(33,55,99,.25); }
.sb-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--head); font-weight: 700; font-size: 15px; }
.sb-top .link { color: #bfe6f4; }
.sb-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sb-acts .btn { flex: 1 1 46%; min-height: 44px; padding: 9px 10px; font-size: 13px; background: var(--teal-dark); color: #fff; border: 2px solid var(--teal-dark); }
.sb-acts .btn.ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.3); }
.sb-acts .btn:disabled { opacity: .45; }
.pcard.sel { cursor: pointer; }
.pcard.sel .im { position: relative; }
.pcard.sel .tick { position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(13,26,51,.45); border: 2px solid #fff; color: #fff; font-size: 17px; font-weight: 800; display: grid; place-items: center; }
.pcard.picked { outline: 4px solid var(--teal); outline-offset: -2px; }
.pcard.picked .tick { background: var(--teal-dark); }
.pcard.locked { opacity: .5; }
.pcard.locked .tick { display: none; }
