/* Світлини: тепла «паперова» палітра, великі кнопки (від 48 px), рукописні підписи. */
:root {
  --paper: #F4EDE2;
  --paper-2: #EBE1D2;
  --card: #FFFDF8;
  --ink: #2A2420;
  --ink-2: #6B5F55;
  --ink-3: #998B7D;
  --line: #E1D5C3;
  --accent: #A85A1C;
  --accent-2: #F3E2CF;
  --on-accent: #FFFFFF;
  --rec: #C8402F;
  --ok: #2E7D4F;
  --shadow: 0 1px 2px rgba(60, 40, 20, .08), 0 6px 20px rgba(60, 40, 20, .10);
  --radius: 18px;
  --tap: 52px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: 'Commissioner', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Unbounded', 'Commissioner', system-ui, sans-serif;
  --font-hand: 'Caveat', 'Segoe Print', cursive;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15120F;
    --paper-2: #1D1915;
    --card: #231E1A;
    --ink: #F3ECE2;
    --ink-2: #B9AC9C;
    --ink-3: #85786B;
    --line: #3A322B;
    --accent: #E39A55;
    --accent-2: #3A2A1C;
    --on-accent: #1A120B;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
html.big { font-size: 20px; }
html, body { margin: 0; height: 100%; background: var(--paper); color: var(--ink); }
body { font-family: var(--font); line-height: 1.45; overscroll-behavior: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
a { color: var(--accent); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { min-height: 100%; }
.screen { max-width: 760px; margin: 0 auto; padding: calc(var(--safe-t) + 12px) 16px calc(var(--safe-b) + 110px); }

/* ---------- кнопки ---------- */
.btn {
  min-height: var(--tap); padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600; font-size: 1rem; text-decoration: none; transition: transform .12s ease, background .2s;
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.rec { background: var(--rec); border-color: var(--rec); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.wide { width: 100%; }
.btn.small { min-height: 44px; padding: 0 14px; font-size: .92rem; }
.btn:disabled { opacity: .5; pointer-events: none; }
.icon-btn {
  width: var(--tap); height: var(--tap); border-radius: 50%; border: 0; display: inline-grid; place-items: center;
  background: color-mix(in srgb, var(--card) 88%, transparent); color: var(--ink); box-shadow: var(--shadow); flex: none;
}
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn:active { transform: scale(.94); }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 12px; }
.muted { color: var(--ink-2); }
.small { font-size: .88rem; }
.hand { font-family: var(--font-hand); font-weight: 600; font-size: 1.45em; line-height: 1.15; }

/* ---------- шапка головної ---------- */
.top { display: flex; align-items: center; gap: 12px; margin: 6px 0 18px; }
.top h1 { font-family: var(--font-head); font-weight: 600; font-size: 1.55rem; margin: 0; letter-spacing: -.01em; }
.top .sub { color: var(--ink-2); font-size: .92rem; margin-top: 2px; }
.avatar {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; border: 0;
  font-size: 1.1rem; flex: none;
}
.avatar.sm { width: 30px; height: 30px; font-size: .8rem; }
h2 { font-family: var(--font-head); font-weight: 600; font-size: 1.12rem; margin: 26px 0 12px; }

/* ---------- полиця альбомів ---------- */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; perspective: 900px; }
.album-card {
  border: 0; padding: 0; background: none; text-align: left; display: grid; gap: 8px; color: inherit;
}
.album-cover {
  position: relative; aspect-ratio: 3 / 4; border-radius: 6px 14px 14px 6px; overflow: hidden;
  box-shadow: -6px 0 0 -2px rgba(0,0,0,.18) inset, var(--shadow); transform: rotateY(-8deg); transform-origin: left center;
  transition: transform .35s cubic-bezier(.2,.8,.2,1); background: var(--cover, #7B4A2E);
}
.album-card:active .album-cover, .album-card:hover .album-cover { transform: rotateY(-2deg) translateZ(10px); }
.album-cover::before { /* корінець */
  content: ''; position: absolute; inset: 0 auto 0 0; width: 12px; z-index: 2;
  background: linear-gradient(90deg, rgba(0,0,0,.35), rgba(255,255,255,.12) 60%, rgba(0,0,0,.15));
}
.album-cover .pic {
  position: absolute; left: 16%; right: 10%; top: 12%; aspect-ratio: 1; background: #fff; padding: 5px; box-shadow: 0 3px 10px rgba(0,0,0,.35);
  transform: rotate(-2deg);
}
.album-cover .pic img { width: 100%; height: 100%; object-fit: cover; }
.album-cover .label {
  position: absolute; left: 14%; right: 8%; bottom: 8%; color: #F7E7C6; font-family: var(--font-hand); font-weight: 600;
  font-size: 1.35rem; line-height: 1.05; text-shadow: 0 1px 0 rgba(0,0,0,.35);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.album-meta { display: flex; gap: 6px; align-items: center; color: var(--ink-2); font-size: .86rem; }
.album-meta svg { width: 16px; height: 16px; }
.album-new .album-cover { background: transparent; border: 2px dashed var(--line); box-shadow: none; transform: none; display: grid; place-items: center; }
.album-new .album-cover::before { display: none; }
.album-new .album-cover span { color: var(--accent); font-weight: 700; display: grid; justify-items: center; gap: 6px; }
.album-new svg { width: 34px; height: 34px; }

/* «Цього дня колись» */
.memories { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 12px; margin: 0 -16px; padding-left: 16px; }
.memory { scroll-snap-align: start; flex: none; width: 140px; border: 0; padding: 8px 8px 10px; background: #fff; color: #2A2420;
  box-shadow: var(--shadow); transform: rotate(var(--r, -1.5deg)); border-radius: 3px; text-align: center; }
.memory img { width: 124px; height: 124px; object-fit: cover; background: #eee; }
.memory .hand { font-size: 1.25rem; margin-top: 6px; }

/* картка-підказка */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.empty { text-align: center; padding: 30px 16px; color: var(--ink-2); }
.empty .hand { font-size: 2rem; color: var(--ink); margin-bottom: 8px; }

/* плаваюча кнопка */
.fab-bar {
  position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(var(--safe-b) + 14px); display: flex; gap: 10px; justify-content: center;
  pointer-events: none; z-index: 20;
}
.fab-bar > * { pointer-events: auto; box-shadow: var(--shadow); }

/* ---------- сітка світлин ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 4px; }
.cell { position: relative; aspect-ratio: 1; border: 0; padding: 0; background: var(--paper-2); overflow: hidden; border-radius: 4px; }
.cell img { width: 100%; height: 100%; object-fit: cover; }
.cell .badge { position: absolute; right: 5px; bottom: 5px; display: flex; gap: 4px; }
.cell .badge span { background: rgba(0,0,0,.55); color: #fff; border-radius: 999px; padding: 2px 7px; font-size: .72rem; display: inline-flex; gap: 3px; align-items: center; }
.cell .badge svg { width: 13px; height: 13px; }
.cell.sel::after { content: ''; position: absolute; inset: 0; border: 4px solid var(--accent); border-radius: 4px; }
.cell .check { position: absolute; left: 6px; top: 6px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff;
  background: rgba(0,0,0,.25); display: grid; place-items: center; }
.cell.sel .check { background: var(--accent); border-color: var(--accent); }
.cell .check svg { width: 18px; height: 18px; color: #fff; opacity: 0; }
.cell.sel .check svg { opacity: 1; }
.cell .prog { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(0,0,0,.25); }
.cell .prog i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.cell.fail::before { content: '!'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 2rem; color: #fff; background: rgba(200,64,47,.6); }
.group-h { position: sticky; top: 0; z-index: 3; background: var(--paper); padding: 14px 2px 8px; font-weight: 700; display: flex; justify-content: space-between; align-items: baseline; }
.group-h .muted { font-weight: 400; font-size: .86rem; }

/* ---------- альбом (3D) ---------- */
.album-screen { position: fixed; inset: 0; overflow: hidden; background: var(--scene-bg, var(--paper)); touch-action: none; }
.album-screen canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
.scene-top {
  position: absolute; left: 0; right: 0; top: 0; padding: calc(var(--safe-t) + 10px) 12px 10px; display: flex; gap: 10px; align-items: center; z-index: 5;
  pointer-events: none;
}
.scene-top > * { pointer-events: auto; }
.scene-title {
  flex: 1; min-width: 0; font-family: var(--font-hand); font-weight: 600; font-size: 1.9rem; line-height: 1; color: var(--scene-ink, var(--ink));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 8px var(--scene-glow, transparent); background: none; border: 0; text-align: left; padding: 0;
}
.scene-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px calc(var(--safe-b) + 14px); display: flex; gap: 10px; align-items: center;
  justify-content: center; z-index: 5; pointer-events: none;
}
.scene-bottom > * { pointer-events: auto; }
.views {
  display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--card) 90%, transparent); box-shadow: var(--shadow);
}
.views button { width: 46px; height: 44px; border-radius: 999px; border: 0; background: transparent; color: var(--ink-2); display: grid; place-items: center; }
.views button svg { width: 24px; height: 24px; }
.views button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.scene-hint {
  position: absolute; left: 50%; bottom: calc(var(--safe-b) + 140px); transform: translateX(-50%); z-index: 4; pointer-events: none;
  background: rgba(20,14,10,.66); color: #fff; padding: 9px 16px; border-radius: 16px; font-size: .92rem; text-align: center;
  width: max-content; max-width: calc(100% - 32px);
  transition: opacity .6s; opacity: 0;
}
.scene-hint.on { opacity: 1; }
.scene-loading { position: absolute; inset: 0; display: grid; place-items: center; z-index: 3; pointer-events: none; color: var(--scene-ink, var(--ink)); }
.years { position: absolute; left: 0; right: 0; top: calc(var(--safe-t) + 70px); display: flex; gap: 6px; z-index: 5; overflow-x: auto; padding: 4px 12px; scrollbar-width: none; }
.years::-webkit-scrollbar { display: none; }
.years button { flex: none; border: 0; border-radius: 999px; padding: 6px 10px; min-height: 36px; background: color-mix(in srgb, var(--card) 85%, transparent); color: var(--ink); font-weight: 600; font-size: .82rem; box-shadow: var(--shadow); }
.years button.on { background: var(--accent); color: var(--on-accent); }
.album-grid { position: absolute; inset: 0; overflow-y: auto; padding: calc(var(--safe-t) + 76px) 10px calc(var(--safe-b) + 100px); touch-action: pan-y; z-index: 2; }

/* ---------- шари: аркуш знизу, перегляд, історія ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; }
.dim { position: absolute; inset: 0; background: rgba(15, 10, 6, .45); animation: fade .2s ease; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow-y: auto; background: var(--card); border-radius: 24px 24px 0 0;
  padding: 10px 18px calc(var(--safe-b) + 20px); box-shadow: 0 -10px 40px rgba(0,0,0,.25); animation: up .26s cubic-bezier(.2,.8,.2,1);
  max-width: 760px; margin: 0 auto;
}
.sheet::before { content: ''; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.sheet h3 { margin: 4px 0 14px; font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; }
.menu { display: grid; gap: 4px; }
.menu button { min-height: var(--tap); border: 0; background: transparent; text-align: left; padding: 0 8px; border-radius: 12px; display: flex; gap: 14px; align-items: center; font-size: 1.02rem; }
.menu button:active { background: var(--paper-2); }
.menu button svg { width: 24px; height: 24px; color: var(--ink-2); flex: none; }
.menu button.danger, .menu button.danger svg { color: var(--rec); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.field { display: grid; gap: 6px; }
.field > span { font-weight: 600; font-size: .95rem; }
.input, textarea.input {
  width: 100%; min-height: var(--tap); border-radius: 14px; border: 1.5px solid var(--line); background: var(--paper); padding: 12px 14px; font-size: 1.05rem;
}
textarea.input { min-height: 120px; resize: vertical; line-height: 1.4; }
textarea.input.hand { font-size: 1.6rem; line-height: 1.2; }
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.choice {
  border: 2px solid var(--line); background: var(--paper); border-radius: 16px; padding: 12px; text-align: left; display: grid; gap: 6px; min-height: 96px;
}
.choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-2); }
.choice svg { width: 40px; height: 40px; color: var(--accent); }
.choice b { font-size: 1rem; }
.choice small { color: var(--ink-2); line-height: 1.3; }
.swatches { display: flex; gap: 12px; flex-wrap: wrap; }
.swatch { width: 52px; height: 52px; border-radius: 50%; border: 3px solid transparent; box-shadow: var(--shadow); position: relative; }
.swatch[aria-pressed="true"] { border-color: var(--ink); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); display: inline-flex; align-items: center; gap: 6px; font-size: .95rem; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ---------- перегляд ---------- */
.viewer { position: fixed; inset: 0; z-index: 40; background: #0B0907; color: #F5EEE4; display: flex; flex-direction: column; animation: fade .2s ease; }
.viewer .stage { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; }
.viewer .slide { position: absolute; inset: 0; display: grid; place-items: center; transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.viewer .slide img, .viewer .slide video { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.viewer .slide img.low { filter: blur(6px); }
.viewer .vtop { position: absolute; top: 0; left: 0; right: 0; padding: calc(var(--safe-t) + 10px) 12px 10px; display: flex; gap: 10px; align-items: center; z-index: 3;
  background: linear-gradient(rgba(0,0,0,.55), transparent); }
.viewer .vtop .icon-btn { background: rgba(255,255,255,.14); color: #fff; box-shadow: none; }
.viewer .count { flex: 1; text-align: center; font-size: .92rem; opacity: .85; }
.viewer .panel {
  background: #17120E; border-top: 1px solid #2E261F; padding: 14px 16px calc(var(--safe-b) + 14px); max-height: 46vh; overflow-y: auto;
  transition: max-height .3s ease;
}
.viewer .panel.min { max-height: 0; padding-top: 0; padding-bottom: 0; border: 0; }
.viewer .when { color: #BFAF9C; font-size: .9rem; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.viewer .caption { font-family: var(--font-hand); font-weight: 600; font-size: 1.85rem; line-height: 1.12; margin: 6px 0 4px; color: #FFF3DF; white-space: pre-wrap; }
.viewer .caption.empty { color: #8E8070; font-size: 1.4rem; }
.viewer .who { font-size: .82rem; color: #A39482; }
.viewer .acts { display: flex; gap: 10px; margin-top: 12px; }
.viewer .acts .btn { flex: 1; background: #2A221B; border-color: #3A3027; color: #F5EEE4; }
.viewer .acts .btn.rec { background: var(--rec); border-color: var(--rec); }
.viewer .nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; background: rgba(255,255,255,.12); color: #fff; box-shadow: none; }
.viewer .nav-arrow.l { left: 10px; } .viewer .nav-arrow.r { right: 10px; }
@media (hover: none) { .viewer .nav-arrow { display: none; } }
.play-big { position: absolute; width: 84px; height: 84px; border-radius: 50%; border: 0; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; }
.play-big svg { width: 40px; height: 40px; }

/* голосові розповіді */
.voices { display: grid; gap: 8px; margin-top: 12px; }
.voice { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; background: #221B15; border-radius: 16px; padding: 8px 10px 8px 8px; }
.voice .pp { width: 48px; height: 48px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; }
.voice .pp svg { width: 22px; height: 22px; }
.voice .meta b { font-size: .95rem; }
.voice .meta .muted { color: #A39482; font-size: .82rem; }
.voice .bar { height: 4px; border-radius: 2px; background: #3A3027; margin-top: 6px; overflow: hidden; }
.voice .bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.voice .text { grid-column: 1 / -1; font-size: .95rem; color: #E6D9C8; line-height: 1.4; padding: 0 4px 4px; }
.voice .text .ai { font-size: .74rem; color: #CDA36F; border: 1px solid #5A4630; border-radius: 6px; padding: 0 5px; margin-right: 6px; }
.voice .more { background: none; border: 0; color: #A39482; width: 40px; height: 40px; display: grid; place-items: center; }
.voice .more svg { width: 22px; height: 22px; }

/* запис голосу */
.recorder { display: grid; justify-items: center; gap: 14px; padding: 6px 0 4px; }
.rec-btn { width: 112px; height: 112px; border-radius: 50%; border: 0; background: var(--rec); color: #fff; display: grid; place-items: center;
  box-shadow: 0 0 0 0 rgba(200,64,47,.5); transition: transform .15s; }
.rec-btn svg { width: 46px; height: 46px; }
.rec-btn.on { animation: pulse 1.4s infinite; border-radius: 34px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(200,64,47,.45); } 70% { box-shadow: 0 0 0 26px rgba(200,64,47,0); } 100% { box-shadow: 0 0 0 0 rgba(200,64,47,0); } }
.rec-time { font-variant-numeric: tabular-nums; font-size: 1.6rem; font-weight: 700; }
.wave { width: 100%; height: 56px; }
.rec-photo { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; box-shadow: var(--shadow); }

/* історія («Слухати») */
.story { position: fixed; inset: 0; z-index: 45; background: #0B0907; color: #FFF3DF; overflow: hidden; animation: fade .3s ease; }
.story .bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(28px) brightness(.45); transform: scale(1.1); }
.story .pic { position: absolute; inset: 0; display: grid; place-items: center; padding: calc(var(--safe-t) + 60px) 16px 34vh; }
.story .pic img, .story .pic video { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.6); border: 8px solid #FBF6EC; border-bottom-width: 8px; background: #FBF6EC; }
.story .pic img.kb { animation: kb 14s ease-out both; }
@keyframes kb { from { transform: scale(1); } to { transform: scale(1.07) translateY(-1%); } }
@media (prefers-reduced-motion: reduce) { .story .pic img.kb { animation: none; } }
.story .words { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 22px calc(var(--safe-b) + 96px); background: linear-gradient(transparent, rgba(0,0,0,.75) 30%); }
.story .words .hand { font-size: 2.2rem; text-align: center; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.story .words .said { text-align: center; color: #E9DCCB; font-size: 1.05rem; margin-top: 8px; max-height: 4.4em; overflow: hidden; }
.story .ctl { position: absolute; left: 0; right: 0; bottom: calc(var(--safe-b) + 16px); display: flex; justify-content: center; gap: 16px; z-index: 2; }
.story .ctl .icon-btn { background: rgba(255,255,255,.15); color: #fff; box-shadow: none; width: 60px; height: 60px; }
.story .ctl .icon-btn.main { background: #FFF3DF; color: #2A2420; width: 72px; height: 72px; }
.story .top { position: absolute; top: 0; left: 0; right: 0; padding: calc(var(--safe-t) + 10px) 12px; display: flex; gap: 10px; align-items: center; z-index: 2; margin: 0; }
.story .top .icon-btn { background: rgba(255,255,255,.15); color: #fff; box-shadow: none; }
.story .dots { flex: 1; display: flex; gap: 3px; }
.story .dots i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.25); overflow: hidden; }
.story .dots i b { display: block; height: 100%; width: 0; background: #FFF3DF; }
.story .dots i.done b { width: 100%; }

/* сповіщення */
.toast { position: fixed; left: 50%; bottom: calc(var(--safe-b) + 92px); transform: translate(-50%, 20px); z-index: 90; background: #2A2420; color: #FFF3DF;
  padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: all .25s; max-width: calc(100% - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { margin-left: 10px; background: none; border: 0; color: #F3B77A; font-weight: 700; }

/* завантаження */
.uploads { position: fixed; left: 12px; right: 12px; top: calc(var(--safe-t) + 10px); z-index: 60; display: grid; justify-items: center; pointer-events: none; }
.uploads div { background: #2A2420; color: #FFF3DF; padding: 10px 16px; border-radius: 999px; font-size: .9rem; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; }
.uploads i { width: 80px; height: 5px; border-radius: 3px; background: #4A3F36; overflow: hidden; display: block; }
.uploads i b { display: block; height: 100%; background: #F3B77A; width: 0; transition: width .3s; }

.people { display: grid; gap: 10px; }
.person { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; }
.person .grow b { display: block; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; opacity: .6; }
@keyframes spin { to { transform: rotate(360deg); } }
.folder { display: flex; gap: 12px; align-items: center; min-height: var(--tap); padding: 0 10px; border: 0; background: var(--card); border-radius: 14px; width: 100%; text-align: left; border: 1px solid var(--line); }
.folder svg { width: 26px; height: 26px; color: var(--accent); }
.crumbs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; color: var(--ink-2); font-size: .92rem; margin-bottom: 10px; }
.crumbs button { border: 0; background: none; color: var(--accent); font-weight: 600; padding: 6px 2px; }
.viewer .when svg { width: 16px; height: 16px; vertical-align: -3px; }
.viewer .acts .btn { padding: 0 14px; white-space: nowrap; }
.album-grid .group-h { position: static; background: none; color: var(--scene-ink, var(--ink)); font-family: var(--font-hand); font-size: 1.7rem; font-weight: 600; padding: 10px 4px 6px; }
.album-grid .grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.album-grid .cell { border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
