:root {
  --edge: #ece2cd;
  --paper: #f8f2e6;
  --card: #fffdf7;
  --gold: #c8a24a;
  --gold-soft: #e8d5a3;
  --gold-pale: #f6ecd6;
  --olive: #3f5340;
  --olive-soft: #6f8468;
  --ink: #322e26;
  --ink-soft: #8b8172;
  --line: #e8dcc3;
  --danger: #a63a2b;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(760px 420px at 12% -8%, #f7efdd 0%, transparent 60%),
    radial-gradient(680px 420px at 92% 2%, #f2e7cf 0%, transparent 58%),
    var(--edge);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- App shell ---------- */

.app {
  position: relative;
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 16px 118px;
  background: var(--paper);
  overflow-x: hidden;
}

@media (min-width: 520px) {
  .app {
    margin: 26px auto;
    min-height: calc(100vh - 52px);
    border-radius: 28px;
    box-shadow: 0 32px 80px -48px rgba(50, 46, 38, 0.6), 0 0 0 1px rgba(232, 220, 195, 0.9);
  }
}

/* ---------- Masthead ---------- */

.masthead {
  position: relative;
  text-align: center;
  padding: 8px 4px 20px;
}

.admin-btn[hidden] {
  display: none;
}

.admin-btn {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.9);
  color: #a2988a;
  font: inherit;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.admin-btn:hover {
  color: var(--olive);
  border-color: var(--gold-soft);
}

.admin-btn.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: #fffdf5;
}

.admin-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.sheet-card--compact {
  max-width: 380px;
}

/* ---------- Admin panel ---------- */

.admin-panel {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  animation: fade 0.18s ease both;
}

.admin-panel[hidden] {
  display: none;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
}

.admin-eyebrow {
  margin: 0 0 2px;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.admin-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: #33302a;
}

.admin-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fffdf7;
  color: #8b8172;
  cursor: pointer;
}

.admin-close:hover {
  color: var(--olive);
}

.admin-body {
  flex: 1;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 16px 18px 20px;
  overflow-y: auto;
}

.admin-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 0.95rem;
  color: #33302a;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.stat-card {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf7;
}

.stat-value {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: #3a352b;
  line-height: 1.2;
}

.stat-label {
  margin: 2px 0 0;
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.stat-bars {
  display: grid;
  gap: 5px;
  margin-bottom: 20px;
}

.stat-bar-row {
  display: grid;
  grid-template-columns: 72px 1fr 28px;
  gap: 8px;
  align-items: center;
  font-size: 0.62rem;
  color: var(--ink-soft);
}

.stat-bar-track {
  height: 7px;
  border-radius: 99px;
  background: #efe6d2;
  overflow: hidden;
}

.stat-bar-fill {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #c8b083, #a98f5e);
}

.stat-bar-count {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.storage-alert {
  margin: 0 0 8px;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid #e2d4ae;
  background: #fdf6e3;
  font-size: 0.68rem;
  line-height: 1.5;
  color: #7a5f22;
}

.storage-alert.is-critical {
  border-color: #e0b48c;
  background: #fdeee0;
  color: #8a4a15;
}

.storage-alert.is-full {
  border-color: #dda2a2;
  background: #fbe7e7;
  color: #8f2b2b;
}

.admin-backup-note {
  flex: 1;
  min-width: 140px;
  width: auto;
}

.admin-quota-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.admin-quota-label {
  flex: 1;
  min-width: 120px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #4a4438;
}

.admin-quota-input {
  width: 68px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fffdf7;
  font-family: var(--sans);
  font-size: 0.74rem;
  color: #3a352b;
}

.admin-quota-status {
  margin: 0 0 10px;
  font-size: 0.66rem;
  line-height: 1.5;
  color: var(--ink-soft);
  min-height: 0;
}

.admin-quota-status:empty {
  display: none;
}

.guest-meta {
  margin: 1px 0 0;
  font-size: 0.66rem;
  line-height: 1.5;
  color: #8b8172;
}

.admin-section-title + .admin-list {
  margin-bottom: 22px;
}

.admin-count {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.admin-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf7;
}

.admin-row.is-hidden {
  opacity: 0.58;
  border-style: dashed;
}

.admin-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--gold-pale);
  display: block;
}

.admin-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold-pale);
  color: #7a6537;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.admin-info {
  min-width: 0;
}

.admin-name {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 600;
  color: #3a352b;
  overflow-wrap: anywhere;
}

.admin-caption {
  margin: 1px 0 0;
  font-size: 0.68rem;
  line-height: 1.45;
  color: #8b8172;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.admin-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: none;
}

.mini-btn {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #6f6758;
  font: inherit;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.mini-btn:hover {
  background: #fbf6ea;
  color: var(--olive);
}

.mini-btn.danger {
  color: var(--danger);
  border-color: #f0d6d0;
}

.mini-btn.danger:hover {
  background: #fdf1ee;
}

.mini-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.admin-empty {
  margin: 0;
  padding: 18px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--ink-soft);
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fbf6ea;
}

