:root {
  color-scheme: light;
  --ink: #121514;
  --muted: #6b716d;
  --line: rgba(18, 21, 20, 0.14);
  --paper: #111412;
  --surface: #f5f4ef;
  --field: #fbfaf7;
  --rose: #8d4b47;
  --rose-deep: #5b2e2d;
  --mint: #0f6d62;
  --mint-soft: #dbeae5;
  --gold: #af9259;
  --plum: #5b516d;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 78px),
    var(--paper);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img,
video {
  display: block;
  max-width: 100%;
}

.icon-sprite {
  display: none;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 44px);
  border-bottom: 1px solid rgba(175, 146, 89, 0.22);
  background: rgba(17, 20, 18, 0.93);
  color: #f5f4ef;
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--guest-accent, #d7bd82) 52%, transparent);
  background:
    radial-gradient(circle at 26% 18%, color-mix(in srgb, var(--guest-accent, #d7bd82) 24%, transparent), transparent 38%),
    color-mix(in srgb, var(--guest-accent, #d7bd82) 10%, #171a18);
  color: var(--guest-accent, #d7bd82);
  box-shadow:
    0 0 24px color-mix(in srgb, var(--guest-accent, #d7bd82) 16%, transparent),
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
  overflow: hidden;
}

.brand-mark-logo {
  display: block;
  width: 100%;
  height: 100%;
  background: currentColor;
  mask: url("/assets/mypiclink-logo.png") left center / 124px auto no-repeat;
  -webkit-mask: url("/assets/mypiclink-logo.png") left center / 124px auto no-repeat;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: rgba(245, 244, 239, 0.62);
  font-size: 0.76rem;
  margin-top: 1px;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 34px);
  padding: clamp(18px, 4vw, 44px);
}

.host-panel {
  align-self: start;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.panel-section,
.upload-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.18);
}

.panel-section {
  padding: 14px;
}

.panel-section h1,
.panel-section h2,
.panel-section h3 {
  margin: 0 0 12px;
}

.panel-section h1 {
  font-size: 1.28rem;
  line-height: 1.2;
}

.panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-heading h1 {
  margin: 0;
}

.panel-heading > span {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid rgba(175, 146, 89, 0.22);
  background: rgba(175, 146, 89, 0.12);
  color: #81683c;
  font-size: 0.78rem;
  font-weight: 900;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.stacked-form,
.panel-section label,
.upload-grid label {
  display: grid;
  gap: 5px;
}

.stacked-form {
  gap: 8px;
}

label > span,
.theme-picker legend {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.25;
}

input[type="text"],
input[type="date"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  padding: 7px 10px;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 72px;
}

#eventForm textarea {
  height: 78px;
}

input:focus,
textarea:focus,
input[type="color"]:focus,
.drop-zone:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(175, 146, 89, 0.18);
}

.welcome-page {
  position: relative;
  display: none;
  min-height: 100vh;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 460px);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(30px, 6vw, 76px);
  background:
    linear-gradient(120deg, rgba(255, 49, 133, 0.12), rgba(39, 184, 255, 0.08) 48%, rgba(17, 20, 18, 0)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 88px),
    #08090d;
  color: #f8fbff;
}

body[data-view="welcome"] .welcome-page {
  display: grid;
}

body[data-view="owner"] .owner-page {
  display: block;
}

body[data-view="welcome"] .app-shell,
body[data-view="owner"] .app-shell,
body[data-view="owner"] .mobile-add-fab,
body[data-view="welcome"] .mobile-add-fab {
  display: none;
}

.welcome-actions {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-switch {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.language-button,
.owner-entry-button,
.owner-back-button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 900;
}

.language-button {
  background: transparent;
  color: rgba(248, 251, 255, 0.72);
}

.language-button.is-active {
  background: #ffffff;
  color: #111412;
}

.owner-entry-button,
.owner-back-button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.welcome-brand-panel {
  display: grid;
  align-content: center;
  gap: clamp(18px, 3vw, 34px);
  min-width: 0;
}

.welcome-logo {
  width: min(640px, 100%);
  filter: drop-shadow(0 30px 70px rgba(255, 49, 133, 0.18));
}

.welcome-copy {
  max-width: 560px;
}

.welcome-copy h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.2rem, 4.2vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.welcome-copy p:last-child {
  max-width: 44ch;
  margin: 18px 0 0;
  color: rgba(248, 251, 255, 0.72);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  line-height: 1.8;
}

.owner-page {
  display: none;
  min-height: 100vh;
  padding: 24px clamp(16px, 4vw, 48px) 48px;
  background:
    linear-gradient(120deg, rgba(255, 49, 133, 0.1), rgba(39, 184, 255, 0.08) 42%, transparent),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 88px),
    #08090d;
  color: #f8fbff;
}

.owner-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto 34px;
}

.owner-topbar img {
  width: min(260px, 52vw);
}

.owner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.owner-shell {
  display: grid;
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
}

.owner-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.owner-heading {
  max-width: 720px;
}

.owner-heading h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 0.98;
}

.owner-heading p:last-child {
  max-width: 56ch;
  margin: 16px 0 0;
  color: rgba(248, 251, 255, 0.72);
  line-height: 1.75;
}

.owner-create-link {
  flex: 0 0 auto;
  min-width: 190px;
  box-shadow: 0 18px 42px rgba(215, 189, 130, 0.22);
}

.owner-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.owner-stat-grid article,
.owner-table-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.owner-stat-grid article {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.owner-stat-grid span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.owner-stat-grid strong {
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1;
}

.owner-flow-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 1.12fr) minmax(0, 1.08fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.owner-flow-column {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border-right: 1px solid rgba(18, 21, 20, 0.11);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(245, 244, 239, 0.72)),
    rgba(255, 255, 255, 0.86);
}

.owner-flow-column:last-child {
  border-right: 0;
}

.owner-flow-heading h2 {
  margin: 0;
  font-size: 1.1rem;
}

.owner-flow-list,
.owner-flow-detail {
  display: grid;
  gap: 8px;
}

.owner-flow-list {
  max-height: 340px;
  overflow: auto;
  padding-right: 2px;
}

.owner-flow-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 70px;
  border: 1px solid rgba(18, 21, 20, 0.12);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px;
  text-align: left;
  box-shadow: 0 10px 26px rgba(18, 21, 20, 0.05);
}

.owner-flow-item:hover,
.owner-flow-item.is-active {
  border-color: rgba(175, 146, 89, 0.62);
  background: rgba(175, 146, 89, 0.11);
}

.owner-flow-item strong,
.owner-flow-summary strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-flow-item small,
.owner-flow-summary small {
  display: block;
  min-width: 0;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-flow-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 26px;
  border-radius: 999px;
  background: rgba(15, 109, 98, 0.1);
  color: #0f6d62;
  font-size: 0.72rem;
  font-weight: 900;
}

.owner-flow-summary,
.owner-flow-meta-grid,
.owner-flow-url,
.owner-flow-empty {
  border: 1px solid rgba(18, 21, 20, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.owner-flow-summary {
  padding: 12px;
}

.owner-flow-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: rgba(18, 21, 20, 0.08);
}

.owner-flow-meta-grid > span {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.86);
}

.owner-flow-meta-grid small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.owner-flow-meta-grid strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-flow-url {
  overflow: hidden;
  padding: 10px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-flow-empty {
  margin: 0;
  padding: 14px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.55;
}

.owner-table-card {
  padding: 20px;
}

.owner-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 12px;
}

.owner-add-staff {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 0.7fr) auto;
  gap: 10px;
  align-items: end;
  margin: 18px 0 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 20, 18, 0.035);
}

