:root {
  --bg: #f3f6f4;
  --bg-soft: #e7efe9;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --ink: #15231f;
  --ink-soft: #2c3d37;
  --muted: #5c6f68;
  --line: rgba(21, 35, 31, 0.1);
  --teal: #1f8a70;
  --teal-deep: #146654;
  --coral: #e85d4c;
  --coral-soft: #f08a7d;
  --sand: #d8c4a4;
  --ok: #1f8a70;
  --danger: #d64545;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 18px 40px rgba(21, 35, 31, 0.08);
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --max: 1120px;
  --header-h: 58px;
  --tabbar-h: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 8% -5%, rgba(31, 138, 112, 0.16), transparent 60%),
    radial-gradient(800px 480px at 96% 8%, rgba(232, 93, 76, 0.12), transparent 55%),
    radial-gradient(700px 420px at 50% 100%, rgba(216, 196, 164, 0.22), transparent 50%),
    linear-gradient(180deg, #f7faf8 0%, var(--bg) 40%, #eef3f0 100%);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
}
body.is-home {
  --font-display: "Cormorant Garamond", "Fraunces", Georgia, serif;
}
html[data-theme="dark"] body.is-home {
  --home-bg: #0b0f0e;
  --home-ink: #f6f0e6;
  --home-muted: rgba(246, 240, 230, 0.58);
  --home-line: rgba(246, 240, 230, 0.1);
  --home-gold: #d4b57a;
  --home-gold-soft: #efd7a5;
  background: var(--home-bg);
  color: var(--home-ink);
}
html[data-theme="light"] body.is-home {
  --home-bg: #f6f7f5;
  --home-ink: #15231f;
  --home-muted: #5c6f68;
  --home-line: rgba(21, 35, 31, 0.1);
  --home-gold: #1f8a70;
  --home-gold-soft: #146654;
  background: var(--home-bg);
  color: var(--home-ink);
}
html[data-theme="dark"] body.is-home .site-header {
  background: rgba(11, 15, 14, 0.78);
  border-bottom-color: var(--home-line);
}
html[data-theme="dark"] body.is-home .logo,
html[data-theme="dark"] body.is-home .nav a,
html[data-theme="dark"] body.is-home .linkish,
html[data-theme="dark"] body.is-home .icon-btn,
html[data-theme="dark"] body.is-home .theme-toggle {
  color: var(--home-ink);
}
html[data-theme="dark"] body.is-home .logo span { color: var(--home-gold-soft); }
html[data-theme="dark"] body.is-home .nav a { color: var(--home-muted); }
html[data-theme="dark"] body.is-home .nav a.is-active,
html[data-theme="dark"] body.is-home .nav a:hover,
html[data-theme="dark"] body.is-home .linkish:hover { color: var(--home-ink); }
html[data-theme="dark"] body.is-home .icon-btn,
html[data-theme="dark"] body.is-home .theme-toggle {
  background: rgba(255,255,255,.04);
  border-color: var(--home-line);
}
html[data-theme="dark"] body.is-home .lang-switch {
  background: rgba(255,255,255,.04);
  border-color: var(--home-line);
}
html[data-theme="dark"] body.is-home .lang-switch a { color: var(--home-muted); }
html[data-theme="dark"] body.is-home .lang-switch a.is-active {
  background: var(--home-gold);
  color: #14110c;
}
html[data-theme="dark"] body.is-home .nav .btn-accent {
  background: var(--home-gold);
  color: #14110c !important;
}
html[data-theme="dark"] body.is-home .site-footer {
  border-top-color: var(--home-line);
  color: var(--home-muted);
}
html[data-theme="dark"] body.is-home .site-footer strong { color: var(--home-ink); }
html[data-theme="dark"] body.is-home .site-footer p { color: var(--home-muted); }
html[data-theme="dark"] body.is-home .tabbar {
  background: rgba(11, 15, 14, 0.94);
  border-top-color: var(--home-line);
}
html[data-theme="dark"] body.is-home .tab {
  color: var(--home-muted);
}
html[data-theme="dark"] body.is-home .tab.is-active { color: var(--home-gold-soft); }
html[data-theme="dark"] body.is-home .app-splash {
  background: var(--home-bg);
}
html[data-theme="dark"] body.is-home .app-splash-mark { color: var(--home-ink); }
html[data-theme="dark"] body.is-home .app-splash-mark span { color: var(--home-gold-soft); }

