/* FAMILIS — design system
   Brand: slate #263238 · teal #6CC7B9 (from the logo) */

:root {
  --brand: #263238;
  --teal: #6CC7B9;
  --teal-strong: #2F8F80;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter Display", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --container: 1200px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #F5F7F6;
  --bg-soft: #EEF2F1;
  --surface: #FFFFFF;
  --surface-2: #F8FAF9;
  --border: #E2E8E6;
  --border-strong: #CED7D4;
  --text: #1C272C;
  --text-2: #4A5A60;
  --muted: #6D7C82;
  --primary: #263238;
  --primary-text: #FFFFFF;
  --accent: #2F8F80;
  --accent-soft: rgba(108, 199, 185, .16);
  --shadow: 0 1px 2px rgba(20, 35, 40, .05), 0 8px 24px -12px rgba(20, 35, 40, .14);
  --shadow-lg: 0 24px 60px -24px rgba(20, 35, 40, .32);
  --header-bg: rgba(245, 247, 246, .78);
  --danger: #C2413A;
  --warn: #B7791F;
  --ok: #2F8F80;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F1518;
  --bg-soft: #131B1F;
  --surface: #172024;
  --surface-2: #1C272C;
  --border: #253238;
  --border-strong: #33434A;
  --text: #E8EEEC;
  --text-2: #B7C3C0;
  --muted: #8A9A9E;
  --primary: #6CC7B9;
  --primary-text: #0E1A1C;
  --accent: #6CC7B9;
  --accent-soft: rgba(108, 199, 185, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 70px -28px rgba(0, 0, 0, .8);
  --header-bg: rgba(15, 21, 24, .78);
  --danger: #EF7C74;
  --warn: #E9B45A;
  --ok: #6CC7B9;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.25rem); letter-spacing: -.03em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.narrow { max-width: 760px; }
.section { padding: clamp(48px, 7vw, 96px) 0; }
.section-tight { padding: clamp(32px, 4vw, 56px) 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--primary); color: var(--primary-text); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* theme-aware images */
[data-theme="light"] .only-dark, [data-theme="dark"] .only-light { display: none !important; }

/* icons (Font Awesome duotone) */
.ico { width: 1.05em; height: 1.05em; flex: none; display: inline-block; vertical-align: -.15em; }
.ico .fa-secondary { opacity: .4; }

/* ---------- buttons ---------- */
.btn {
  --h: 46px; display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  height: var(--h); padding: 0 1.25em; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .95rem; letter-spacing: -.005em; line-height: 1;
  cursor: pointer; white-space: nowrap; user-select: none;
  transition: transform .15s var(--ease), background-color .2s, border-color .2s, color .2s, box-shadow .2s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-sm { --h: 38px; padding: 0 1em; font-size: .875rem; }
.btn-lg { --h: 54px; padding: 0 1.6em; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-primary:hover { color: var(--primary-text); box-shadow: 0 8px 22px -10px var(--primary); filter: brightness(1.08); }
.btn-accent { background: var(--teal); color: #0E1A1C; }
.btn-accent:hover { color: #0E1A1C; filter: brightness(1.05); box-shadow: 0 8px 22px -10px var(--teal); }
.btn-dark { background: #263238; color: #fff; }
.btn-dark:hover { color: #fff; filter: brightness(1.15); }
.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--text); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); }
.btn-danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn.is-disabled { opacity: .6; cursor: not-allowed; pointer-events: none; }
.icon-btn, .pill-btn, .avatar-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  height: 40px; min-width: 40px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer; font: inherit; font-size: .85rem; font-weight: 600;
  transition: background-color .2s, border-color .2s;
}
.icon-btn:hover, .pill-btn:hover, .avatar-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.icon-btn .ico { width: 18px; height: 18px; }
.caret { width: 10px !important; height: 10px !important; opacity: .6; transition: transform .2s; }
[aria-expanded="true"] .caret { transform: rotate(180deg); }
.flag { width: 20px; height: 20px; object-fit: contain; flex: none; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }
.header-inner { display: flex; align-items: center; gap: 20px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .14em; font-size: 1.05rem; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-ico { height: 34px; width: auto; }
.main-nav { display: flex; gap: 2px; margin-left: 12px; }
.main-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; color: var(--text-2); font-weight: 550; font-size: .94rem; transition: background-color .2s, color .2s; }
.main-nav a .ico { display: none; }
.main-nav a:hover { color: var(--text); background: var(--bg-soft); }
.main-nav a.is-active { color: var(--text); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.burger { display: none; }
.theme-ico { display: inline-flex; }
[data-theme="light"] .ti-dark, [data-theme="dark"] .ti-light { display: none; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--teal); color: #0E1A1C; font-weight: 700; font-size: .85rem; flex: none; }
.avatar-btn { padding: 0 8px 0 4px; }

/* dropdown menus */
.dropdown { position: relative; }
.menu {
  position: absolute; top: calc(100% + 8px); left: 50%; min-width: 230px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translate(-50%, -4px) scale(.98); transform-origin: top center;
  transition: opacity .16s var(--ease), transform .16s var(--ease), visibility .16s; z-index: 60;
}
.menu-sm { min-width: 180px; }
.menu-right { left: auto; right: 0; transform: translateY(-4px) scale(.98); transform-origin: top right; }
.dropdown.is-open .menu { opacity: 1; visibility: visible; transform: translate(-50%, 0) scale(1); }
.dropdown.is-open .menu-right { transform: translateY(0) scale(1); }
.menu-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 8px 10px 4px; font-weight: 700; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px;
  background: none; border: 0; color: var(--text); font: inherit; font-size: .92rem; text-align: left; cursor: pointer;
}
.menu-item:hover { background: var(--bg-soft); color: var(--text); }
.menu-item .ico { width: 18px; height: 18px; color: var(--text-2); }
.menu-item.danger, .menu-item.danger .ico { color: var(--danger); }
.menu-text { display: flex; flex-direction: column; line-height: 1.25; flex: 1; min-width: 0; }
.menu-text strong { font-weight: 600; }
.menu-text small { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; }
.menu-check { opacity: 0; color: var(--accent) !important; width: 14px !important; height: 14px !important; }
.menu-item.is-active .menu-check, .menu-item[aria-checked="true"] .menu-check { opacity: 1; }
.menu-head { display: flex; align-items: center; gap: 10px; padding: 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu-sep { height: 1px; background: var(--border); margin: 6px 0; }

/* drawer (mobile) */
.drawer { position: fixed; inset: 0; z-index: 80; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(8, 12, 14, .5); backdrop-filter: blur(2px); animation: fade .2s; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(340px, 88vw); background: var(--surface); display: flex; flex-direction: column; padding: 18px; box-shadow: var(--shadow-lg); animation: slideIn .28s var(--ease); }
.drawer-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.drawer-nav { display: flex; flex-direction: column; gap: 4px; }
.drawer-nav a { display: flex; align-items: center; gap: 14px; padding: 13px 14px; border-radius: 12px; font-weight: 600; color: var(--text); }
.drawer-nav a .ico { width: 20px; height: 20px; color: var(--accent); }
.drawer-nav a.is-active, .drawer-nav a:hover { background: var(--bg-soft); }
.drawer-foot { margin-top: auto; display: grid; gap: 10px; }
@keyframes slideIn { from { transform: translateX(100%); } }
@keyframes fade { from { opacity: 0; } }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 720px; height: 720px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 70%); pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.eyebrow .ico { width: 14px; height: 14px; }
.hero h1 { margin: 16px 0 18px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--text-2); max-width: 34em; margin-bottom: 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { display: flex; gap: 32px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border); }
.hero-stats strong { display: block; font-size: 1.8rem; font-family: var(--font-display); letter-spacing: -.03em; line-height: 1.1; }
.hero-stats span { color: var(--muted); font-size: .88rem; }
.hero-visual { position: relative; }
.hero-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 4.2;
  background: var(--surface); box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.hero-card > img { width: 100%; height: 100%; object-fit: cover; }
.hero-card .hero-logo { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(160deg, var(--surface-2), var(--bg-soft)); }
.hero-card .hero-logo img { width: 52%; }
.hero-float {
  position: absolute; left: -24px; bottom: 28px; max-width: 300px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px;
  box-shadow: var(--shadow-lg); display: flex; gap: 12px; align-items: center;
}
.hero-float:hover { color: inherit; transform: translateY(-2px); }
.hero-float { transition: transform .2s var(--ease); }
.hero-float .date-badge { position: static; }
.hero-float strong { display: block; font-size: .95rem; line-height: 1.25; }
.hero-float small { color: var(--muted); }
.hero-play {
  position: absolute; right: 22px; top: 22px; display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .92); color: #1C272C; border: 0; border-radius: 999px; padding: 9px 14px 9px 10px;
  font: inherit; font-weight: 600; font-size: .85rem; cursor: pointer; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .4);
}
.hero-play .ico { width: 22px; height: 22px; color: #2F8F80; }

/* ---------- section head ---------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head p { margin: 0; color: var(--muted); max-width: 36em; }
.section-head h2 { margin-bottom: 8px; }
.page-hero { padding: clamp(40px, 6vw, 72px) 0 clamp(20px, 3vw, 32px); }
.page-hero p { color: var(--muted); font-size: 1.1rem; max-width: 40em; }

/* ---------- chips & badges ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  --tag: var(--teal); display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px;
  border-radius: 999px; font-size: .78rem; font-weight: 650;
  color: color-mix(in srgb, var(--tag) 70%, var(--text)); background: color-mix(in srgb, var(--tag) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--tag) 28%, transparent); transition: background-color .2s;
}
.chip .ico { width: 12px; height: 12px; color: var(--tag); }
a.chip:hover { background: color-mix(in srgb, var(--tag) 24%, transparent); color: color-mix(in srgb, var(--tag) 70%, var(--text)); }
.chip.is-active { background: var(--tag); color: #fff; border-color: var(--tag); }
.chip.is-active .ico { color: #fff; }
.chip-filter { --tag: var(--text-2); height: 36px; padding: 0 14px; font-size: .85rem; cursor: pointer; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: .78rem; font-weight: 650; background: var(--bg-soft); color: var(--text-2); }
.badge .ico { width: 12px; height: 12px; }
.badge-ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.badge-warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.badge-danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }

/* ---------- event cards ---------- */
.grid-events { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.event-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.event-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.event-card.is-past { opacity: .78; }
.event-media { position: relative; aspect-ratio: 16 / 9; background: var(--bg-soft); overflow: hidden; display: block; }
.event-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.event-card:hover .event-media img { transform: scale(1.04); }
.event-media-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--accent); background: linear-gradient(140deg, var(--accent-soft), var(--bg-soft)); }
.event-media-fallback .ico { width: 44px; height: 44px; }
.date-badge {
  position: absolute; left: 14px; top: 14px; width: 54px; padding: 6px 0 7px; border-radius: 12px; text-align: center;
  background: var(--surface); color: var(--text); box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .35); line-height: 1;
}
.date-badge small { display: block; font-size: .66rem; font-weight: 800; letter-spacing: .1em; color: var(--accent); }
.date-badge strong { display: block; font-size: 1.4rem; font-family: var(--font-display); margin-top: 3px; }
.media-flag { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; backdrop-filter: blur(4px); }
.event-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.event-body h3 { margin: 2px 0 0; font-size: 1.18rem; }
.meta { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; color: var(--text-2); font-size: .9rem; }
.meta li { display: flex; align-items: center; gap: 8px; }
.meta .ico { color: var(--accent); width: 15px; height: 15px; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; font-size: .93rem; }
.event-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px dashed var(--border); flex-wrap: wrap; }
.event-actions { display: flex; gap: 6px; align-items: center; margin-left: auto; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.segmented { display: inline-flex; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }
.segmented a { padding: 7px 16px; border-radius: 999px; font-size: .88rem; font-weight: 600; color: var(--text-2); }
.segmented a.is-active { background: var(--primary); color: var(--primary-text); }
.search { position: relative; min-width: min(320px, 100%); }
.search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 40px !important; border-radius: 999px !important; }