.owner-add-staff label {
  display: grid;
  gap: 6px;
  font-weight: 900;
}

.owner-add-staff label > span {
  color: var(--muted);
  font-size: 0.72rem;
}

.owner-table-card h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
}

.owner-table-wrap {
  overflow-x: auto;
}

.owner-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.owner-table.compact {
  min-width: 520px;
}

.owner-table th,
.owner-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.owner-table th {
  color: var(--muted);
  font-size: 0.78rem;
}

.owner-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.owner-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.owner-action-row button,
.owner-link-action,
.owner-fixed-role {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid rgba(17, 20, 18, 0.12);
  border-radius: 999px;
  padding: 5px 10px;
  background: #ffffff;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
  text-decoration: none;
}

.owner-action-row button:hover,
.owner-link-action:hover {
  border-color: rgba(175, 146, 89, 0.5);
  background: rgba(175, 146, 89, 0.12);
}

.owner-fixed-role {
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
}

.status-pill.active {
  background: rgba(15, 109, 98, 0.12);
  color: #0f6d62;
}

.status-pill.pending {
  background: rgba(175, 146, 89, 0.16);
  color: #6d5526;
}

.auth-panel {
  width: 100%;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

.auth-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1;
}

.auth-heading p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.google-auth-button,
.auth-tab {
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
}

.google-auth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  margin-top: 24px;
  border-radius: 8px;
  font-weight: 900;
}

.google-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  color: #4285f4;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(18, 21, 20, 0.12);
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ebeae5;
}

.auth-tab {
  min-height: 40px;
  border-radius: 6px;
  font-weight: 900;
}

.auth-tab.is-active {
  border-color: transparent;
  background: #111412;
  color: #ffffff;
}

.auth-form {
  display: grid;
  gap: 13px;
  margin-top: 18px;
}

.auth-form label {
  display: grid;
  gap: 7px;
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
}

.auth-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

.theme-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
  gap: 4px;
  padding: 0;
  margin: 0;
  border: 0;
}

.theme-picker legend {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.theme-group-label {
  grid-column: 1 / -1;
  margin-top: 1px;
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 900;
}

.theme-picker label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--field);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 800;
}

.theme-picker input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.theme-picker label:has(input:checked) {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold);
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(32, 37, 43, 0.14);
}

.swatch.cute-sweet {
  background: linear-gradient(135deg, #d7748f, #f2c6d5);
}

.swatch.cute-peach {
  background: linear-gradient(135deg, #ef9d74, #ffe1c9);
}

.swatch.cute-lavender {
  background: linear-gradient(135deg, #9f88d5, #efd9ff);
}

.swatch.cool-night {
  background: linear-gradient(135deg, #28213a, #090914);
}

.swatch.cool-aqua {
  background: linear-gradient(135deg, #0f6d62, #9fd7c5);
}

.swatch.cool-luxe {
  background: linear-gradient(135deg, #f1d99b, #715523);
}

.swatch.mono-dark {
  background: linear-gradient(135deg, #f8f8f1 0 48%, #111412 50% 100%);
}

.swatch.mono-light {
  background: linear-gradient(135deg, #fffefa 0 50%, #858986 52% 100%);
}

.swatch.custom {
  background: conic-gradient(from 30deg, #121514 0 33%, #f5f4ef 0 66%, #d7bd82 0);
}

.custom-theme-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 5px;
  padding: 7px;
  border: 1px solid color-mix(in srgb, var(--gold) 26%, transparent);
  border-radius: 8px;
  background: rgba(175, 146, 89, 0.08);
}

.custom-theme-panel[hidden] {
  display: none;
}

.mobile-style-preview {
  display: none;
}

.color-control {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
}

.color-control > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.color-control strong {
  color: var(--ink);
  font-size: 0.8rem;
}

.color-control small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
}

.color-control input[type="color"] {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
}

.color-control input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-control input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 50%;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.switch-row input {
  position: absolute;
  opacity: 0;
}

.switch-track {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #c9d0d3;
  transition: background 0.18s ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.18s ease;
}

.switch-row input:checked + .switch-track {
  background: var(--ink);
}

.switch-row input:checked + .switch-track::after {
  transform: translateX(16px);
}

.button-row,
.upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 11px;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.button svg,
.empty-state svg,
.lightbox-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  border-color: #232721;
  background: #111412;
  color: #f8f5ed;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.button.secondary,
.button.ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
}

.topbar .button.ghost {
  border-color: rgba(175, 146, 89, 0.32);
  background: rgba(255, 255, 255, 0.06);
  color: #f5f4ef;
}

.button.text {
  min-height: 42px;
  padding-inline: 4px;
  background: transparent;
  color: var(--muted);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
  box-shadow: none;
}

.camera-upload-button {
  display: none;
}

.mobile-add-fab {
  display: none;
}

.flow-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-list li {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.flow-list span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(175, 146, 89, 0.13);
  color: #80683c;
  font-weight: 900;
}

.event-list {
  display: grid;
  gap: 9px;
  max-height: 430px;
  overflow: auto;
  padding-right: 2px;
}

.event-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: stretch;
}

.event-select {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: 100%;
  min-height: 74px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  text-align: left;
}

.event-select strong,
.event-select span,
.event-select small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-select span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
}

.event-select small {
  align-self: start;
  padding: 4px 7px;
  border-radius: 999px;
  background: #ebe7dc;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.event-row.is-active .event-select {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold);
}

.event-delete {
  display: grid;
  place-items: center;
  width: 38px;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: #7e2926;
}

.event-delete svg,
.security-note svg,
.access-denied svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.security-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 13px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.qr-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
}

.qr-card canvas {
  width: 112px;
  height: 112px;
  border-radius: 6px;
  background: #ffffff;
  image-rendering: pixelated;
}

.qr-card strong,
.qr-card span {
  display: block;
}

.qr-card strong {
  margin-bottom: 5px;
  color: var(--ink);
}

.qr-card span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.experience {
  min-width: 0;
  border: 1px solid rgba(175, 146, 89, 0.2);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}

body[data-view="host"] .experience {
  position: sticky;
  top: 92px;
  align-self: start;
  max-height: calc(100vh - 116px);
  overflow: auto;
}

.access-denied {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 13px;
  min-height: calc(100vh - 160px);
  padding: 32px;
  text-align: center;
}

.access-denied[hidden] {
  display: none;
}

.access-denied svg {
  width: 42px;
  height: 42px;
  color: var(--theme-main, var(--rose));
}

.access-denied h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.4rem);
}

.access-denied p {
  max-width: 36ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.guest-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 88px;
  padding: 20px clamp(18px, 4vw, 34px);
  border-bottom: 1px solid var(--line);
  background: rgba(245, 244, 239, 0.78);
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease;
}

.guest-toolbar h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.2;
}