/* —— Home dark luxe —— */
.home-hero{
  position:relative;
  min-height:calc(100dvh - var(--header-h));
  display:grid;
  align-items:end;
  overflow:hidden;
  color:var(--home-ink, #fff);
}
.home-hero-media{
  position:absolute;inset:0;
  background-size:cover;
  background-position:center 26%;
  transform:scale(1.06);
  will-change:transform;
  filter:saturate(.9) contrast(1.06);
}
.home-hero-veil{
  position:absolute;inset:0;
  background:
    linear-gradient(180deg, rgba(11,15,14,.5) 0%, rgba(11,15,14,.2) 36%, rgba(11,15,14,.9) 100%),
    linear-gradient(90deg, rgba(11,15,14,.68) 0%, transparent 60%);
}
.home-hero-copy{
  position:relative;z-index:2;
  width:min(var(--max),100%);
  margin:0 auto;
  padding:clamp(4rem,13vh,7.5rem) clamp(1.15rem,3.5vw,2rem) clamp(2.8rem,8vh,4rem);
}
.home-brand{
  font-family:var(--font-display);
  font-size:clamp(4.2rem,14vw,8.2rem);
  line-height:.86;
  letter-spacing:-.03em;
  margin:0 0 .65rem;
  font-weight:600;
  max-width:9ch;
}
.home-brand span{color:var(--home-gold-soft, #efd7a5)}
.home-tagline{
  margin:0;
  max-width:14ch;
  font-size:clamp(1.2rem,2.5vw,1.55rem);
  font-weight:500;
  line-height:1.25;
  color:rgba(246,240,230,.86);
}
html[data-theme="light"] .home-tagline{color:rgba(255,255,255,.9)}
.home-rule{
  width:72px;
  height:1px;
  margin:1.25rem 0 1.55rem;
  background:linear-gradient(90deg, var(--home-gold, #d4b57a), transparent);
}
.home-cta-row{display:flex;flex-wrap:wrap;gap:.75rem}
.home-btn-primary{
  background:linear-gradient(180deg, color-mix(in srgb, var(--home-gold) 88%, #fff) 0%, var(--home-gold, #d4b57a) 100%)!important;
  color:#14110c!important;
  border:1px solid rgba(255,236,190,.35)!important;
  border-radius:3px!important;
  min-width:11.5rem;
  letter-spacing:.01em;
}
html[data-theme="light"] .home-btn-primary{
  background:#fff!important;
  color:#14110c!important;
  border-color:transparent!important;
}
.home-btn-primary:hover{filter:brightness(1.05);transform:translateY(-1px)}
.home-btn-ghost{
  background:transparent!important;
  color:#fff!important;
  border:1px solid rgba(255,255,255,.4)!important;
  border-radius:3px!important;
  min-width:7.5rem;
}
.home-btn-ghost:hover{
  background:rgba(255,255,255,.1)!important;
  color:#fff!important;
}

.home-section{
  width:min(var(--max),100%);
  margin:0 auto;
  padding:clamp(3.8rem,9vw,6rem) clamp(1.15rem,3.5vw,2rem);
}
.home-section-head{
  max-width:24rem;
  margin:0 0 2rem;
}
.home-section-head h2{
  font-family:var(--font-display);
  font-size:clamp(2.3rem,5vw,3.2rem);
  margin:0 0 .5rem;
  letter-spacing:-.02em;
  font-weight:600;
  line-height:1.05;
  color:var(--home-ink, #f6f0e6);
}
.home-section-head p{
  margin:0;
  color:var(--home-muted, rgba(246,240,230,.58));
  font-size:1.02rem;
}

.home-occ-rail{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:.85rem;
}
@media (min-width:700px){
  .home-occ-rail{
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:1rem;
  }
}
@media (min-width:1040px){
  .home-occ-rail{
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:1.1rem;
  }
}
.home-occ{
  position:relative;
  display:block;
  aspect-ratio:4/5;
  overflow:hidden;
  border-radius:22px;
  color:#fff;
  isolation:isolate;
  border:0;
  outline:1px solid rgba(246,240,230,.06);
}
.home-occ-photo{
  position:absolute;inset:0;
  background-size:cover;
  background-position:center;
  transition:transform .7s ease;
  filter:saturate(.9);
}
.home-occ::after{
  content:"";
  position:absolute;inset:0;
  background:linear-gradient(180deg, transparent 32%, rgba(8,10,9,.9) 100%);
  z-index:1;
}
.home-occ-name{
  position:absolute;left:0;right:0;bottom:0;z-index:2;
  padding:1.1rem 1.05rem 1.15rem;
  font-family:var(--font-display);
  font-size:clamp(1.3rem,2.3vw,1.7rem);
  font-weight:600;
  letter-spacing:-.015em;
  line-height:1.1;
}
.home-occ-name::after{
  content:"";
  display:block;
  width:32px;height:1px;
  margin-top:.5rem;
  background:var(--home-gold, #d4b57a);
  opacity:.85;
  border-radius:999px;
}
.home-occ:hover .home-occ-photo,
.home-occ:focus-visible .home-occ-photo{transform:scale(1.04)}
.home-occ:focus-visible{
  outline:2px solid var(--home-gold, #d4b57a);
  outline-offset:2px;
}

.home-section-how{
  border-top:1px solid var(--home-line, rgba(246,240,230,.1));
  border-bottom:1px solid var(--home-line, rgba(246,240,230,.1));
  background:rgba(255,255,255,.02);
}
.home-how-list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:0;
}
@media (min-width:860px){
  .home-how-list{grid-template-columns:repeat(3,minmax(0,1fr))}
  .home-how-item{border-bottom:0!important}
  .home-how-item + .home-how-item{border-left:1px solid var(--home-line, rgba(246,240,230,.1))}
}
.home-how-item{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:1rem;
  align-items:start;
  padding:1.4rem 0;
  border-bottom:1px solid var(--home-line, rgba(246,240,230,.1));
}
@media (min-width:860px){
  .home-how-item{padding:0 1.5rem}
  .home-how-item:first-child{padding-left:0}
  .home-how-item:last-child{padding-right:0}
}
.home-how-num{
  font-family:var(--font-display);
  font-size:2.55rem;
  font-weight:600;
  color:var(--home-gold, #d4b57a);
  line-height:1;
  letter-spacing:-.03em;
}
.home-how-item h3{
  margin:0 0 .45rem;
  font-family:var(--font-display);
  font-size:1.5rem;
  font-weight:600;
  letter-spacing:-.015em;
  color:var(--home-ink, #f6f0e6);
}
.home-how-item p{
  margin:0;
  color:var(--home-muted, rgba(246,240,230,.58));
  font-size:.96rem;
  line-height:1.55;
}

.home-close{
  position:relative;
  min-height:min(70dvh,580px);
  display:grid;
  place-items:center;
  overflow:hidden;
  color:var(--home-ink, #fff);
  text-align:center;
}
.home-close-media{
  position:absolute;inset:0;
  background-size:cover;
  background-position:center;
  filter:saturate(.82);
}
.home-close-veil{
  position:absolute;inset:0;
  background:rgba(8,10,9,.74);
}
.home-close-copy{
  position:relative;z-index:2;
  padding:3.6rem 1.25rem;
  max-width:28rem;
}
.home-close-copy h2{
  font-family:var(--font-display);
  font-size:clamp(2.5rem,6vw,3.7rem);
  margin:0 0 .6rem;
  letter-spacing:-.02em;
  font-weight:600;
  line-height:1.02;
}
.home-close-copy p{
  margin:0 0 1.5rem;
  color:rgba(246,240,230,.7);
  font-size:1.08rem;
}
.home-close-copy .btn{margin:0 auto}

body.app-shell {
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}
a { color: var(--teal-deep); text-decoration: none; }
a:hover { color: var(--coral); }
img { max-width: 100%; display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
  padding: calc(.65rem + var(--safe-top)) clamp(1rem, 3vw, 1.75rem) .65rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(247, 250, 248, 0.86);
  border-bottom: 1px solid var(--line);
}
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}
.logo span { color: var(--coral); }
.nav { display: flex; gap: .85rem; align-items: center; flex-wrap: wrap; }
.header-mobile { display: none; align-items: center; gap: .45rem; }
.nav a, .linkish {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
}
.nav a.is-active { color: var(--ink); font-weight: 700; }
button.linkish, form.inline {
  background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer;
}
form.inline { display: inline; }
.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.7);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: .15rem;
  padding: .18rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.65);
}
.lang-switch a {
  min-width: 34px;
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  padding: 0 .35rem;
}
.lang-switch a.is-active {
  background: var(--ink);
  color: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  background: var(--ink);
  color: #fff !important;
  border: 0;
  border-radius: var(--radius-sm);
  padding: .85rem 1.35rem;
  min-height: 46px;
  font-weight: 700;
  font-family: var(--font-body);
  font-size: .95rem;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
  touch-action: manipulation;
}
.btn:hover { transform: translateY(-1px); background: #0f1a17; color: #fff !important; }
.btn-sm { padding: .55rem .95rem; font-size: .86rem; }
.btn-accent { background: var(--coral); }
.btn-accent:hover { background: #d44c3c; }
.btn-ghost {
  background: transparent;
  color: var(--ink) !important;
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: rgba(255,255,255,.55); color: var(--ink) !important; }
.btn-danger { background: var(--danger); color: #fff !important; }

/* Legacy hero (unused on home) */
.hero {
  position: relative;
  min-height: calc(100dvh - var(--header-h));
  display: grid;
  align-items: end;
  overflow: hidden;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(21,35,31,.72) 0%, rgba(21,35,31,.42) 46%, rgba(31,138,112,.28) 100%),
    var(--hero-photo, none) center/cover no-repeat,
    linear-gradient(120deg, #15231f, #1f4035);
}
.hero-orbs { display: none; }
.hero-inner {
  position: relative;
  z-index: 2;
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: clamp(4.5rem, 12vh, 7rem) clamp(1.1rem, 3vw, 1.75rem) 3.5rem;
  color: #fff;
}
.brand-hero {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 11vw, 6.8rem);
  line-height: .92;
  letter-spacing: -0.04em;
  margin: 0 0 .85rem;
  font-weight: 700;
}
.brand-hero span { color: #ffb4a8; }
.hero-tag {
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 600;
  margin: 0 0 1.6rem;
  max-width: 24ch;
  color: rgba(255,255,255,.92);
}
.hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; }

.section {
  padding: clamp(3.5rem, 8vw, 5.5rem) clamp(1.1rem, 3vw, 1.75rem);
  width: min(var(--max), 100%);
  margin: 0 auto;
}
.section-head { max-width: 36rem; margin-bottom: 2rem; }
.section h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.85rem);
  margin: 0 0 .55rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}
.section-head p,
.section > p {
  color: var(--muted);
  margin: 0;
  font-size: 1.02rem;
}

.occasion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: .9rem;
}
.occasion {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  min-height: 210px;
  overflow: hidden;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.occasion:hover {
  border-color: rgba(31, 138, 112, 0.45);
  transform: translateY(-3px);
  color: var(--ink);
  box-shadow: 0 16px 32px rgba(21,35,31,.1);
}
.occasion-media {
  display: block;
  aspect-ratio: 16/10;
  background-size: cover;
  background-position: center;
  position: relative;
}
.occasion-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(21,35,31,.35));
}
.occasion-body {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: .85rem .9rem 1rem;
  flex: 1;
}
.occasion-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(31, 138, 112, 0.12);
  color: var(--teal-deep);
  margin-top: -.2rem;
}
.occasion-icon svg { width: 18px; height: 18px; }
.occasion strong {
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.25;
}
.occasion span:last-child {
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.4;
}

.place-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.place {
  padding: 0;
  border-top: 0;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.place:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(21,35,31,.08); }
.place-media {
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
}
.place-body { padding: 1rem 1.05rem 1.15rem; border-top: 2px solid var(--teal); }
.place h3 {
  margin: 0 0 .4rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.place p { margin: 0; color: var(--muted); font-size: .94rem; }

.steps-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  counter-reset: how;
}
.how-step {
  position: relative;
  padding: 0 0 1.15rem;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.how-step::before { content: none; }
.how-media {
  position: relative;
  aspect-ratio: 16/10;
  background-size: cover;
  background-position: center;
  margin-bottom: .9rem;
}
.how-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(21,35,31,.05), rgba(21,35,31,.45));
}
.how-num {
  position: absolute;
  left: .9rem;
  bottom: .7rem;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: #fff;
  letter-spacing: -.02em;
  line-height: 1;
}
.how-step h3,
.how-step p { padding: 0 1.05rem; }
.how-step h3 {
  margin: 0 0 .35rem;
  font-size: 1.05rem;
}
.how-step p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}

.feat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem 1.75rem;
}
.feat-item {
  padding-top: 0;
  border-top: 0;
}
.feat-visual .feat-frame {
  aspect-ratio: 16/10;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  margin-bottom: .85rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(21,35,31,.1);
}
.feat-visual .feat-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(31,138,112,.15), rgba(21,35,31,.35));
}
.feat-item h3 {
  margin: 0 0 .35rem;
  font-size: 1rem;
  font-weight: 700;
}
.feat-item p {
  margin: 0;
  color: var(--muted);
  font-size: .93rem;
}