/* ---------- video ---------- */
.grid-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.video-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.video-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; background: #000; cursor: pointer; overflow: hidden; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: transform .6s var(--ease), opacity .3s; }
.video-thumb:hover img { transform: scale(1.04); opacity: 1; }
.play {
  position: absolute; left: 50%; top: 50%; width: 66px; height: 66px; margin: -33px 0 0 -33px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, .94); color: #263238;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .55); transition: transform .25s var(--ease);
}
.play .ico { width: 24px; height: 24px; margin-left: 3px; }
.play .ico .fa-secondary { opacity: 1; }
.video-thumb:hover .play { transform: scale(1.08); }
.video-body { padding: 16px 20px 20px; }
.video-body h3 { margin: 6px 0 6px; }
.video-body p { margin: 0; font-size: .93rem; }
.video-card-big { display: grid; grid-template-columns: 1.4fr 1fr; align-items: stretch; }
.video-card-big .video-thumb { aspect-ratio: auto; min-height: 320px; height: 100%; }
.video-card-big .video-body { padding: clamp(22px, 3vw, 40px); display: flex; flex-direction: column; justify-content: center; }
.video-card-big h3 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); }
.video-card-big .play { width: 84px; height: 84px; margin: -42px 0 0 -42px; }

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { padding: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.feature-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 16px; }
.feature-ico .ico { width: 22px; height: 22px; }
.feature h3 { font-size: 1.08rem; margin-bottom: 6px; }
.feature p { margin: 0; color: var(--muted); font-size: .94rem; }

.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: clamp(28px, 4vw, 48px); border-radius: var(--radius-lg);
  background: #263238; color: #fff; position: relative; overflow: hidden;
}
.cta-band::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(closest-side, rgba(108, 199, 185, .35), transparent); }
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { color: rgba(255, 255, 255, .72); margin: 0; }
.cta-band > * { position: relative; z-index: 1; }

