/* ═══════════════════════════════════════════════════════════════════════
   More hub, Bucket List, Countdowns, Profile & settings, and avatars.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Avatars (photo or initial) ────────────────────────────────────── */
.has-photo { padding: 0 !important; overflow: hidden; }
.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.circle-avatar.has-photo, .mini-avatar.has-photo, .sv-avatar.has-photo { background: #3a0716; }
.avatar-big-img, .avatar-mid {
  display: grid; place-items: center; border-radius: 50%; color: #fff; font-family: var(--font-display); font-weight: 700; line-height: 1;
  background: radial-gradient(circle at 22% 14%, #ff8aa0 0, #b8113a 13%, #6e0a24 50%, #3e0311 100%); text-shadow: 0 1px 3px rgba(40, 0, 14, 0.7);
}
.avatar-big-img { width: 100%; height: 100%; font-size: 3.2rem; }
.avatar-mid { width: 60px; height: 60px; flex: none; font-size: 1.8rem; border: 2px solid rgba(255, 255, 255, 0.3); }


/* ── Device preferences that hide decoration ───────────────────────── */
body.pref-no-petals .petals { display: none; }
body.pref-no-notes .rose-notes { display: none; }
.form-error.ok { color: #9af2c8; }

/* ── More hub ──────────────────────────────────────────────────────── */
.more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.more-tile {
  display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: var(--radius); color: var(--ink); text-decoration: none; text-shadow: 0 1px 3px rgba(20, 0, 8, 0.5);
  background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.more-tile:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -20px rgba(255, 40, 80, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.more-ico { flex: none; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 30% 22%, #ff6b85, #be123c 60%, #6e0a24); box-shadow: 0 10px 22px -8px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.more-ico .icon { width: 28px; height: 28px; }
.more-text { display: flex; flex-direction: column; min-width: 0; }
.more-text b { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.15; }
.more-text small { font-size: 0.82rem; color: var(--ink-soft); }

/* ── Bucket list ───────────────────────────────────────────────────── */
.bucket-progress { display: flex; align-items: center; gap: 18px; }
.bp-text { display: flex; flex-direction: column; flex: none; line-height: 1.2; }
.bp-text b { font-family: var(--font-display); font-size: 1.8rem; }
.bp-text small { color: var(--ink-soft); }
.bp-bar { flex: 1; height: 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.3); overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.2); }
.bp-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #ff5a78, #ffd0d9); transition: width 0.5s var(--ease); }
.bucket-list { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.bucket-item { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border-radius: var(--radius); background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); text-shadow: 0 1px 3px rgba(20, 0, 8, 0.5); }
.bi-check { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: transparent; background: rgba(0, 0, 0, 0.25); border: 2px solid rgba(255, 255, 255, 0.6); transition: background 0.2s, transform 0.2s var(--ease); }
.bi-check:hover { transform: scale(1.08); border-color: #fff; }
.bi-check .icon { width: 24px; height: 24px; stroke-width: 3; }
.bucket-item.done .bi-check { color: #8f0f33; background: linear-gradient(180deg, #fff, #ffd9e0); border-color: #fff; }
.bi-main { flex: 1; min-width: 0; }
.bi-title { display: block; font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
.bucket-item.done .bi-title { text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.5); opacity: 0.85; }
.bi-note { margin: 3px 0 0; font-size: 0.9rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.bi-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 8px; font-size: 0.78rem; color: var(--ink-soft); }
.bi-done { color: #9af2c8; font-weight: 700; }
.pill-cat { background: rgba(255, 255, 255, 0.14); color: #fff; border: 1px solid rgba(255, 255, 255, 0.3); }
.cat-travel { background: rgba(80, 160, 255, 0.25); } .cat-food { background: rgba(255, 170, 60, 0.28); } .cat-adventure { background: rgba(60, 200, 130, 0.25); } .cat-together { background: rgba(255, 90, 130, 0.3); } .cat-home { background: rgba(190, 130, 255, 0.28); }
.bi-actions { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.bi-edit { display: flex; flex-direction: column; gap: 8px; }
.bi-edit .field { margin: 0; }

/* ── Countdowns ────────────────────────────────────────────────────── */
.cd-hero-card { text-align: center; padding: 26px 20px; }
.cd-kicker { display: block; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rose); }
.cd-hero-title { font-size: clamp(1.8rem, 6vw, 2.6rem); line-height: 1.1; margin: 6px 0 4px; }
.cd-big { display: flex; flex-direction: column; align-items: center; line-height: 1; margin: 8px 0 2px; }
.cd-big b { font-family: var(--font-display); font-size: clamp(4.4rem, 20vw, 7rem); color: #fff; text-shadow: 0 0 40px rgba(255, 90, 125, 0.7); }
.cd-big span { font-size: 1rem; font-weight: 700; color: var(--rose-light); letter-spacing: 0.06em; }
.cd-big.today { font-family: var(--font-script); font-size: clamp(3.4rem, 14vw, 5rem); font-weight: 400; color: #fff; text-shadow: 0 0 40px rgba(255, 90, 125, 0.8); }
.cd-ticker { margin-top: 8px; font-size: 0.95rem; font-weight: 700; letter-spacing: 0.08em; color: var(--ink-soft); }
.cd-hero-date { margin: 10px 0 0; color: var(--ink-soft); }
.cd-heading { font-size: 1.5rem; margin: 22px 0 10px; }
.cd-list { display: flex; flex-direction: column; gap: 12px; }
.cd-card { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: var(--radius); background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); text-shadow: 0 1px 3px rgba(20, 0, 8, 0.5); }
.cd-card.today { border-color: #fff; box-shadow: var(--glass-shadow), 0 0 30px rgba(255, 90, 125, 0.6); }
.cd-card.past { opacity: 0.8; }
.cd-num { flex: none; width: 76px; text-align: center; line-height: 1.05; }
.cd-num b { display: block; font-family: var(--font-display); font-size: 2.2rem; color: var(--rose-light); }
.cd-num small { font-size: 0.74rem; font-weight: 700; color: var(--ink-soft); }
.cd-main { flex: 1; min-width: 0; }
.cd-title { display: block; font-size: 1.05rem; line-height: 1.25; overflow-wrap: anywhere; }
.cd-date { color: var(--ink-soft); font-size: 0.82rem; }
.cd-note { margin: 4px 0 0; font-size: 0.88rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.cd-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; font-size: 0.75rem; color: var(--ink-soft); }
.cd-past { margin-top: 18px; }
.cd-past summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 700; color: var(--rose-light); }
.cd-past .cd-list { margin-top: 8px; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 0.9rem; cursor: pointer; }
.check input { accent-color: var(--red); width: 18px; height: 18px; }

/* ── Profile & settings ────────────────────────────────────────────── */
.profile-top { display: flex; align-items: center; gap: 20px; }
.avatar-big { flex: none; width: 112px; height: 112px; border-radius: 50%; padding: 4px; background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow), 0 0 30px rgba(255, 90, 125, 0.35); }
.avatar-big .has-photo, .avatar-big .avatar-big-img { width: 100%; height: 100%; }
.profile-top-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.profile-top-text b { font-family: var(--font-display); font-size: 2rem; line-height: 1.1; }
.profile-top-text small { color: var(--ink-soft); font-size: 0.9rem; }
.profile-photo-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.pf-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; font-size: 0.85rem; font-weight: 700; color: var(--ink-soft); }
.pf-field .field { margin: 0; font-weight: 400; }
.panel .panel-title { margin-bottom: 12px; }
.partner-row { display: flex; align-items: center; gap: 14px; }
.partner-text { display: flex; flex-direction: column; min-width: 0; }
.partner-text small { color: var(--ink-soft); }
.prefs .switch { display: flex; align-items: center; gap: 14px; padding: 10px 0; min-height: 56px; cursor: pointer; }
.prefs .switch + .switch { border-top: 1px solid rgba(255, 255, 255, 0.14); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { flex: none; position: relative; width: 52px; height: 30px; border-radius: 999px; background: rgba(0, 0, 0, 0.35); border: 1.5px solid rgba(255, 255, 255, 0.45); transition: background 0.2s; }
.switch-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 23px; height: 23px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); transition: transform 0.25s var(--ease); }
.switch input:checked + .switch-ui { background: linear-gradient(135deg, #e11d48, #be123c); border-color: #fff; }
.switch input:checked + .switch-ui::after { transform: translateX(22px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--rose-light); outline-offset: 3px; }
.switch-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.switch-text small { color: var(--ink-soft); font-size: 0.8rem; }
.signout-panel { text-align: center; }
.signout-panel .btn { min-width: 180px; }

/* ── Photo cropper ─────────────────────────────────────────────────── */
.crop-stage { position: relative; width: min(300px, 100%); aspect-ratio: 1; margin: 8px auto 12px; border-radius: 18px; overflow: hidden; touch-action: none; background: #200610; }
.crop-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.crop-stage canvas:active { cursor: grabbing; }
.crop-mask { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle closest-side at 50% 50%, transparent 97%, rgba(14, 0, 6, 0.68) 100%); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5); }
.crop-zoom { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 0.85rem; font-weight: 700; color: var(--ink-soft); }
.crop-zoom input { flex: 1; accent-color: var(--red); height: 32px; }

@media (max-width: 560px) {
  .profile-top { flex-direction: column; text-align: center; }
  .profile-top-text { align-items: center; }
  .bucket-item { padding: 14px; gap: 12px; }
  .cd-card { padding: 12px 14px; gap: 12px; }
  .cd-num { width: 64px; }
}


/* A long chosen name must never push a chip, tab or tile past the screen edge */
.chip { max-width: 100%; }
.chip[data-author] { max-width: 11em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.circle-info b, .story-group-head b, .partner-text b { overflow-wrap: anywhere; }
.circle-info b { max-width: 110px; margin: 0 auto; }