.cta-band {
  width: min(var(--max), calc(100% - 2.2rem));
  margin: 0 auto 3rem;
  padding: clamp(2rem, 5vw, 3rem);
  border-radius: 18px;
  background:
    radial-gradient(500px 220px at 90% 20%, rgba(232,93,76,.25), transparent 60%),
    linear-gradient(135deg, #15231f, #1f4035 55%, #146654);
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.cta-band-photo {
  background:
    linear-gradient(120deg, rgba(21,35,31,.82), rgba(20,102,84,.72)),
    var(--cta-photo) center/cover no-repeat;
}
.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin: 0 0 .4rem;
  letter-spacing: -0.02em;
}
.cta-band p {
  margin: 0;
  color: rgba(255,255,255,.75);
  max-width: 34rem;
}
.cta-band .btn { background: #fff; color: var(--ink) !important; }

.panel {
  width: min(640px, 100%);
  margin: 2rem auto;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}
.panel h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 0 0 .35rem;
  letter-spacing: -0.02em;
}

/* —— Auth —— */
.auth-shell{
  width: min(1040px, 100%);
  margin: 1.25rem auto 2.5rem;
  padding: 0 clamp(1.1rem, 3vw, 1.75rem);
  display:grid;
  gap:1rem;
}
.auth-visual{
  display:none;
  position:relative;
  min-height:420px;
  border-radius:18px;
  overflow:hidden;
  background:
    linear-gradient(160deg, rgba(21,35,31,.72), rgba(21,35,31,.28)),
    var(--auth-photo) center/cover no-repeat,
    #15231f;
  color:#fff;
}
.auth-visual-inner{
  position:absolute;inset:auto 0 0 0;
  padding:1.6rem 1.5rem 1.7rem;
}
.auth-brand{
  font-family:var(--font-display);
  font-size:clamp(2rem,4vw,2.6rem);
  margin:0 0 .45rem;
  letter-spacing:-.03em;
  line-height:1;
}
.auth-brand span{color:#ffb4a8}
.auth-lead{
  margin:0;
  max-width:28ch;
  color:rgba(255,255,255,.82);
  font-size:1rem;
  line-height:1.45;
}
.auth-panel.panel{
  width:100%;
  margin:0;
  padding:1.45rem 1.35rem 1.5rem;
}
.auth-sub{margin:0 0 1rem;font-size:.92rem}
.auth-form .g-recaptcha{margin-top:1rem}
.auth-hint{margin:1rem 0 0;font-size:.82rem;line-height:1.4}
@media (min-width:860px){
  .auth-shell{
    grid-template-columns:1.05fr .95fr;
    align-items:stretch;
    min-height:calc(100dvh - var(--header-h) - var(--tabbar-h) - 3rem);
  }
  .auth-visual{display:block;min-height:100%}
  .auth-panel.panel{
    display:flex;flex-direction:column;justify-content:center;
    padding:2rem 1.75rem;
  }
}
label { display: block; font-size: .86rem; color: var(--muted); margin: .85rem 0 .35rem; font-weight: 600; }
input, select, textarea {
  width: 100%;
  padding: .75rem .9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* prevent iOS zoom on focus */
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(31,138,112,.28);
  border-color: var(--teal);
}
textarea { min-height: 110px; resize: vertical; }
.form-actions { margin-top: 1.25rem; display: flex; gap: .7rem; flex-wrap: wrap; }
.alert {
  padding: .8rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: .95rem;
}
.alert-error { background: rgba(214,69,69,.1); border: 1px solid rgba(214,69,69,.28); }
.alert-ok { background: rgba(31,138,112,.1); border: 1px solid rgba(31,138,112,.28); }
.muted { color: var(--muted); }

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 2.5rem clamp(1.1rem, 3vw, 1.75rem) 2rem;
  border-top: 1px solid var(--line);
  width: min(var(--max), 100%);
  margin: 1rem auto 0;
}
.site-footer strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
}
.site-footer p { margin: .25rem 0 0; color: var(--muted); font-size: .9rem; }

