@font-face {
  font-family: "Eventger Thai";
  src: url("/assets/noto-sans-thai-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Eventger Thai";
  src: url("/assets/noto-sans-thai-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Eventger Latin";
  src: url("/assets/noto-sans-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Eventger Latin";
  src: url("/assets/noto-sans-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #231d36;
  --soft: #5d566a;
  --paper: #fff;
  --white: #fff;
  --line: #e6e0ec;
  --accent: #b83b24;
  --radius: 20px;
  --control-radius: 12px;
  --gutter: clamp(16px, 4vw, 40px);
  --dock-clearance: calc(94px + env(safe-area-inset-bottom));
  --surface-muted: #f8f5fa;
  --selected: #fce9e3;
  --control-border: #8b7f97;
  --border-hover: #ac8ab0;
  --elevation: 0 2px 8px #231d360a;
  --elevation-raised: 0 10px 32px #231d361f;
  --font-ui: "Eventger Thai", "Eventger Latin", sans-serif;
  font-family: var(--font-ui);
  line-height: 1.5;
  scroll-padding-block: 12px var(--dock-clearance);
  color: var(--ink);
  background: #f5f2f9;
}

html[lang="en"] {
  --font-ui: "Eventger Latin", "Eventger Thai", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.app-update {
  margin-block: 12px;
  display: grid;
  gap: 12px;
  border-color: var(--accent);
  overflow-wrap: anywhere;
}

.app-update[hidden] { display: none; }

.app-update > button { justify-self: start; }

h1,h2,h3,p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem,8vw,2.85rem);
  line-height: 1.22;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

h2 {
  font-size: 1.28rem;
  line-height: 1.4;
}

h3 {
  font-size: 1.08rem;
}

p {
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button,input,select,textarea {
  font: inherit;
}

button,a,select {
  -webkit-tap-highlight-color: transparent;
}

button,a,select {
  touch-action: manipulation;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 6;
  inset: 8px auto auto 12px;
  transform: translateY(-160%);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--control-radius);
  background: var(--paper);
  color: var(--ink);
}

.skip-link:focus {
  transform: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.icon {
  flex: none;
  width: 19px;
  height: 19px;
  vertical-align: middle;
}

.shell {
  width: min(100%, 1120px);
  margin-inline: auto;
  min-height: 100dvh;
  background: var(--paper);
}

.topbar {
  position: relative;
  z-index: 4;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  font-weight: 850;
  font-size: 1.27rem;
}

.brand img {
  border-radius: 9px;
}

.account-menu {
  position: relative;
  min-width: 0;
}

.account-menu summary {
  display: block;
  overflow: hidden;
  max-width: min(190px, 45vw);
  min-height: 44px;
  padding: 11px 30px 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 760;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.account-menu summary::marker { content: ""; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 13px;
  width: 6px;
  height: 6px;
  border: solid var(--accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.account-actions {
  position: absolute;
  z-index: 4;
  top: calc(100% + 8px);
  right: 0;
  width: min(264px, calc(100vw - 2 * var(--gutter)));
  max-height: calc(100dvh - 100px - env(safe-area-inset-bottom));
  overflow-y: auto;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--elevation-raised);
}

.menu-language {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.menu-language button[aria-pressed="true"] {
  background: #fce9e3;
  border-color: #f5c8bb;
  color: #8d2d1b;
}

main {
  padding: clamp(18px, 4vw, 36px) var(--gutter) var(--dock-clearance);
  outline: none;
}

.discover-head {
  isolation: isolate;
  position: relative;
  display: grid;
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
  padding: clamp(22px, 4vw, 44px);
  border-radius: var(--radius);
  background: #2b1941;
  color: var(--white);
}

.discover-head::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at 108% -20%, #9f608b8c, transparent 65%);
}

.discover-head h1 {
  margin-top: 8px;
  font-size: clamp(1.95rem, 5vw, 3.15rem);
  text-wrap: auto;
}

.discover-intro {
  max-width: 47ch;
  margin-top: 8px;
  color: #f5ecfb;
}

.location {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ffd1be;
  font-size: .9rem;
  font-weight: 750;
}

.event-search {
  min-width: 0;
  width: min(100%, 460px);
}

.event-search label {
  display: block;
  margin-bottom: 6px;
  font-size: .94rem;
  font-weight: 700;
}

.search-controls {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--white);
  border: 1px solid transparent;
  border-radius: var(--control-radius);
}

.event-search input {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
}

.event-search button {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: #ef623c;
  color: #20132c;
  cursor: pointer;
}

.event-search :focus-visible {
  outline-offset: -3px;
}

.event-search button:focus-visible {
  outline-color: #20132c;
}

.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
}

.topbar .event-search {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  max-width: 320px;
  justify-self: end;
}

.topbar .brand {
  grid-column: 1;
}

.topbar .account-menu {
  grid-column: 3;
  grid-row: 1;
}

.topbar .account-menu summary {
  max-width: clamp(64px, 20vw, 140px);
}

.topbar .search-controls {
  border-color: var(--control-border);
}

.topbar .event-search input {
  font-size: 1rem;
}

.topbar .event-search button {
  background: var(--accent);
  color: var(--white);
}

.topbar .event-search button:focus-visible {
  outline-color: var(--white);
}

.nearby-recommendations {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--elevation);
}

.recommendation-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.recommendation-heading > .icon {
  flex: none;
  margin-top: 4px;
}

.recommendation-heading h2 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.recommendation-list {
  display: grid;
  gap: 12px;
}

.recommendation-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-radius: 4px;
}

.recommendation-card .event-cover {
  width: 64px;
  aspect-ratio: 1;
  border-radius: 8px;
}

.recommendation-card .cover-fallback span {
  display: none;
}

.recommendation-card .cover-fallback {
  min-height: 64px;
  padding: 8px;
}

.recommendation-body {
  min-width: 0;
  overflow-wrap: anywhere;
}

.recommendation-body p {
  margin-top: 4px;
  color: var(--soft);
  font-size: .875rem;
}

.recommendation-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 8px;
  margin-top: 4px;
  font-size: .875rem;
  color: var(--soft);
}

.recommendation-body strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.recommendation-empty {
  font-size: .875rem;
  color: var(--soft);
}

.recommendation-card:hover,
.recommendation-card:active {
  background: var(--surface-muted);
}

@media (min-width: 760px) {
  .topbar {
    grid-template-columns: auto minmax(0, 320px) auto;
    gap: 16px;
  }
}

@media (max-width: 759px) {
  .topbar .brand span {
    display: none;
  }
}

@media (min-width: 760px) {
  .discover-head {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
}

.primary,.secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  gap: 8px;
  border-radius: var(--control-radius);
  font-weight: 800;
  padding: 10px 16px;
  cursor: pointer;
  transition: filter .15s,transform .15s;
  text-align: center;
}

.primary {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.primary:hover,.secondary:hover {
  filter: brightness(.94);
}

.primary:active,.secondary:active {
  transform: scale(.98);
}

button:disabled {
  opacity: .5;
  cursor: default;
}

.discovery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin-top: 24px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--surface-muted);
}

.discovery-filters button {
  min-width: 0;
  min-height: 44px;
  padding: 6px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--soft);
  font-weight: 700;
  font-size: .93rem;
  cursor: pointer;
}

