:root {
  color-scheme: light dark;
  --bg: #faf9f7;
  --surface: #fff;
  --ink: #221c20;
  --muted: #716b70;
  --line: #e7e2e4;
  --brand: #8b2332;
  --blue: #007aff;
  --bubble: #eeecee;
  --scale: 1;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: calc(16px * var(--scale));
  background: var(--bg);
  color: var(--ink);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.42;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #007aff;
  outline-offset: 3px;
}
button svg {
  width: 24px;
  height: 24px;
}
a {
  color: var(--brand);
}
[hidden] {
  display: none !important;
}
#app {
  max-width: none;
  min-height: 100dvh;
  margin: auto;
  position: relative;
}
.page {
  min-height: 100dvh;
  padding: calc(24px + env(safe-area-inset-top)) 24px
    calc(130px + env(safe-area-inset-bottom));
}
#performances {
  position: fixed;
  inset: 0;
  max-width: none;
  margin: auto;
  padding: 0;
}
iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--bg);
}
h1 {
  font-size: 2rem;
  line-height: 1.12;
  letter-spacing: -0.055em;
  margin: 10px 0 24px;
  font-weight: 750;
}
h2 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin: 26px 0 14px;
}
h3 {
  margin: 0 0 7px;
}
p {
  line-height: 1.5;
}
.muted,
.meta {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.45;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.toolbar h1,
.toolbar h2 {
  flex: 1;
  margin: 0;
}
.toolbar .logo {
  width: min(58%, 260px);
  height: 74px;
  object-fit: contain;
  object-position: left center;
}
.toolbar .profile-button {
  margin-left: auto;
}
.icon-button {
  border: 0;
  background: transparent;
  color: inherit;
  width: 44px;
  min-width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  padding: 10px;
}
.icon-button:hover {
  background: var(--bubble);
}
.avatar {
  --size: 44px;
  display: inline-grid;
  place-items: center;
  width: var(--size);
  min-width: var(--size);
  height: var(--size);
  background: var(--bubble);
  border-radius: 50%;
  overflow: hidden;
  color: var(--muted);
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar svg {
  width: 55%;
  height: 55%;
}
.button,
.primary,
.secondary {
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}
.primary {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}
.secondary {
  background: var(--bubble);
  border: 0;
}
.text-button {
  background: none;
  border: 0;
  color: var(--brand);
  padding: 10px;
  font-weight: 600;
}
.danger {
  color: #c92c2c;
}
.guest {
  min-height: 65dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  gap: 12px;
  max-width: 440px;
  margin: auto;
}
.guest h2 {
  font-size: 1.65rem;
  margin: 6px 0;
}
.guest p {
  color: var(--muted);
  margin: 0 0 8px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.stat {
  padding: 22px;
  border: 1px solid #b35e6d40;
  background: linear-gradient(120deg, #8b23320d, #c38c1b08);
  border-radius: 20px;
  font-size: 1.12rem;
  line-height: 1.6;
  margin: 26px 0;
}
.stat strong {
  font-size: 1.6em;
  color: var(--brand);
  font-weight: 750;
}
.event-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
  margin: 12px 0;
}
.event-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--bubble);
}
.event-copy {
  padding: 18px;
}
.event-card .meta {
  margin-bottom: 5px;
}
.event-card h3 {
  font-size: 1.2rem;
}
.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.schedule-row {
  width: 100%;
  display: flex;
  align-items: center;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 16px 0;
  gap: 14px;
}
.schedule-row div {
  flex: 1;
}
.schedule-row strong {
  display: block;
  margin-bottom: 5px;
}
.recent-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x proximity;
}
.recent-card {
  flex: 0 0 235px;
  scroll-snap-align: start;
  text-align: left;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
}
.recent-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--bubble);
}
.recent-card .event-copy {
  padding: 13px;
}
.recent-card strong {
  display: block;
  margin: 8px 0;
}
.see-all {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: var(--brand);
  font-weight: 650;
}
#tabs {
  position: fixed;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 3px;
  width: min(calc(100% - 28px), 560px);
  padding: 7px;
  border: 1px solid #ffffff70;
  border-radius: 32px;
  background: #f8f5f0cc;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 8px 40px #23131820;
  z-index: 50;
}
#tabs button {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--muted);
  border-radius: 26px;
  padding: 8px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  min-height: 58px;
}
#tabs button[aria-current="page"] {
  background: #8b233211;
  color: var(--brand);
  font-weight: 700;
}
#tabs svg {
  width: 24px;
  height: 24px;
}
#status {
  position: relative;
  background: #8b23320e;
  color: var(--brand);
  text-align: center;
  font-size: 0.82rem;
  padding: 8px;
  z-index: 3;
}
#status:empty {
  display: none;
}
.overlay {
  position: fixed;
  inset: 0;
  background: #30283155;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 80;
  animation: fade 0.18s;
}
.panel {
  width: 100%;
  height: 90dvh;
  border-radius: 28px 28px 0 0;
  background: var(--bg);
  box-shadow: 0 -10px 60px #0002;
  display: flex;
  flex-direction: column;
  animation: slide 0.26s cubic-bezier(0.2, 0.75, 0.2, 1);
  padding-bottom: env(safe-area-inset-bottom);
  overflow: hidden;
  transition: transform 0.2s;
}
.panel.full {
  height: 100dvh;
  border-radius: 0;
  padding-top: env(safe-area-inset-top);
}
.handle {
  width: 38px;
  height: 5px;
  background: #8c858b60;
  margin: 10px auto 3px;
  border-radius: 5px;
}
.panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  flex: none;
  border-bottom: 1px solid var(--line);
  min-height: 66px;
  touch-action: pan-x;
}
.panel-header h2 {
  margin: 0;
  flex: 1;
  font-size: 1.1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.panel-body {
  padding: 20px 24px;
  overflow: auto;
  overscroll-behavior: contain;
  flex: 1;
  min-height: 0;
}
.leaving {
  opacity: 0;
  transition: opacity 0.2s;
}
.leaving .panel {
  transform: translateY(100%) !important;
}
.locked {
  overflow: hidden;
}
.field {
  display: block;
  margin: 14px 0;
}
.field span {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.field input,
input.search,
textarea,
select {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 13px 14px;
  border-radius: 12px;
  width: 100%;
  min-width: 0;
}
input.search {
  background: var(--bubble);
  border: 0;
  margin: 18px 0;
}
.form-stack > .primary {
  width: 100%;
  margin-top: 15px;
}
.error {
  padding: 12px;
  border-radius: 12px;
  background: #c92c2c0c;
  color: #b52a2a;
  line-height: 1.4;
}
.error:empty {
  display: none;
}
.settings-row,
.member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.settings-row .row-copy,
.member-row .row-copy {
  flex: 1;
}
.settings-row strong,
.member-row strong {
  display: block;
}
.settings-row > svg {
  width: 23px;
  height: 23px;
  color: var(--brand);
}
.profile-summary {
  text-align: center;
  padding: 28px 0;
}
.profile-summary h2 {
  font-size: 1.7rem;
  margin: 14px 0 5px;
}
.inbox-row {
  display: flex;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 18px 0;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.inbox-row .row-copy {
  flex: 1;
  min-width: 0;
}
.inbox-title {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}
.inbox-title strong {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inbox-row .meta {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dot {
  width: 9px;
  height: 9px;
  background: var(--blue);
  border-radius: 50%;
  display: block;
}
.pin {
  width: 13px;
  height: 13px;
}
.conversation .panel-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.messages {
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 18px 20px;
  min-height: 0;
}
.message {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 12px 0;
}
.message.own {
  align-items: flex-end;
}
.sender {
  font-size: 0.75rem;
  color: var(--muted);
  padding: 0 10px 5px;
}
.bubble {
  max-width: 82%;
  border-radius: 20px;
  background: var(--bubble);
  padding: 11px 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.4;
  text-align: left;
  border: 0;
  color: var(--ink);
  position: relative;
}
.own .bubble {
  background: var(--blue);
  color: white;
}
.bubble img {
  width: 240px;
  max-width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  margin: 2px 0 8px;
}
.message-time {
  color: var(--muted);
  font-size: 0.65rem;
  margin: 4px 10px;
}
.reply-preview {
  padding: 6px 10px;
  border-left: 3px solid currentColor;
  font-size: 0.8rem;
  margin-bottom: 8px;
  opacity: 0.8;
}
.reactions {
  display: flex;
  gap: 5px;
  padding-top: 5px;
}
.reaction {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 16px;
  padding: 5px 8px;
  font-size: 0.8rem;
}
.composer {
  flex: none;
  border-top: 1px solid var(--line);
  padding: 9px 10px;
  background: var(--bg);
  display: flex;
  gap: 6px;
  align-items: flex-end;
}
.composer textarea {
  resize: none;
  min-height: 44px;
  max-height: 130px;
  border-radius: 22px;
  font-size: 1rem;
  padding: 11px 15px;
}
.send-button {
  color: var(--blue);
}
.draft-files {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 8px 16px;
}
.draft-files:empty {
  display: none;
}
.file-chip {
  display: flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px 10px;
  flex: none;
  font-size: 0.8rem;
}
.compose-reply {
  padding: 8px 18px;
  font-size: 0.85rem;
  background: var(--bubble);
  display: flex;
  align-items: center;
  gap: 8px;
}
.compose-reply:empty {
  display: none;
}
.compose-reply span {
  flex: 1;
}
.day-label {
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  padding: 15px 0 5px;
}
.selected-members {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 140px;
  overflow: auto;
}
.chip {
  border: 0;
  border-radius: 18px;
  background: var(--bubble);
  padding: 7px 11px;
  color: var(--ink);
  font-size: 0.8rem;
}
.media-view {
  padding: 0 !important;
  background: #080808;
  display: flex;
  align-items: center;
  justify-content: center;
}
.media-view img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}
.media-view video {
  max-width: 100%;
}
progress {
  width: 100%;
  height: 5px;
}
#toast {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top));
  left: 50%;
  transform: translate(-50%, -140%);
  background: var(--ink);
  color: var(--surface);
  padding: 14px 20px;
  border-radius: 18px;
  width: max-content;
  max-width: calc(100% - 32px);
  box-shadow: 0 6px 30px #0002;
  z-index: 150;
  transition: transform 0.25s;
  pointer-events: none;
}
#toast.shown {
  transform: translate(-50%, 0);
}
.loading {
  padding: 32px;
  color: var(--muted);
  text-align: center;
}
.empty {
  color: var(--muted);
  padding: 24px 0;
  line-height: 1.5;
}
.checklist {
  padding-left: 20px;
  line-height: 1.8;
}
.links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.recent-count {
  color: var(--brand);
  border-radius: 16px;
  background: #8b233211;
  padding: 4px 10px;
  font-size: 0.8rem;
}
.test-label {
  font-size: 0.75rem;
  color: var(--brand);
  font-weight: 600;
  margin: 12px 0;
}
@keyframes slide {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113;
    --surface: #1c1c1f;
    --ink: #f5f0f2;
    --muted: #aaa4a9;
    --line: #343037;
    --brand: #e99aa8;
    --bubble: #29282c;
  }
  #tabs {
    background: #222126cc;
    border-color: #ffffff20;
    box-shadow: 0 8px 40px #0005;
  }
  .stat {
    background: linear-gradient(120deg, #8b233224, #c38c1b0a);
  }
  .error {
    color: #ff9b9b;
  }
}
@media (min-width: 800px) {
  #app {
    border-inline: 1px solid var(--line);
  }
  .page {
    padding-inline: 32px;
  }
  .panel {
    border-radius: 28px 28px 0 0;
  }
  .panel.full {
    max-height: 95dvh;
    border-radius: 24px 24px 0 0;
  }
  .toolbar .logo {
    height: 90px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 360px) {
  .page {
    padding-inline: 16px;
  }
  .recent-card {
    flex-basis: 200px;
  }
  .panel-body {
    padding-inline: 16px;
  }
  #tabs button {
    font-size: 0.65rem;
  }
}