/* —— Wizard / product —— */
.wizard-wrap {
  width: min(900px, 100%);
  margin: 1.5rem auto 3rem;
  padding: 0 clamp(1.1rem, 3vw, 1.75rem);
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 2.4rem);
  margin: 0;
  letter-spacing: -0.02em;
}
.page-head p { margin: .35rem 0 0; color: var(--muted); }

.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: .8rem;
  margin: 1.35rem 0 1.6rem;
}
.type-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  background: var(--surface-strong);
  cursor: pointer;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  text-align: left;
  display: grid;
  gap: 0;
  min-height: 0;
  overflow: hidden;
}
.type-card:hover { border-color: rgba(31,138,112,.45); transform: translateY(-2px); box-shadow: 0 14px 28px rgba(21,35,31,.08); }
.type-card input { display: none; }
.type-card:has(input:checked) {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(31,138,112,.25);
}
.type-media {
  display: block;
  aspect-ratio: 16/10;
  background-size: cover;
  background-position: center;
}
.type-body {
  display: grid;
  gap: .45rem;
  padding: .9rem .85rem 1rem;
}
.type-card .type-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: rgba(31,138,112,.12);
  color: var(--teal-deep);
}
.type-card .type-icon svg { width: 18px; height: 18px; }
.type-card strong { font-size: .95rem; line-height: 1.25; }
.type-card small { color: var(--muted); font-size: .78rem; line-height: 1.35; }