.discovery-filters button[aria-pressed="true"] {
  border-color: var(--line);
  background: var(--selected);
  color: var(--accent);
}

.discovery-filters span {
  display: inline-block;
  margin-inline-start: 6px;
  font-size: .84em;
  font-variant-numeric: tabular-nums;
}

.result-head {
  margin: 24px 0 12px;
}

.result-head h2 {
  font-size: 1.38rem;
}

.result-head p {
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.text-action {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 750;
  cursor: pointer;
}

.discovery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.muted,.meta {
  color: var(--soft);
  font-size: .93rem;
}

.list {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}

@media (min-width: 690px) {
  .list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.panel, .card {
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--elevation);
}

.panel {
  padding: clamp(16px, 3vw, 24px);
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color .15s;
}

.card:hover {
  border-color: var(--border-hover);
}

.card-body {
  display: grid;
  gap: 12px;
  align-content: start;
  flex: 1;
  padding: clamp(14px, 2.4vw, 22px);
}

.card-title :is(h2,h3) {
  margin-top: 7px;
  font-size: clamp(1.18rem, 2vw, 1.44rem);
  line-height: 1.36;
  overflow-wrap: anywhere;
}

.event-facts {
  display: grid;
  gap: 5px;
  padding: 0;
  margin: 0;
  list-style: none;
  color: var(--soft);
}

.event-facts li, .card-attendance {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.event-facts .icon, .card-attendance .icon {
  width: 17px;
  height: 17px;
  margin-top: 3px;
}

.card-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 14px;
  color: var(--soft);
}

.event-price {
  color: var(--ink);
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}

.card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px clamp(14px, 2.4vw, 22px);
  min-height: 48px;
  border-top: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--accent);
  font-size: .94rem;
  font-weight: 750;
}