/* ---------- event detail ---------- */
.event-hero { padding: 28px 0 0; }
.crumb { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; font-weight: 600; margin-bottom: 20px; }
.crumb .ico { transform: rotate(180deg); }
.event-cover { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 21 / 9; background: var(--bg-soft); border: 1px solid var(--border); }
.event-cover img { width: 100%; height: 100%; object-fit: cover; }
.event-layout { display: grid; grid-template-columns: 1fr 360px; gap: clamp(24px, 4vw, 48px); align-items: start; margin-top: 32px; }
.event-layout h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin: 14px 0 14px; }
.prose { font-size: 1.04rem; color: var(--text-2); }
.prose p { margin: 0 0 1.1em; }
.side-card { position: sticky; top: 92px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.side-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 14px; }
.side-list li { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: center; }
.side-list .si { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.side-list small { display: block; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.side-list strong { font-weight: 600; font-size: .95rem; }
.progress { height: 6px; background: var(--bg-soft); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.progress > span { display: block; height: 100%; background: var(--teal); border-radius: 99px; }
.side-actions { display: grid; gap: 10px; }
.embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; margin: 24px 0; border: 1px solid var(--border); }
.embed iframe, .embed .video-thumb { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: .85rem; font-weight: 600; color: var(--text-2); }
.field small { color: var(--muted); font-size: .8rem; }
input, select, textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 12px; padding: 11px 14px; transition: border-color .2s, box-shadow .2s, background-color .2s;
}
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface); }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--teal); }
input[type="color"] { padding: 4px; height: 44px; cursor: pointer; }
textarea { resize: vertical; min-height: 90px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.check { display: flex; align-items: center; gap: 10px; font-size: .92rem; color: var(--text-2); cursor: pointer; margin-bottom: 14px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); width: 36px; height: 36px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.pw-toggle:hover { color: var(--text); background: var(--bg-soft); }
.stepper { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.stepper input { border: 0; border-radius: 0; text-align: center; background: transparent; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper input:focus { box-shadow: none; }
.stepper button { width: 46px; border: 0; background: transparent; color: var(--text); font-size: 1.2rem; cursor: pointer; }
.stepper button:hover { background: var(--bg-soft); }
.form-error, .alert { padding: 12px 14px; border-radius: 12px; font-size: .9rem; margin-bottom: 14px; display: flex; gap: 10px; align-items: flex-start; }
.form-error, .alert-error { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.alert-ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.hint { font-size: .86rem; color: var(--muted); display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.hint a { color: var(--accent); font-weight: 600; }

/* ---------- auth ---------- */
.auth-wrap { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { position: relative; background: #263238; color: #fff; padding: clamp(32px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.auth-side::before { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; bottom: -160px; border-radius: 50%; background: radial-gradient(closest-side, rgba(108, 199, 185, .4), transparent); }
.auth-side > * { position: relative; }
.auth-side img { width: 120px; }
.auth-side h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.4rem); max-width: 14em; }
.auth-side p { color: rgba(255, 255, 255, .7); }
.auth-points { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.auth-points li { display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, .86); }
.auth-points .ico { color: #6CC7B9; width: 18px; height: 18px; }
.auth-main { display: grid; place-items: center; padding: clamp(28px, 5vw, 64px) 20px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 2rem; margin-bottom: 6px; }
.auth-card > p { color: var(--muted); margin-bottom: 26px; }
.auth-alt { text-align: center; margin-top: 22px; color: var(--muted); font-size: .92rem; }
.auth-alt a { color: var(--accent); font-weight: 650; }

/* ---------- cards / account ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(18px, 2.4vw, 28px); box-shadow: var(--shadow); }
.card h2, .card h3 { margin-top: 0; }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; margin-bottom: 18px; }
.card-title .ico { color: var(--accent); }
.account-grid { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }
.booking-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--border); }
.booking-row:last-child { border-bottom: 0; }
.booking-row .date-badge { position: static; box-shadow: none; border: 1px solid var(--border); }
.booking-row h4 { margin: 0 0 4px; font-size: 1rem; letter-spacing: -.01em; }
.booking-row .bmeta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .85rem; align-items: center; }
.code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-weight: 700; letter-spacing: .04em; color: var(--text); }
.empty-state { padding: 48px 20px; text-align: center; }
.big-ico { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 22px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.big-ico .ico { width: 30px; height: 30px; }
.empty-state .btn { margin-top: 10px; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 24px; align-items: start; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.contact-list li { display: flex; gap: 14px; align-items: center; }
.contact-list .si { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.contact-list small { display: block; color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- modal ---------- */
.modal { padding: 0; border: 0; background: transparent; max-width: min(620px, calc(100vw - 24px)); width: 100%; color: var(--text); }
.modal::backdrop { background: rgba(8, 12, 14, .6); backdrop-filter: blur(4px); }
.modal[open] { animation: pop .22s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; }
.modal-head { display: flex; justify-content: space-between; gap: 16px; padding: 22px 24px 8px; }
.modal-head h3 { margin: 6px 0 2px; font-size: 1.3rem; }
.modal-head p { margin: 0; }
.modal-body { padding: 14px 24px 6px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 22px; }
.success-box { text-align: center; padding: 18px 0 8px; }
.success-box .big-ico { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.success-box .code { font-size: 1.5rem; display: inline-block; margin: 8px 0; padding: 8px 16px; border-radius: 12px; background: var(--bg-soft); }
.modal-video { max-width: min(1100px, calc(100vw - 24px)); }
.video-shell { position: relative; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-caption { color: #fff; text-align: center; padding: 14px 8px 0; font-weight: 600; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.video-x { position: absolute; right: 0; top: -52px; background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .2); color: #fff; }
.video-x:hover { background: rgba(255, 255, 255, .25); }

/* toasts */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: grid; gap: 10px; max-width: min(400px, calc(100vw - 36px)); }
.toast { display: flex; align-items: center; gap: 12px; padding: 13px 14px 13px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: .92rem; animation: pop .25s var(--ease); }
.toast > .ico { width: 18px; height: 18px; }
.toast-success > .ico { color: var(--ok); }
.toast-error > .ico { color: var(--danger); }
.toast-x { margin-left: auto; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 6px; display: grid; }
.toast.is-leaving { opacity: 0; transform: translateY(8px); transition: .25s; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 32px; padding-top: 52px; padding-bottom: 36px; }
.footer-logo { width: 104px; height: auto; margin-bottom: 14px; }
.footer-brand p { font-size: .92rem; max-width: 26em; }
.site-footer h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: .94rem; }
.footer-links a { color: var(--text-2); }
.footer-links a:hover { color: var(--accent); }
.footer-contact li { display: flex; gap: 10px; align-items: center; color: var(--text-2); }
.footer-contact .ico { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 26px; border-top: 1px solid var(--border); color: var(--muted); font-size: .86rem; }
.footer-langs { display: flex; gap: 16px; }
.footer-langs a { display: inline-flex; align-items: center; gap: 6px; }
.footer-langs a.is-active { color: var(--text); font-weight: 600; }
.footer-langs .flag { width: 16px; height: 16px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .reveal { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .main-nav { display: none; }
  .burger { display: inline-flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hero-grid, .event-layout, .account-grid, .contact-grid, .video-card-big { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; }
  .hero-float { left: 12px; }
  .side-card { position: static; }
  .features { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .event-cover { aspect-ratio: 16 / 9; }
  .video-card-big .video-thumb { min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 760px) { .hide-md { display: none !important; } }
@media (max-width: 560px) {
  .hide-sm { display: none !important; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-events, .grid-videos { grid-template-columns: 1fr; }
  .header-inner { gap: 10px; height: 64px; }
  .brand-name { font-size: .95rem; }
  .hero-stats { gap: 22px; }
  .footer-grid { grid-template-columns: 1fr; }
  .booking-row { grid-template-columns: 48px 1fr; }
  .booking-row > :last-child { grid-column: 1 / -1; }
  .modal-foot .btn { flex: 1; }
}

/* ======================= ADMIN ======================= */
.admin { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.admin-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px; background: var(--surface); border-right: 1px solid var(--border); }
.admin-brand { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 22px; }
.admin-tag { font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 560; font-size: .93rem; }
.admin-nav a .ico { width: 18px; height: 18px; }
.admin-nav a:hover { background: var(--bg-soft); color: var(--text); }
.admin-nav a.is-active { background: var(--primary); color: var(--primary-text); }
.admin-nav .count { margin-left: auto; font-style: normal; font-size: .72rem; font-weight: 700; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; background: var(--teal); color: #0E1A1C; }
.admin-side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.admin-viewsite { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 560; font-size: .9rem; }
.admin-viewsite:hover { background: var(--bg-soft); }
.admin-main { min-width: 0; display: flex; flex-direction: column; }
.admin-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; height: 68px; padding: 0 clamp(16px, 3vw, 32px); background: var(--header-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.admin-title { font-size: 1.3rem; margin: 0; letter-spacing: -.02em; }
.admin-burger { display: none; }
.admin-content { padding: clamp(18px, 3vw, 32px); max-width: 1400px; width: 100%; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin: 16px 0 22px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .2s var(--ease), border-color .2s; }
.stat:hover { transform: translateY(-2px); border-color: var(--border-strong); color: inherit; }
.stat-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 10px; }
.stat strong { font-size: 1.9rem; font-family: var(--font-display); letter-spacing: -.03em; line-height: 1.1; }
.stat span:last-child { color: var(--muted); font-size: .86rem; }
.admin-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.admin-grid-rev { grid-template-columns: 1fr 400px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head .card-title { margin: 0; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.card > .table-wrap .table th:first-child { border-top-left-radius: var(--radius); }
.table .num { text-align: center; }
.table .right { text-align: right; }
.nowrap { white-space: nowrap; }
.notes-cell { max-width: 240px; color: var(--text-2); }
.row-actions { display: inline-flex; gap: 6px; justify-content: flex-end; }
.row-actions form { margin: 0; }
.icon-btn.danger { color: var(--danger); }
.icon-btn.danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.cell-event { display: flex; align-items: center; gap: 12px; }
.thumb { width: 56px; height: 40px; border-radius: 8px; overflow: hidden; background: var(--bg-soft); display: grid; place-items: center; color: var(--accent); flex: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge-btn { border: 0; cursor: pointer; font: inherit; font-size: .78rem; font-weight: 650; }
.table-toolbar { padding: 14px; border-bottom: 1px solid var(--border); }
.filter-card { padding: 16px; margin-bottom: 14px; align-items: flex-end; }
.status-select { padding: 6px 30px 6px 10px; font-size: .84rem; font-weight: 600; border-radius: 99px; background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; width: auto; }
.st-pending { color: var(--warn); }
.st-confirmed { color: var(--ok); }
.st-cancelled { color: var(--danger); }
.mini-event { display: grid; grid-template-columns: 54px 1fr; gap: 14px; align-items: center; padding: 10px; border-radius: 12px; }
.mini-event:hover { background: var(--bg-soft); color: inherit; }
.mini-event .date-badge { position: static; box-shadow: none; border: 1px solid var(--border); }
.mini-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mini-body .progress { display: block; }

/* switch */
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; margin-bottom: 12px; font-size: .92rem; font-weight: 550; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { width: 42px; height: 24px; border-radius: 99px; background: var(--border-strong); position: relative; transition: background-color .2s; flex: none; }
.switch-ui::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s var(--ease); }
.switch input:checked + .switch-ui { background: var(--teal); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--teal); outline-offset: 2px; }

/* event editor */
.edit-grid { display: grid; grid-template-columns: 1fr 380px; gap: 20px; align-items: start; }
.edit-main, .edit-side { display: grid; gap: 20px; }
.edit-side { position: sticky; top: 88px; }
.grid-4 { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr 1fr; gap: 0 12px; }
.lang-tabs { display: inline-flex; padding: 3px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface-2); }
.lang-tabs button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 12px; border-radius: 99px; font: inherit; font-size: .82rem; font-weight: 700; color: var(--text-2); cursor: pointer; }
.lang-tabs button .flag { width: 16px; height: 16px; }
.lang-tabs button.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.media-preview { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--bg-soft); border: 1px dashed var(--border-strong); display: grid; place-items: center; color: var(--muted); margin-bottom: 12px; }
.media-preview > .ico { width: 34px; height: 34px; }
.media-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-preview .play { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
.tag-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tag-option input { position: absolute; opacity: 0; }
.tag-option .chip { cursor: pointer; height: 32px; opacity: .55; transition: opacity .15s, background-color .15s; }
.tag-option input:checked + .chip { opacity: 1; background: var(--tag); color: #fff; border-color: var(--tag); }
.tag-option input:checked + .chip .ico { color: #fff; }
.tag-option input:focus-visible + .chip { outline: 2px solid var(--teal); outline-offset: 2px; }
.new-tag { display: grid; grid-template-columns: 1fr 52px; gap: 8px; margin-bottom: 10px; }
.btn-preview { display: grid; place-items: center; min-height: 86px; border-radius: 12px; margin-bottom: 14px; background: repeating-linear-gradient(45deg, var(--surface-2) 0 10px, var(--bg-soft) 10px 20px); border: 1px solid var(--border); }
.swatches { display: flex; gap: 8px; margin: -4px 0 16px; }
.swatches button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* videos admin */
.video-admin-list { display: grid; gap: 12px; }
.video-admin { display: grid; grid-template-columns: 160px 1fr auto; gap: 16px; align-items: center; padding: 12px; }
.video-admin .video-thumb { border-radius: 10px; }
.video-admin .play { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
.video-admin .play .ico { width: 16px; height: 16px; }
.video-admin-body { display: flex; flex-direction: column; min-width: 0; }

/* inbox */
.inbox { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }
.inbox-list { max-height: calc(100vh - 140px); overflow: auto; }
.inbox-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; }
.inbox-item:hover { background: var(--bg-soft); color: inherit; }
.inbox-item.is-active { background: var(--accent-soft); }
.inbox-item .avatar { width: 34px; height: 34px; background: var(--bg-soft); color: var(--text-2); }
.inbox-item.is-unread .avatar { background: var(--teal); color: #0E1A1C; }
.inbox-item.is-unread strong::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); margin-left: 6px; vertical-align: middle; }
.inbox-text { display: flex; flex-direction: column; min-width: 0; font-size: .88rem; }
.inbox-text span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Caffè & Restaurant */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.restaurant-page { min-height: 55vh; }
.restaurant-heading { max-width: 760px; margin: 0 auto 28px; text-align: center; }
.restaurant-heading .eyebrow { display: flex; justify-content: center; margin: 16px 0 10px; }
.restaurant-mode-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; max-width: 920px; margin: 0 auto; }
.restaurant-mode-card { display: flex; flex-direction: column; align-items: flex-start; min-height: 300px; padding: clamp(24px,4vw,40px); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); transition: transform .18s var(--ease),border-color .18s,box-shadow .18s; }
.restaurant-mode-card:hover { color: inherit; transform: translateY(-3px); border-color: var(--teal); box-shadow: var(--shadow-lg); }
.restaurant-mode-card h2 { margin: 0 0 10px; }
.restaurant-mode-card p { color: var(--muted); margin: 0 0 24px; }
.restaurant-mode-card .btn { margin-top: auto; }
.mode-mark,.restaurant-check { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 20px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); font-size: 1.3rem; }
.restaurant-order-grid { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 22px; align-items: start; }
.restaurant-products { display: grid; gap: 18px; }
.restaurant-section-title { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 4px; }
.restaurant-section-title h2 { margin: 0; font-size: 1.3rem; }
.restaurant-section-title > span { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: .8rem; font-weight: 700; }
.restaurant-product-list { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.restaurant-product { display: grid; grid-template-columns: 68px minmax(0,1fr) auto 74px; gap: 14px; align-items: center; padding: 16px; border-bottom: 1px solid var(--border); }
.restaurant-product:last-child { border-bottom: 0; }
.restaurant-product-image { display: grid; place-items: center; width: 68px; height: 68px; overflow: hidden; border-radius: 12px; background: var(--bg-soft); color: var(--accent); }
.restaurant-product-image img { width: 100%; height: 100%; object-fit: cover; }
.restaurant-product h3 { margin: 0 0 4px; font-size: 1rem; }
.restaurant-product p { margin: 0; }
.restaurant-price { white-space: nowrap; }
.restaurant-qty { display: flex; align-items: center; justify-content: flex-end; gap: 6px; color: var(--muted); font-size: .75rem; }
.restaurant-qty input { width: 58px; min-height: 38px; padding: 6px; text-align: center; }
.restaurant-checkout { position: sticky; top: 92px; display: grid; gap: 12px; }
.restaurant-checkout h2 { margin: 0; font-size: 1.35rem; }
.restaurant-checkout .field { margin: 0; }
.restaurant-cart-total { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.restaurant-cart-total strong { font-size: 1.25rem; }
.receipt-choice { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.receipt-choice legend { padding: 0 5px; font-size: .83rem; font-weight: 700; }
.receipt-choice label { display: flex; gap: 8px; align-items: center; font-size: .86rem; }
.restaurant-success { max-width: 680px; margin: 0 auto; text-align: center; }
.restaurant-success .restaurant-check { margin: 0 auto 18px; }
.restaurant-success .hint { margin: 16px 0; text-align: left; }
.restaurant-receipt { max-width: 460px; margin: 22px auto; padding: 18px; text-align: left; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.restaurant-receipt h3 { margin-bottom: 14px; }
.restaurant-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.restaurant-total { margin-top: 4px; border: 0; font-size: 1.05rem; }
.restaurant-admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.restaurant-admin-grid .card { display: grid; gap: 12px; }
.restaurant-admin-photo { width: 160px; height: 120px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
.restaurant-admin-thumb { display: inline-block; vertical-align: middle; width: 42px; height: 42px; margin-right: 10px; object-fit: cover; border-radius: 8px; }
.restaurant-admin-orders { display: grid; gap: 14px; }
.restaurant-admin-order { padding: 18px; }
.restaurant-admin-order-head,.restaurant-admin-order-foot,.restaurant-admin-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.restaurant-admin-order-head h2 { margin: 5px 0 0; font-size: 1.2rem; }
.order-total { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.restaurant-admin-meta { justify-content: flex-start; margin: 14px 0; color: var(--text-2); font-size: .88rem; }
.restaurant-admin-lines { padding: 8px 0; border-top: 1px solid var(--border); }
.restaurant-order-notes { margin: 12px 0; padding: 10px 12px; border-radius: 10px; background: var(--bg-soft); font-size: .9rem; }
.restaurant-admin-order-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.restaurant-admin-order-foot form { display: flex; align-items: center; gap: 8px; }
.restaurant-admin-order-foot .status-select { min-width: 140px; }
.restaurant-page .toast { margin-bottom: 16px; }
@media (max-width: 900px) { .restaurant-order-grid,.restaurant-admin-grid { grid-template-columns: 1fr; } .restaurant-checkout { position: static; } }
@media (max-width: 620px) { .restaurant-mode-grid { grid-template-columns: 1fr; } .restaurant-mode-card { min-height: 250px; } .restaurant-product { grid-template-columns: 52px minmax(0,1fr) auto; gap: 8px; } .restaurant-product-image { width: 52px; height: 52px; grid-row: 1; } .restaurant-product-copy { grid-column: 2; grid-row: 1; } .restaurant-price { grid-column: 3; grid-row: 1; } .restaurant-qty { grid-column: 2 / -1; justify-content: flex-start; } .restaurant-admin-order-foot { align-items: flex-start; } .restaurant-admin-order-foot form { width: 100%; } .restaurant-admin-order-foot .status-select { flex: 1; } }
@media print { body * { visibility: hidden !important; } .restaurant-receipt,.restaurant-receipt * { visibility: visible !important; } .restaurant-receipt { position: absolute; inset: 0 auto auto 0; width: 100%; max-width: none; border: 0; background: white; color: black; } .restaurant-receipt button { display: none; } }

@media (max-width: 1180px) {
  .edit-grid, .admin-grid, .admin-grid-rev, .inbox { grid-template-columns: 1fr; }
  .edit-side { position: static; }
}
@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .admin-side { position: fixed; z-index: 90; left: 0; top: 0; width: 270px; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--shadow-lg); }
  .admin-side.is-open { transform: none; }
  .admin-burger { display: inline-flex; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .video-admin { grid-template-columns: 120px 1fr; }
  .video-admin .row-actions { grid-column: 1 / -1; }
  .admin-title { font-size: 1.05rem; }
}
img.img-failed { visibility: hidden; }
.event-cover, .hero-card, .event-media, .video-thumb { background-image: linear-gradient(140deg, var(--accent-soft), var(--bg-soft)); }
.badge, .code { white-space: nowrap; }

/* ---------- next-event spotlight (top of home) ---------- */
.spot { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.spot-media { position: relative; display: block; aspect-ratio: 16 / 8; overflow: hidden; background-image: linear-gradient(140deg, var(--accent-soft), var(--bg-soft)); }
.spot-media > img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.spot:hover .spot-media > img { transform: scale(1.03); }
.spot-fallback { position: absolute; inset: 0; display: grid; place-items: center; }
.spot-fallback img { height: 58%; width: auto; opacity: .9; }
.spot .date-badge { left: 18px; top: 18px; width: 62px; }
.spot .date-badge strong { font-size: 1.6rem; }
.countdown { position: absolute; right: 16px; top: 18px; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 99px; font-size: .82rem; font-weight: 700; background: rgba(255, 255, 255, .94); color: #1C272C; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .35); }
.countdown .ico { color: #2F8F80; }
.countdown.is-soon { background: #263238; color: #fff; }
.countdown.is-soon .ico { color: #6CC7B9; }
.spot-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.spot-title { font-size: clamp(1.35rem, 2.2vw, 1.75rem); margin: 0; }
.spot-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.price-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.price-chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: .84rem; color: var(--text-2); }
.price-chip .ico { width: 14px; height: 14px; color: var(--accent); }
.price-chip strong { color: var(--text); font-weight: 700; }
.price-line { display: flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; color: var(--text); }
.price-line .ico { color: var(--accent); width: 15px; height: 15px; }
.price-table { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; margin-top: 4px; font-size: .92rem; }
.price-table span { color: var(--text-2); }
.price-table strong { text-align: right; }
.price-table .is-free { color: var(--ok); }
.price-note { display: block; font-style: normal; font-size: .82rem; color: var(--muted); margin-top: 6px; }
.side-list li.price-li { align-items: start; }
.price-preview { margin: 4px 0 8px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--border-strong); }
.price-preview:empty { display: none; }

/* booking: people breakdown */
.pax { border: 1px solid var(--border); border-radius: 14px; padding: 6px 14px 12px; margin-bottom: 14px; background: var(--surface-2); }
.pax-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.pax-label { display: flex; flex-direction: column; line-height: 1.3; }
.pax-label small { color: var(--muted); font-size: .8rem; }
.stepper-sm { width: 132px; background: var(--surface); }
.stepper-sm button { width: 40px; }
.stepper-sm input { padding: 8px 0; }
.pax-total { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; font-weight: 600; }
.pax-total strong { font-size: 1.25rem; font-family: var(--font-display); letter-spacing: -.02em; }
.pax-summary { margin: 6px 0 12px; }
.spot-fallback img { height: clamp(90px, 11vw, 140px); width: auto; max-height: 70%; }

/* Italian date / 24h time fields */
.dt-field { position: relative; display: flex; }
.dt-field input[type="text"] { padding-right: 44px; font-variant-numeric: tabular-nums; }
.dt-native { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.dt-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.dt-btn:hover { background: var(--bg-soft); color: var(--accent); }
.dt-ico { pointer-events: none; }

/* bookings grouped by event */
.ev-group { padding: 0; margin-bottom: 14px; overflow: hidden; }
.ev-head { display: grid; grid-template-columns: 54px 1fr auto 20px; gap: 14px; align-items: center; padding: 14px 18px; cursor: pointer; list-style: none; }
.ev-head::-webkit-details-marker { display: none; }
.ev-head:hover { background: var(--surface-2); }
.ev-head .date-badge { position: static; box-shadow: none; border: 1px solid var(--border); }
.ev-title { display: flex; flex-direction: column; min-width: 0; }
.ev-title strong { font-size: 1.02rem; }
.ev-stats { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.ev-caret { width: 14px !important; height: 14px !important; color: var(--muted); transition: transform .2s; }
.ev-group[open] .ev-caret { transform: rotate(180deg); }
.ev-money { color: var(--accent); font-weight: 700; }
.ev-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.ev-vat { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: .88rem; color: var(--text-2); }
.ev-vat strong { color: var(--text); }
.ev-tools .row-actions { flex-wrap: wrap; }
.vat-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 14px 18px; margin-bottom: 14px; font-size: .92rem; }
.past-title { display: flex; align-items: center; gap: 8px; font-size: 1rem; color: var(--muted); margin: 28px 0 12px; }
@media (max-width: 760px) { .ev-head { grid-template-columns: 48px 1fr 18px; } .ev-stats { grid-column: 1 / -1; justify-content: flex-start; } }

/* directions button next to addresses */
.nav-btn { flex: none; width: 30px; height: 30px; margin-left: auto; border-radius: 50%; display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--teal) 30%, transparent); transition: background-color .2s, color .2s, transform .15s; }
.nav-btn .ico { width: 15px; height: 15px; }
.nav-btn .ico .fa-secondary, .nav-btn .ico [opacity] { opacity: .45; }
.nav-btn:hover { background: var(--teal); color: #0E1A1C; transform: scale(1.06); }
.meta li.loc, .footer-contact li.loc { align-items: center; }
.meta li.loc > span { flex: 1; min-width: 0; }
.footer-contact li.loc > span { flex: 1; }
.side-list li.loc-li { grid-template-columns: 38px 1fr auto; }
.contact-list li { align-items: center; }

/* ======================= VISITATORI ======================= */
.count-live { background: #E5675E !important; color: #fff !important; animation: livepulse 2s infinite; }
@keyframes livepulse { 50% { opacity: .65; } }
.seg-scroll { overflow-x: auto; max-width: 100%; }
.seg-scroll a { white-space: nowrap; }
.vis-top { display: grid; grid-template-columns: 360px 1fr; gap: 16px; margin-bottom: 16px; align-items: stretch; }
.live-card { display: flex; flex-direction: column; max-height: 360px; }
.live-head { display: flex; align-items: center; gap: 8px; font-size: .95rem; flex-wrap: wrap; }
.live-head strong { font-size: 1.6rem; font-family: var(--font-display); letter-spacing: -.03em; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: #3FA36B; box-shadow: 0 0 0 0 rgba(63, 163, 107, .6); animation: ping 1.6s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(63, 163, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(63, 163, 107, 0); } }
.live-list { margin-top: 10px; overflow-y: auto; display: grid; gap: 2px; }
.live-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; }
.live-row:hover { background: var(--bg-soft); color: inherit; }
.live-main { display: flex; flex-direction: column; min-width: 0; font-size: .88rem; }
.live-main strong, .live-main small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-meta { display: flex; flex-direction: column; align-items: flex-end; color: var(--muted); font-size: .75rem; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.kpi small { color: var(--muted); font-size: .78rem; display: flex; align-items: center; gap: 6px; }
.kpi small .ico { color: var(--accent); width: 14px; height: 14px; }
.kpi strong { font-size: 1.65rem; font-family: var(--font-display); letter-spacing: -.03em; line-height: 1.2; }
.delta { font-size: .76rem; font-weight: 700; color: var(--muted); }
.delta.up { color: var(--ok); } .delta.down { color: var(--danger); }
.rot-up { display: none; }
.legend { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); }
.lg { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.lg-v { background: #2F8F80; } .lg-p { background: color-mix(in srgb, var(--teal) 35%, transparent); }
.chart { width: 100%; min-height: 240px; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 10.5px; font-family: var(--font); }
.chart .bar { fill: color-mix(in srgb, var(--teal) 32%, transparent); }
.chart .bar:hover { fill: color-mix(in srgb, var(--teal) 60%, transparent); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: color-mix(in srgb, var(--accent) 10%, transparent); }
.chart .dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.vis-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin: 16px 0; }
.vis-grid-3 { grid-template-columns: repeat(3, 1fr); }
.vmap { height: 340px; }
.vmap .jvm-zoom-btn { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.jvm-tooltip { background: #263238 !important; font-family: var(--font) !important; border-radius: 8px !important; padding: 6px 10px !important; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.bars li { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 8px; font-size: .88rem; overflow: hidden; }
.bar-fill { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); border-radius: 8px; z-index: 0; }
.bar-label, .bar-val { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.bar-label > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-label .ico { color: var(--accent); }
.bar-val small { color: var(--muted); width: 34px; text-align: right; }
.flag-none { display: inline-grid; place-items: center; border-radius: 50%; background: var(--bg-soft); color: var(--muted); }
.flag-none .ico { width: 60%; height: 60%; }
.donut-wrap { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; }
.donut-t { font-size: 7px; font-weight: 700; fill: var(--text); font-family: var(--font); }
.heat { display: grid; grid-template-columns: 34px repeat(24, 1fr); gap: 3px; font-size: .68rem; color: var(--muted); }
.heat-h { text-align: center; }
.heat-d { display: flex; align-items: center; text-transform: capitalize; }
.heat-c { aspect-ratio: 1; border-radius: 4px; background: var(--bg-soft); position: relative; overflow: hidden; }
.heat-c::after { content: ""; position: absolute; inset: 0; background: #2F8F80; opacity: var(--o); }
.loc-cell { display: flex; align-items: center; gap: 8px; }
.vis-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 18px 0 8px; }
.vis-foot .ico { color: var(--accent); }
.visitor-hero { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; margin-bottom: 16px; }

.visitor-facts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
.visitor-facts span { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 8px 14px; display: flex; flex-direction: column; }
.visitor-facts small { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.journey { margin-bottom: 12px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 62px 18px 1fr; gap: 8px; align-items: baseline; padding: 6px 0; font-size: .9rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 78px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline li:first-child::before { top: 50%; } .timeline li:last-child::before { bottom: 50%; }
.tl-time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .8rem; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); position: relative; z-index: 1; margin-left: 5px; box-shadow: 0 0 0 3px var(--surface); }
@media (max-width: 1280px) { .vis-top { grid-template-columns: 1fr; } .kpis { grid-template-columns: repeat(4, 1fr); } .vis-grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) { .vis-grid, .vis-grid-3 { grid-template-columns: 1fr; } .kpis { grid-template-columns: repeat(2, 1fr); } .heat { font-size: .6rem; gap: 2px; } }
.vis-grid { align-items: start; }
.donut-wrap { grid-template-columns: 1fr; justify-items: center; }
.donut-wrap .bars { width: 100%; }

/* free-entry toggle → paid prices collapse down */
.collapse { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .3s var(--ease), opacity .25s; }
.collapse.is-open { grid-template-rows: 1fr; opacity: 1; }
.collapse-inner { overflow: hidden; min-height: 0; }
.collapse:not(.is-open) .collapse-inner { visibility: hidden; }
.pax.is-free .pax-total, .pax.is-free .hint { display: none; }
.when-time { display: flex; align-items: center; gap: 7px; margin-top: 3px; font-weight: 600; font-size: .95rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.when-time .ico { width: 15px; height: 15px; color: var(--accent); }

/* legal pages */
.legal-toc { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 24px; padding: 18px 22px; margin-bottom: 28px; font-size: .92rem; }
.legal-toc a { color: var(--text-2); padding: 4px 0; }
.legal-toc a:hover { color: var(--accent); }
.legal h2 { font-size: 1.3rem; margin: 34px 0 12px; scroll-margin-top: 90px; color: var(--text); }
.legal h2:first-child { margin-top: 0; }
.legal ul { padding-left: 20px; margin: 0 0 1.1em; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal strong { color: var(--text); }
.legal code { font-size: .85em; background: var(--bg-soft); padding: 2px 6px; border-radius: 6px; }
.legal-table { margin: 6px 0 16px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.legal-table td { vertical-align: top; }
.footer-legal { display: flex; gap: 18px; }
.footer-legal a:hover { color: var(--accent); }
.legal-note { display: flex; gap: 8px; align-items: flex-start; font-size: .8rem; color: var(--muted); margin: 0 0 12px; line-height: 1.45; }
.legal-note .ico { flex: none; margin-top: 2px; color: var(--accent); }
.legal-note a, .check-legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.check-legal { align-items: flex-start; font-size: .88rem; line-height: 1.45; }
.check-legal input { margin-top: 3px; }
@media (max-width: 560px) { .legal-toc { grid-template-columns: 1fr; } .footer-legal { order: 3; } }

/* install app */
.install-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 999px; padding: 6px 14px 6px 6px; font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; transition: border-color .2s, background-color .2s; }
.install-btn img { border-radius: 50%; }
.install-btn:hover { border-color: var(--teal); background: var(--accent-soft); }
.install-btn[hidden] { display: none; }
.toast { max-width: 420px; }

/* iPhone installed app (status bar "black-translucent"): keep content below the clock/notch
   and paint the strip behind the white status-bar text in brand slate, in both themes */
body::before { content: ""; position: fixed; z-index: 200; left: 0; right: 0; top: 0; height: env(safe-area-inset-top, 0px); background: #263238; pointer-events: none; }
.site-header, .admin-top { top: env(safe-area-inset-top, 0px); }
body { padding-top: env(safe-area-inset-top, 0px); }
.drawer-panel { padding-top: calc(18px + env(safe-area-inset-top, 0px)); padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
.toasts { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
@supports (padding: max(0px)) { .site-footer { padding-bottom: env(safe-area-inset-bottom, 0px); } }
.badge-owner { background: color-mix(in srgb, #E9A23B 18%, transparent); color: #B7791F; }
[data-theme="dark"] .badge-owner { color: #E9B45A; }

/* ===== mobile & tablet: no sideways sliding ===== */
html, body { max-width: 100%; overflow-x: clip; overscroll-behavior-x: none; }
@supports not (overflow-x: clip) { body { overflow-x: hidden; } }
body { touch-action: pan-y pinch-zoom; }            /* vertical scroll + zoom; scroll boxes (tables) still swipe sideways */
.table-wrap, .seg-scroll, .live-list, .inbox-list { touch-action: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
img, svg, video, iframe { max-width: 100%; }
/* grid/flex children may shrink instead of pushing the page wider */
.admin-grid > *, .vis-grid > *, .edit-grid > *, .edit-main > *, .edit-side > *, .account-grid > *, .contact-grid > *, .event-layout > *, .hero-grid > *, .vis-top > *, .inbox > *, .admin-main, .admin-content { min-width: 0; }
.ev-title strong, .ev-title small { overflow-wrap: anywhere; }

@media (max-width: 760px) {
  /* dropdown menus (language / theme / account) open as a full-width sheet under the header */
  .menu, .menu-right { position: fixed; left: 12px; right: 12px; top: calc(70px + env(safe-area-inset-top, 0px)); min-width: 0; transform: translateY(-6px); transform-origin: top center; }
  .dropdown.is-open .menu, .dropdown.is-open .menu-right { transform: none; }
  .admin-top { gap: 8px; padding: 0 12px; }
  .admin-top .header-actions { gap: 6px; }
  .admin-top .btn-sm { padding: 0 10px; }
  .admin-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
  .header-actions { min-width: 0; }
  .pill-btn { padding: 0 8px; }
  .ev-tools { padding: 12px; }
  .ev-tools .row-actions { width: 100%; }
  .ev-tools .row-actions .btn { flex: 1; }
  .filters { gap: 10px; }
  .search { min-width: 0; width: 100%; }
}

/* tables keep readable words and scroll sideways inside their own box on small screens */
.table-wrap { overflow-x: auto; max-width: 100%; }
.table th, .table td { white-space: nowrap; }
.table td.notes-cell, .table td .cell-event span { white-space: normal; min-width: 160px; }
.segmented { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.segmented a { white-space: nowrap; flex: none; }

/* ===== QR tickets ===== */
.qr { display: block; margin: 0 auto; aspect-ratio: 1; }
.qr svg { display: block; width: 100%; height: 100%; }
.qr-modal { width: min(240px, 70vw); margin: 10px auto 4px; filter: drop-shadow(0 8px 20px rgba(20, 35, 40, .16)); border-radius: 14px; }
.ticket-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.ticket-wrap { max-width: 460px; }
.ticket { padding: 0; overflow: hidden; }
.ticket-top { padding: 24px 24px 18px; background: #263238; color: #fff; }
.ticket-top h1 { font-size: 1.5rem; margin: 8px 0 12px; color: #fff; }
.ticket-top .eyebrow { color: #6CC7B9; }
.ticket-when { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; color: rgba(255, 255, 255, .82); font-size: .93rem; }
.ticket-when .ico { color: #6CC7B9; }
.ticket-when .nav-btn { background: rgba(108, 199, 185, .2); border-color: transparent; color: #6CC7B9; }
.ticket-cut { height: 22px; position: relative; background: radial-gradient(circle at 0 50%, var(--bg) 11px, transparent 12px) left / 50% 100% no-repeat, radial-gradient(circle at 100% 50%, var(--bg) 11px, transparent 12px) right / 50% 100% no-repeat; border-top: 2px dashed var(--border); margin-top: -1px; }
.ticket-body { padding: 6px 24px 24px; }
.ticket-qr { position: relative; width: min(300px, 100%); margin: 4px auto 0; }
.ticket-qr.is-used .qr { opacity: .18; filter: grayscale(1); }
.used-stamp { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-weight: 800; font-size: 1.15rem; color: var(--ok); text-transform: uppercase; letter-spacing: .06em; }
.used-stamp .ico { width: 44px; height: 44px; }
.ticket-code { display: block; text-align: center; font-size: 1.7rem; margin: 10px 0 0; }
.ticket-facts { list-style: none; padding: 0; margin: 10px 0 0; border-top: 1px solid var(--border); }
.ticket-facts li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .93rem; }
.ticket-facts small { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; font-weight: 700; }
.ticket-facts strong { text-align: right; }

/* ===== door check-in ===== */
.checkin { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.checkin > * { min-width: 0; }
.checkin-side { display: grid; gap: 16px; }
.scan-box { position: relative; aspect-ratio: 1; max-width: 460px; margin: 0 auto; border-radius: 22px; overflow: hidden; background: var(--surface-2); border: 2px dashed var(--border-strong); display: grid; place-items: center; }
.scan-box.is-live { background: #000; border-style: solid; border-color: #263238; }
.scan-box video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-idle { text-align: center; padding: 24px; display: grid; gap: 14px; justify-items: center; }
.scan-idle .big-ico { margin: 0; }
.scan-frame { position: absolute; inset: 18%; pointer-events: none; }
.scan-frame span { position: absolute; width: 34px; height: 34px; border: 4px solid #6CC7B9; }
.scan-frame span:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-radius: 12px 0 0 0; }
.scan-frame span:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-radius: 0 12px 0 0; }
.scan-frame span:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 12px; }
.scan-frame span:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 12px 0; }
.scan-frame::after { content: ""; position: absolute; left: 6%; right: 6%; height: 2px; background: #6CC7B9; box-shadow: 0 0 12px #6CC7B9; animation: scanline 1.8s ease-in-out infinite alternate; }
@keyframes scanline { from { top: 8%; } to { top: 92%; } }
.manual { display: flex; gap: 10px; align-items: flex-end; margin-top: 16px; }
.manual input { text-transform: uppercase; font-family: ui-monospace, Consolas, monospace; letter-spacing: .06em; }
.verdict { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 16px; }
.verdict > .ico { width: 34px; height: 34px; flex: none; }
.verdict strong { display: block; font-size: 1.15rem; }
.verdict small { opacity: .85; }
.verdict-ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.verdict-warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.verdict-used { background: color-mix(in srgb, #4F8EF7 15%, transparent); color: #4F8EF7; }
.verdict-bad { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.who { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 18px 0 10px; }
.who h2 { margin: 6px 0 0; font-size: 1.5rem; }
.pax-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.checkin-notes { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--bg-soft); font-size: .9rem; margin: 0 0 12px; }
.checkin-notes .ico { color: var(--accent); margin-top: 3px; flex: none; }
.seats { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0; }
.seat { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-soft); color: var(--muted); border: 1px solid var(--border); }
.seat .ico { width: 20px; height: 20px; }
.seat.is-in { background: var(--ok); color: #fff; border-color: var(--ok); }
.seat-count { margin-left: auto; font-size: 1.8rem; font-family: var(--font-display); letter-spacing: -.03em; }
.admit { display: grid; gap: 10px; }
.admit-one { --h: 64px; font-size: 1.1rem; }
.after-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.arrivals { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 8px; }
.arrivals strong { font-size: 2.2rem; font-family: var(--font-display); letter-spacing: -.03em; }
.arrivals span { color: var(--muted); }
.entries { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.entries a { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; }
.entries a:hover { background: var(--bg-soft); color: inherit; }
.entry-time { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.entry-name { display: flex; flex-direction: column; min-width: 0; font-size: .9rem; }
@media (max-width: 1100px) { .checkin { grid-template-columns: 1fr; } }

/* "Created by BlackLayer" credit */
.footer-credit { display: flex; justify-content: center; align-items: center; gap: 6px; padding-top: 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); margin-top: -8px; color: var(--muted); font-size: .8rem; }
.footer-credit a { font-weight: 700; color: var(--text-2); letter-spacing: .02em; }
.footer-credit a:hover { color: var(--accent); }

/* ===== profile & settings ===== */
.avatar-img { overflow: hidden; background: var(--bg-soft); }
.avatar-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-lg { width: 84px; height: 84px; font-size: 2rem; }
.avatar-xl { width: 96px; height: 96px; font-size: 2.4rem; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--teal); }
.bday-banner { display: flex; gap: 12px; align-items: center; padding: 14px 18px; margin-bottom: 16px; border-radius: 16px; background: linear-gradient(120deg, color-mix(in srgb, var(--teal) 30%, transparent), color-mix(in srgb, #F2B84B 30%, transparent)); font-weight: 550; }
.bday-banner .ico { width: 26px; height: 26px; color: var(--accent); flex: none; }
.profile-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 24px; margin-bottom: 20px; }
.hero-avatar { position: relative; }
.avatar-edit { position: absolute; right: -2px; bottom: -2px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--primary-text); cursor: pointer; border: 3px solid var(--surface); }
.avatar-edit .ico { width: 15px; height: 15px; }
.hero-who h1 { margin: 8px 0 4px; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.hero-who p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .9rem; }
.hero-who p .ico { width: 14px; height: 14px; }
.hero-who .dot { opacity: .5; }
.hero-complete { display: grid; justify-items: center; gap: 6px; }
.hero-complete small { color: var(--muted); font-size: .75rem; font-weight: 600; text-align: center; }
.ring { --p: 0; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--teal) calc(var(--p) * 1%), var(--bg-soft) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--surface); }
.ring strong { position: relative; font-family: var(--font-display); font-size: 1.05rem; }
.profile-layout { display: grid; grid-template-columns: 230px 1fr; gap: 22px; align-items: start; }
.profile-layout > * { min-width: 0; }
.profile-nav { position: sticky; top: 90px; display: grid; gap: 4px; padding: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.profile-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; font-weight: 600; font-size: .93rem; color: var(--text-2); }
.profile-nav a:hover { background: var(--bg-soft); color: var(--text); }
.profile-nav a.is-active { background: var(--primary); color: var(--primary-text); }
.profile-nav a .ico { width: 18px; height: 18px; flex: none; }
.profile-nav a em { margin-left: auto; font-style: normal; font-size: .75rem; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; background: var(--teal); color: #0E1A1C; }
.profile-nav .nav-admin { border-top: 1px solid var(--border); border-radius: 0 0 12px 12px; margin-top: 4px; padding-top: 14px; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.next-ticket { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; margin-bottom: 18px; }
.next-ticket h2 { margin: 8px 0 10px; font-size: 1.4rem; }
.ticket-line { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; color: var(--text-2); font-size: .93rem; }
.ticket-line .ico { color: var(--accent); flex: none; }
.countdown-pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 12px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .85rem; }
.next-qr { display: grid; justify-items: center; gap: 6px; width: 170px; padding: 12px; border-radius: 18px; background: #fff; border: 1px solid var(--border); transition: transform .2s var(--ease); }
.next-qr:hover { transform: scale(1.03); }
.next-qr .qr { width: 146px; }
.next-qr .code { color: #263238; font-size: .95rem; }
.overview-grid { gap: 18px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.checklist a { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px; color: var(--text); font-size: .92rem; }
.checklist a:hover { background: var(--bg-soft); }
.checklist .ico { color: var(--warn); flex: none; }
.checklist .is-done a { color: var(--muted); text-decoration: line-through; }
.checklist .is-done .ico { color: var(--ok); }
.checklist .go { margin-left: auto; color: var(--muted); width: 14px; }
.family-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fam-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 99px; background: var(--bg-soft); border: 1px solid var(--border); }
.fam-chip > span:last-child { display: flex; flex-direction: column; line-height: 1.15; font-size: .85rem; }
.fam-chip small { color: var(--muted); font-size: .72rem; }
.fam-chip .avatar .ico { width: 14px; height: 14px; }
.av-child { background: #F2B84B; }
.last-login { display: flex; align-items: center; gap: 6px; margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--border); }
.booking-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.danger-text { color: var(--danger) !important; }
.photo-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.photo-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.photo-actions small { flex-basis: 100%; }
.photo-actions label.btn { cursor: pointer; }
.fam-me { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg-soft); margin: 14px 0 10px; }
.fam-list { display: grid; gap: 10px; }
.fam-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 8px; align-items: center; }
.fam-row input, .fam-row select { margin: 0; }
.fam-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.sec-grid { gap: 18px; align-items: start; }
.pw-meter { height: 6px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; margin: -4px 0 4px; }
.pw-meter span { display: block; height: 100%; width: 0; background: var(--danger); transition: width .25s, background-color .25s; }
.pw-meter[data-s="1"] span { width: 25%; background: var(--danger); }
.pw-meter[data-s="2"] span { width: 50%; background: var(--warn); }
.pw-meter[data-s="3"] span { width: 75%; background: var(--teal); }
.pw-meter[data-s="4"] span { width: 100%; background: var(--ok); }
.card-head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.login-list { list-style: none; margin: 0; padding: 0; }
.login-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.login-list li:last-child { border-bottom: 0; }
.login-list .dev-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--bg-soft); color: var(--text-2); flex: none; }
.login-list .dev-text { display: flex; flex-direction: column; min-width: 0; font-size: .9rem; flex: 1; }
.login-list .dev-text small { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.login-list .is-fail .dev-ico { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.choice-row { display: flex; gap: 10px; flex-wrap: wrap; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice > span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 14px; border: 2px solid var(--border); cursor: pointer; font-weight: 600; font-size: .92rem; transition: border-color .15s, background-color .15s; }
.choice input:checked + span { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 12%, transparent); }
.choice input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.theme-prev i { width: 22px; height: 22px; border-radius: 7px; border: 1px solid var(--border-strong); flex: none; }
.theme-light i { background: #F5F7F6; }
.theme-dark i { background: #0F1518; }
.theme-system i { background: linear-gradient(135deg, #F5F7F6 50%, #0F1518 50%); }
.switch-row { justify-content: space-between; padding: 12px 0; margin: 0; border-bottom: 1px solid var(--border); }
.switch-row > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.switch-row small { font-weight: 400; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.danger-zone .card-title .ico { color: var(--danger); }
.danger-zone .grid-2 { align-items: end; }
@media (max-width: 900px) {
  .profile-layout { grid-template-columns: 1fr; }
  .profile-nav { position: static; display: flex; overflow-x: auto; scrollbar-width: none; padding: 6px; gap: 4px; }
  .profile-nav::-webkit-scrollbar { display: none; }
  .profile-nav a { flex: none; padding: 9px 12px; white-space: nowrap; }
  .profile-nav .nav-admin { border-top: 0; margin-top: 0; padding-top: 9px; border-radius: 12px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .profile-hero { grid-template-columns: auto 1fr; padding: 18px; gap: 14px; }
  .profile-hero .avatar-xl { width: 72px; height: 72px; font-size: 1.8rem; }
  .hero-complete { grid-column: 1 / -1; grid-template-columns: auto 1fr; justify-items: start; align-items: center; gap: 12px; }
  .hero-complete .ring { width: 52px; height: 52px; }
  .hero-complete .ring::before { inset: 6px; }
  .hero-complete .ring strong { font-size: .8rem; }
  .next-ticket { grid-template-columns: 1fr; }
  .next-qr { justify-self: center; }
  .fam-row { grid-template-columns: 1fr 1fr auto; }
  .fam-row input[name="m_name[]"] { grid-column: 1 / -1; }
  .booking-actions { flex-direction: row; }
}

/* overview: empty next-event card keeps the same gap as the rest */
.next-empty { padding: 30px; margin-bottom: 18px; }
.profile-main > .card + .card, .profile-main > .card + .grid-2 { margin-top: 0; }

/* ===== photo cropper ===== */
.crop-modal .modal-card { width: min(640px, 100%); }
.crop-stage { position: relative; width: 100%; height: min(58vh, 480px); margin: 0 auto; border-radius: 16px; overflow: hidden; touch-action: none; user-select: none;
  background: repeating-conic-gradient(#d9dfde 0 25%, #f3f5f4 0 50%) 0 0 / 18px 18px; }
[data-theme="dark"] .crop-stage { background: repeating-conic-gradient(#25303a 0 25%, #1a232b 0 50%) 0 0 / 18px 18px; }
.crop-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.crop-stage canvas:active { cursor: grabbing; }
.crop-hole { position: absolute; pointer-events: none; border-radius: 14px; box-shadow: 0 0 0 2px #fff, 0 0 0 9999px rgba(12, 20, 22, .55);
  background-image: linear-gradient(rgba(255,255,255,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px); background-size: 33.333% 33.333%; background-position: -1px -1px; }
.crop-stage.is-round .crop-hole { border-radius: 50%; }
.crop-tools { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.crop-tools .icon-btn { font-size: 1.3rem; font-weight: 700; width: 42px; height: 42px; flex: none; }
.crop-tools input[type=range] { flex: 1; min-width: 0; accent-color: var(--teal); }
.crop-tools-2 { flex-wrap: wrap; margin-top: 10px; }
.crop-tools-2 label.btn { cursor: pointer; }
.crop-bg { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.bg-dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--c); cursor: pointer; padding: 0; }
.bg-dot[data-bg=""] { background: repeating-conic-gradient(#cfd6d5 0 25%, #fff 0 50%) 0 0 / 10px 10px; }
.bg-dot.is-active { outline: 3px solid var(--teal); outline-offset: 2px; }
@media (max-width: 640px) { .crop-stage { height: min(52vh, 380px); } }

/* ===== gallery + local video ===== */
.local-video { display: block; width: 100%; max-height: 70vh; border-radius: var(--radius); background: #000; margin: 14px 0 24px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.gal-thumb { padding: 0; border: 0; aspect-ratio: 1; border-radius: 14px; overflow: hidden; cursor: zoom-in; background: var(--bg-soft); }
.gal-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.gal-thumb:hover img { transform: scale(1.06); }
.lightbox { padding: 0; border: 0; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; background: rgba(8, 12, 14, .94); display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(8, 12, 14, .7); }
.lightbox img { max-width: 94vw; max-height: 86vh; object-fit: contain; border-radius: 10px; }
.lb-btn { position: fixed; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 1.6rem; cursor: pointer; display: grid; place-items: center; }
.lb-btn:hover { background: rgba(255,255,255,.26); }
.lb-x { top: 16px; right: 16px; font-size: 1.2rem; }
.lb-p { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-n { right: 14px; top: 50%; transform: translateY(-50%); }
.lb-c { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.8); font-size: .9rem; }
.sub-title { display: flex; align-items: center; gap: 8px; margin: 22px 0 10px; font-size: 1rem; }
.gal-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.gal-item { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; cursor: pointer; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; }
.gal-item input { position: absolute; opacity: 0; }
.gal-x { position: absolute; inset: 0; display: none; place-items: center; background: color-mix(in srgb, var(--danger) 60%, transparent); color: #fff; }
.gal-item input:checked + .gal-x { display: grid; }

/* ===== import & backup ===== */
.import-grid { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.import-grid > * { min-width: 0; }
.import-side { display: grid; gap: 16px; }
.import-form .switch { margin-bottom: 10px; }
.import-form .btn { margin-top: 8px; }
.imp-progress { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.imp-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.imp-log { list-style: none; margin: 14px 0 0; padding: 0; max-height: 520px; overflow-y: auto; }
.imp-log li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.imp-log .imp-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.imp-log .imp-a { white-space: nowrap; font-size: .82rem; }
.imp-log .is-err { color: var(--danger); }
.kv { list-style: none; padding: 0; margin: 0 0 12px; }
.kv li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.kv span { color: var(--muted); }
@media (max-width: 1100px) { .import-grid { grid-template-columns: 1fr; } }
.video-list.is-multi { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 14px 0 24px; }
.video-list.is-multi .local-video { margin: 0; }

.year-chips { margin: -6px 0 16px; }
.vbadge { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 99px; background: rgba(0,0,0,.6); color: #fff; font-size: .72rem; font-weight: 700; }
.vbadge .ico { width: 12px; height: 12px; }
.video-thumb video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.video-frame video { width: 100%; height: 100%; background: #000; }

/* avatars never stretch (admin tables give text spans a min-width) */
.avatar, .table td .cell-event .avatar { min-width: 0 !important; flex: none; aspect-ratio: 1; white-space: nowrap; }
.table td .cell-event .avatar { width: 38px; height: 38px; }
.avatar-img img { aspect-ratio: 1; }

/* Android edge-to-edge: area behind the gesture bar shows the page colour */
html { background-color: var(--bg); }
.site-footer::after { content: ""; display: block; height: env(safe-area-inset-bottom, 0px); }

/* ---------- tessera socio (soci.php) ---------- */
.soci-head { text-align: center; margin: 8px 0 20px; }
.soci-head h1 { margin: 6px 0 8px; }
.soci-fees, .soci-status, .soci-cta { margin-bottom: 18px; }
.soci-fee-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.soci-fee-row:last-child { border-bottom: 0; }
.soci-total { font-size: 1.1rem; border-top: 2px solid var(--border-strong, var(--border)); border-bottom: 0; margin-top: 4px; }
.soci-calc { margin: 14px 0; }
.soci-badge { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--ok) 12%, transparent); }
.soci-badge .ico { width: 34px; height: 34px; color: var(--ok); flex: none; }
.soci-badge div { display: grid; gap: 2px; }
.soci-badge strong { font-size: 1.1rem; }
.soci-badge.is-no { background: var(--bg-soft, rgba(0,0,0,.04)); }
.soci-badge.is-no .ico { color: var(--accent); }
.soci-pay { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); text-align: center; }
.soci-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.soci-sede { margin-top: 12px; }
.soci-wait { background: var(--bg-soft, rgba(0,0,0,.04)); }