.steps {
  display: flex;
  gap: .35rem;
  flex-wrap: nowrap;
  margin-bottom: 1.25rem;
  padding: .35rem;
  background: rgba(255,255,255,.55);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  position: sticky;
  top: calc(var(--header-h, 64px) + .35rem);
  z-index: 8;
  backdrop-filter: blur(10px);
}
.steps::-webkit-scrollbar { display: none; }
.steps a {
  font-size: .8rem;
  font-weight: 600;
  padding: .45rem .7rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
  white-space: nowrap;
  scroll-snap-align: start;
  flex: 0 0 auto;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.steps a .step-num {
  width: 1.35rem; height: 1.35rem;
  border-radius: 999px;
  display: inline-grid; place-items: center;
  font-size: .72rem; font-weight: 800;
  background: rgba(21,35,31,.08);
  color: inherit;
}
.steps a.active {
  color: #fff;
  background: var(--ink);
}
.steps a.active .step-num {
  background: rgba(255,255,255,.18);
  color: #fff;
}
.steps a.done { color: var(--teal-deep); }
.steps a.done .step-num {
  background: rgba(31,138,112,.16);
  color: var(--teal-deep);
}

.wizard-panel {
  width: 100%;
  margin: 0;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.venue-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: .35rem 0 1rem;
}
.venue-chips button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius-sm);
  padding: .4rem .7rem;
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}
.venue-chips button:hover,
.venue-chips button.is-on {
  border-color: var(--teal);
  color: var(--teal-deep);
  background: rgba(31,138,112,.08);
}

.extra-row, .media-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: .5rem;
  margin: .4rem 0;
  align-items: center;
}
.media-row {
  grid-template-columns: 64px 1fr auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .5rem;
}
.media-row img {
  width: 64px; height: 64px; object-fit: cover; border-radius: 8px;
}
.q-item {
  border-top: 1px solid var(--line);
  padding-top: .8rem;
  margin-top: .8rem;
}

.tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .85rem;
}
.tpl-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.tpl-card:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(21,35,31,.08); }
.tpl-card:has(input:checked) { outline: 2px solid var(--teal); }
.tpl-card input { display: none; }
.tpl-card .preview {
  aspect-ratio: 3/4;
  background: linear-gradient(145deg, #1f4035, #15231f);
  display: grid; place-items: end start;
  font-family: var(--font-display);
  color: #f3ead7;
  font-size: .95rem;
  padding: .65rem;
}
.tpl-card .meta { padding: .7rem .75rem .85rem; }
.tpl-card .meta strong { display:block; font-size: .9rem; line-height: 1.25; }
.badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  padding: .18rem .45rem;
  border-radius: 6px;
  background: rgba(31,138,112,.12);
  color: var(--teal-deep);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-draft { background: rgba(216,196,164,.35); color: #6a5636; }
.badge-published { background: rgba(31,138,112,.14); color: var(--teal-deep); }
.badge-archived { background: rgba(92,111,104,.15); color: var(--muted); }

.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}
.inv-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  padding: 0;
  display: grid;
  gap: 0;
  box-shadow: 0 10px 24px rgba(21,35,31,.04);
  transition: transform .2s, border-color .2s;
  overflow: hidden;
}
.inv-card:hover {
  transform: translateY(-2px);
  border-color: rgba(31,138,112,.35);
}
.inv-cover {
  display: block;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  position: relative;
}
.inv-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(21,35,31,.28));
}
.inv-body { padding: 1rem 1.1rem 1.15rem; display: grid; gap: .65rem; }
.inv-card h3 {
  margin: 0;
  font-size: 1.1rem;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}
.inv-card h3 a { color: var(--ink); }
.inv-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .7rem;
  font-size: .84rem;
  color: var(--muted);
}
.inv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .25rem;
}
.empty-state {
  padding: 2.5rem 1.25rem;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.5);
}
.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin: 0 0 .4rem;
}
.empty-visual {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: .55rem;
  margin: 0 auto 1.35rem;
  height: 120px;
}
.empty-visual span {
  width: 78px;
  height: 100px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 12px 24px rgba(21,35,31,.16);
  border: 2px solid #fff;
}
.empty-visual span:nth-child(1) { transform: rotate(-8deg) translateY(8px); }
.empty-visual span:nth-child(2) { width: 92px; height: 118px; z-index: 1; }
.empty-visual span:nth-child(3) { transform: rotate(8deg) translateY(8px); }

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -.25rem;
  padding: 0 .25rem;
  border-radius: var(--radius-sm);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  min-width: 520px;
}
table.data th, table.data td {
  text-align: left;
  padding: .7rem .55rem;
  border-bottom: 1px solid var(--line);
}
table.data th { color: var(--muted); font-weight: 600; }

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}
.stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--surface-strong);
}
.stat .n {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--ink);
  line-height: 1;
}
.stat .l { color: var(--muted); font-size: .85rem; margin-top: .35rem; }