.celebration-band {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.8fr);
  gap: clamp(20px, 5vw, 62px);
  align-items: center;
  min-height: 420px;
  padding: clamp(28px, 5vw, 58px);
  background:
    linear-gradient(120deg, rgba(245, 244, 239, 0.96), rgba(245, 244, 239, 0.64)),
    var(--theme-soft, #f7e5df);
  overflow: hidden;
  isolation: isolate;
  transition:
    background 0.22s ease,
    color 0.22s ease;
}

.celebration-band::before,
.floating-room::before {
  content: var(--style-decor-content, "");
  position: absolute;
  inset: -18% -12%;
  z-index: 0;
  color: var(--style-decor-color, rgba(255, 255, 255, 0.36));
  font-family: Georgia, "Times New Roman", ui-serif, serif;
  font-size: var(--style-decor-size, clamp(1.05rem, 3vw, 2rem));
  font-weight: 800;
  line-height: var(--style-decor-line, 3);
  letter-spacing: 0;
  opacity: var(--style-decor-opacity, 0.14);
  pointer-events: none;
  text-shadow: var(--style-decor-glow, none);
  transform: var(--style-decor-transform, rotate(-8deg));
  transition:
    color 0.22s ease,
    opacity 0.22s ease;
  white-space: pre;
  word-spacing: 1.6rem;
}

.celebration-band > * {
  position: relative;
  z-index: 1;
}

.celebration-copy {
  max-width: 620px;
}

.date-label {
  margin: 0 0 12px;
  color: var(--theme-main, var(--rose));
  font-weight: 900;
  transition: color 0.22s ease;
}

.celebration-copy h2 {
  margin: 0;
  max-width: none;
  font-size: var(--headline-size, 6.3rem);
  line-height: 0.92;
  letter-spacing: 0;
  transition:
    color 0.22s ease,
    text-shadow 0.22s ease;
}

.celebration-copy p:last-child {
  max-width: 58ch;
  margin: 22px 0 0;
  color: #4a5258;
  font-size: 1.06rem;
  line-height: 1.8;
  transition: color 0.22s ease;
}

.memory-stack {
  position: relative;
  min-height: 360px;
}

.memory-stack img {
  position: absolute;
  width: min(72%, 340px);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 10px solid #fff;
  border-radius: 8px;
  box-shadow: 0 22px 40px rgba(32, 37, 43, 0.24);
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.memory-stack img:nth-child(1) {
  right: 8%;
  top: 4%;
  transform: rotate(5deg);
}

.memory-stack img:nth-child(2) {
  left: 4%;
  top: 26%;
  transform: rotate(-7deg);
}

.memory-stack img:nth-child(3) {
  right: 0;
  bottom: 2%;
  width: min(56%, 250px);
  aspect-ratio: 1 / 1;
  transform: rotate(2deg);
}

.floating-room {
  position: relative;
  min-height: calc(100vh - 72px);
  overflow: hidden;
  isolation: isolate;
  background: var(
    --guest-room-bg,
    linear-gradient(115deg, rgba(245, 244, 239, 0.08), rgba(245, 244, 239, 0) 42%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 28px),
    #101210
  );
}

.floating-room::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: var(--guest-overlay, linear-gradient(180deg, rgba(16, 18, 16, 0), rgba(16, 18, 16, 0.34)));
}

.floating-copy {
  position: absolute;
  left: clamp(18px, 6vw, 72px);
  top: clamp(20px, 7vh, 72px);
  z-index: 4;
  width: min(520px, calc(100% - 36px));
  pointer-events: none;
}

.floating-copy .date-label {
  color: var(--guest-accent, #d7bd82);
}

.floating-copy h2 {
  margin: 0;
  max-width: none;
  font-size: var(--headline-size, 7.2rem);
  line-height: 0.9;
  letter-spacing: 0;
  color: var(--guest-title, #f5f4ef);
  text-shadow: 0 20px 45px rgba(0, 0, 0, 0.34);
}

.headline-line {
  display: block;
  white-space: nowrap;
}

.floating-copy p:last-child {
  width: min(46ch, 92%);
  margin: 22px 0 0;
  color: var(--guest-copy, rgba(245, 244, 239, 0.72));
  font-size: clamp(0.98rem, 2vw, 1.16rem);
  line-height: 1.75;
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.48);
}

.floating-surface {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  outline: none;
  z-index: 2;
  perspective: 1000px;
  perspective-origin: center;
}

.floating-surface::before {
  content: "";
  position: absolute;
  inset: -16%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.52) 0 1px, transparent 1.8px),
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.38) 0 1px, transparent 1.8px),
    radial-gradient(circle at 84% 66%, rgba(215, 189, 130, 0.45) 0 1px, transparent 2px),
    radial-gradient(circle at 36% 74%, rgba(255, 255, 255, 0.34) 0 1px, transparent 1.8px),
    radial-gradient(circle at 58% 46%, rgba(255, 255, 255, 0.22) 0 1px, transparent 1.7px);
  background-size:
    180px 180px,
    240px 240px,
    210px 210px,
    260px 260px,
    150px 150px;
  opacity: 0.68;
  transform: translate3d(0, 0, -120px);
  animation: star-drift 26s linear infinite;
}

.floating-surface:focus {
  box-shadow: inset 0 0 0 3px rgba(23, 112, 100, 0.18);
}

.floating-surface.is-swiping {
  cursor: grabbing;
}

.floating-surface.is-zooming {
  cursor: zoom-in;
}

.floating-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform-origin: center;
  transform-style: preserve-3d;
  will-change: transform;
}

.floating-card {
  position: absolute;
  left: 0;
  top: 0;
  width: clamp(150px, 19vw, 255px);
  aspect-ratio: 4 / 5;
  border: 1px solid var(--guest-card-border, rgba(175, 146, 89, 0.34));
  border-radius: 8px;
  padding: 8px 8px 40px;
  background: var(--guest-card-bg, #e9e4d8);
  color: var(--ink);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.42),
    0 1px 0 rgba(255, 255, 255, 0.65) inset;
  cursor: grab;
  transform-origin: center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform;
}