.admin-foot {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 12px 18px 20px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.admin-foot .btn {
  width: 100%;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}

.names {
  margin: 0 0 6px;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  cursor: default;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.75rem, 7.5vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #2c2a23;
}

.amp {
  font-style: italic;
  color: var(--gold);
}

.date {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.tagline {
  margin: 12px auto 0;
  max-width: 26ch;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.98rem;
  color: #574f42;
}

/* ---------- Stories ---------- */

.stories {
  margin: 0 -16px 16px;
}

.story-row {
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 4px 16px 6px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.story-row::-webkit-scrollbar {
  display: none;
}

.story {
  flex: none;
  width: 62px;
  text-align: center;
}

.story-ring {
  width: 56px;
  height: 56px;
  margin: 0 auto 6px;
  padding: 3px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--gold), var(--gold-soft), #d9c084, var(--gold));
}

.story-face {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--paper);
  background: var(--gold-pale);
  color: #7a6537;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  text-transform: uppercase;
  overflow: hidden;
  user-select: none;
}

.story-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-name {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.02em;
  color: #6f6758;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Challenge ---------- */

.challenge {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fdf7ea 0%, #f7eeda 100%);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(50, 46, 38, 0.03);
}

.challenge-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--olive);
  color: var(--gold-soft);
}

.challenge-label {
  margin: 0 0 2px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.challenge-text {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 500;
  color: #3f3a2e;
}

.challenge-text.is-swapping {
  animation: challengeIn 0.55s ease both;
}

@keyframes challengeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Section titles ---------- */

.section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  color: #33302a;
}

.flame {
  font-size: 0.95rem;
}

/* ---------- Live strip ---------- */

.live {
  margin-bottom: 22px;
}

.live-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.live-strip::-webkit-scrollbar {
  display: none;
}

.live-item {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
}

.live-thumb {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--gold-pale);
}

.live-thumb.is-empty {
  display: grid;
  place-items: center;
  color: #b49a63;
}

.live-name {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: #4a4438;
}

.live-time {
  margin: 0;
  font-size: 0.63rem;
  color: var(--ink-soft);
}

/* ---------- Sort row ---------- */

.sort-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.sort {
  position: relative;
  padding: 0 0 8px;
  border: 0;
  background: none;
  color: #a2988a;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.sort.is-active {
  color: var(--olive);
}

.sort.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--olive);
}

.sort:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- Gallery grid (polaroid style) ---------- */

.grid {
  columns: 2;
  column-gap: 11px;
}

.shot {
  break-inside: avoid;
  margin: 0 0 11px;
  padding: 7px 7px 9px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 2px 10px -7px rgba(50, 46, 38, 0.5);
  animation: rise 0.28s ease both;
}

.shot.is-new {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold-soft);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.shot-media {
  position: relative;
  cursor: zoom-in;
  border-radius: 6px;
  overflow: hidden;
  background: var(--gold-pale);
}

.shot-media img {
  display: block;
  width: 100%;
  height: auto;
}

.shot-media.is-placeholder {
  aspect-ratio: 4 / 5;
  cursor: default;
}

.shot:nth-child(3n) .shot-media.is-placeholder {
  aspect-ratio: 1 / 1;
}

.shot:nth-child(4n) .shot-media.is-placeholder {
  aspect-ratio: 3 / 4;
}

.shot-media.is-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.45), transparent 55%),
    radial-gradient(circle at 74% 72%, rgba(255, 255, 255, 0.25), transparent 52%);
}

.badge-new {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 1;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--gold);
  color: #fffdf5;
  font-size: 0.53rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.shot-caption {
  margin: 8px 2px 2px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.82rem;
  line-height: 1.3;
  color: #3a352b;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.shot-meta {
  margin: 0 2px 6px;
  font-size: 0.63rem;
  color: var(--ink-soft);
}

.shot-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.like {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px;
  border: 0;
  background: none;
  color: #8f8577;
  font: inherit;
  font-size: 0.66rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.like svg {
  width: 15px;
  height: 15px;
}

.like.is-liked {
  color: #b4562f;
}

.like.is-liked svg {
  fill: currentColor;
  stroke: currentColor;
}

.like:focus-visible,
.download:focus-visible,
.shot-delete:focus-visible,
.dock-btn:focus-visible,
.fab:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.download {
  display: inline-flex;
  padding: 2px;
  color: #8f8577;
  cursor: pointer;
}

.download svg {
  width: 15px;
  height: 15px;
}

.download:hover,
.like:hover {
  color: var(--olive);
}

.shot-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(50, 46, 38, 0.5);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(2px);
}

.shot-delete:hover {
  background: rgba(166, 58, 43, 0.9);
}

/* ---------- Placeholder tones ---------- */