.map-box {
  height: 280px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #dfe8e3;
  margin-top: .5rem;
  z-index: 1;
}
.map-search {
  display: flex;
  gap: .5rem;
  margin: .5rem 0;
  flex-wrap: wrap;
}
.map-search input { flex: 1; min-width: 180px; }
.map-search-results {
  list-style: none;
  margin: 0 0 .6rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  max-height: 180px;
  overflow: auto;
}
.map-search-results li {
  padding: .65rem .85rem;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  font-size: .88rem;
}
.map-search-results li:hover,
.map-search-results li:focus {
  background: rgba(31,138,112,.08);
  outline: none;
}
.map-search-results li:last-child { border-bottom: 0; }
.leaflet-container { font: inherit; }

.panel-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin: 0 0 .85rem;
  letter-spacing: -0.02em;
}
.share-row {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.share-row input { flex: 1; min-width: 180px; }
.qr-block {
  margin-top: 1.1rem;
  display: grid;
  gap: .4rem;
  justify-items: start;
}
.ticket-form {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
  align-items: center;
}
.ticket-form input { max-width: 260px; margin: 0; }
.poll-block { margin-bottom: 1.25rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.poll-block:last-child { border-bottom: 0; }
.poll-block h3 { font-size: 1rem; margin: 0 0 .5rem; }
.poll-list { margin: .5rem 0; padding-left: 1.1rem; color: var(--muted); }
.qr-cell svg, .qr-cell img { display: block; }
.dash-detail .wizard-panel { width: 100%; box-shadow: none; }

/* —— Visual showcase / marquee —— */
.showcase-band {
  padding: clamp(2.2rem, 5vw, 3.5rem) 0 1rem;
  overflow: hidden;
}
.showcase-head {
  width: min(var(--max), 100%);
  margin: 0 auto 1.4rem;
  padding: 0 clamp(1.1rem, 3vw, 1.75rem);
}
.showcase-mask {
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.showcase-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: showcase-scroll 42s linear infinite;
  padding: .35rem clamp(1.1rem, 3vw, 1.75rem) 1rem;
}
.showcase-band:hover .showcase-track { animation-play-state: paused; }
@keyframes showcase-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.showcase-card {
  width: min(240px, 68vw);
  flex: 0 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 30px rgba(21,35,31,.08);
  transform: rotate(-1.2deg);
}
.showcase-card:nth-child(even) { transform: rotate(1.4deg) translateY(8px); }
.showcase-photo {
  aspect-ratio: 3/4;
  background-size: cover;
  background-position: center;
}
.showcase-meta {
  padding: .75rem .85rem .9rem;
  display: grid;
  gap: .15rem;
}
.showcase-meta strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -.01em;
}
.showcase-meta span { color: var(--muted); font-size: .82rem; }
@media (prefers-reduced-motion: reduce) {
  .showcase-track { animation: none; }
  .hero-orbs span { animation: none; }
}

/* —— App shell: splash / tabbar / sheet / install —— */
.app-splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background:
    radial-gradient(600px 400px at 20% 10%, rgba(31,138,112,.22), transparent 60%),
    radial-gradient(500px 360px at 90% 80%, rgba(232,93,76,.16), transparent 55%),
    #f3f6f4;
  transition: opacity .35s ease, visibility .35s ease;
}
.app-splash.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.app-splash-mark {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 10vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -.04em;
  color: var(--ink);
  animation: splash-in .55s ease both;
}
.app-splash-mark span { color: var(--coral); }
@keyframes splash-in {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .app-splash-mark { animation: none; }
}

.tabbar {
  display: none;
}
.app-sheet {
  border: 0;
  padding: 0 1rem 1.15rem;
  width: min(100%, 440px);
  max-width: 100%;
  margin: auto 0 0;
  border-radius: 18px 18px 0 0;
  background: #fff;
  box-shadow: 0 -12px 40px rgba(21,35,31,.14);
  color: var(--ink);
}
.app-sheet::backdrop {
  background: rgba(21,35,31,.42);
}
.app-sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 99px;
  background: rgba(21,35,31,.15);
  margin: .65rem auto .35rem;
}
.app-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .35rem 0 .85rem;
}
.app-sheet-user {
  margin: 0 0 .75rem;
  color: var(--muted);
  font-size: .92rem;
}
.app-sheet-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: .7rem .2rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 650;
}
.app-sheet-logout { margin-top: 1rem; }
.app-sheet-langs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.1rem;
  padding-top: .85rem;
  border-top: 1px solid var(--line);
}

.install-banner {
  position: fixed;
  left: max(.75rem, var(--safe-left));
  right: max(.75rem, var(--safe-right));
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + .65rem);
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1rem;
  border-radius: 14px;
  background: rgba(21,35,31,.94);
  color: #fff;
  box-shadow: 0 14px 34px rgba(21,35,31,.28);
}
.install-banner[hidden] { display: none !important; }
.install-banner strong { display: block; font-size: .95rem; }
.install-banner p {
  margin: .2rem 0 0;
  color: rgba(255,255,255,.72);
  font-size: .82rem;
}
.install-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.install-banner .btn-ghost {
  color: #fff !important;
  border-color: rgba(255,255,255,.28);
}

@media (min-width: 901px) {
  .tabbar,
  .header-mobile,
  .install-banner,
  .app-splash { display: none !important; }
  .app-sheet { display: none; }
}

