:root {
  --bg: #f6f1e8;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #fffaf3;
  --border: rgba(35, 31, 32, 0.08);
  --text: #171312;
  --muted: #6d625c;
  --accent: #f56711;
  --accent-soft: #fff0e3;
  --green: #2ecf68;
  --green-soft: #e8fff0;
  --shadow: 0 22px 60px rgba(71, 50, 33, 0.12);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 103, 17, 0.12), transparent 28%),
    linear-gradient(180deg, #f3ede3 0%, #fff8f2 36%, #f5f1ea 100%);
}

button,
input,
textarea {
  font: inherit;
}

.hidden {
  display: none !important;
}

.page-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 18px 22px 42px;
}

.topbar {
  background: linear-gradient(90deg, #eb5b12 0%, #df4e10 100%);
  color: white;
  border-radius: 28px;
  padding: 18px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  width: 72px;
  height: 72px;
  display: block;
  object-fit: contain;
}

.brand h1,
.brand-kicker {
  margin: 0;
}

.brand h1 {
  font-size: 1.75rem;
  text-transform: lowercase;
  letter-spacing: -0.04em;
}

.brand-kicker {
  text-transform: uppercase;
  font-size: 0.72rem;
  opacity: 0.85;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: white;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
}

.ghost-button {
  cursor: pointer;
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 24px;
  padding: 34px 8px 22px;
  align-items: center;
}

.create-page {
  padding: 30px 0 8px;
}

.install-panel {
  display: grid;
  justify-items: center;
  gap: 22px;
  margin: 6px 0 22px;
  padding: 30px 24px 34px;
  background: rgba(255, 255, 255, 0.84);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.install-button {
  min-width: min(100%, 620px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 0;
  border-radius: 999px;
  padding: 22px 28px;
  color: #fff;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #ef5b12 0%, #ff6f16 100%);
  box-shadow: 0 16px 32px rgba(245, 103, 17, 0.28);
  cursor: pointer;
}

.install-icon {
  font-size: 1.3em;
  line-height: 1;
}

.install-text {
  max-width: 760px;
  margin: 0;
  color: #605651;
  font-size: clamp(1.2rem, 2.3vw, 1.65rem);
  line-height: 1.45;
  text-align: center;
}

.create-page-panel {
  max-width: 920px;
  margin: 0 auto;
}

.hero-copy h2 {
  margin: 0;
  font-size: clamp(2.6rem, 4vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  max-width: 780px;
}

.script {
  color: var(--accent);
  font-family: "Caveat", cursive;
  font-size: 1.2em;
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  font-weight: 800;
}

.hero-text {
  color: var(--muted);
  max-width: 620px;
  font-size: 1.14rem;
  line-height: 1.6;
  margin: 18px 0 24px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-badges span,
.mock-pills span,
.vote-chip {
  border-radius: 999px;
  padding: 12px 16px;
  background: white;
  box-shadow: 0 10px 28px rgba(76, 48, 25, 0.08);
  font-weight: 700;
}

.hero-card {
  min-height: 340px;
  border-radius: 36px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(228, 236, 248, 0.8)),
    radial-gradient(circle at 85% 18%, rgba(82, 112, 167, 0.16), transparent 20%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 42px rgba(52, 74, 115, 0.12);
  opacity: 0.9;
}

.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(82, 112, 167, 0.12);
}

.hero-card::before {
  width: 300px;
  height: 300px;
  right: -80px;
  top: -60px;
}

.hero-card::after {
  width: 220px;
  height: 220px;
  left: -40px;
  bottom: -70px;
}

.mock-event {
  position: relative;
  z-index: 1;
  background: rgba(246, 250, 255, 0.88);
  border: 1px solid rgba(177, 194, 223, 0.5);
  margin: 34px;
  padding: 28px;
  border-radius: 28px;
  backdrop-filter: blur(4px);
}

.example-label {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(82, 112, 167, 0.12);
  color: #4e6491;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mock-date {
  background: #e2ebfb;
  color: #47618f;
}

.mock-status {
  background: #dff2ea;
  color: #2d7a5b;
}

.mock-pills .yes {
  background: #dff2ea;
  color: #2d7a5b;
}

.mock-pills .maybe {
  background: #eef0ff;
  color: #5d62a8;
}

.mock-pills .no {
  background: #f5e7ef;
  color: #9a5475;
}

.mock-header,
.event-meta,
.share-row,
.attendance-stats,
.vote-form-row,
.vote-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.mock-date,
.mock-status,
.meta-pill {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.mock-date,
.meta-pill {
  background: var(--accent-soft);
  color: var(--accent);
}

.mock-status {
  background: var(--green-soft);
  color: #119145;
}

.mock-event h3,
.panel-header h3 {
  margin: 0;
  letter-spacing: -0.04em;
  font-size: 1.6rem;
}

.mock-event p {
  color: var(--muted);
  line-height: 1.6;
}

.mock-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mock-pills .yes,
.vote-pill.yes {
  background: var(--green-soft);
  color: #0f8f43;
}

.mock-pills .maybe,
.vote-pill.maybe {
  background: #fff4d7;
  color: #ad7c05;
}

.mock-pills .no,
.vote-pill.no {
  background: #ffe6e6;
  color: #c74242;
}

.content-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 420px;
  gap: 22px;
}

.event-only-mode main {
  padding-top: 22px;
}

.create-mode main {
  padding-top: 20px;
}

.event-only-grid {
  grid-template-columns: minmax(0, 920px);
  justify-content: center;
}

.event-only-panel {
  min-height: calc(100vh - 180px);
}

.panel {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 24px;
  backdrop-filter: blur(10px);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 18px 0;
  background: rgba(242, 235, 226, 0.9);
  border-radius: 999px;
  padding: 6px;
}

.tab {
  border: 0;
  background: transparent;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.tab.active {
  background: white;
  color: var(--accent);
  box-shadow: 0 8px 24px rgba(70, 42, 18, 0.08);
}

.stack,
.event-form,
.detail-stack,
.vote-form {
  display: grid;
  gap: 14px;
}

.compact-stack {
  gap: 10px;
}

label {
  display: grid;
  gap: 8px;
  color: #4c403b;
  font-size: 0.95rem;
  font-weight: 700;
}

.consent-group {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(245, 103, 17, 0.14);
  border-radius: 20px;
  background: rgba(255, 250, 244, 0.9);
}

.checkbox-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: start;
  gap: 12px;
  font-size: 0.92rem;
  font-weight: 600;
}

.checkbox-row input {
  margin-top: 2px;
  padding: 0;
}

.checkbox-row a {
  color: var(--accent);
  font-weight: 800;
}

.checkbox-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.form-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

input,
textarea {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--text);
}

textarea {
  resize: vertical;
  min-height: 110px;
}

.primary-button,
.accent-button,
.share-button,
.vote-option,
.secondary-button {
  border: 0;
  cursor: pointer;
  border-radius: 18px;
  padding: 14px 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.primary-button,
.accent-button,
.share-button {
  background: linear-gradient(90deg, #ff7b1a, #f56711);
  color: white;
  box-shadow: 0 14px 28px rgba(245, 103, 17, 0.24);
}

.secondary-button {
  background: #f1ebe5;
  color: var(--text);
}

.calendar-button {
  border: 0;
  cursor: pointer;
  border-radius: 18px;
  padding: 14px 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: #e7f3ff;
  color: #1f5d99;
}

.danger-button {
  border: 0;
  cursor: pointer;
  border-radius: 18px;
  padding: 14px 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: #ffe7e7;
  color: #b43333;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.text-link {
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 800;
  cursor: pointer;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.session-card,
.event-card,
.detail-card,
.vote-card,
.share-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(244, 231, 220, 0.96);
  border-radius: 24px;
  padding: 18px;
}

.session-card {
  display: grid;
  gap: 10px;
  background: linear-gradient(135deg, #fffaf2, #fff1e4);
  border-color: rgba(245, 103, 17, 0.16);
}

.profile-form {
  margin-top: 6px;
}

.profile-inline-box {
  margin-top: 6px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(245, 103, 17, 0.12);
}

.session-card h4,
.session-card p {
  margin: 0;
}

.session-muted {
  color: var(--muted);
  font-size: 0.92rem;
}

.session-muted.warning {
  color: #a44b12;
  font-weight: 700;
}

.session-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.form-notice {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #f4ede5;
  color: var(--muted);
  font-weight: 700;
}

.form-notice.ready {
  background: var(--green-soft);
  color: #177543;
}

.event-status {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #fff1e4;
  color: #a44b12;
  font-weight: 700;
}

.event-status.success {
  background: var(--green-soft);
  color: #177543;
}

.auth-status {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #ffe7e7;
  color: #ad3434;
  font-weight: 700;
}

.auth-status.success {
  background: var(--green-soft);
  color: #177543;
}

.event-list {
  display: grid;
  gap: 14px;
}

.empty-state,
.detail-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(109, 98, 92, 0.24);
  border-radius: 24px;
  padding: 20px;
}

.event-card {
  display: grid;
  gap: 12px;
}

.event-card h4,
.detail-card h4,
.vote-card h5 {
  margin: 0;
  font-size: 1.18rem;
  letter-spacing: -0.03em;
}

.event-card p,
.detail-card p,
.vote-card p,
.share-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.card-actions,
.vote-options,
.attendance-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.card-actions button,
.event-card button {
  flex: 1;
}

.vote-option {
  flex: 1;
  min-width: 108px;
}

.vote-option.active.yes {
  background: var(--green);
  color: white;
}

.vote-option.active.maybe {
  background: #f4b319;
  color: white;
}

.vote-option.active.no {
  background: #dc4c4c;
  color: white;
}

.share-card {
  display: grid;
  gap: 10px;
}

.share-url {
  overflow-wrap: anywhere;
  font-size: 0.92rem;
  color: var(--accent);
}

.attendance-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.attendance-column {
  background: var(--surface-strong);
  border-radius: 20px;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.pf-footer {
  margin-top: 26px;
}

.pf-catrow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.pf-cat {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 44px rgba(196, 151, 92, 0.15);
  text-decoration: none;
  color: var(--text);
  min-height: 100%;
}

.pf-cat img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 18px;
  background: #f7f2eb;
}

.pf-cat__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 800;
}

.pf-cat__arrow {
  color: var(--accent);
}

.pf-cat--active {
  background: linear-gradient(160deg, #ff8f1f 0%, #ff6a00 100%);
  color: white;
}

.pf-cat--active .pf-cat__arrow {
  color: white;
}

@media (max-width: 1200px) {
  .pf-catrow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .pf-catrow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.attendance-column h5 {
  margin: 0;
  font-size: 1rem;
}

.vote-card {
  display: grid;
  gap: 8px;
}

.vote-card header {
  align-items: flex-start;
}

.vote-note {
  border-top: 1px solid rgba(26, 21, 19, 0.08);
  padding-top: 8px;
  white-space: pre-wrap;
}

.attendance-stats {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.pf-footer {
  margin-top: 34px;
}

.pf-footer__heading {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin: 6px 0 26px;
}

.pf-footer__heading span {
  height: 1px;
  background: rgba(26, 21, 19, 0.12);
}

.pf-footer__heading h3 {
  margin: 0;
  font-size: clamp(2rem, 2.6vw, 2.8rem);
  line-height: 1;
}

.pf-footer__panel {
  padding: 30px 28px;
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 22px 46px rgba(196, 151, 92, 0.16);
}

.pf-catrow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.pf-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 22px 18px;
  background: #f3f3f3;
  border-radius: 26px;
  text-decoration: none !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  min-height: 200px;
  min-width: 0;
}

.pf-cat:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12);
  background: #f7f7f7;
}

.pf-cat img {
  width: 195px;
  height: 140px;
  object-fit: contain;
  flex: 0 0 auto;
  max-width: 100%;
}

.pf-cat__label {
  font-family: Poppins, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 800;
  font-size: 28px;
  line-height: 1.1;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  max-width: 100%;
  min-width: 0;
}

.pf-cat__arrow {
  color: #ff6a00;
  font-weight: 900;
}

.pf-cat--active {
  background: #ff6a00;
}

.pf-cat--active .pf-cat__label,
.pf-cat--active .pf-cat__arrow {
  color: #fff;
}

.pf-cat--active .pf-cat__label {
  white-space: normal;
  overflow-wrap: anywhere;
}

.pf-cat--active:hover .pf-cat__label {
  color: #ff6a00 !important;
}

@media (max-width: 1200px) {
  .pf-catrow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pf-cat__label {
    font-size: 24px;
  }
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: #171312;
  color: white;
  padding: 14px 18px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  z-index: 20;
}

@media (max-width: 1180px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .install-button {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 12px;
  }

  .install-panel {
    padding: 24px 18px 28px;
  }

  .install-button {
    font-size: 1.6rem;
    padding: 18px 22px;
  }

  .install-text {
    font-size: 1.1rem;
  }

  .topbar {
    padding: 16px;
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }

  .hero-copy h2 {
    font-size: 2.6rem;
  }

  .mock-event {
    margin: 18px;
  }

  .form-row,
  .attendance-columns {
    grid-template-columns: 1fr;
  }

  .pf-footer__heading {
    gap: 12px;
    margin-bottom: 18px;
  }

  .pf-footer__panel {
    padding: 18px 16px;
    border-radius: 28px;
  }

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

  .pf-cat {
    padding: 14px;
    min-height: 160px;
  }

  .pf-cat img {
    width: 120px;
    height: 80px;
  }

  .pf-cat__label {
    font-size: 20px;
  }
}