.tone-a { background: linear-gradient(150deg, #c9b48b 0%, #efe0c2 55%, #a9926b 100%); }
.tone-b { background: linear-gradient(150deg, #a8b39a 0%, #dfe6d6 55%, #7f8d73 100%); }
.tone-c { background: linear-gradient(150deg, #d8c2a6 0%, #f4e9d8 55%, #bda287 100%); }
.tone-d { background: linear-gradient(150deg, #b9b0a0 0%, #ece4d6 55%, #9a9184 100%); }
.tone-e { background: linear-gradient(150deg, #cbb89a 0%, #f1e4cd 55%, #a58f70 100%); }
.tone-f { background: linear-gradient(150deg, #9fae9a 0%, #dbe3d3 55%, #7c8c74 100%); }

.gallery-stats {
  margin: 8px 2px 10px;
  font-size: 0.66rem;
  line-height: 1.5;
  color: #9a8f7c;
  text-align: center;
}

.gallery-empty {
  margin: 18px 2px;
  padding: 26px 18px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fbf6ea;
  text-align: center;
  font-size: 0.74rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.hint {
  margin: 2px 2px 0;
  font-size: 0.67rem;
  line-height: 1.5;
  color: #a89d8b;
  text-align: center;
  white-space: pre-line;
}

.storage-warn {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.68rem;
  line-height: 1.45;
  text-align: center;
  color: #8a4b3a;
  background: #fdf0e8;
  border: 1px solid #efd3c2;
}

.admin-storage {
  padding: 12px 16px 4px;
  border-bottom: 1px solid var(--line);
}

.admin-storage-text {
  margin: 0 0 6px;
  font-size: 0.7rem;
  color: #6f6656;
}

.admin-storage-track {
  height: 6px;
  border-radius: 999px;
  background: #efe7d8;
  overflow: hidden;
}

.admin-storage-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: #9aa886;
  transition: width 0.3s ease;
}

.admin-storage-fill.is-warning {
  background: #d9a441;
}

.admin-storage-fill.is-full {
  background: #c0563f;
}

.admin-storage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 8px;
}

.download .dl-label {
  margin-left: 2px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ---------- Guestbook ---------- */

.book-card {
  padding: 18px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 2px 14px -10px rgba(50, 46, 38, 0.6);
}

.book-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 0.98rem;
  color: #33302a;
}

.book-sub {
  margin: 4px 0 16px;
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.field {
  margin-bottom: 13px;
}

.field label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9a8f7d;
}

input[type="text"],
textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbf6ea;
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

textarea {
  resize: vertical;
  min-height: 78px;
}

input[type="text"]::placeholder,
textarea::placeholder {
  color: #bdb3a2;
}

input[type="text"]:focus,
textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 162, 74, 0.2);
}

.field.has-error input,
.field.has-error textarea {
  border-color: var(--danger);
}

.field-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 5px;
  min-height: 16px;
}

.error {
  margin: 5px 0 0;
  font-size: 0.7rem;
  color: var(--danger);
}

.field-foot .error {
  margin: 0;
  flex: 1;
}

.counter {
  flex: none;
  font-size: 0.66rem;
  font-variant-numeric: tabular-nums;
  color: #bdb3a2;
}

.counter.is-near {
  color: var(--olive);
  font-weight: 600;
}

.btn {
  width: 100%;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--olive);
  color: #fdf8ea;
  font: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.08s ease;
}

.btn:hover {
  background: #344636;
}

.btn:active {
  transform: translateY(1px);
}

.status {
  margin: 9px 0 0;
  min-height: 16px;
  font-size: 0.72rem;
  text-align: center;
  color: var(--olive);
}

.entries-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 2px 10px;
}

.count {
  font-size: 0.66rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

.entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.entry {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 11px;
  cursor: zoom-in;
  padding: 13px 15px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.entry.is-new {
  border-color: var(--gold-soft);
  background: linear-gradient(180deg, #fffdf7 0%, #fbf4e4 100%);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--gold-pale);
  color: #7a6537;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  user-select: none;
}

.entry-body {
  min-width: 0;
}

.entry-top {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 2px;
}

.entry-name {
  font-weight: 600;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.entry-time {
  font-size: 0.63rem;
  color: #b3a896;
}

.entry-message {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #544c40;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.entry-delete {
  margin-left: auto;
  padding: 3px 9px;
  border: 1px solid #f0d6d0;
  border-radius: 999px;
  background: #fff;
  color: var(--danger);
  font: inherit;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
}

.entry-delete:hover {
  background: #fdf1ee;
  border-color: #e3bdb4;
}

.entry-delete:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.empty {
  padding: 30px 18px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fbf6ea;
}

.empty-title {
  margin: 0 0 3px;
  font-family: var(--serif);
  font-size: 1rem;
  color: #4a4438;
}

.empty-text {
  margin: 0;
  font-size: 0.74rem;
  color: var(--ink-soft);
}

/* ---------- Upload sheet ---------- */

body.is-locked {
  overflow: hidden;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  align-items: end;
  justify-items: center;
}

.sheet[hidden] {
  display: none;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(50, 46, 38, 0.45);
  backdrop-filter: blur(2px);
  animation: fade 0.18s ease both;
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sheet-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 12px 18px 22px;
  border-radius: 22px 22px 0 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom: 0;
  box-shadow: 0 -18px 50px -30px rgba(50, 46, 38, 0.8);
  animation: slideUp 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes slideUp {
  from { transform: translateY(18px); opacity: 0.6; }
  to { transform: none; opacity: 1; }
}

@media (min-width: 520px) {
  .sheet {
    align-items: center;
  }

  .sheet-card {
    border-radius: 22px;
    border-bottom: 1px solid var(--line);
    margin: 0 16px;
  }
}

.sheet-handle {
  width: 40px;
  height: 4px;
  margin: 4px auto 14px;
  border-radius: 999px;
  background: var(--line);
}

.sheet-title {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  color: #33302a;
}

.sheet-sub {
  margin: 0 0 14px;
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.sheet-label {
  margin: 0 0 8px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9a8f7d;
}

.frames {
  display: flex;
  gap: 9px;
  margin-bottom: 16px;
  padding: 2px 0 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.frames::-webkit-scrollbar {
  display: none;
}

.frame {
  flex: none;
  width: 62px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

.frame-thumb {
  display: block;
  width: 62px;
  height: 62px;
  border-radius: 9px;
  overflow: hidden;
  background: #efe6d3;
  box-sizing: border-box;
  transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.frame-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Colour filters ---------- */

.filters {
  display: flex;
  gap: 9px;
  margin-bottom: 16px;
  padding: 2px 0 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter {
  flex: none;
  width: 58px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

.filter-thumb {
  display: block;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  overflow: hidden;
  background: #efe6d3;
  box-shadow: inset 0 0 0 1px rgba(200, 162, 74, 0.25);
  transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.filter-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.filter.is-active .filter-thumb {
  box-shadow: 0 0 0 2px var(--gold), 0 0 0 4px rgba(200, 162, 74, 0.22);
}

.filter:active .filter-thumb {
  transform: scale(0.96);
}

.filter:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 50%;
}

.filter-label {
  display: block;
  margin-top: 5px;
  font-size: 0.6rem;
  text-align: center;
  color: #8b8172;
}

.filter.is-active .filter-label {
  color: var(--olive);
  font-weight: 600;
}

.f-blur img { filter: blur(1.4px); }
.f-fade img { filter: contrast(0.86) brightness(1.08) saturate(0.82); }
.f-cool img { filter: saturate(1.05) hue-rotate(-12deg) brightness(1.02); }
.f-light img { filter: brightness(1.14) contrast(0.95) saturate(1.04); }
.f-retro img { filter: sepia(0.45) saturate(1.15) contrast(1.05); }
.f-mono img { filter: grayscale(1) contrast(1.08); }

.frame.is-active .frame-thumb {
  box-shadow: 0 0 0 2px var(--gold), 0 0 0 4px rgba(200, 162, 74, 0.22);
}

.frame:active .frame-thumb {
  transform: scale(0.96);
}

.frame:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 12px;
}

.frame-label {
  display: block;
  margin-top: 5px;
  font-size: 0.6rem;
  letter-spacing: 0.02em;
  text-align: center;
  color: #8b8172;
}

.frame.is-active .frame-label {
  color: var(--olive);
  font-weight: 600;
}

/* mini frame looks */

.c-emas {
  padding: 6px;
  background: #fdf8ec;
  box-shadow: inset 0 0 0 2px #c8a24a;
}

.c-polaroid {
  padding: 4px 4px 13px;
  background: #fffdf7;
  box-shadow: inset 0 0 0 1px #e8dcc3;
}

.c-filem {
  padding: 6px;
  background: #38332b;
}

.c-bunga {
  padding: 7px;
  background: #f7efe0;
  box-shadow: inset 0 0 0 1px #e0cfa8, inset 0 0 0 4px #f7efe0;
}

.c-songket {
  padding: 6px;
  background: #4a2230;
  box-shadow: inset 0 0 0 1px #d8b969, inset 0 0 0 4px #4a2230, inset 0 0 0 5px #d8b969;
}

.c-ros {
  padding: 7px;
  background: #fdf1f3;
  box-shadow: inset 0 0 0 1px #c8a24a, inset 0 0 0 3px #fdf1f3, inset 0 0 0 4px #d19ba2;
}

.c-kerawang {
  padding: 6px;
  background: #fbf5e6;
  border: 2px dotted #c8a24a;
  box-shadow: inset 0 0 0 3px #fbf5e6, inset 0 0 0 4px #e0cfa8;
}

.c-klasik {
  padding: 6px;
  background: #fffdf7;
  box-shadow: inset 0 0 0 1px #c8a24a, inset 0 0 0 4px #fffdf7, inset 0 0 0 5px #e0cfa8;
}

.c-mewah {
  padding: 6px;
  background: linear-gradient(135deg, #e9d49c, #c8a24a, #e9d49c);
}

.c-renda {
  padding: 6px;
  background: #fdf8ec;
  border: 2px dotted #c8a24a;
  box-shadow: inset 0 0 0 3px #f6ecd6;
}

.c-dedaun {
  padding: 7px;
  background: #f2f0e2;
  box-shadow: inset 0 0 0 2px #8a9a72;
}

.c-bintang {
  padding: 6px;
  background: linear-gradient(160deg, #fdf6e8, #f0e0bd);
  box-shadow: inset 0 0 0 1px #c8a24a;
}

.c-gerbang {
  padding: 5px;
  background: #fdf8ec;
  border-radius: 50% 50% 4px 4px / 38% 38% 4px 4px;
  box-shadow: inset 0 0 0 2px #c8a24a;
}

.c-gerbang img {
  border-radius: 50% 50% 2px 2px / 38% 38% 2px 2px;
}

.c-retro {
  padding: 3px;
  background: #e8dcc0;
  filter: sepia(0.35) saturate(1.15) contrast(1.05);
}

.c-mono {
  padding: 4px;
  background: #f5f1e7;
}

.c-asal {
  padding: 0;
}

.c-retro img {
  filter: sepia(0.35) saturate(1.1) contrast(1.04);
}

.c-mono img {
  filter: grayscale(1) contrast(1.06);
}

.sheet-preview {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 300px;
  margin: 0 auto;
  border-radius: 12px;
  object-fit: contain;
  background: #f1e8d6;
  border: 1px solid var(--line);
}

.preview-note {
  margin: 7px 0 0;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  color: #a2988a;
}

.sheet-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.sheet-actions .btn {
  width: auto;
  flex: 1;
}

.btn-ghost {
  background: none;
  border: 1px solid var(--line);
  color: #6f6758;
}

.btn-ghost:hover {
  background: #fbf6ea;
  color: #4a4438;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px 18px;
  background: rgba(26, 24, 19, 0.92);
  backdrop-filter: blur(6px);
  animation: fade 0.18s ease both;
  cursor: zoom-out;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-content {
  max-width: 100%;
  max-height: 100%;
  display: grid;
  place-items: center;
  animation: pop 0.22s ease both;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 253, 247, 0.28);
  border-radius: 50%;
  background: rgba(255, 253, 247, 0.12);
  color: #fffdf7;
  cursor: pointer;
  z-index: 1;
}

.lb-photo {
  margin: 0;
  text-align: center;
}

.lb-photo img {
  display: block;
  max-width: min(92vw, 460px);
  max-height: 70vh;
  margin: 0 auto;
  border-radius: 10px;
  box-shadow: 0 26px 60px -28px rgba(0, 0, 0, 0.95);
}

.lb-caption {
  margin: 14px 0 3px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: #f7efdd;
}

.lb-time {
  margin: 0;
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(247, 239, 221, 0.62);
}

.lb-entry {
  width: min(92vw, 420px);
  padding: 24px 20px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  text-align: center;
  box-shadow: 0 30px 70px -40px #000;
}

.lb-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: var(--gold-pale);
  color: #7a6537;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
}

.lb-name {
  margin: 0 0 3px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  color: #33302a;
}

.lb-entry .lb-time {
  color: var(--ink-soft);
}

.lb-message {
  margin: 14px 0 0;
  font-size: 0.94rem;
  line-height: 1.7;
  color: #4a4438;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ---------- Photo status ---------- */

.photo-status {
  position: fixed;
  left: 50%;
  bottom: 92px;
  z-index: 30;
  transform: translateX(-50%);
  max-width: 320px;
  margin: 0;
  padding: 0 14px;
  font-size: 0.72rem;
  line-height: 1.5;
  text-align: center;
  color: var(--olive);
}

.photo-status:not(:empty) {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.95);
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px -12px rgba(50, 46, 38, 0.7);
}

/* ---------- Dock ---------- */

.dock {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 40;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: min(408px, calc(100vw - 32px));
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.94);
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px -18px rgba(50, 46, 38, 0.65);
  backdrop-filter: blur(8px);
}

.dock-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 4px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: #a2988a;
  font: inherit;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s ease;
}

.dock-btn:hover {
  color: var(--olive);
}

.dock-btn.is-active {
  color: var(--olive);
}

.fab {
  flex: none;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 6px;
  border: 4px solid var(--paper);
  border-radius: 50%;
  background: linear-gradient(180deg, #d3ad55 0%, #bb9440 100%);
  color: #fffdf5;
  cursor: pointer;
  box-shadow: 0 10px 22px -12px rgba(187, 148, 64, 0.9);
  transition: transform 0.1s ease, filter 0.15s ease;
}

.fab:hover {
  filter: brightness(1.05);
}

.fab:active {
  transform: scale(0.95);
}

.fab[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* ---------- Countdown ---------- */

.countdown {
  margin-top: 18px;
  padding: 14px 14px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdf7 0%, #faf3e4 100%);
  box-shadow: 0 14px 30px -26px rgba(120, 92, 40, 0.55);
}

.countdown-label {
  margin: 0 0 8px;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
}

.countdown-units {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 2px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
}

.countdown-value {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.1;
  color: #4a3f2b;
  font-variant-numeric: tabular-nums;
}

.countdown-name {
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.countdown-note {
  margin: 9px 0 0;
  font-size: 0.66rem;
  text-align: center;
  color: var(--ink-soft);
}

/* ---------- Section head ---------- */

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.section-head .section-title {
  margin: 0;
}

/* ---------- Butang pintasan utama ---------- */

.quick-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 4px 0 20px;
}

.quick-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 60px;
  padding: 11px 15px;
  border: 1px solid rgba(200, 162, 74, 0.55);
  border-radius: 16px;
  background: linear-gradient(145deg, #1e2e4f 0%, #121f36 100%);
  color: #fdf7e8;
  font-family: var(--sans);
  text-align: left;
  cursor: pointer;
  box-shadow:
    0 16px 30px -24px rgba(12, 22, 40, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
  transition: transform 0.12s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.quick-btn:hover {
  border-color: #dcb765;
  box-shadow:
    0 18px 34px -22px rgba(12, 22, 40, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.quick-btn:active {
  transform: translateY(1px) scale(0.995);
}

.quick-btn:focus-visible {
  outline: 2px solid #dcb765;
  outline-offset: 3px;
}

.quick-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, #ecd28b 0%, #c8a24a 72%);
  color: #14213a;
  box-shadow: 0 7px 16px -10px rgba(200, 162, 74, 0.95);
}

.quick-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.quick-label {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.quick-sub {
  font-size: 0.64rem;
  letter-spacing: 0.02em;
  color: rgba(253, 247, 232, 0.64);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 440px) {
  .quick-actions {
    grid-template-columns: 1fr 1fr;
  }

  .quick-btn {
    min-height: 66px;
    padding: 10px 12px;
    gap: 9px;
  }

  .quick-icon {
    width: 34px;
    height: 34px;
  }

  .quick-label {
    font-size: 0.79rem;
  }

  .quick-sub {
    font-size: 0.6rem;
    white-space: normal;
  }
}

/* ---------- QR card ---------- */

.qr-card {
  margin-top: 22px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf7 0%, #fbf5e9 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.qr-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.qr-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  color: #3a352b;
}

.qr-sub {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 300px;
}

.qr-frame {
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 26px -22px rgba(90, 70, 30, 0.6);
  line-height: 0;
}

.qr-frame canvas {
  width: 190px;
  height: 190px;
  display: block;
}

.qr-link {
  margin: 0;
  font-size: 0.6rem;
  color: var(--ink-soft);
  word-break: break-all;
}

/* ---------- Voice guest book ---------- */

.voice-card {
  margin: 18px 0 22px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.voice-card .book-title {
  margin: 0 0 4px;
}

.voice-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.voice-controls .btn {
  margin: 0;
  width: auto;
  padding: 10px 18px;
  flex: 0 0 auto;
}

.voice-timer {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: #4a3f2b;
  font-variant-numeric: tabular-nums;
}

.voice-limit {
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.voice-timer.is-recording {
  color: #a63a2b;
}

.voice-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.voice-actions .btn {
  margin: 0;
  width: auto;
  padding: 10px 16px;
}

#voice-preview {
  width: 100%;
  margin: 4px 0 8px;
}

.voice-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.voice-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fffdf7;
}

.voice-play {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(180deg, #d3ad55 0%, #bb9440 100%);
  color: #fffdf5;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.voice-item-body {
  flex: 1 1 auto;
  min-width: 0;
}

.voice-item-name {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #3a352b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-item-meta {
  margin: 1px 0 0;
  font-size: 0.64rem;
  color: var(--ink-soft);
}

.voice-empty {
  list-style: none;
  font-size: 0.72rem;
  color: var(--ink-soft);
  padding: 6px 0;
}

/* ---------- Slideshow ---------- */

.slideshow {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #14110c;
  display: flex;
  flex-direction: column;
}

.slideshow-stage {
  flex: 1 1 auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
}

.slideshow-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.slideshow-stage img.is-visible {
  opacity: 1;
}

.slideshow-caption {
  padding: 14px 18px 6px;
  text-align: center;
  background: linear-gradient(180deg, rgba(20, 17, 12, 0) 0%, rgba(20, 17, 12, 0.96) 55%);
  color: #fdf7e8;
}

.slideshow-name {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}

.slideshow-text {
  margin: 3px 0 0;
  font-size: 0.8rem;
  color: rgba(253, 247, 232, 0.78);
  line-height: 1.5;
}

.slideshow-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  padding: 10px 14px 18px;
  background: #14110c;
  flex-wrap: wrap;
}

.ss-btn {
  border: 1px solid rgba(253, 247, 232, 0.28);
  background: rgba(253, 247, 232, 0.08);
  color: #fdf7e8;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 0.76rem;
  font-family: var(--sans);
  cursor: pointer;
  min-height: 38px;
}

.ss-btn:hover {
  background: rgba(253, 247, 232, 0.16);
}

.ss-close {
  border-color: rgba(253, 247, 232, 0.5);
}

.slideshow-empty {
  color: #fdf7e8;
  font-size: 0.9rem;
  text-align: center;
  padding: 24px;
}

/* ---------- Admin: modes, moderation, voices ---------- */

.admin-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf7;
}

.admin-toggle-row .admin-name {
  margin: 0;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
  vertical-align: middle;
}

.badge-pending {
  background: #fdf3da;
  border-color: #e6d09a;
  color: #7d6220;
}

.badge-approved {
  background: #eaf2e4;
  border-color: #c3d7b5;
  color: #3f6134;
}

.badge-rejected {
  background: #fbe7e7;
  border-color: #dda2a2;
  color: #8f2b2b;
}

.admin-moderation-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf7;
  margin-bottom: 8px;
}

.admin-moderation-row img {
  width: 52px;
  height: 52px;
  border-radius: 9px;
  object-fit: cover;
  background: #efe6d2;
}

.admin-moderation-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.admin-moderation-actions .mini-btn {
  min-height: 30px;
}

.voice-admin-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf7;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.voice-admin-item audio {
  flex: 1 1 160px;
  min-width: 120px;
  height: 34px;
}

@media (min-width: 520px) {
  .qr-card {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .qr-copy {
    align-items: flex-start;
  }

  .qr-frame canvas {
    width: 210px;
    height: 210px;
  }
}

.admin-moderation-row.is-text {
  grid-template-columns: 1fr;
}

.admin-text {
  margin: 2px 0 4px;
  font-size: 0.76rem;
  line-height: 1.45;
  color: #4b4438;
  word-break: break-word;
}

.admin-moderation-row audio {
  width: 100%;
  height: 34px;
  margin: 4px 0 2px;
}

.fab.is-closed,
.fab[disabled] {
  opacity: 0.45;
  filter: grayscale(0.5);
  cursor: not-allowed;
}

@media (max-width: 400px) {
  .countdown-value {
    font-size: 1.18rem;
  }

  .ss-btn {
    padding: 9px 12px;
    font-size: 0.72rem;
  }

  .slideshow-caption {
    padding: 12px 14px 4px;
  }

  .slideshow-name {
    font-size: 1rem;
  }
}

@media (max-width: 360px) {
  .grid {
    column-gap: 9px;
  }

  .dock {
    width: calc(100vw - 20px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Kategori gambar (awam) ---------- */

.category-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  margin: 4px 0 2px;
  scrollbar-width: none;
}

.category-bar::-webkit-scrollbar { display: none; }

.cat {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(200, 162, 74, 0.45);
  background: rgba(255, 255, 255, 0.6);
  color: #514a3f;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.cat.is-active {
  background: linear-gradient(145deg, #1e2e4f, #121f36);
  border-color: rgba(200, 162, 74, 0.8);
  color: #fdf7e8;
}

.cat:focus-visible { outline: 2px solid #c8a24a; outline-offset: 2px; }

/* ---------- Gambar pilihan (pin admin) ---------- */

.featured { margin-bottom: 16px; }

.featured-star { color: #c8a24a; }

.featured-count {
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a7a5c;
}

.featured-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: none;
}

.featured-strip::-webkit-scrollbar { display: none; }

.featured-item {
  position: relative;
  flex: 0 0 164px;
  border: 1px solid rgba(200, 162, 74, 0.4);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 22px -20px rgba(40, 32, 20, 0.7);
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.featured-item img {
  display: block;
  width: 100%;
  height: 118px;
  object-fit: cover;
}

.featured-item-body { padding: 8px 10px 10px; }

.featured-item-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: #34302a;
  margin: 0;
}

.featured-item-caption {
  font-size: 0.64rem;
  color: #7d7466;
  margin: 2px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-pin {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(18, 31, 54, 0.86);
  color: #f0d79a;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Pilih kategori semasa muat naik ---------- */

.cat-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.cat-option {
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(200, 162, 74, 0.45);
  background: #fffdf8;
  color: #514a3f;
  font-family: var(--sans);
  font-size: 0.68rem;
  cursor: pointer;
}

.cat-option.is-active {
  background: #1e2e4f;
  border-color: #c8a24a;
  color: #fdf7e8;
}

.cat-option:focus-visible { outline: 2px solid #c8a24a; outline-offset: 2px; }

/* ---------- Muat naik berbilang ---------- */

.multi-list {
  list-style: none;
  margin: 4px 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 38vh;
  overflow-y: auto;
}

.multi-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(120, 105, 80, 0.18);
  border-radius: 12px;
  background: #fffdf8;
}

.multi-item img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
}

.multi-info { min-width: 0; }

.multi-name {
  margin: 0;
  font-size: 0.72rem;
  color: #34302a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-track {
  margin-top: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(120, 105, 80, 0.16);
  overflow: hidden;
}

.multi-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #c8a24a, #e0c47e);
  transition: width 0.2s ease;
}

.multi-state {
  font-size: 0.62rem;
  color: #857a67;
  white-space: nowrap;
}

.multi-state.is-ok { color: #3f7a4a; }
.multi-state.is-fail { color: #b2453a; }

/* ---------- Carian & QR dalam panel admin ---------- */

.admin-search { margin-bottom: 4px; }

.admin-search .admin-quota-input { width: 100%; }

.admin-qr {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(200, 162, 74, 0.35);
  border-radius: 14px;
  background: #fffdf8;
  margin-bottom: 8px;
}

.admin-qr-frame {
  background: #fff;
  border-radius: 10px;
  padding: 6px;
  box-shadow: inset 0 0 0 1px rgba(120, 105, 80, 0.16);
}

.admin-qr-frame canvas { display: block; width: 100%; height: auto; }

.admin-qr-copy { min-width: 0; }

.admin-qr-copy .mini-btn { margin-top: 6px; }

@media (max-width: 430px) {
  .admin-qr { grid-template-columns: 1fr; }
  .admin-qr-frame { max-width: 190px; margin: 0 auto; }
}

/* ---------- Slaid: kiraan & mod TV ---------- */

.slideshow-counter {
  position: absolute;
  top: 14px;
  right: 18px;
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(10, 18, 32, 0.55);
  color: #f0d79a;
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  z-index: 3;
}

.slideshow.is-idle { cursor: none; }

.slideshow.is-idle .slideshow-bar,
.slideshow.is-idle .slideshow-counter,
.slideshow.is-idle .slideshow-caption {
  opacity: 0;
  pointer-events: none;
}

.slideshow-bar,
.slideshow-counter,
.slideshow-caption {
  transition: opacity 0.35s ease;
}

.admin-qr-copy,
.admin-qr-copy .guest-meta { min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 430px) {
  .admin-qr { min-width: 0; }
}

/* ---------- Muzik latar slaid ---------- */

.ss-music {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 16px 2px;
  background: #14110c;
  color: #fdf7e8;
  transition: opacity 0.35s ease;
}

.ss-music-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ss-music-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(240, 215, 154, 0.16);
  color: #f0d79a;
  font-size: 0.7rem;
}

.ss-music-title {
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
  font-size: 0.8rem;
  font-family: var(--sans);
  color: #fdf7e8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ss-music-count {
  flex: 0 0 auto;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: rgba(253, 247, 232, 0.6);
}

.ss-music-source {
  flex: 0 0 auto;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(240, 215, 154, 0.45);
  color: #f0d79a;
}

.ss-music-source.is-fallback {
  border-color: rgba(253, 247, 232, 0.5);
  color: #fdf7e8;
}

.ss-music-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ss-music-btn {
  border: 1px solid rgba(253, 247, 232, 0.28);
  background: rgba(253, 247, 232, 0.08);
  color: #fdf7e8;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.72rem;
  font-family: var(--sans);
  cursor: pointer;
  min-height: 34px;
  min-width: 38px;
}

.ss-music-btn:hover { background: rgba(253, 247, 232, 0.16); }

.ss-music-btn[aria-pressed="true"] {
  border-color: rgba(240, 215, 154, 0.6);
  color: #f0d79a;
}

.ss-music-volume {
  display: flex;
  align-items: center;
  flex: 1 1 120px;
  min-width: 96px;
  max-width: 220px;
}

.ss-music-volume input[type="range"] {
  width: 100%;
  accent-color: #c8a24a;
  height: 28px;
  margin: 0;
}

.ss-music-note {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.45;
  color: rgba(253, 247, 232, 0.72);
  min-height: 0;
}

.ss-music-note:empty { display: none; }

.ss-music-start {
  position: absolute;
  left: 50%;
  bottom: 22%;
  transform: translateX(-50%);
  z-index: 4;
  border: 1px solid rgba(240, 215, 154, 0.55);
  background: rgba(20, 17, 12, 0.86);
  color: #f0d79a;
  border-radius: 999px;
  padding: 12px 20px;
  font-family: var(--sans);
  font-size: 0.8rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.ss-music-start:hover { background: rgba(20, 17, 12, 0.95); }

.ss-yt {
  position: absolute;
  width: 1px;
  height: 1px;
  left: 0;
  bottom: 0;
  overflow: hidden;
  opacity: 0.01;
  pointer-events: none;
  z-index: 0;
}

.ss-yt iframe { width: 1px; height: 1px; border: 0; }

.slideshow.is-idle .ss-music,
.slideshow.is-idle .ss-music-start {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 480px) {
  .ss-music { padding: 8px 12px 2px; }
  .ss-music-title { font-size: 0.74rem; }
  .ss-music-btn { padding: 6px 10px; font-size: 0.68rem; }
  .ss-music-start { bottom: 26%; width: calc(100% - 48px); max-width: 320px; }
}

/* ---------- Admin: muzik latar ---------- */

.admin-music-source {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0 8px;
}

.admin-music-source .mini-btn[aria-pressed="true"] {
  background: var(--gold-pale);
  border-color: var(--gold);
  color: var(--ink);
}

.admin-music-row input[type="file"] {
  padding: 6px 8px;
  font-size: 0.72rem;
  line-height: 1.3;
  width: 100%;
  min-width: 0;
}

.admin-music-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