@media (max-width: 900px) {
  .nav-desktop { display: none !important; }
  .header-mobile { display: flex; }

  body.app-shell {
    padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  }
  body.app-shell.has-install {
    padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 5.5rem);
  }

  .site-footer {
    padding-bottom: 1.25rem;
    font-size: .9rem;
  }

  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: end;
    gap: .15rem;
    min-height: calc(var(--tabbar-h) + var(--safe-bottom));
    padding: .35rem .4rem calc(.35rem + var(--safe-bottom));
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 28px rgba(21,35,31,.06);
  }
  .tab {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .18rem;
    min-height: 52px;
    padding: .25rem .2rem;
    font: inherit;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .01em;
    cursor: pointer;
    text-decoration: none;
    border-radius: 12px;
  }
  .tab svg { width: 22px; height: 22px; display: block; }
  .tab.is-active { color: var(--teal-deep); }
  .tab-create { position: relative; top: -.35rem; }
  .tab-create-orb {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, var(--coral), #d44c3c);
    color: #fff;
    box-shadow: 0 10px 22px rgba(232,93,76,.35);
  }
  .tab-create-orb svg { width: 24px; height: 24px; }
  .tab-create span:last-child { color: var(--ink); }
  .tab-create.is-active span:last-child { color: var(--coral); }

  .home-hero {
    min-height: calc(100dvh - var(--header-h) - var(--tabbar-h));
  }
  .home-hero-copy {
    padding: 3rem 1.1rem 2.1rem;
  }
  .home-cta-row .btn {
    flex: 1 1 auto;
    min-width: min(100%, 148px);
    justify-content: center;
  }
  .home-section {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }

  .hero {
    min-height: calc(100dvh - var(--header-h) - var(--tabbar-h));
  }
  .hero-inner {
    padding: 3.2rem 1.1rem 2.4rem;
  }
  .hero-actions .btn {
    flex: 1 1 auto;
    min-width: min(100%, 160px);
  }

  .section { padding-left: 1.1rem; padding-right: 1.1rem; }
  .occasion-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .wizard-wrap {
    margin: 1rem auto 2rem;
    padding: 0 1rem;
  }
  .page-head {
    align-items: stretch;
    flex-direction: column;
  }
  .page-head .btn,
  .page-head .inv-actions {
    width: 100%;
  }
  .page-head .inv-actions .btn,
  .inv-actions .btn {
    flex: 1 1 calc(50% - .45rem);
    min-width: 0;
  }
  .wizard-panel { padding: 1.1rem; border-radius: 14px; }
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .form-actions .btn { width: 100%; }

  .panel {
    margin: 1rem auto 2rem;
    width: calc(100% - 2rem);
    padding: 1.2rem 1.1rem;
  }

  .extra-row,
  .media-row { grid-template-columns: 1fr; }
  .media-row { grid-template-columns: 64px 1fr; }
  .ticket-form input { max-width: none; width: 100%; }
  .map-box { height: 240px; }
  .share-row { flex-direction: column; }
  .share-row input { min-width: 0; width: 100%; }

  .inv-grid { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Standalone PWA chrome */
  @media (display-mode: standalone) {
    .site-footer { display: none; }
    .site-header {
      background: rgba(247, 250, 248, 0.96);
    }
  }
}

@media (max-width: 640px) {
  .site-header { padding-left: 1rem; padding-right: 1rem; }
  .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tpl-grid { grid-template-columns: 1fr 1fr; }
}

/* —— Wizard poll builder —— */
.q-list{display:grid;gap:1rem;margin-top:.85rem}
.q-item{
  border:1px solid var(--line);
  border-radius:14px;
  padding:1rem 1rem 1.1rem;
  background:var(--surface-strong);
  box-shadow:0 8px 20px rgba(21,35,31,.04);
  display:grid;
  gap:.45rem;
}
.q-item-head{
  display:flex;align-items:center;justify-content:space-between;gap:.75rem;
  margin-bottom:.15rem;
}
.q-item-head strong{font-size:.92rem}
.q-options-wrap{margin-top:.2rem;display:grid;gap:.35rem}
.q-options-wrap[hidden]{display:none!important}
#add-q{margin-top:.85rem}
.field-hint{margin:.15rem 0 0;font-size:.82rem;color:var(--muted)}

.check-grid{
  display:grid;
  gap:.65rem;
  margin-top:.85rem;
}
.check-card{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:.75rem;
  align-items:flex-start;
  margin:0;
  padding:.9rem 1rem;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.55);
  cursor:pointer;
  transition:border-color .15s, background .15s, box-shadow .15s;
}
.check-card:has(input:checked){
  border-color:rgba(31,138,112,.45);
  background:rgba(31,138,112,.08);
  box-shadow:0 0 0 1px rgba(31,138,112,.12);
}
.check-card input{
  position:absolute;opacity:0;pointer-events:none;
  width:1px;height:1px;
}
.check-card-ui{
  width:1.25rem;height:1.25rem;margin-top:.15rem;
  border-radius:6px;border:1.5px solid rgba(21,35,31,.25);
  background:#fff;position:relative;flex:0 0 auto;
}
.check-card:has(input:checked) .check-card-ui{
  background:var(--teal);border-color:var(--teal);
}
.check-card:has(input:checked) .check-card-ui::after{
  content:"";position:absolute;left:4px;top:1px;
  width:5px;height:9px;border:solid #fff;border-width:0 2px 2px 0;
  transform:rotate(45deg);
}
.check-card-body{display:grid;gap:.2rem;min-width:0}
.check-card-body strong{font-size:.95rem;line-height:1.3}
.check-card-body small{color:var(--muted);font-size:.8rem;line-height:1.35}

.form-actions-sticky{
  position:sticky;
  bottom:calc(var(--tabbar-h, 0px) + var(--safe-bottom, 0px) + .65rem);
  z-index:6;
  margin-top:1.25rem;
  padding:.75rem;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(247,250,248,.94);
  backdrop-filter:blur(12px);
  box-shadow:0 12px 30px rgba(21,35,31,.08);
  display:flex;flex-wrap:wrap;gap:.65rem;
}