.floating-card.is-dragging {
  cursor: grabbing;
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.56),
    0 0 0 1px rgba(255, 255, 255, 0.38) inset,
    0 0 34px var(--guest-accent, rgba(215, 189, 130, 0.42));
}

.floating-card:nth-child(3n + 1) {
  width: clamp(170px, 23vw, 305px);
}

.floating-card:nth-child(4n + 2) {
  aspect-ratio: 1 / 1;
}

.floating-layer.is-dense .floating-card {
  width: clamp(92px, 11vw, 178px);
  padding: 5px 5px 28px;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.34),
    0 1px 0 rgba(255, 255, 255, 0.55) inset;
}

.floating-layer.is-dense .floating-card:nth-child(3n + 1) {
  width: clamp(104px, 13vw, 205px);
}

.floating-card img,
.floating-card video {
  width: 100%;
  height: 100%;
  border-radius: 5px;
  object-fit: cover;
  pointer-events: none;
  filter: saturate(0.9) contrast(1.06);
}

.floating-card-label {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  overflow: hidden;
  color: var(--guest-card-label, #242722);
  font-size: 0.8rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floating-layer.is-dense .floating-card-label {
  left: 8px;
  right: 8px;
  bottom: 8px;
  font-size: 0.68rem;
}

.floating-card .video-badge {
  left: 16px;
  top: 16px;
}

.floating-layer.is-dense .floating-card .video-badge {
  left: 10px;
  top: 10px;
}

@keyframes star-drift {
  from {
    background-position:
      0 0,
      20px 40px,
      80px 20px,
      40px 90px,
      0 30px;
  }

  to {
    background-position:
      180px 90px,
      260px 160px,
      290px 120px,
      300px 220px,
      150px 90px;
  }
}

.upload-panel {
  margin: 24px clamp(18px, 4vw, 34px) 0;
  padding: 18px;
  border-color: rgba(175, 146, 89, 0.24);
}

.upload-grid {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.drop-zone {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 116px;
  margin-top: 14px;
  border: 1px dashed #aeb8bd;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  text-align: center;
  outline: none;
}

.drop-zone strong {
  color: var(--ink);
}

.drop-zone.is-dragging {
  border-color: var(--theme-main, var(--mint));
  background: var(--theme-soft, var(--mint-soft));
}

.pending-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.pending-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.pending-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-section {
  padding: clamp(44px, 6vw, 72px) clamp(22px, 4vw, 34px) clamp(22px, 4vw, 34px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading h3 {
  margin: 0;
  font-size: clamp(1.3rem, 3vw, 2rem);
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.media-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
}

.media-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #d7d9d3;
  overflow: hidden;
}

.media-frame img,
.media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.56);
  color: #fff;
}

.video-badge svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: none;
}

.media-meta {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.media-meta strong {
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.media-meta span {
  color: var(--muted);
  font-size: 0.84rem;
}

.delete-media {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #7e2926;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.delete-media svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 220px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.empty-state[hidden] {
  display: none;
}

.empty-state svg {
  width: 34px;
  height: 34px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  max-width: min(340px, calc(100vw - 40px));
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(175, 146, 89, 0.28);
  background: #111412;
  color: #f5f4ef;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 34px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(6, 8, 8, 0.82);
  backdrop-filter: blur(18px);
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: min(1080px, 100%);
  max-height: calc(100vh - 40px);
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(175, 146, 89, 0.24);
  background: #0b0d0c;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.52);
}

.lightbox-close {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(175, 146, 89, 0.46);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}

.lightbox-media {
  display: grid;
  place-items: center;
  min-height: min(72vh, 720px);
  background: #050606;
}

.lightbox-media img,
.lightbox-media video {
  width: 100%;
  max-height: min(72vh, 720px);
  object-fit: contain;
}

.lightbox-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-top: 1px solid rgba(175, 146, 89, 0.22);
  background: #f5f4ef;
}

.lightbox-footer div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.lightbox-actions {
  display: flex !important;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px !important;
}

.lightbox-footer strong,
.lightbox-footer span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox-footer span {
  color: var(--muted);
  font-size: 0.88rem;
}

body.is-lightbox-open {
  overflow: hidden;
}

body[data-theme="cute-sweet"],
body[data-theme="rose"] {
  --theme-main: #d7748f;
  --theme-deep: #7d3047;
  --theme-soft: #f3d8e1;
  --guest-bg: #1a1014;
  --guest-room-bg: radial-gradient(circle at 82% 12%, rgba(245, 185, 205, 0.22), transparent 30%),
    linear-gradient(120deg, rgba(215, 116, 143, 0.24), rgba(26, 16, 20, 0) 46%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 28px), #1a1014;
  --guest-overlay: linear-gradient(180deg, rgba(26, 16, 20, 0), rgba(26, 16, 20, 0.38));
  --guest-toolbar-bg: rgba(26, 16, 20, 0.78);
  --guest-accent: #f2c6d5;
  --guest-title: #fff4f8;
  --guest-copy: rgba(255, 244, 248, 0.74);
  --guest-action-bg: #f2c6d5;
  --guest-action-text: #281116;
  --guest-card-bg: #f3e2e7;
  --guest-card-border: rgba(242, 198, 213, 0.44);
  --guest-card-label: #42212c;
  --style-decor-content: "♡   ✦   ♡      ✧   ♡\A   ♡      ✧   ♡   ✦\A✦   ♡      ♡      ✧\A      ♡   ✧      ♡\A♡      ✦   ♡      ✧";
  --style-decor-color: #ffd8e8;
  --style-decor-glow: 0 0 18px rgba(255, 214, 232, 0.34);
  --style-decor-opacity: 0.18;
  --style-decor-size: clamp(0.86rem, 2.25vw, 1.52rem);
}

body[data-theme="cute-peach"] {
  --theme-main: #e98662;
  --theme-deep: #7d3a22;
  --theme-soft: #f5dfd2;
  --guest-bg: #1b120d;
  --guest-room-bg: radial-gradient(circle at 76% 18%, rgba(255, 210, 178, 0.24), transparent 30%),
    linear-gradient(130deg, rgba(233, 134, 98, 0.26), rgba(27, 18, 13, 0) 44%),
    repeating-linear-gradient(110deg, rgba(255, 225, 201, 0.04) 0 1px, transparent 1px 30px), #1b120d;
  --guest-overlay: linear-gradient(180deg, rgba(27, 18, 13, 0), rgba(27, 18, 13, 0.38));
  --guest-toolbar-bg: rgba(27, 18, 13, 0.78);
  --guest-accent: #ffe1c9;
  --guest-title: #fff7ef;
  --guest-copy: rgba(255, 247, 239, 0.76);
  --guest-action-bg: #ffd6b9;
  --guest-action-text: #281309;
  --guest-card-bg: #f4e6dc;
  --guest-card-border: rgba(255, 214, 185, 0.42);
  --guest-card-label: #44220f;
  --style-decor-content: "✿   ✧      ♡   ✿\A   ♡      ✿   ✧      ♡\A✧      ✿      ♡   ✧\A   ✿   ♡      ✧      ✿\A♡      ✧   ✿      ♡";
  --style-decor-color: #ffd5bd;
  --style-decor-glow: 0 0 16px rgba(255, 213, 189, 0.28);
  --style-decor-opacity: 0.17;
  --style-decor-size: clamp(0.84rem, 2.15vw, 1.46rem);
}

body[data-theme="cute-lavender"] {
  --theme-main: #9f88d5;
  --theme-deep: #4a347a;
  --theme-soft: #e6dcf3;
  --guest-bg: #151020;
  --guest-room-bg: radial-gradient(circle at 78% 16%, rgba(224, 198, 255, 0.24), transparent 32%),
    linear-gradient(120deg, rgba(159, 136, 213, 0.25), rgba(21, 16, 32, 0) 46%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 28px), #151020;
  --guest-overlay: linear-gradient(180deg, rgba(21, 16, 32, 0), rgba(21, 16, 32, 0.42));
  --guest-toolbar-bg: rgba(21, 16, 32, 0.8);
  --guest-accent: #efd9ff;
  --guest-title: #fbf6ff;
  --guest-copy: rgba(251, 246, 255, 0.75);
  --guest-action-bg: #efd9ff;
  --guest-action-text: #1b102d;
  --guest-card-bg: #eee6f4;
  --guest-card-border: rgba(239, 217, 255, 0.42);
  --guest-card-label: #2c2040;
  --style-decor-content: "✦   ♡      ✧   ⋆\A   ⋆      ✦   ♡      ✧\A♡      ✧      ✦   ⋆\A   ✦   ⋆      ♡      ✧\A⋆      ♡   ✦      ✧";
  --style-decor-color: #ead8ff;
  --style-decor-glow: 0 0 20px rgba(234, 216, 255, 0.32);
  --style-decor-opacity: 0.18;
  --style-decor-size: clamp(0.88rem, 2.2vw, 1.5rem);
}

body[data-theme="cool-night"],
body[data-theme="night"] {
  --theme-main: var(--plum);
  --theme-deep: #2a2032;
  --theme-soft: #d9d5df;
  --guest-bg: #090914;
  --guest-room-bg: radial-gradient(circle at 74% 18%, rgba(185, 167, 255, 0.2), transparent 30%),
    radial-gradient(circle at 10% 78%, rgba(141, 75, 71, 0.22), transparent 28%),
    repeating-linear-gradient(140deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 26px), #090914;
  --guest-overlay: linear-gradient(180deg, rgba(9, 9, 20, 0), rgba(9, 9, 20, 0.45));
  --guest-toolbar-bg: rgba(9, 9, 20, 0.8);
  --guest-accent: #c4b4ff;
  --guest-title: #faf7ff;
  --guest-copy: rgba(241, 236, 255, 0.75);
  --guest-action-bg: #c4b4ff;
  --guest-action-text: #12101e;
  --guest-card-bg: #e8e1f2;
  --guest-card-border: rgba(196, 180, 255, 0.38);
  --guest-card-label: #28213a;
  --style-decor-content: "✦      ◇      ✧      ◇\A   ◇      ✦      ─      ✧\A✧      ─      ◇      ✦\A   ✦      ◇      ✧      ─\A◇      ✧      ✦      ◇";
  --style-decor-color: #c4b4ff;
  --style-decor-glow: 0 0 22px rgba(196, 180, 255, 0.34);
  --style-decor-opacity: 0.13;
  --style-decor-size: clamp(0.78rem, 1.9vw, 1.3rem);
}

body[data-theme="cool-aqua"],
body[data-theme="mint"] {
  --theme-main: var(--mint);
  --theme-deep: #0f4f48;
  --theme-soft: #d6e2dc;
  --guest-bg: #0d1714;
  --guest-room-bg: radial-gradient(circle at 78% 18%, rgba(177, 226, 207, 0.16), transparent 28%),
    linear-gradient(130deg, rgba(15, 109, 98, 0.26), rgba(6, 13, 12, 0) 44%),
    repeating-linear-gradient(110deg, rgba(183, 218, 203, 0.035) 0 1px, transparent 1px 30px), #0d1714;
  --guest-overlay: linear-gradient(180deg, rgba(13, 23, 20, 0), rgba(13, 23, 20, 0.38));
  --guest-toolbar-bg: rgba(13, 23, 20, 0.78);
  --guest-accent: #9fd7c5;
  --guest-title: #edf8f2;
  --guest-copy: rgba(226, 244, 235, 0.76);
  --guest-action-bg: #a8dcca;
  --guest-action-text: #07110f;
  --guest-card-bg: #e5eee8;
  --guest-card-border: rgba(159, 215, 197, 0.38);
  --guest-card-label: #14372f;
  --style-decor-content: "◇      ✦      ◇      ·\A   ·      ◇      ✦      ◇\A✦      ◇      ·      ✦\A   ◇      ·      ◇      ✦\A·      ✦      ◇      ·";
  --style-decor-color: #9fd7c5;
  --style-decor-glow: 0 0 18px rgba(159, 215, 197, 0.28);
  --style-decor-opacity: 0.13;
  --style-decor-size: clamp(0.78rem, 1.95vw, 1.34rem);
}

body[data-theme="cool-luxe"],
body[data-theme="champagne"] {
  --theme-main: var(--gold);
  --theme-deep: #6d5526;
  --theme-soft: #efe2c3;
  --guest-bg: #17130d;
  --guest-room-bg: radial-gradient(circle at 82% 12%, rgba(241, 217, 155, 0.2), transparent 31%),
    linear-gradient(120deg, rgba(175, 146, 89, 0.2), rgba(23, 19, 13, 0) 44%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 34px), #17130d;
  --guest-overlay: linear-gradient(180deg, rgba(23, 19, 13, 0), rgba(23, 19, 13, 0.34));
  --guest-toolbar-bg: rgba(23, 19, 13, 0.78);
  --guest-accent: #f1d99b;
  --guest-title: #fff9e8;
  --guest-copy: rgba(255, 249, 232, 0.75);
  --guest-action-bg: #f1d99b;
  --guest-action-text: #15100a;
  --guest-card-bg: #f2eadb;
  --guest-card-border: rgba(241, 217, 155, 0.44);
  --guest-card-label: #3a2f1b;
  --style-decor-content: "✦      ✧      ✦      ✧\A   ✧      ✦      ✧      ✦\A✦      ✧      ✦      ✧\A   ✧      ✦      ✧      ✦\A✦      ✧      ✦      ✧";
  --style-decor-color: #f1d99b;
  --style-decor-glow: 0 0 22px rgba(241, 217, 155, 0.36);
  --style-decor-opacity: 0.14;
  --style-decor-size: clamp(0.82rem, 2.05vw, 1.42rem);
}

body[data-theme="mono-dark"],
body[data-theme="mono"] {
  --theme-main: #2f3533;
  --theme-deep: #0b0c0c;
  --theme-soft: #e8e8e2;
  --guest-bg: #0b0c0c;
  --guest-room-bg: linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 36%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 42px), #0b0c0c;
  --guest-overlay: linear-gradient(180deg, rgba(11, 12, 12, 0), rgba(11, 12, 12, 0.46));
  --guest-toolbar-bg: rgba(11, 12, 12, 0.82);
  --guest-accent: #f4f4ee;
  --guest-title: #fbfbf6;
  --guest-copy: rgba(244, 244, 238, 0.72);
  --guest-action-bg: #f4f4ee;
  --guest-action-text: #0b0c0c;
  --guest-card-bg: #f1f0eb;
  --guest-card-border: rgba(244, 244, 238, 0.36);
  --guest-card-label: #151716;
  --style-decor-content: "□      ◇      □      ◇\A   ◇      □      ◇      □\A□      ◇      □      ◇\A   ◇      □      ◇      □\A□      ◇      □      ◇";
  --style-decor-color: #f4f4ee;
  --style-decor-opacity: 0.075;
  --style-decor-size: clamp(0.72rem, 1.8vw, 1.2rem);
}

body[data-theme="mono-light"] {
  --theme-main: #70746f;
  --theme-deep: #171817;
  --theme-soft: #f1f0eb;
  --guest-bg: #f5f4ef;
  --guest-room-bg: linear-gradient(120deg, rgba(17, 20, 18, 0.06), transparent 38%),
    repeating-linear-gradient(0deg, rgba(17, 20, 18, 0.055) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(90deg, rgba(17, 20, 18, 0.035) 0 1px, transparent 1px 42px), #f5f4ef;
  --guest-overlay: linear-gradient(180deg, rgba(245, 244, 239, 0), rgba(245, 244, 239, 0.34));
  --guest-toolbar-bg: rgba(245, 244, 239, 0.84);
  --guest-accent: #1a1d1b;
  --guest-title: #111412;
  --guest-copy: rgba(17, 20, 18, 0.74);
  --guest-action-bg: #111412;
  --guest-action-text: #f5f4ef;
  --guest-card-bg: #ffffff;
  --guest-card-border: rgba(17, 20, 18, 0.18);
  --guest-card-label: #111412;
  --style-decor-content: "□      ◇      □      ◇\A   ◇      □      ◇      □\A□      ◇      □      ◇\A   ◇      □      ◇      □\A□      ◇      □      ◇";
  --style-decor-color: #171817;
  --style-decor-opacity: 0.06;
  --style-decor-size: clamp(0.72rem, 1.8vw, 1.2rem);
}

body[data-theme="custom"] {
  --theme-main: var(--custom-accent, #d7bd82);
  --theme-deep: color-mix(in srgb, var(--custom-accent, #d7bd82) 55%, #000);
  --theme-soft: color-mix(in srgb, var(--custom-accent, #d7bd82) 14%, #fff);
  --guest-bg: var(--custom-bg, #121514);
  --guest-room-bg: radial-gradient(
      circle at 78% 16%,
      color-mix(in srgb, var(--custom-accent, #d7bd82) 24%, transparent),
      transparent 31%
    ),
    linear-gradient(120deg, color-mix(in srgb, var(--custom-accent, #d7bd82) 18%, transparent), transparent 46%),
    repeating-linear-gradient(
      135deg,
      color-mix(in srgb, var(--custom-text, #f5f4ef) 5%, transparent) 0 1px,
      transparent 1px 30px
    ),
    var(--custom-bg, #121514);
  --guest-overlay: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0),
    color-mix(in srgb, var(--custom-bg, #121514) 48%, transparent)
  );
  --guest-toolbar-bg: color-mix(in srgb, var(--custom-bg, #121514) 82%, transparent);
  --guest-accent: var(--custom-accent, #d7bd82);
  --guest-title: var(--custom-text, #f5f4ef);
  --guest-copy: color-mix(in srgb, var(--custom-text, #f5f4ef) 74%, transparent);
  --guest-action-bg: var(--custom-accent, #d7bd82);
  --guest-action-text: var(--custom-action-text, #111412);
  --guest-card-bg: color-mix(in srgb, var(--custom-text, #f5f4ef) 14%, var(--custom-bg, #121514));
  --guest-card-border: color-mix(in srgb, var(--custom-accent, #d7bd82) 42%, transparent);
  --guest-card-label: var(--custom-text, #f5f4ef);
  --style-decor-content: "✦      ✧      ✦      ✧\A   ✧      ✦      ✧      ✦\A✦      ✧      ✦      ✧\A   ✧      ✦      ✧      ✦\A✦      ✧      ✦      ✧";
  --style-decor-color: var(--custom-accent, #d7bd82);
  --style-decor-glow: 0 0 18px color-mix(in srgb, var(--custom-accent, #d7bd82) 34%, transparent);
  --style-decor-opacity: 0.13;
  --style-decor-size: clamp(0.78rem, 1.95vw, 1.34rem);
}

body[data-view="host"] .guest-toolbar {
  border-bottom-color: color-mix(in srgb, var(--guest-accent, #d7bd82) 32%, transparent);
  background: var(--guest-toolbar-bg, rgba(16, 18, 16, 0.76));
  color: var(--guest-title, #f5f4ef);
}

body[data-view="host"] .guest-toolbar .eyebrow {
  color: var(--guest-accent, #d7bd82);
}

body[data-view="host"] .guest-toolbar .button.primary {
  border-color: color-mix(in srgb, var(--guest-action-bg, #d7bd82) 58%, transparent);
  background: var(--guest-action-bg, #d7bd82);
  color: var(--guest-action-text, #121514);
}

body[data-view="host"] .celebration-band {
  background: var(
    --guest-room-bg,
    linear-gradient(115deg, rgba(245, 244, 239, 0.08), rgba(245, 244, 239, 0) 42%),
    #101210
  );
  color: var(--guest-title, #f5f4ef);
}

body[data-view="host"] .celebration-band .date-label {
  color: var(--guest-accent, #d7bd82);
}

body[data-view="host"] .celebration-copy h2 {
  color: var(--guest-title, #f5f4ef);
  text-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
}

body[data-view="host"] .celebration-copy p:last-child {
  color: var(--guest-copy, rgba(245, 244, 239, 0.72));
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

body[data-view="host"] .memory-stack img {
  border-color: color-mix(in srgb, var(--guest-card-bg, #e9e4d8) 84%, white);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
}

body[data-view="guest"] .host-only,
body[data-view="host"] .guest-only {
  display: none !important;
}

.staff-return,
.session-logout {
  display: none !important;
}

body[data-view="host"][data-owner-session="true"] .staff-return {
  display: inline-flex !important;
}

body[data-view="host"][data-auth-session="true"] .session-logout {
  display: inline-flex !important;
}

body[data-view="guest"] .topbar,
body[data-view="host"] .topbar {
  border-bottom-color: color-mix(in srgb, var(--guest-accent, #d7bd82) 28%, transparent);
  background: color-mix(in srgb, var(--guest-toolbar-bg, rgba(16, 18, 16, 0.78)) 88%, #050706);
  color: var(--guest-title, #f5f4ef);
}

body[data-view="guest"] .brand small,
body[data-view="host"] .brand small {
  color: var(--guest-copy, rgba(245, 244, 239, 0.62));
}

body[data-view="guest"] .layout {
  display: block;
  max-width: none;
  margin-inline: auto;
  padding: 0;
}

body[data-view="guest"] .experience {
  border-color: transparent;
  border-radius: 0;
  background: var(--guest-bg, #101210);
  box-shadow: none;
}

body[data-view="guest"] .access-denied {
  color: var(--guest-title, #f5f4ef);
  background: var(--guest-bg, #101210);
}

body[data-view="guest"] .access-denied svg {
  color: var(--guest-accent, #d7bd82);
}

body[data-view="guest"] .access-denied p {
  color: var(--guest-copy, rgba(245, 244, 239, 0.68));
}

body[data-view="guest"] .celebration-band,
body[data-view="guest"] .gallery-section {
  display: none;
}

body[data-view="guest"][data-access="denied"] .guest-toolbar,
body[data-view="guest"][data-access="denied"] .celebration-band,
body[data-view="guest"][data-access="denied"] .floating-room,
body[data-view="guest"][data-access="denied"] .upload-panel,
body[data-view="guest"][data-access="denied"] .gallery-section {
  display: none !important;
}

body[data-view="guest"] .guest-toolbar {
  position: sticky;
  top: 72px;
  z-index: 10;
  border-bottom-color: color-mix(in srgb, var(--guest-accent, #d7bd82) 32%, transparent);
  background: var(--guest-toolbar-bg, rgba(16, 18, 16, 0.76));
  color: var(--guest-title, #f5f4ef);
  backdrop-filter: blur(16px);
}

body[data-view="guest"] .guest-toolbar .button.primary {
  border-color: color-mix(in srgb, var(--guest-action-bg, #d7bd82) 58%, transparent);
  background: var(--guest-action-bg, #d7bd82);
  color: var(--guest-action-text, #121514);
}

@media (max-width: 980px) {
  .welcome-page {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 18px;
  }

  .welcome-logo {
    width: min(520px, 100%);
  }

  .welcome-copy h1 {
    font-size: clamp(2rem, 9vw, 3.6rem);
  }

  .owner-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .owner-flow-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .owner-flow-column:nth-child(2n) {
    border-right: 0;
  }

  .owner-flow-column:nth-child(n + 3) {
    border-top: 1px solid rgba(18, 21, 20, 0.11);
  }

  .owner-grid,
  .owner-add-staff {
    grid-template-columns: 1fr;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  body[data-view="guest"] .host-panel {
    order: 2;
  }

  body[data-view="guest"] .experience {
    order: 1;
  }

  body[data-view="host"] .host-panel {
    order: 1;
  }

  body[data-view="host"] .experience {
    order: 2;
    position: static;
    max-height: none;
    overflow: hidden;
  }

  body[data-view="guest"] .celebration-band {
    grid-template-columns: 1fr;
  }

  .memory-stack {
    min-height: 320px;
  }
}

@media (max-width: 680px) {
  html {
    scroll-padding-top: 76px;
  }

  body {
    min-width: 320px;
  }

  .welcome-page {
    align-content: center;
    padding: 72px 12px 22px;
  }

  .welcome-actions {
    top: 12px;
    right: 12px;
  }

  .language-button,
  .owner-entry-button,
  .owner-back-button {
    min-height: 28px;
    padding: 5px 8px;
  }

  .welcome-brand-panel {
    gap: 18px;
  }

  .welcome-copy h1,
  .welcome-copy p:last-child {
    display: none;
  }

  .auth-panel {
    padding: 20px 16px;
  }

  .owner-page {
    padding: 14px 12px 28px;
  }

  .owner-topbar {
    align-items: flex-start;
    margin-bottom: 24px;
  }

  .owner-actions {
    flex-direction: column;
    align-items: flex-end;
  }

  .owner-heading h1 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .owner-heading-row {
    align-items: stretch;
    flex-direction: column;
  }

  .owner-create-link {
    width: 100%;
  }

  .owner-stat-grid {
    grid-template-columns: 1fr;
  }

  .owner-flow-card {
    grid-template-columns: 1fr;
  }

  .owner-flow-column,
  .owner-flow-column:nth-child(2n) {
    border-right: 0;
  }

  .owner-flow-column + .owner-flow-column {
    border-top: 1px solid rgba(18, 21, 20, 0.11);
  }

  .owner-flow-list {
    max-height: 260px;
  }

  .owner-flow-meta-grid {
    grid-template-columns: 1fr;
  }

  .owner-table-card {
    padding: 16px;
  }

  .topbar {
    align-items: center;
    min-height: 64px;
    padding: max(10px, env(safe-area-inset-top)) 12px 10px;
  }

  .brand small {
    display: none;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-mark-logo {
    mask-size: 112px auto;
    -webkit-mask-size: 112px auto;
  }

  .brand strong {
    font-size: 0.98rem;
    white-space: nowrap;
  }

  .layout {
    gap: 12px;
    padding: 12px;
  }

  body[data-view="host"] .layout {
    padding-top: 10px;
  }

  body[data-view="host"] .mobile-style-preview {
    position: sticky;
    top: 74px;
    z-index: 8;
    display: grid;
    min-height: 176px;
    margin: 0 0 4px;
    padding: 16px 14px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--guest-accent, #d7bd82) 26%, transparent);
    border-radius: 8px;
    background: var(
      --guest-room-bg,
      linear-gradient(115deg, rgba(245, 244, 239, 0.08), rgba(245, 244, 239, 0) 42%),
      #101210
    );
    color: var(--guest-title, #f5f4ef);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
    isolation: isolate;
  }

  body[data-view="host"] .mobile-style-preview::before {
    content: var(--style-decor-content, "");
    position: absolute;
    inset: -34% -18%;
    z-index: 0;
    color: var(--style-decor-color, rgba(255, 255, 255, 0.36));
    font-family: Georgia, "Times New Roman", ui-serif, serif;
    font-size: var(--style-decor-size, 1rem);
    font-weight: 800;
    line-height: var(--style-decor-line, 3);
    opacity: var(--style-decor-opacity, 0.14);
    pointer-events: none;
    text-shadow: var(--style-decor-glow, none);
    transform: rotate(-8deg);
    white-space: pre;
    word-spacing: 1.6rem;
  }

  body[data-view="host"] .mobile-style-preview > * {
    position: relative;
    z-index: 1;
  }

  body[data-view="host"] .mobile-style-preview .date-label {
    margin: 0 0 8px;
    color: var(--guest-accent, #d7bd82);
    font-size: 0.72rem;
  }

  body[data-view="host"] .mobile-style-preview h2 {
    margin: 0;
    max-width: 72%;
    color: var(--guest-title, #f5f4ef);
    font-size: min(var(--headline-mobile-size, 2.8rem), 2.55rem);
    line-height: 0.92;
    text-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
  }

  body[data-view="host"] .mobile-style-preview p:last-of-type {
    display: -webkit-box;
    max-width: 60%;
    margin: 10px 0 0;
    overflow: hidden;
    color: var(--guest-copy, rgba(245, 244, 239, 0.72));
    font-size: 0.82rem;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .mobile-style-preview-stack {
    position: absolute !important;
    right: 12px;
    bottom: 12px;
    width: 34%;
    min-width: 108px;
    height: 118px;
  }

  .mobile-style-preview-stack span {
    position: absolute;
    display: block;
    width: 72px;
    aspect-ratio: 4 / 5;
    border: 5px solid color-mix(in srgb, var(--guest-card-bg, #e9e4d8) 84%, white);
    border-radius: 7px;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.12)),
      var(--guest-card-bg, #e9e4d8);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  }

  .mobile-style-preview-stack span:nth-child(1) {
    right: 8px;
    top: 0;
    transform: rotate(5deg);
  }

  .mobile-style-preview-stack span:nth-child(2) {
    left: 0;
    top: 28px;
    transform: rotate(-7deg);
  }

  .mobile-style-preview-stack span:nth-child(3) {
    right: 0;
    bottom: 0;
    width: 58px;
    transform: rotate(2deg);
  }

  .panel-section {
    padding: 16px;
  }

  .panel-section h1 {
    font-size: 1.32rem;
  }

  .manager-panel {
    position: static;
  }

  .event-list {
    max-height: 230px;
  }

  .event-row {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .event-select,
  .event-delete {
    min-height: 68px;
  }

  .guest-toolbar,
  .section-heading,
  .upload-grid {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .guest-toolbar {
    display: grid;
    min-height: auto;
    padding: 14px 16px;
  }

  .guest-toolbar h2 {
    font-size: 1.08rem;
  }

  .button {
    min-height: 46px;
    padding: 10px 13px;
  }

  .button-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .qr-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .qr-card canvas {
    width: 96px;
    height: 96px;
  }

  .security-note {
    align-items: flex-start;
  }

  input[type="text"],
  input[type="date"],
  input[type="email"],
  input[type="password"],
  textarea {
    font-size: 16px;
  }

  .celebration-band {
    padding: 26px 18px;
    min-height: unset;
  }

  .celebration-copy h2 {
    font-size: var(--headline-mobile-size, 3.15rem);
  }

  .floating-room {
    min-height: calc(100svh - 64px);
  }

  .floating-copy {
    left: 18px;
    top: 20px;
    width: calc(100% - 36px);
  }

  .floating-copy h2 {
    font-size: var(--headline-mobile-size, 3.35rem);
  }

  .floating-copy p:last-child {
    width: min(30ch, 100%);
    font-size: 0.96rem;
  }

  .floating-card {
    width: clamp(126px, 43vw, 188px);
    padding-bottom: 36px;
  }

  .floating-layer.is-dense .floating-card {
    width: clamp(74px, 24vw, 126px);
    padding: 4px 4px 24px;
  }

  .floating-layer.is-dense .floating-card:nth-child(3n + 1) {
    width: clamp(84px, 27vw, 142px);
  }

  .floating-layer.is-dense .floating-card-label {
    left: 7px;
    right: 7px;
    bottom: 7px;
    font-size: 0.62rem;
  }

  .memory-stack {
    min-height: 280px;
  }

  .memory-stack img {
    border-width: 7px;
  }

  .button {
    width: 100%;
  }

  .button.text {
    width: auto;
  }

  .top-actions .button {
    width: auto;
  }

  body[data-view="guest"] .guest-toolbar {
    position: relative;
    top: auto;
    z-index: 6;
  }

  body[data-view="guest"] #addMediaButton {
    display: none;
  }

  body[data-view="guest"] .mobile-add-fab {
    position: fixed;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 45;
    display: grid;
    place-items: center;
    width: 64px;
    min-width: 64px;
    height: 64px;
    min-height: 64px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--guest-action-bg, #d7bd82) 68%, transparent);
    background: var(--guest-action-bg, #d7bd82);
    color: var(--guest-action-text, #111412);
    box-shadow:
      0 18px 48px rgba(0, 0, 0, 0.38),
      0 0 0 1px rgba(255, 255, 255, 0.28) inset;
  }

  body[data-view="guest"] .mobile-add-fab svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  body[data-view="guest"] .mobile-add-fab:disabled {
    opacity: 0.48;
  }

  body[data-view="guest"][data-access="denied"] .mobile-add-fab {
    display: none !important;
  }

  body[data-view="guest"] .floating-room {
    min-height: max(560px, calc(100svh - 198px));
  }

  body[data-view="guest"] .upload-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 55;
    max-height: min(72svh, 560px);
    overflow: auto;
    margin: 0;
    padding: 16px;
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.45);
  }

  body[data-view="guest"] .upload-panel h3 {
    margin-top: 0;
  }

  body[data-view="guest"] .drop-zone {
    display: none;
  }

  body[data-view="guest"] .upload-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  body[data-view="guest"] .camera-upload-button {
    display: inline-flex;
  }

  .lightbox {
    padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  }

  .lightbox-panel {
    width: 100%;
    max-height: calc(100svh - 20px);
  }

  .lightbox-media {
    min-height: 54svh;
  }

  .lightbox-media img,
  .lightbox-media video {
    max-height: 58svh;
  }

  .lightbox-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .lightbox-actions {
    display: grid !important;
    grid-template-columns: 1fr;
  }

  .lightbox-actions .button {
    width: 100%;
  }
}