.event-cover {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
  background: var(--surface-muted);
}

.photo-card .event-cover {
  border-radius: 0;
}

.detail-layout .event-cover {
  aspect-ratio: 3 / 2;
}

.event-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 12px;
  text-align: center;
  color: var(--soft);
  background: radial-gradient(ellipse at 75% 25%, var(--selected), transparent 74%);
}

.cover-fallback .icon {
  width: 30px;
  height: 30px;
}

.action-group {
  gap: 7px;
}

.action-group p {
  text-align: center;
}

.tag {
  display: inline-block;
  border-radius: 999px;
  background: #f8edf8;
  color: #743420;
  font-size: .84rem;
  font-weight: 750;
  padding: 4px 10px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.tag.closed {
  background: #eeeaf0;
  color: #5d566a;
}

.tag.ready {
  background: #def5d1;
  color: #245128;
}

.tag.completed {
  background: #eee9f8;
  color: #4f3675;
}

.tag.review {
  background: #fbefd4;
  color: #674809;
}

.tag.open {
  background: #e5f0e7;
  color: #245741;
}

.tabs {
  position: fixed;
  z-index: 2;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  background: var(--white);
  padding: 7px 12px max(7px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  box-shadow: var(--elevation-raised);
}

.tabs a {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 54px;
  gap: 3px;
  padding: 4px;
  text-align: center;
  overflow-wrap: anywhere;
  font-size: .79rem;
  color: var(--soft);
  border-radius: 12px;
}

.tabs a[aria-current] {
  background: var(--selected);
  color: var(--accent);
  font-weight: 800;
}

.tab-icon {
  width: 21px;
  height: 21px;
}

.tabs b {
  font-weight: inherit;
}

@media (min-width: 690px) {
  :root {
    --dock-clearance: calc(108px + env(safe-area-inset-bottom));
  }

  .tabs {
    width: min(440px, calc(100% - 32px));
    bottom: max(14px, env(safe-area-inset-bottom));
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 6px;
  }
}

.page-head {
  margin: 6px 0 17px;
}

.page-head h1 {
  font-size: clamp(1.8rem, 4vw, 2.45rem);
  margin: 9px 0 3px;
  overflow-wrap: anywhere;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  font-size: .88rem;
  font-weight: 700;
  color: var(--accent);
}

.form-layout, .editor-form {
  width: min(100%, 760px);
  margin-inline: auto;
}

.detail-layout {
  width: min(100%, 860px);
  margin-inline: auto;
}

.event-header {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding-block: 8px 20px;
}

.event-header-facts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  width: 100%;
}

.detail-price {
  display: grid;
  gap: 2px;
  color: var(--soft);
  font-size: .93rem;
}

.stack {
  display: grid;
  gap: 16px;
}

.editor-form {
  gap: 20px;
}

.panel p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.panel h2 {
  margin-bottom: 6px;
}

.panel dl {
  margin: 0;
}

.panel dl div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.panel dl div:last-child {
  border-bottom: 0;
}

dt {
  color: var(--soft);
}

dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

progress {
  width: 100%;
  accent-color: var(--accent);
  margin: 6px 0;
}

.field {
  display: grid;
  gap: 5px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.field input,.field textarea,.field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--control-border);
  border-radius: var(--control-radius);
  padding: 8px 12px;
  background: var(--white);
  color: var(--ink);
  font-size: 1rem;
  scroll-margin-block: 8px;
}

.field textarea {
  min-height: 86px;
  resize: vertical;
}

.check-field {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 9px;
  cursor: pointer;
}

.check-field input {
  flex: none;
  accent-color: var(--accent);
}

.form-section, .question-editor, .profit-calculator {
  min-width: 0;
  margin: 0;
  padding: 12px clamp(12px, 2vw, 20px) 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-muted);
}

:is(.form-section, .question-editor, .profit-calculator) legend {
  padding: 0 5px;
  font-size: 1.06rem;
  font-weight: 750;
}