.inv-toolbar{
  display:flex;flex-wrap:wrap;align-items:flex-start;gap:.55rem;
}
.inv-actions-primary{
  display:flex;flex-wrap:wrap;gap:.45rem;align-items:center;
}
.inv-more{position:relative}
.inv-more > summary{
  list-style:none;cursor:pointer;
}
.inv-more > summary::-webkit-details-marker{display:none}
.inv-more-menu{
  position:absolute;right:0;top:calc(100% + .35rem);
  min-width:180px;z-index:12;
  display:grid;gap:.35rem;padding:.55rem;
  border:1px solid var(--line);border-radius:12px;
  background:var(--surface-strong);
  box-shadow:0 16px 36px rgba(21,35,31,.12);
}
.inv-more-menu .btn,
.inv-more-menu form{width:100%}
.inv-more-menu .btn{justify-content:flex-start}

.poll-list{list-style:none;margin:.65rem 0 0;padding:0;display:grid;gap:.4rem}
.poll-list li{
  display:flex;justify-content:space-between;gap:1rem;
  padding:.55rem .75rem;border-radius:10px;
  background:rgba(31,138,112,.06);border:1px solid rgba(31,138,112,.12);
}
.poll-block h3{display:flex;flex-wrap:wrap;align-items:center;gap:.45rem}

/* —— Site-wide theme: dark —— */
html[data-theme="dark"] {
  --bg: #101614;
  --bg-soft: #1a221f;
  --surface: rgba(24, 32, 29, 0.88);
  --surface-strong: #171e1b;
  --ink: #f0ebe3;
  --ink-soft: #d9d2c6;
  --muted: #9aa59f;
  --line: rgba(240, 235, 227, 0.12);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}
html[data-theme="light"] { color-scheme: light; }

html[data-theme="dark"] body {
  background:
    radial-gradient(900px 520px at 8% -5%, rgba(31, 138, 112, 0.12), transparent 60%),
    radial-gradient(800px 480px at 96% 8%, rgba(212, 181, 122, 0.08), transparent 55%),
    linear-gradient(180deg, #121916 0%, var(--bg) 45%, #0e1311 100%);
}

html[data-theme="dark"] .site-header {
  background: rgba(16, 22, 20, 0.88);
  border-bottom-color: var(--line);
}
html[data-theme="dark"] .icon-btn {
  background: rgba(255,255,255,.04);
  color: var(--ink);
}
html[data-theme="dark"] .lang-switch {
  background: rgba(255,255,255,.04);
}
html[data-theme="dark"] .lang-switch a.is-active {
  background: var(--ink);
  color: #101614;
}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #121916;
  color: var(--ink);
  border-color: var(--line);
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: rgba(240,235,227,.4);
}
html[data-theme="dark"] .panel,
html[data-theme="dark"] .wizard-panel,
html[data-theme="dark"] .inv-card,
html[data-theme="dark"] .q-item,
html[data-theme="dark"] .stat,
html[data-theme="dark"] .type-card,
html[data-theme="dark"] .tpl-card,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .app-sheet {
  background: var(--surface-strong);
  color: var(--ink);
}
html[data-theme="dark"] .steps {
  background: rgba(255,255,255,.04);
}
html[data-theme="dark"] .steps a.active {
  background: var(--ink);
  color: #101614;
}
html[data-theme="dark"] .btn-ghost {
  color: var(--ink) !important;
  border-color: var(--line);
}
html[data-theme="dark"] .btn-ghost:hover {
  background: rgba(255,255,255,.06);
  color: var(--ink) !important;
}
html[data-theme="dark"] .form-actions-sticky {
  background: rgba(16, 22, 20, 0.94);
}
html[data-theme="dark"] .tabbar {
  background: rgba(16, 22, 20, 0.94);
  border-top-color: var(--line);
}
html[data-theme="dark"] .tab { color: var(--muted); }
html[data-theme="dark"] .tab.is-active { color: var(--home-gold-soft, #efd7a5); }
html[data-theme="dark"] .site-footer {
  border-top-color: var(--line);
}
html[data-theme="dark"] .data th,
html[data-theme="dark"] .data td {
  border-color: var(--line);
}
html[data-theme="dark"] .badge {
  background: rgba(255,255,255,.08);
  color: var(--ink-soft);
}
html[data-theme="dark"] .alert-ok {
  background: rgba(31,138,112,.16);
  color: #8fd9bf;
}
html[data-theme="dark"] .alert-error {
  background: rgba(214,69,69,.16);
  color: #f0a0a0;
}
html[data-theme="dark"] .check-card {
  background: rgba(255,255,255,.03);
}
html[data-theme="dark"] .check-card-ui { background: #121916; }
html[data-theme="dark"] .inv-more-menu {
  background: var(--surface-strong);
}
html[data-theme="dark"] .auth-panel.panel {
  background: var(--surface-strong);
}
html[data-theme="dark"] .app-splash {
  background: #101614;
}
html[data-theme="dark"] .app-splash-mark { color: var(--ink); }

html[data-theme="light"] .home-section-how {
  background: rgba(21,35,31,.03);
}
html[data-theme="light"] .home-how-item h3,
html[data-theme="light"] .home-section-head h2 {
  color: var(--home-ink);
}
html[data-theme="light"] .home-how-item p,
html[data-theme="light"] .home-section-head p {
  color: var(--home-muted);
}

/* Theme toggle */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.7);
  color: var(--ink);
  cursor: pointer;
}
.nav-desktop .theme-toggle {
  margin-right: .15rem;
}
html[data-theme="dark"] .theme-toggle {
  background: rgba(255,255,255,.04);
}
.theme-toggle .theme-icon-sun,
.theme-toggle .theme-icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .theme-icon-moon { display: block; }
html[data-theme="dark"] .theme-toggle .theme-icon-sun { display: block; }
.theme-toggle:hover { transform: translateY(-1px); }
.theme-sheet-btn {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: .35rem;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
