:root {
  color-scheme: light;
  --bg: #f4f5f2;
  --surface: #fff;
  --ink: #172b35;
  --muted: #708087;
  --line: #e1e7e3;
  --green: #ceeadd;
  --accent: #b6dcca;
  --dark: #101d25;
  --coral: #efb59a;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #27806c;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  letter-spacing: -0.045em;
  line-height: 1.13;
  margin-bottom: 10px;
}
h2 {
  font-size: 1.5rem;
  letter-spacing: -0.035em;
  margin-bottom: 12px;
}
h3 {
  font-size: 1rem;
}
small {
  font-size: 0.72rem;
}
a {
  text-decoration: none;
}
.muted {
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.65;
}
.kicker {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin-bottom: 14px;
}
.boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.brand-lockup {
  display: grid;
  justify-items: start;
  gap: 10px;
  color: white;
  font-weight: 700;
  font-size: 0.88rem;
}
.scenesite-name { font-size: 2rem; letter-spacing: -.065em; line-height: 1; font-weight: 700; }
.scenesite-name > span { color: var(--green); font-weight: 500; }
.powered-by { display: flex; align-items: center; gap: 8px; font-size: .56rem; font-weight: 400; color: #a7bdbf; letter-spacing: .035em; }
.powered-by img { display: block; width: 104px; height: auto; }
.login-story .scenesite-name { font-size: 2.7rem; }
.login-story .powered-by { font-size: .65rem; gap: 12px; }
.login-story .powered-by img { width: 140px; }
.provider-credit { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-end; gap: 12px; color: var(--muted); container-type: inline-size; }
.provider-credit img { width: 110px; height: auto; display: block; filter: brightness(0); opacity: .65; }
.provider-credit p { font-size: min(.69rem, 2.5cqw); line-height: 1.7; margin: 0; text-align: right; white-space: nowrap; }
.provider-credit p a { color: var(--ink); }
.admins-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.admins-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.admins-heading h2 { margin-bottom: 0; }
.admins-card > .muted { margin-top: 20px; }
.admin-row { display: flex; align-items: center; gap: 14px; padding: 22px 0; border-top: 1px solid var(--line); }
.admin-avatar { flex: 0 0 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: #eaf0ed; font-size: .8rem; font-weight: 600; color: #4d7368; }
.admin-avatar.founder { background: #ede9f3; color: #735a91; }
.admin-details { flex: 1; min-width: 0; display: grid; gap: 9px; }
.admin-details > strong { font-size: .85rem; overflow-wrap: anywhere; }
.admin-details > small { font-size: .68rem; }
.admin-details > .admin-email { font-size: .72rem; overflow-wrap: anywhere; }
.admin-actions { display: grid; gap: 6px; flex-shrink: 0; }
.admin-actions button { min-height: 44px; }
.admin-protection { display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: start; gap: 8px; min-height: 44px; padding: 6px 0; cursor: pointer; }
.admin-protection input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: #52755d; }
.admin-protection strong { display: block; color: #546e5a; font-size: .72rem; font-weight: 500; line-height: 1.5; }
.admin-protection small { display: block; margin-top: 3px; color: var(--muted); font-size: .6875rem; line-height: 1.6; }
.admin-protection:has(input:disabled) { cursor: default; opacity: .7; }
.admin-protection-status { color: #54715a; }
.admin-protection-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0; color: #6c735e; font-size: .75rem; line-height: 1.6; }
.admin-protection-notice .btn { min-height: 44px; }
.account-profile-form { border-bottom: 1px solid var(--line); padding-bottom: 24px; margin-bottom: 24px; }
.admin-role { display: flex; align-items: center; gap: 10px; }
.role-badge { display: inline-block; padding: 4px 8px; border-radius: 5px; font-size: .63rem; background: #edf3f0; color: #43675c; }
.role-badge.founder { background: #ede9f3; color: #735a91; }
.admin-row .remove-admin { font-size: .72rem; padding: 9px; color: #a04449; }
.btn.danger { background: #a6424b; color: white; border-color: #a6424b; }
.admin-create-form .btn { width: 100%; justify-content: space-between; }
.admin-create-form { display: grid; gap: 18px; }
.admin-create-form .muted, .admin-create-form .error-text { margin: 0; }
.admin-create-form .error-text:empty { display: none; }
.managing-admins .action-bar { display: none; }
.managing-admins .main-content { padding-bottom: 40px; }
#delete-admin-email { overflow-wrap: anywhere; }
@media (max-width: 1100px) { .admins-layout { grid-template-columns: 1fr; } }
@media (max-width: 680px) {
  .provider-credit { align-items: flex-end; }
  .provider-credit p { text-align: right; }
  .sidebar .scenesite-name { font-size: 1.7rem; }
  .sidebar .powered-by { gap: 5px; font-size: .49rem; }
  .sidebar .powered-by img { width: 83px; }
  .sidebar .brand-lockup { max-width: calc(100% - 150px); }
  .admin-row { gap: 10px; }
  .admin-avatar { flex-basis: 32px; height: 32px; font-size: .65rem; }
}
.login-screen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100svh;
}
.login-story {
  padding: 52px clamp(36px, 6vw, 100px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 80px;
  color: white;
  background:
    radial-gradient(ellipse at 100% 80%, #284c4b, transparent 70%), var(--dark);
  position: relative;
  overflow: hidden;
}
.login-story:after {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  border: 1px solid #b6dcca18;
  border-radius: 50%;
  right: -270px;
  bottom: -100px;
  box-shadow:
    0 0 0 70px #b6dcca08,
    0 0 0 140px #b6dcca04;
  pointer-events: none;
}
.login-story h1 {
  font-size: clamp(3rem, 5.8vw, 5.7rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.065em;
}
.login-story .kicker {
  color: var(--accent);
}
.login-story p {
  line-height: 1.8;
  color: #a7bdbf;
}
.story-footer {
  font-size: 0.72rem;
  color: #8ea2ab;
}
.login-form-wrap {
  display: grid;
  place-items: center;
  padding: 40px;
}
.login-form {
  width: min(390px, 100%);
}
.login-form h2 {
  font-size: 2.4rem;
}
.login-form label:first-of-type {
  margin-top: 34px;
}
.login-form .btn {
  width: 100%;
  margin-top: 6px;
  justify-content: space-between;
}
.quiet-link {
  display: block;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 24px;
}
.app-shell {
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--dark);
  color: #9cafb5;
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 30px 20px 20px;
  overflow-y: auto;
}
.sidebar .brand-lockup {
  padding: 0 8px 24px;
}
.site-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  padding: 14px 12px;
  border: 1px solid #ffffff14;
  border-radius: 10px;
  color: #e2eeeb;
  margin-bottom: 24px;
}
.site-switch > span:nth-child(2) {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.nav-caption {
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  padding: 12px 12px 8px;
  color: #687f89;
}
.nav-link {
  display: flex;
  gap: 11px;
  align-items: center;
  font-size: 0.76rem;
  padding: 10px 12px;
  border-radius: 8px;
  margin: 2px 0;
  line-height: 1.4;
}
.nav-link:hover {
  background: #ffffff08;
  color: white;
}
.nav-link.active {
  background: var(--green);
  color: var(--dark);
  font-weight: 700;
}
.nav-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  opacity: 0.8;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 30px;
}
.account-button {
  background: none;
  border: 0;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  width: 100%;
  padding: 10px 4px;
}
.avatar {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid #ffffff24;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.6rem;
  color: var(--accent);
}
.account-button > span:last-child {
  flex: 1;
  min-width: 0;
}
.account-button strong {
  display: block;
  font-size: 0.74rem;
  overflow-wrap: anywhere;
}
.account-button small {
  display: block;
  color: #8097a0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 4px;
}
.logout {
  border: 0;
  background: none;
  font-size: 0.72rem;
  color: #9cafb5;
  padding: 8px 48px;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 76px;
  border-bottom: 1px solid var(--line);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.breadcrumb {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.breadcrumb span {
  margin: 0 12px;
  color: #b3bebb;
}
.breadcrumb strong {
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0;
}
.visit-link {
  font-size: 0.73rem;
  font-weight: 600;
  white-space: nowrap;
}
.main-content {
  max-width: 1380px;
  padding: 42px 40px 130px;
  margin: auto;
}
.page-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}
.page-heading .kicker {
  color: var(--muted);
  margin-bottom: 10px;
}
.page-heading .muted {
  margin: 0;
}
.stats-period-notice {
  margin: 16px 0 0;
  padding: 14px 18px;
  border: 1px solid #bddbc8;
  border-left: 4px solid #52866a;
  border-radius: 10px;
  background: #e5f2e9;
  color: #28543d;
  font-size: .82rem;
  line-height: 1.65;
}
.badge {
  border: 1px solid #cfe2d8;
  background: #e6f1ea;
  font-size: 0.65rem;
  color: #3c6c56;
  white-space: nowrap;
  border-radius: 40px;
  padding: 8px 12px;
}
.badge.draft {
  background: #fff0e5;
  border-color: #f0dac8;
  color: #945a33;
}
.welcome-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  min-height: 270px;
  background:
    radial-gradient(ellipse at 75% 30%, #365d59, transparent 70%), var(--dark);
  padding: 36px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.welcome-card:after {
  content: "";
  position: absolute;
  right: -80px;
  top: -150px;
  width: 420px;
  height: 420px;
  border: 1px solid #a8d3bc33;
  border-radius: 50%;
  box-shadow: 0 0 0 60px #a8d3bc0a;
  pointer-events: none;
}
.welcome-card > div {
  position: relative;
  z-index: 1;
}
.welcome-card h2 {
  font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  max-width: 480px;
}
.welcome-card p {
  max-width: 460px;
  color: #adbfbe;
  font-size: 0.84rem;
  line-height: 1.8;
}
.welcome-card .kicker {
  color: var(--accent);
}
.welcome-image {
  width: 230px;
  aspect-ratio: 1.5;
  object-fit: cover;
  border-radius: 10px;
  transform: rotate(3deg);
  border: 6px solid #ffffff14;
  position: relative;
  z-index: 1;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 17px;
  min-height: 42px;
  font-weight: 600;
  font-size: 0.76rem;
  line-height: 1.3;
  transition:
    background 0.15s,
    transform 0.15s;
}
.btn:hover {
  filter: brightness(0.97);
}
.primary {
  background: var(--green);
  color: #17382d;
  border-color: #bddbc9;
}
.secondary {
  background: white;
  border-color: #d8e0db;
  color: var(--ink);
}
.quiet {
  background: transparent;
  color: var(--muted);
  padding-inline: 9px;
}
.danger {
  color: #a34135;
  background: #fff3ee;
  border-color: #f1d6cc;
}
.btn.small {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 0.7rem;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 32px;
}
.stat-card {
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.stat-card strong {
  font-size: 2rem;
  letter-spacing: -0.05em;
  display: block;
}
.stat-card span {
  font-size: 0.74rem;
  color: var(--muted);
}
.stat-icon {
  font-size: 1.5rem !important;
  border-radius: 12px;
  padding: 12px;
  background: #f2f6f2;
  color: #537968 !important;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 30px 0 15px;
}
.section-title h2 {
  font-size: 1.05rem;
  margin: 0;
}
.section-title span {
  color: var(--muted);
  font-size: 0.74rem;
}
.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.quick-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.quick-card:hover {
  border-color: #a9c9b8;
}
.quick-card > span:first-child {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: #f3f5ee;
  border-radius: 10px;
  font-size: 1.2rem;
}
.quick-card strong {
  font-size: 0.85rem;
  display: block;
}
.quick-card small {
  display: block;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 5px;
}
.quick-card > span:last-child {
  margin-left: auto;
}
.info-note {
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 20px;
  font-size: 0.77rem;
  color: var(--muted);
  line-height: 1.7;
}
.form-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.field {
  min-width: 0;
}
.field.full {
  grid-column: 1/-1;
}
label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 0.77rem;
  font-weight: 600;
}
input,
textarea {
  width: 100%;
  border: 1px solid #dce4de;
  background: #fafbf9;
  padding: 12px 13px;
  border-radius: 7px;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.5;
}
input:hover,
textarea:hover {
  border-color: #b6c6bc;
}
input:focus,
textarea:focus {
  border-color: #5c9980;
  background: white;
}
textarea {
  resize: vertical;
  min-height: 100px;
}
input[type="color"] {
  height: 48px;
  padding: 5px;
  cursor: pointer;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #387b60;
}
.checkbox-label {
  flex-direction: row;
  align-items: center;
  min-height: 48px;
  padding-top: 15px;
}
.field-hint {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 7px 0 0;
  font-weight: 400;
}
.field-error {
  color: #a53d31;
  font-size: 0.72rem;
  margin-top: 6px;
}
[aria-invalid="true"] {
  border-color: #bb5949;
}
.image-field {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  align-items: center;
  padding: 18px;
  border: 1px dashed #cddbd2;
  border-radius: 9px;
  background: #fafcf9;
  margin-top: 10px;
}
.image-field img {
  width: 100%;
  height: 112px;
  object-fit: contain;
  border-radius: 5px;
  background: repeating-conic-gradient(#e4eae5 0% 25%, #f5f7f2 0% 50%) 50%/20px
    20px;
}
.image-field .empty-image {
  height: 112px;
  display: grid;
  place-items: center;
  background: #e9efea;
  border-radius: 5px;
  color: #71877a;
  font-size: 0.75rem;
}
.image-name {
  overflow-wrap: anywhere;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.list-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 28px 0 16px;
}
.list-heading h2 {
  overflow-wrap: anywhere;
  margin: 0;
  font-size: 1.15rem;
}
.repeater-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  margin-bottom: 12px;
  overflow: hidden;
}
.repeater-card summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  list-style: none;
}
.repeater-card summary::-webkit-details-marker {
  display: none;
}
.repeater-card summary:after {
  content: "+";
  margin-left: auto;
  color: var(--muted);
  font-size: 1.3rem;
}
.repeater-card[open] summary:after {
  content: "−";
}
.item-number {
  font-size: 0.69rem;
  color: #86978d;
  min-width: 20px;
}
.item-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  background: #e9efea;
}
.item-title {
  font-size: 0.84rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.item-subtitle {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--muted);
  display: block;
  margin-top: 4px;
}
.repeater-body {
  padding: 6px 24px 24px;
}
.repeater-actions {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 22px;
  gap: 12px;
}
.empty-state {
  text-align: center;
  padding: 48px 25px;
  background: white;
  border: 1px dashed #cbd8ce;
  border-radius: 12px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.85rem;
}
.action-bar {
  position: fixed;
  z-index: 10;
  bottom: 0;
  left: 255px;
  right: 0;
  padding: 16px 32px;
  border-top: 1px solid var(--line);
  background: #fafcf9f5;
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.save-state {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 110px;
}
.save-state strong {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
}
.save-state small {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  margin-top: 4px;
}
.save-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5a9879;
  flex-shrink: 0;
}
.save-dot.dirty {
  background: #d99458;
}
.action-buttons {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}
.action-buttons .btn {
  min-height: 44px;
}
.media-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 22px;
}
.media-toolbar input[type="search"] {
  max-width: 360px;
  background: white;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.media-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  min-width: 0;
  text-align: left;
  padding: 0;
  color: var(--ink);
}
button.media-card:hover {
  border-color: #569977;
  box-shadow: 0 0 0 2px #d7e8dc;
}
.media-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1.5;
  object-fit: contain;
  background: repeating-conic-gradient(#edf0e9 0% 25%, #f7f9f3 0% 50%) 50%/20px
    20px;
}
.media-caption {
  padding: 14px;
}
.media-caption strong {
  display: block;
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-caption small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
  font-size: 0.66rem;
}
.media-used {
  font-size: 0.6rem;
  background: #e4efe7;
  color: #497358;
  border-radius: 20px;
  display: inline-block;
  padding: 4px 7px;
  margin-top: 9px;
}
.history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 12px;
}
.history-row strong {
  display: block;
  font-size: 0.84rem;
}
.history-row small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}
.error-text {
  font-size: 0.8rem;
  color: #a53d31;
  line-height: 1.6;
}
.error-banner {
  border: 1px solid #e9bcb0;
  background: #fff1eb;
  border-radius: 10px;
  padding: 18px;
  color: #933e32;
  font-size: 0.81rem;
  line-height: 1.6;
  margin-bottom: 20px;
  white-space: pre-line;
}
.login-form label,
#password-form label {
  margin-bottom: 20px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  max-width: min(500px, calc(100vw - 32px));
  width: 100%;
  max-height: 85svh;
  overflow: auto;
  color: var(--ink);
  background: var(--bg);
  box-shadow: 0 30px 120px #0005;
}
dialog::backdrop {
  background: #091820a6;
  backdrop-filter: blur(5px);
}
dialog.media-dialog {
  max-width: min(1040px, calc(100vw - 32px));
}
.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.dialog-header .kicker {
  color: var(--muted);
  margin-bottom: 8px;
}
.icon-button {
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: white;
  font-size: 1.4rem;
  color: var(--muted);
}
.toast {
  position: fixed;
  z-index: 100;
  bottom: 104px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: white;
  border: 1px solid #39534d;
  border-radius: 10px;
  padding: 14px 22px;
  font-size: 0.8rem;
  box-shadow: 0 10px 50px #0003;
  max-width: min(620px, calc(100vw - 32px));
  line-height: 1.6;
}
.toast.error {
  background: #702f27;
  border-color: #aa5a43;
}
.upload-label input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.upload-label:focus-within {
  outline: 3px solid #27806c;
  outline-offset: 3px;
}
.upload-label {
  cursor: pointer;
}
.loading {
  padding: 50px;
  color: var(--muted);
  text-align: center;
}
@media (min-width: 1600px) {
  .media-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1200px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .sidebar {
    padding-inline: 14px;
  }
  .main-content {
    padding: 30px 24px 180px;
  }
  .topbar {
    padding-inline: 24px;
  }
  .action-bar {
    left: 220px;
    padding: 14px 20px;
    flex-wrap: wrap;
  }
  .action-buttons {
    margin-left: auto;
  }
  .toast {
    bottom: 140px;
  }
  .welcome-image {
    width: 170px;
  }
  .welcome-card {
    padding: 28px;
  }
  .form-card {
    padding: 22px;
  }
  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .save-state small {
    max-width: 130px;
  }
  .btn {
    padding-inline: 12px;
  }
}
@media (max-width: 900px) {
  .main-content {
    padding-bottom: 210px;
  }
  .action-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .save-state {
    justify-content: center;
  }
  .save-state > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }
  .save-state small {
    margin: 0;
    max-width: none;
  }
  .action-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-left: 0;
  }
  .action-buttons .btn {
    min-width: 0;
  }
  .toast {
    bottom: 190px;
  }
  .welcome-image {
    display: none;
  }
  .stats-grid {
    gap: 10px;
  }
  .stat-card {
    padding: 16px;
  }
  .stat-icon {
    display: none;
  }
  .quick-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .quick-card {
    padding: 18px;
  }
  .field.full {
    grid-column: auto;
  }
  .image-field {
    grid-template-columns: 130px 1fr;
  }
  .breadcrumb {
    letter-spacing: 0;
  }
  .breadcrumb span {
    margin-inline: 6px;
  }
  .visit-link {
    font-size: 0.67rem;
  }
}
@media (max-width: 680px) {
  .login-screen {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 28px;
    gap: 36px;
    min-height: 280px;
  }
  .login-story h1 {
    font-size: 2.8rem;
  }
  .login-story p {
    display: none;
  }
  .login-form-wrap {
    padding: 36px 24px;
  }
  .app-shell {
    display: block;
  }
  .sidebar {
    position: relative;
    top: auto;
    height: auto;
    padding: 18px 16px 12px;
  }
  .sidebar .brand-lockup {
    padding: 0 0 14px;
  }
  .site-switch {
    position: absolute;
    right: 16px;
    top: 18px;
    padding: 9px;
    margin: 0;
    max-width: 150px;
  }
  .sidebar nav {
    display: flex;
    overflow-x: auto;
    gap: 5px;
    padding-bottom: 5px;
  }
  .nav-link {
    flex: 0 0 auto;
    padding: 9px 11px;
    white-space: nowrap;
    font-size: 0.71rem;
  }
  .nav-caption,
  .sidebar-bottom {
    display: none;
  }
  .topbar {
    height: 56px;
    padding-inline: 18px;
  }
  .main-content {
    padding: 26px 16px calc(210px + env(safe-area-inset-bottom, 0px));
  }
  .page-heading {
    align-items: flex-start;
    margin-bottom: 22px;
  }
  .page-heading .badge {
    font-size: 0.6rem;
    padding: 7px 9px;
  }
  .page-heading .muted {
    font-size: 0.8rem;
  }
  .welcome-card {
    min-height: 260px;
    padding: 25px;
  }
  .welcome-card h2 {
    font-size: 1.9rem;
  }
  .stats-grid {
    margin-top: 14px;
    gap: 8px;
  }
  .stat-card {
    padding: 15px 12px;
  }
  .stat-card strong {
    font-size: 1.65rem;
  }
  .stat-card span {
    font-size: 0.65rem;
  }
  .quick-grid {
    gap: 10px;
  }
  .action-bar {
    left: 0;
    padding: 12px 10px calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .action-buttons .btn {
    font-size: 0.72rem;
    min-height: 44px;
    padding-inline: 10px;
    flex: 1;
    gap: 5px;
  }
  .action-buttons {
    gap: 8px;
  }
  .save-state strong {
    font-size: 0.67rem;
  }
  .save-state small {
    font-size: 0.6rem;
  }
  .form-card {
    padding: 20px 16px;
  }
  .image-field {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .image-field img,
  .image-field .empty-image {
    height: 150px;
  }
  .repeater-card summary {
    padding: 16px;
  }
  .repeater-body {
    padding: 4px 16px 20px;
  }
  .media-grid {
    gap: 12px;
  }
  .media-toolbar {
    flex-wrap: wrap;
  }
  .media-toolbar input[type="search"] {
    max-width: none;
    flex: 1;
    min-width: 150px;
  }
  .media-caption {
    padding: 11px;
  }
  .media-caption strong {
    font-size: 0.67rem;
  }
  .media-caption small {
    font-size: 0.6rem;
  }
  .history-row {
    padding: 16px;
    gap: 10px;
  }
  .history-row .btn {
    font-size: 0.67rem;
  }
  .toast {
    bottom: calc(190px + env(safe-area-inset-bottom, 0px));
  }
  dialog {
    padding: 22px 16px;
  }
  .dialog-header h2 {
    font-size: 1.3rem;
  }
}
.sharing-preview { max-width:650px; margin:0 0 26px; overflow:hidden; border:1px solid var(--line); border-radius:16px; background:white; box-shadow:0 8px 30px #10182008; }
.sharing-preview > img { display:block; width:100%; height:auto; aspect-ratio:1.91; object-fit:contain; background:#05080b; }
.sharing-preview > div { padding:24px; }
.sharing-preview h2 { margin:10px 0; font-size:1.3rem; line-height:1.3; overflow-wrap:anywhere; }
.sharing-preview p { font-size:.85rem; line-height:1.7; color:var(--muted); overflow-wrap:anywhere; }
.sharing-preview > small { display:block; border-top:1px solid var(--line); padding:14px 24px; color:var(--muted); font-size:.7rem; }
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* SceneSite-komponenter med turnévalg og billettklikk. */
select {
  width: 100%; border: 1px solid #dce4de; background: #fafbf9;
  padding: 12px 13px; border-radius: 7px; color: var(--ink);
  font: inherit; font-size: .86rem; line-height: 1.5;
}
select:focus-visible { outline: 3px solid #27806c; outline-offset: 3px; }
select:disabled { opacity: .6; }
.nav-settings { margin-top: 12px; }
.nav-settings > summary { cursor: pointer; font-size: .73rem; font-weight: 600; padding: 12px; color: #b6c8ca; }
.nav-settings > summary:focus-visible { outline: 3px solid #b6dcca; outline-offset: -2px; }
.nav-settings[open] > summary { color: white; }
.quick-card { width: 100%; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.dashboard-clicks { margin-top: 32px; }
.tour-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.tour-choice { display: grid; gap: 9px; text-align: left; padding: 20px; border-radius: 12px; border: 1px solid var(--line); background: white; color: var(--ink); min-width: 0; }
.tour-choice:hover { border-color: #a9c9b8; }
.tour-choice.selected { border: 2px solid #56826c; padding: 19px; background: #edf5ef; }
.tour-choice .tour-year { font-size: 1.6rem; letter-spacing: -.04em; font-weight: 700; }
.tour-choice strong { font-size: .85rem; overflow-wrap: anywhere; }
.tour-choice small { color: var(--muted); font-size: .7rem; line-height: 1.5; }
.new-tour > summary, .upcoming-copy > summary, .import-history > summary { cursor: pointer; font-size: .85rem; font-weight: 600; }
.new-tour[open] > summary, .upcoming-copy[open] > summary, .import-history[open] > summary { margin-bottom: 22px; }
.new-tour .full, .new-tour .error-text { grid-column: 1 / -1; margin: 0; }
.new-tour button[type="submit"] { justify-self: start; }
.upcoming-copy { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.tour-editor > .list-heading { margin-top: 0; }
.tour-editor > .form-grid { margin-top: 22px; }
.event-flags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.event-flag { display: flex; flex-direction: row; align-items: center; gap: 8px; padding: 11px 13px; border: 1px solid #e8b4b4; border-radius: 8px; background: #fff4f4; color: #a61111; font-size: .71rem; cursor: pointer; }
.event-flag.checked { border-color: #b80000; background: #c00; color: white; }
.event-flag.coming { border-color: #d0d0d0; background: #f3f3f3; color: #555; }
.event-flag.coming.checked { border-color: #686868; background: #777; color: white; }
.event-flag input { accent-color: #b80000; }
.event-flag.coming input { accent-color: #666; }
.event-flag:focus-within { outline: 3px solid #27806c; outline-offset: 3px; }
.event-flag input { margin: 0; }
.concert-card .repeater-actions { align-items: center; }
.concert-card .repeater-actions p { margin: 0; max-width: 65%; }
.page-field-card { padding-block: 22px; }
.page-field-card > .btn { margin-top: 16px; }
.add-video-form { margin-top: 18px; display: grid; gap: 12px; }
.add-video-form > .btn { justify-self: start; }
.stats-toolbar { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin-bottom: 24px; }
.stats-toolbar label { flex: 1; max-width: 420px; }
.stats-live-tools { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 9px 16px; }
.stats-live-status { color: var(--muted); font-size: .68rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stats-refresh-error { margin: -10px 0 20px; color: #906737; font-size: .73rem; line-height: 1.6; }
.table-wrap { overflow-x: auto; margin: 26px 0; border: 1px solid var(--line); border-radius: 12px; background: white; }
.click-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .8rem; }
.click-table caption { text-align: left; padding: 22px; font-size: 1.05rem; font-weight: 600; }
.click-table th, .click-table td { padding: 15px 20px; border-top: 1px solid var(--line); }
.click-table thead { background: #f2f6f2; color: #4d685a; }
.click-table thead th { font-size: .7rem; white-space: nowrap; }
.click-table th:not(:first-child), .click-table td { text-align: right; font-variant-numeric: tabular-nums; }
.click-table tbody th { min-width: 220px; font-weight: 500; }
.click-table tbody small { display: block; margin-top: 6px; color: var(--muted); font-size: .69rem; font-weight: 400; }
.click-table tfoot { background: #edf5ef; font-weight: 700; }
.import-history p { margin-top: 16px; }
@media (max-width: 1000px) { .tour-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) {
  .nav-settings { flex: 0 0 auto; margin-top: 0; }
  .nav-settings > summary { padding: 9px 11px; font-size: .71rem; }
  .nav-settings[open] { display: flex; }
  .nav-settings .nav-link { display: inline-flex; }
  .tour-picker { grid-template-columns: 1fr 1fr; gap: 9px; }
  .tour-choice { padding: 15px; }
  .tour-choice.selected { padding: 14px; }
  .tour-choice .tour-year { font-size: 1.35rem; }
  .event-flags { display: grid; grid-template-columns: 1fr 1fr; }
  .event-flag { font-size: .64rem; padding: 10px; }
  .concert-card .repeater-actions { align-items: flex-start; flex-direction: column; }
  .concert-card .repeater-actions p { max-width: none; }
  .click-table th, .click-table td { padding: 13px; }
  .click-table caption { padding: 18px; }
  .stats-toolbar { align-items: stretch; }
}
.badge-edit-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.badge-edit-row h3 { margin-bottom: 4px; font-size: .85rem; }
.badge-edit-row .field-hint { margin: 0; }
.badge-edit-row .event-flags { margin: 0; flex-shrink: 0; max-width: 100%; }
@media (max-width: 1100px) { .badge-edit-row { align-items: flex-start; flex-direction: column; gap: 14px; } }
@media (max-width: 680px) { .badge-edit-row .event-flags { width: 100%; } }

.concert-toggle.btn { display: flex; align-items: center; gap: 13px; flex: 1; align-self: stretch; min-width: 0; padding: 10px 0; border: 0; background: transparent; border-radius: 4px; text-align: left; color: var(--ink); }
.concert-toggle:hover .concert-summary strong { text-decoration: underline; }
.concert-summary { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.concert-summary strong { display: block; font-size: .85rem; }
.concert-summary .item-subtitle { display: block; margin-top: 6px; }
.concert-chevron { color: var(--muted); font-size: 1.25rem; padding-inline: 4px; }
.concert-editor { margin-top: 20px; padding-top: 24px; border-top: 1px solid var(--line); }
.concert-editor[hidden] { display: none; }
.concert-editor .repeater-actions > div { display: grid; gap: 10px; }
.concert-editor .repeater-actions p { max-width: 440px; }
.tour-delete { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.tour-delete p { margin: 0; }
.intro-navigation { margin-top: 20px; }
@media (max-width: 1100px) { .concert-toggle.btn { width: 100%; } }
@media (max-width: 680px) { .tour-delete { flex-direction: column; align-items: flex-start; } }

.nav-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 20px; }
.nav-icon svg { display: block; }
.nav-settings > summary { display: flex; align-items: center; gap: 10px; }
.nav-settings-chevron { margin-left: auto; }
.nav-settings[open] .nav-settings-chevron { transform: rotate(180deg); }

.concert-action-hint { display: inline-block; color: #315e4f; margin-top: 8px; font-size: .68rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.activity-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.activity-toolbar p { margin: 0; font-size: .8rem; }
.activity-toolbar .stats-live-tools { margin-left: auto; }
.activity-table-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: white; }
.activity-table { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: left; font-size: .8rem; }
.activity-table th, .activity-table td { padding: 16px 20px; vertical-align: top; overflow-wrap: anywhere; line-height: 1.6; }
.activity-table thead { background: #f2f6f2; color: #4d685a; font-size: .7rem; }
.activity-table th:first-child { width: 190px; }
.activity-table th:nth-child(2) { width: 28%; }
.activity-table tbody tr { border-top: 1px solid var(--line); }
.activity-table time { font-variant-numeric: tabular-nums; }
.activity-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
.activity-pagination span { color: var(--muted); font-size: .75rem; text-align: center; }
#activity-page-status:focus { outline: 2px solid #27806c; outline-offset: 5px; border-radius: 2px; }
@media (max-width: 800px) {
  .activity-table, .activity-table tbody, .activity-table tr, .activity-table td { display: block; width: 100%; }
  .activity-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .activity-table tbody tr { padding: 14px 18px; }
  .activity-table tbody tr:first-child { border-top: 0; }
  .activity-table td { padding: 5px 0; }
  .activity-table td::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--muted); font-size: .66rem; font-weight: 600; }
}
@media (max-width: 380px) {
  .activity-pagination { flex-wrap: wrap; }
  .activity-pagination span { order: -1; width: 100%; }
}

.tutorial-controls.tutorial-password-controls { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; }
.tutorial-controls.tutorial-password-controls .tutorial-previous { grid-column: 1 / -1; justify-self: start; }
.tutorial-controls.tutorial-password-controls .btn { min-width: 0; min-height: 44px; padding: 10px 12px; }