.question-row {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.question-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.field input[aria-invalid="true"] {
  border-color: var(--accent);
}

.sponsor-panel summary {
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 800;
  padding-block: 4px;
}

.sponsor-panel summary span {
  display: inline-block;
  margin-inline-start: 8px;
  font-size: .85rem;
  font-weight: 600;
}

.sponsor-panel[open] > p {
  margin-block: 8px 14px;
}

.panel dl.registration-answers div, .registration-answers div {
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  overflow-wrap: anywhere;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
}

.field { min-width: 0; }
.field input, .field select { min-width: 0; }
@media (max-width: 420px) {
  .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.image-preview {
  display: block;
  max-width: 280px;
  width: 100%;
  max-height: 175px;
  border-radius: 12px;
  object-fit: contain;
  background: #f5f2f9;
}

.attendance-counts, .owner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.attendee-count {
  padding: 5px 0;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.wait-count { color: var(--soft); }
.tag.cancelled { background: #fce9e3; color: #872a18; }

.people-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.people-list li {
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 11px;
  overflow-wrap: anywhere;
}

.people-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.people-list dl { margin: 8px 0 0; }
.people-list dl div { margin-bottom: 6px; }
.person { display: flex; align-items: center; gap: 10px; }
.person p { line-height: 1.4; }

.avatar {
  display: grid;
  place-content: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-placeholder { background: #fce9e3; color: #8d2d1b; font-weight: 800; }
.user-copy { white-space: pre-wrap; overflow-wrap: anywhere; }
.form-error { color: #972b16; font-size: .88rem; overflow-wrap: anywhere; }
.form-error:empty, [hidden] { display: none !important; }

.empty {
  padding: 20px 15px;
  border: 1px dashed var(--control-border);
  background: var(--surface-muted);
  border-radius: 14px;
  color: var(--soft);
}

dialog {
  width: min(calc(100% - 32px),420px);
  max-height: calc(100dvh - 32px);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  color: var(--ink);
}

dialog::backdrop {
  background: #241b39b0;
}

dialog form {
  display: grid;
  gap: 10px;
}

#notice:not(:empty) {
  position: fixed;
  z-index: 3;
  bottom: var(--dock-clearance);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: white;
  text-align: center;
}


@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation: none!important;
    transition: none!important;
  }
}

.menu-theme {
  font-size: .88rem;
}

html[data-theme="colorful"] {
  --ink: #101d49;
  --soft: #495878;
  --line: #d6def2;
  --accent: #3446c7;
  --control-border: #7b8bb2;
  --surface-muted: #f3f6ff;
  --selected: var(--violet-tint);
  --border-hover: var(--accent);
  --blue-tint: #eef3ff;
  --violet-tint: #eeebff;
  --gold-tint: #fff6df;
  --gold-border: #eed089;
  --gold-ink: #623d11;
  background: #eaf0ff;
}

html[data-theme="colorful"] :focus-visible {
  outline-color: var(--accent);
}

html[data-theme="colorful"] :is(.topbar,.tabs) {
  background: var(--blue-tint);
}

html[data-theme="colorful"] .account-menu summary {
  background: var(--white);
}

html[data-theme="colorful"] .account-actions {
  box-shadow: 0 8px 24px #101d4926;
}

html[data-theme="colorful"] :is(.menu-language button[aria-pressed="true"],.tabs a[aria-current]) {
  background: var(--violet-tint);
  border-color: #bdb6f5;
  color: #3c32b2;
}

html[data-theme="colorful"] .discover-head {
  background: #101d49;
}

html[data-theme="colorful"] .discover-head::before {
  background:
    radial-gradient(ellipse at 104% 104%, #06b7ed, transparent 46%),
    radial-gradient(ellipse at 102% 4%, #7041ec, transparent 59%),
    linear-gradient(125deg, #101d49 28%, #14285c 63%, #243eb0);
}

html[data-theme="colorful"] .location {
  color: #9cefff;
}

html[data-theme="colorful"] .event-search button {
  background: linear-gradient(135deg, #ffe074, #ffad4d);
  color: var(--ink);
}

html[data-theme="colorful"] .event-search :focus-visible {
  outline-offset: -3px;
}

html[data-theme="colorful"] .primary {
  background: linear-gradient(115deg, #2848c4, #5529b7);
}

html[data-theme="colorful"] .secondary {
  border-color: #a9b6de;
}

html[data-theme="colorful"] :is(.event-cover,.image-preview,.avatar-placeholder) {
  background-color: var(--blue-tint);
}

html[data-theme="colorful"] .avatar-placeholder {
  color: var(--accent);
}

html[data-theme="colorful"] :is(.field input,.field textarea,.field select,.empty) {
  border-color: var(--control-border);
}

html[data-theme="colorful"] .field input[aria-invalid="true"] {
  border-color: #972b16;
}

html[data-theme="colorful"] .sponsor-panel {
  background: var(--gold-tint);
  border-color: var(--gold-border);
}

html[data-theme="colorful"] .sponsor-panel summary {
  color: var(--gold-ink);
}

html[data-theme="colorful"] .profit-calculator {
  background: var(--blue-tint);
  border-color: #b3c3ed;
}

html[data-theme="colorful"] dialog {
  background: var(--white);
  border-color: #b3c3ed;
}

html[data-theme="colorful"] dialog::backdrop {
  background: #0c1746b8;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #fff;
  --soft: #b9c3cf;
  --paper: #101419;
  --line: #343f4e;
  --accent: #0cf;
  --accent-ink: #00141b;
  --surface: #1b222b;
  --surface-raised: #232c37;
  --control-border: #657a91;
  --navy: #111c2b;
  --cyan-tint: #17333e;
  --danger: #ffaaa2;
  --shadow: #0009;
  --surface-muted: var(--navy);
  --selected: var(--cyan-tint);
  --border-hover: var(--accent);
  --elevation: 0 2px 8px #0003;
  --elevation-raised: 0 10px 32px #0007;
  background: #000;
}

html[data-theme="dark"] :focus-visible {
  outline-color: var(--accent);
}

html[data-theme="dark"] :is(.topbar,.tabs,.search-controls,.image-preview,.event-cover) {
  background: var(--navy);
}

html[data-theme="dark"] :is(.account-actions,.panel,.card,.empty) {
  background: var(--surface);
}

html[data-theme="dark"] .account-menu summary {
  background: var(--surface);
  border-color: var(--control-border);
}

html[data-theme="dark"] .account-actions {
  box-shadow: 0 8px 22px var(--shadow);
}

html[data-theme="dark"] :is(.menu-language button[aria-pressed="true"],.tabs a[aria-current],.avatar-placeholder) {
  background: var(--cyan-tint);
  color: var(--accent);
}

html[data-theme="dark"] .discover-head {
  background: var(--navy);
  border: 1px solid var(--line);
}

html[data-theme="dark"] .discover-head::before {
  background: linear-gradient(120deg, #101a2b, #153044);
}

html[data-theme="dark"] .location {
  color: var(--accent);
}

html[data-theme="dark"] :is(.event-search input,.field input,.field textarea,.field select) {
  background: var(--paper);
  border-color: var(--control-border);
}

html[data-theme="dark"] :is(.event-search input,.field input,.field textarea)::placeholder {
  color: var(--soft);
  opacity: 1;
}

html[data-theme="dark"] .search-controls {
  border-color: var(--control-border);
}

html[data-theme="dark"] .event-search :focus-visible {
  outline-offset: -3px;
}

html[data-theme="dark"] .event-search button:focus-visible {
  outline-color: var(--accent-ink);
}

html[data-theme="dark"] :is(.event-search button,.primary) {
  background: var(--accent);
  color: var(--accent-ink);
}

html[data-theme="dark"] :is(.secondary,.empty) {
  border-color: var(--control-border);
}

html[data-theme="dark"] .tag {
  background: var(--tag-surface, #263348);
  color: var(--tag-ink, #d1e2ff);
}

html[data-theme="dark"] .tag.ready {
  --tag-surface: #193729;
  --tag-ink: #a8f0bf;
}

html[data-theme="dark"] .tag.completed {
  --tag-surface: #34294f;
  --tag-ink: #ddc9ff;
}

html[data-theme="dark"] .tag.review {
  --tag-surface: #3d321c;
  --tag-ink: #ffdc95;
}

html[data-theme="dark"] .tag.open {
  --tag-surface: #153838;
  --tag-ink: #99eee4;
}

html[data-theme="dark"] .tag.cancelled {
  --tag-surface: #482b2b;
  --tag-ink: var(--danger);
}

html[data-theme="dark"] .field input[aria-invalid="true"] {
  border-color: var(--danger);
}

html[data-theme="dark"] .form-error {
  color: var(--danger);
}

html[data-theme="dark"] .sponsor-panel {
  background: #282318;
  border-color: #76633c;
}

html[data-theme="dark"] .sponsor-panel summary {
  color: #ffdc95;
}

html[data-theme="dark"] .profit-calculator {
  background: var(--navy);
}

html[data-theme="dark"] dialog {
  background: var(--surface-raised);
  border-color: var(--control-border);
}

html[data-theme="dark"] dialog::backdrop {
  background: #000b;
}

html[data-theme="dark"] #notice:not(:empty) {
  background: var(--surface-raised);
  border: 1px solid var(--control-border);
  color: var(--ink);
  box-shadow: 0 8px 22px var(--shadow);
}

html[data-theme="glass"] {
  color-scheme: dark;
  --ink: #f7f9ff;
  --soft: #d2dff4;
  --line: #a0bce05c;
  --accent: #9eeaff;
  --accent-ink: #0c1932;
  --glass-panel: #2d4269;
  --glass-hero: #283d68;
  --glass-chrome: #26385c;
  --glass-raised: #2a3d62;
  --glass-control: #1e3154;
  --glass-control-border: #91afd6;
  --glass-selected: #324f7a;
  --glass-danger: #ffc0d1;
  --glass-rim: inset 0 1px 0 #ffffff45;
  --glass-shadow: 0 12px 30px #07163338;
  --glass-button: linear-gradient(120deg, #6ce0ff, #a4baff 56%, #c5a4ff);
  --paper: #172348;
  --surface-muted: var(--glass-chrome);
  --selected: var(--glass-selected);
  --control-border: var(--glass-control-border);
  --elevation: var(--glass-rim), var(--glass-shadow);
  --elevation-raised: var(--glass-rim), 0 18px 42px #07163359;
  --border-hover: var(--accent);
  background: var(--paper);
}

html[data-theme="glass"] body {
  background:
    radial-gradient(ellipse 720px 620px at 8% 4rem, #2ba6c366, transparent 72%),
    radial-gradient(ellipse 780px 680px at 95% 22rem, #8c53d56b, transparent 72%),
    radial-gradient(ellipse 620px 520px at 40% 58rem, #467de547, transparent 72%),
    var(--paper);
}

html[data-theme="glass"] .shell {
  background: transparent;
}

html[data-theme="glass"] :is(.topbar, .tabs) {
  background: var(--glass-chrome);
  box-shadow: var(--glass-rim), 0 8px 28px #07163340;
}

html[data-theme="glass"] :is(.account-actions, dialog) {
  background: var(--glass-raised);
  border-color: var(--glass-control-border);
  box-shadow: var(--glass-rim), var(--glass-shadow);
}

html[data-theme="glass"] .brand img {
  box-shadow: 0 0 0 1px #c3f2ff70, 0 4px 16px #6bd5ff21;
}

html[data-theme="glass"] :is(.card, .panel, .empty, .discover-head) {
  box-shadow: var(--glass-rim), var(--glass-shadow);
}

html[data-theme="glass"] :is(.card, .panel, .empty) {
  background: linear-gradient(145deg, #d7edff12, transparent 55%), var(--glass-panel);
}

html[data-theme="glass"] .discover-head {
  background: var(--glass-hero);
  border: 1px solid #b7d6ff70;
}

html[data-theme="glass"] .discover-head::before {
  pointer-events: none;
  background:
    radial-gradient(ellipse at 106% -6%, #a994ff2e, transparent 62%),
    radial-gradient(ellipse at -8% 8%, #65e4ff24, transparent 62%);
}

html[data-theme="glass"] .location {
  color: #bdf2ff;
}

html[data-theme="glass"] :is(.account-menu summary, .secondary) {
  background: var(--glass-control);
  border-color: var(--glass-control-border);
  box-shadow: var(--glass-rim);
}

html[data-theme="glass"] :is(.menu-language button[aria-pressed="true"], .tabs a[aria-current], .avatar-placeholder) {
  color: var(--accent);
  background: var(--glass-selected);
  border-color: #91cfe8;
  box-shadow: var(--glass-rim);
}

html[data-theme="glass"] :is(.search-controls, .event-search input, .field input, .field textarea, .field select) {
  background: var(--glass-control);
  border-color: var(--glass-control-border);
}

html[data-theme="glass"] :is(.event-search input, .field input, .field textarea)::placeholder {
  color: var(--soft);
  opacity: 1;
}

html[data-theme="glass"] :is(.event-search button, .primary) {
  color: var(--accent-ink);
  background: var(--glass-button);
  box-shadow: inset 0 1px 0 #ffffff8c;
}

html[data-theme="glass"] :focus-visible {
  outline-color: var(--accent);
}

html[data-theme="glass"] .event-search :focus-visible {
  outline-offset: -3px;
}

html[data-theme="glass"] .event-search button:focus-visible {
  outline-color: var(--accent-ink);
}

html[data-theme="glass"] :is(.event-cover, .image-preview, progress) {
  background-color: var(--glass-control);
}

html[data-theme="glass"] progress {
  height: 10px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
}

html[data-theme="glass"] progress::-webkit-progress-bar {
  background: var(--glass-control);
}

html[data-theme="glass"] progress::-webkit-progress-value {
  background: var(--glass-button);
}

html[data-theme="glass"] progress::-moz-progress-bar {
  background: var(--glass-button);
}

html[data-theme="glass"] .tag {
  background: var(--glass-tag, #3a4670);
  color: var(--glass-tag-ink, #e7eaff);
  box-shadow: var(--glass-rim);
}

html[data-theme="glass"] .tag.open {
  --glass-tag: #214c60;
  --glass-tag-ink: #baf7ff;
}

html[data-theme="glass"] .tag.ready {
  --glass-tag: #245340;
  --glass-tag-ink: #c0f8d9;
}

html[data-theme="glass"] .tag.review {
  --glass-tag: #574528;
  --glass-tag-ink: #ffe3aa;
}

html[data-theme="glass"] .tag.completed {
  --glass-tag: #4b3e75;
  --glass-tag-ink: #edddff;
}

html[data-theme="glass"] .tag.cancelled {
  --glass-tag: #61354f;
  --glass-tag-ink: var(--glass-danger);
}

html[data-theme="glass"] .form-error {
  color: var(--glass-danger);
}

html[data-theme="glass"] .field input[aria-invalid="true"] {
  border-color: var(--glass-danger);
}

html[data-theme="glass"] .empty {
  border-color: var(--glass-control-border);
}

html[data-theme="glass"] .sponsor-panel {
  background: linear-gradient(125deg, #51432f, #3b3e64);
  border-color: #b7a582;
}

html[data-theme="glass"] .sponsor-panel summary {
  color: #ffe3aa;
}

html[data-theme="glass"] :is(.form-section, .question-editor, .profit-calculator) {
  background: var(--glass-control);
  border-color: var(--glass-control-border);
}

html[data-theme="glass"] dialog::backdrop {
  background: #0a1433b8;
}

html[data-theme="glass"] #notice:not(:empty) {
  color: var(--ink);
  background: var(--glass-raised);
  border: 1px solid var(--glass-control-border);
  box-shadow: var(--glass-rim), var(--glass-shadow);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html[data-theme="glass"] {
    --glass-panel: #2d4269ed;
    --glass-hero: #283d68f0;
    --glass-chrome: #26385cf0;
    --glass-raised: #2a3d62f5;
    --glass-blur: blur(14px);
  }

  html[data-theme="glass"] :is(.topbar, .tabs, .account-actions, dialog) {
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
  }
}

@media (prefers-reduced-transparency: reduce) {
  html[data-theme="glass"] {
    --glass-panel: #2d4269;
    --glass-hero: #283d68;
    --glass-chrome: #26385c;
    --glass-raised: #2a3d62;
    --glass-blur: none;
  }
}

.discovery-options {
  margin-block: 20px;
}

.discovery-options > summary {
  min-height: 44px;
  cursor: pointer;
  font-weight: 700;
  padding-block: 10px;
}

.discovery-options[open] > summary {
  margin-bottom: 12px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.location-fields {
  min-width: 0;
  margin: 0;
  padding: 16px 0 0;
  border: 0;
}

.location-fields legend {
  font-weight: 700;
  font-size: 1.08rem;
}

.location-coordinate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.location-coordinate-grid > :last-child {
  grid-column: 1 / -1;
}

.nearby-panel {
  margin-block: 20px;
}

.nearby-panel > summary {
  cursor: pointer;
  min-height: 44px;
  font-weight: 700;
}

.nearby-panel > summary .icon {
  vertical-align: middle;
  margin-inline-end: 8px;
}

.nearby-panel[open] > summary {
  margin-bottom: 12px;
}

.location-map {
  position: relative;
  isolation: isolate;
  z-index: 0;
  height: 320px;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--control-border);
  border-radius: var(--control-radius);
  background: #edf2f5;
  color: #182337;
  font-family: inherit;
}

.location-map[hidden] {
  display: none;
}

.location-map.leaflet-container {
  font-family: var(--font-ui);
}

.location-map .leaflet-control-zoom a {
  width: 44px;
  height: 44px;
  line-height: 44px;
}

.location-map .leaflet-control-attribution {
  max-width: 100%;
  white-space: normal;
  font-family: inherit;
  color: #182337;
  background: #fffffff2;
}

.location-map .leaflet-popup-content {
  font-family: var(--font-ui);
  overflow-wrap: anywhere;
}

.location-map .leaflet-popup-content a {
  color: #164d8b;
  text-decoration: underline;
}

.location-pin span {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50% 50% 50% 0;
  border: 3px solid #fff;
  background: #7154c5;
  box-shadow: 0 1px 6px #14234088;
  transform: rotate(-45deg);
}

.location-pin-selected span {
  background: #1675b8;
}

.nearby-summary, .activity-distance {
  font-weight: 700;
  color: var(--accent);
}

@media (min-width: 760px) {
  .location-coordinate-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .location-coordinate-grid > :last-child { grid-column: auto; }
  .location-map { height: 390px; }
}

.ticket-list {
  max-width: 740px;
  margin-inline: auto;
}

.ticket-card h2 a,
.notification-card h2,
.notification-card p {
  overflow-wrap: anywhere;
}

.ticket-qr {
  display: block;
  width: min(100%, 288px);
  height: auto;
  aspect-ratio: 1;
  padding: 16px;
  background: #fff;
  border: 4px solid #fff;
  border-radius: 12px;
  align-self: start;
}

[data-ticket-token],
#check-in-form textarea {
  overflow-wrap: anywhere;
  font-family: ui-monospace, monospace;
  font-size: 1rem;
}

.notification-card[data-unread] {
  border-inline-start: 4px solid var(--accent);
}

.ticket-card .text-action,
.notification-card .text-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}


.activity-choice-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.activity-choice {
  min-width: 0;
}

.activity-choice h3 {
  display: flex;
  align-items: start;
  gap: 10px;
  overflow-wrap: anywhere;
}

.activity-choice h3 .icon {
  margin-top: 3px;
}

.activity-choice h4 {
  margin: 0;
  font-size: 1rem;
}

.activity-choice :is(.primary, .secondary) {
  min-height: 44px;
}

#activity-sponsorship {
  scroll-margin-block: 24px var(--dock-clearance);
}

@media (min-width: 720px) {
  .activity-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.proposal-rank {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--control-border);
  border-radius: 999px;
  color: var(--ink);
  background: var(--selected);
  font-size: .875rem;
  font-weight: 700;
}

#popular-label {
  line-height: 1.3;
}

.board-layout {
  max-width: 860px;
  margin-inline: auto;
}

.board-navigation, .board-badges, .board-post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: start;
}

.board-navigation > a {
  flex: 1;
  text-align: center;
}

.board-navigation [aria-current="page"] {
  border-color: var(--accent);
  background: var(--selected);
  color: var(--ink);
}

.board-scope, .board-meta {
  font-size: .9rem;
}

.board-badge {
  display: inline-block;
  border: 1px solid var(--control-border);
  border-radius: 999px;
  background: var(--selected);
  color: var(--ink);
  padding: 4px 10px;
  font-size: .8rem;
}

.board-author > div, .board-form, .board-topic-card, .board-post, .board-report {
  min-width: 0;
}

.board-author .board-badges {
  margin-top: 6px;
}

.board-topic-card h2, .board-post h2, .board-body, .board-reason, .board-author strong {
  overflow-wrap: anywhere;
}

.board-topic-card h2 a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.board-body {
  white-space: pre-wrap;
}

.board-editor > summary {
  min-height: 44px;
  cursor: pointer;
  padding-block: 10px;
  font-weight: 700;
}

.board-editor[open] > summary {
  margin-bottom: 12px;
}

.board-post-actions > .board-editor {
  flex: 1 1 180px;
}

.board-status, .board-reason {
  padding: 12px;
  border-inline-start: 3px solid var(--accent);
  background: var(--selected);
}

.board-post {
  scroll-margin-block: 24px var(--dock-clearance);
}
