:root {
  --bg-top: #fff8ef;
  --bg-bottom: #ffe8c8;
  --card: #ffffff;
  --subtle: #fff3e0;
  --border: rgba(0, 0, 0, 0.12);
  --shadow: rgba(255, 120, 0, 0.18);
  --text: #111111;
  --subtext: rgba(30, 20, 0, 0.62);
  --accent: #ff8a00;
  --accent-deep: #ff6a00;
  --green: #2fbf56;
  --red: #e63333;
  --amber: #ffd24a;
  --doodle-yellow: #ffe600;
  --radius: 22px;
  --font: "Nunito", "Avenir Next", sans-serif;
  --display: "Fredoka", "Nunito", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  background-attachment: fixed;
}

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

#app { min-height: 100vh; }

.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hidden { display: none !important; }

/* ========== Welcome / Landing ========== */
/* ========== Marketing landing ========== */
.login-screen {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  background: #f7f4ef;
  overflow-x: hidden;
}

.lp {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 20px 20px;
}

.lp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.lp-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111;
}

.lp-mark {
  display: inline-flex;
  gap: 4px;
  transform: rotate(-28deg);
}

.lp-mark i {
  display: block;
  width: 5px;
  height: 14px;
  border-radius: 999px;
  background: #ff8a00;
}

.lp-mark i:nth-child(2) { height: 20px; background: #ff9d1a; }
.lp-mark i:nth-child(3) { height: 12px; background: #ffb020; }

.lp-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6b7280;
  font-weight: 600;
  font-size: 0.92rem;
}

.lp-nav-right .member-label { display: none; }

.btn-nav-signin {
  width: auto;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid #111;
  background: #fff;
  color: #111;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: none;
}

.lp-hero {
  flex: 1;
  display: grid;
  gap: 36px;
  align-items: center;
}

.lp-copy { max-width: 520px; }

.lp-headline {
  font-family: var(--display);
  font-size: clamp(2.35rem, 7vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: #111;
  margin-bottom: 14px;
}

.lp-sub {
  color: #6b7280;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 22px;
  max-width: 38ch;
}

.auth-card {
  background: #fff;
  border-radius: 28px;
  padding: 22px 20px;
  box-shadow: 0 18px 50px rgba(40, 24, 8, 0.08);
  border: 1px solid rgba(0,0,0,0.04);
}

.auth-card h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  color: #9ca3af;
  font-size: 0.85rem;
  font-weight: 700;
}

.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e8eaee;
}

.auth-note {
  margin-top: 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #8b909a;
  line-height: 1.4;
}

.auth-trust {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #6b7280;
}

.lp-stores {
  margin-top: 22px;
  padding-top: 4px;
}

.lp-stores-label {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b909a;
}

.lp-store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.store-badge {
  display: inline-flex;
  line-height: 0;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.store-badge:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.store-badge img {
  display: block;
  height: 44px;
  width: auto;
}

.store-badge-android img {
  height: 64px;
  margin: -10px -8px;
}

.lp-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 0 28px;
}

.lp-blob {
  position: absolute;
  width: min(92%, 460px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #ffd89a 0%, #ffc56a 45%, transparent 70%);
  opacity: 0.55;
  z-index: 0;
  filter: blur(4px);
}

.demo-card {
  position: relative;
  z-index: 1;
  width: min(100%, 380px);
  background: #fff;
  border-radius: 28px;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(40, 24, 8, 0.12);
  border: 1px solid rgba(0,0,0,0.04);
  animation: panelRise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes panelRise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.demo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.demo-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #8b909a;
}

.demo-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eaf8ef;
  color: #1f9d4b;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 800;
}

.demo-open::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.demo-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.demo-meta {
  color: #8b909a;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.demo-row {
  margin-bottom: 12px;
}

.demo-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 0.92rem;
}

.demo-pop {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #eaf8ef;
  color: #1f9d4b;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 800;
}

.demo-bar {
  height: 10px;
  background: #f1f2f4;
  border-radius: 999px;
  overflow: hidden;
}

.demo-bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb020, #ff8a00);
}

.demo-bar.short > span { background: linear-gradient(90deg, #ffe08a, #ffc94a); }

.demo-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #f0f1f3;
}

.demo-avatars {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 700;
}

.demo-avatars .stack {
  display: flex;
}

.demo-avatars .stack b {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-left: -8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: #fff;
}

.demo-avatars .stack b:first-child { margin-left: 0; background: #ff8a00; }
.demo-avatars .stack b:nth-child(2) { background: #5b8def; }
.demo-avatars .stack b:nth-child(3) { background: #2fbf56; }

.demo-share {
  width: auto;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #e8eaee;
  background: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  color: #333;
  box-shadow: none;
  cursor: default;
}

.demo-float {
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translate(-50%, 50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: 0 12px 28px rgba(40, 24, 8, 0.12);
  font-weight: 800;
  font-size: 0.85rem;
  white-space: nowrap;
}

.demo-float .ok {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2fbf56;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.demo-cal {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(40, 24, 8, 0.12);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 10px;
}

.demo-cal span {
  border-radius: 4px;
  background: #eceef2;
}

.demo-cal span.on { background: #ff8a00; }
.demo-cal span.soft { background: #ffd89a; }

.lp-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid #e8e4de;
  color: #8b909a;
  font-size: 0.85rem;
  font-weight: 600;
}

.lp-footer a {
  color: #6b7280;
  text-decoration: none;
  margin-left: 14px;
  font-weight: 700;
}

.lp-footer a:hover { color: #111; }

.brand-lockup {
  position: relative;
  display: inline-block;
  margin-bottom: 8px;
}

.brand-lockup h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  border-radius: 999px;
  border: none;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-google {
  background: #fff;
  color: #1f1f1f;
  border: 1.5px solid #e5e7eb;
  box-shadow: none;
}

.btn-google .g-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-welcome {
  background: #111;
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.btn-outline {
  background: #fff;
  color: #111;
  border: 1.5px solid #111;
  box-shadow: none;
}

.btn-apple { background: #000; color: #fff; }

.btn-primary {
  background: linear-gradient(135deg, #ffb020 0%, #ff8a00 55%, #ff6a00 100%);
  color: #111;
  box-shadow: 0 12px 28px rgba(255, 120, 0, 0.35);
}

.btn-submitted {
  background: #2f9e44;
  color: #fff;
  box-shadow: none;
}

.btn-submitted:disabled {
  opacity: 1;
  cursor: default;
}

.btn-danger {
  background: #fff;
  color: #c62828;
  border: 1.5px solid #f0c0c0;
  box-shadow: none;
}

.btn-danger:hover {
  background: #fff5f5;
  border-color: #e57373;
}

.btn-ghost {
  background: #fff;
  border: 1.5px solid #e8eaee;
  color: var(--text);
  box-shadow: none;
}

.profile-setup-panel {
  background: #fff;
  border-radius: 28px;
  padding: 28px 22px;
  box-shadow: 0 20px 50px rgba(40, 24, 8, 0.1);
  width: min(420px, 100%);
  margin: auto;
  text-align: left;
}

.profile-setup-panel h1 {
  font-family: var(--display);
  font-size: 2rem;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.profile-setup-panel .tagline {
  color: var(--subtext);
  font-weight: 700;
  margin-bottom: 18px;
}

@media (min-width: 960px) {
  .lp {
    padding: 18px 40px 20px;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .lp-nav {
    margin-bottom: 8px;
  }

  .lp-nav-right .member-label { display: inline; }

  .lp-hero {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 8px 0;
    align-items: center;
  }

  .lp-headline {
    font-size: clamp(2.6rem, 4.2vw, 3.5rem);
  }

  .lp-visual {
    min-height: 0;
    padding: 24px 0 36px;
  }

  .demo-card {
    width: min(100%, 390px);
  }

  .lp-footer {
    margin-top: auto;
  }
}

.btn-small {
  width: auto;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.9rem;
}

.error-banner {
  background: #ffe8e8;
  border: 1.5px solid var(--red);
  color: var(--red);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.action-error {
  background: #ffe8e8;
  border: 1.5px solid var(--red);
  color: var(--red);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 14px 0 10px;
  font-size: 0.9rem;
  font-weight: 700;
}

.action-error[hidden] {
  display: none !important;
}

#voterName.invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(230, 51, 51, 0.15);
}

/* ========== App dashboard ========== */
body.in-app {
  background: #f4f5f7;
}

.dash {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f4f5f7;
}

.sidebar {
  display: none;
}

.dash-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding-bottom: 88px;
}

.dash-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid #ebecef;
  position: sticky;
  top: 0;
  z-index: 20;
}

.crumbs {
  color: #8b909a;
  font-size: 0.9rem;
  font-weight: 600;
}

.crumbs span { margin: 0 6px; color: #c5c8ce; }
.crumbs strong { color: #222; }

.search {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 10px 14px;
  color: #8b909a;
  min-width: 0;
}

.search input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-weight: 600;
  color: #222;
}

.btn-create {
  width: auto;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffb020, #ff8a00);
  color: #111;
  font-weight: 800;
  border: none;
  box-shadow: 0 8px 18px rgba(255, 138, 0, 0.28);
  cursor: pointer;
}

.dash-body {
  display: block;
  padding: 18px 16px 28px;
}

.dash-center { max-width: 820px; margin: 0 auto; }

.quick-start { display: none; }

.page-head {
  margin-bottom: 18px;
}

.page-head h1 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 6px;
}

.page-head p {
  color: #6b7280;
  font-weight: 600;
}

.row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.row-head .btn-create { display: none; }

.feed-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #e8eaee;
  margin-bottom: 16px;
  overflow-x: auto;
}

.feed-tab {
  border: none;
  background: transparent;
  padding: 12px 14px;
  font-weight: 700;
  color: #8b909a;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.feed-tab.active {
  color: #ff8a00;
  border-bottom-color: #ff8a00;
}

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

.poll-card {
  background: #fff;
  border: 1px solid #e8eaee;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(20, 24, 40, 0.04);
  cursor: pointer;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.poll-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(20, 24, 40, 0.08);
}

.poll-card.static { cursor: default; }
.poll-card.static:hover { transform: none; box-shadow: 0 8px 24px rgba(20, 24, 40, 0.04); }
.poll-card.unread { background: #fffaf3; border-color: #ffe0b5; }

.poll-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 0.88rem;
  font-weight: 600;
}

.card-meta .dot { color: #c5c8ce; }
.rank { color: #ff8a00; }

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  object-fit: cover;
  background: #ffe4b8;
  color: #9a5b00;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

.avatar.lg { width: 72px; height: 72px; font-size: 1.4rem; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f3f4f6;
  color: #5b616c;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.card-desc {
  color: #6b7280;
  margin-bottom: 14px;
  font-size: 0.95rem;
  font-weight: 600;
}

.best-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff5e8;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.best-box.soft { background: #f7f8fa; }

.best-box.final {
  background: #e8f8ec;
  border: 1px solid #b7e4c0;
}

.best-box .muted {
  display: block;
  font-size: 0.75rem;
  margin-bottom: 2px;
}

.best-box strong { font-size: 0.98rem; }

.final-banner {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #e8f8ec;
  border: 1px solid #b7e4c0;
  color: #1b5e20;
  font-weight: 600;
}

.creator-panel .creator-title {
  font-family: var(--display);
  font-size: 1.15rem;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}

.creator-sub { margin: 0 0 4px; }

.creator-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.final-pick-list {
  display: grid;
  gap: 8px;
  margin-bottom: 4px;
}

.final-pick-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  border: 1.5px solid #e8eaee;
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  cursor: pointer;
  color: inherit;
}

.final-pick-row:hover {
  border-color: #ffc98a;
  background: #fffaf3;
}

.final-pick-row strong { display: block; }
.final-pick-row .muted { font-size: 0.82rem; }

.final-pick-cta {
  font-size: 0.8rem;
  font-weight: 800;
  color: #c45f00;
  white-space: nowrap;
}

.slot.final-slot,
.slot.final-slot:disabled:hover {
  border-color: #2f9e44;
  background: #eefaf1;
}

.slot.final-slot .slot-toggle { color: #1b5e20; }

.votes-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.votes-modal-head h2 { margin: 0; }

.votes-by-date {
  display: grid;
  gap: 14px;
}

.vote-date-block {
  border: 1px solid #e8eaee;
  border-radius: 14px;
  overflow: hidden;
  background: #fafbfc;
}

.vote-date-block.is-final {
  border-color: #b7e4c0;
  background: #f3fbf5;
}

.vote-date-head {
  padding: 12px 14px;
  background: #fff;
  border-bottom: 1px solid #eef0f3;
}

.vote-date-head p { margin: 2px 0 0; }

.voter-name-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  display: grid;
  gap: 6px;
}

.voter-name-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 10px;
  font-weight: 600;
}

.voter-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff8a00;
  flex-shrink: 0;
}

.vote-empty {
  padding: 12px 14px 14px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #2fbf56;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.status.closed { color: #8b909a; }

.poll-card-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #6b7280;
  font-weight: 700;
  font-size: 0.9rem;
}

.votes-pill {
  background: #f3f4f6;
  border-radius: 999px;
  padding: 6px 10px;
}

.fav-mark { margin-left: auto; }
.view-link { color: #ff8a00; }

.idea-box {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  border: 1.5px dashed #d7dae0;
  background: #fafbfc;
  border-radius: 20px;
  padding: 22px 18px;
  cursor: pointer;
  color: #5b616c;
}

.idea-box:hover { border-color: #ffb020; background: #fffaf3; }

.idea-plus {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e8eaee;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: #ff8a00;
}

.idea-box strong { display: block; color: #222; margin-bottom: 2px; }
.idea-box span { font-weight: 600; font-size: 0.9rem; }

.empty-soft {
  text-align: center;
  padding: 40px 20px;
  background: #fff;
  border-radius: 20px;
  border: 1px solid #e8eaee;
  color: #6b7280;
}

.empty-soft h3 { color: #222; margin-bottom: 6px; }

.detail-tools {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.share-input {
  width: 100%;
  border: 1px solid #e8eaee;
  border-radius: 12px;
  padding: 12px 14px;
  background: #f7f8fa;
  font-weight: 600;
}

.filters {
  display: flex;
  gap: 8px;
  padding: 0 0 12px;
  overflow-x: auto;
}

.chip {
  flex: 0 0 auto;
  border: 1px solid #e8eaee;
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  color: #5b616c;
}

.chip.active {
  background: #fff5e8;
  border-color: #ffc98a;
  color: #c45f00;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 700;
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #e8eaee;
  z-index: 30;
}

.tab {
  border: none;
  background: transparent;
  padding: 8px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #8b909a;
  cursor: pointer;
}

.tab.active { color: #ff8a00; }
.tab .icon { display: block; font-size: 1.05rem; margin-bottom: 2px; }

.fab {
  position: fixed;
  right: 18px;
  bottom: 96px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #ffb020, #ff8a00);
  color: #111;
  font-size: 1.8rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(255, 138, 0, 0.35);
  z-index: 25;
}

.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--subtext);
}

.empty h3 {
  color: var(--text);
  margin-bottom: 8px;
}

/* Detail */
.detail-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.slot-help {
  font-weight: 700;
  margin: 4px 0 12px;
  color: #5b616c;
}

.slot-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.slot, .option {
  border: 1.5px solid #e8eaee;
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 0;
  cursor: pointer;
  transition: 0.15s ease;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
}

.slot {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
}

.slot:hover, .option:hover {
  border-color: #ffc98a;
  background: #fffaf3;
}

.slot.selected, .option.selected {
  border-color: #ff8a00;
  background: #fff5e8;
  box-shadow: 0 0 0 1px rgba(255, 138, 0, 0.35);
}

.slot.best:not(.selected) { border-color: #ffd89a; }

.slot-check {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 2px solid #d7dae0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  background: #fff;
}

.slot.selected .slot-check {
  background: #ff8a00;
  border-color: #ff8a00;
}

.slot-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.slot-main .progress {
  margin-top: 4px;
}

.slot-toggle {
  font-size: 0.78rem;
  font-weight: 800;
  color: #8b909a;
  white-space: nowrap;
}

.slot.selected .slot-toggle {
  color: #c45f00;
}

.slot-row, .option-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.progress {
  height: 6px;
  background: #eceef2;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0;
}

.progress > span {
  display: block;
  height: 100%;
  background: #ffb020;
}

.slot.selected .progress > span {
  background: #ff8a00;
}

.slot-list.locked .slot,
.slot:disabled {
  cursor: default;
  opacity: 0.6;
}

.slot-list.locked .slot:hover,
.slot:disabled:hover {
  border-color: #e8eaee;
  background: #fff;
}

.slot-list.locked .slot.selected:hover,
.slot.selected:disabled:hover {
  border-color: #ff8a00;
  background: #fff5e8;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  font-weight: 700;
  font-size: 0.9rem;
}

.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid #e8eaee;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  font-weight: 600;
}

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

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 40, 0.4);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
  padding: 16px;
}

.modal {
  width: min(560px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
  background: #fff;
  border: none;
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(20, 24, 40, 0.22);
}

.modal h2 {
  font-family: var(--display);
  font-size: 1.45rem;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.time-grid {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.time-chip {
  border: 1px solid #e8eaee;
  background: #f7f8fa;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.time-chip button {
  border: none;
  background: transparent;
  color: var(--red);
  font-weight: 800;
  cursor: pointer;
}

.profile-hero {
  text-align: center;
  padding: 12px 8px 8px;
}

.profile-hero h2 { margin: 10px 0 4px; }
.profile-hero p { color: var(--subtext); }

.avatar-edit {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.avatar-edit.busy {
  pointer-events: none;
  opacity: 0.7;
}

.avatar-edit .avatar.lg {
  width: 96px;
  height: 96px;
  font-size: 1.8rem;
}

.avatar-camera {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(255, 138, 0, 0.35);
}

.avatar-camera::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 12px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 2px;
  box-sizing: border-box;
}

.avatar-camera::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 3px;
  border: 2px solid #fff;
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
  box-sizing: border-box;
}

.avatar-hint {
  margin-top: 8px;
  font-size: 0.8rem;
}

.field-hint {
  margin-top: 6px;
  font-size: 0.8rem;
  text-align: right;
}

.profile-edit-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.profile-card textarea {
  width: 100%;
  resize: vertical;
  min-height: 88px;
  border: 1.5px solid #e8eaee;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.stat-box {
  background: #f7f8fa;
  border: 1px solid #e8eaee;
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
}

.stat-box strong { display: block; font-size: 1.25rem; }
.stat-box span { color: var(--subtext); font-size: 0.75rem; font-weight: 700; }

.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--subtext);
  font-weight: 700;
}

.success-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 166, 0, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-weight: 700;
}

.notif-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.activity-card .notif-copy {
  flex: 1;
  min-width: 0;
}

.activity-card .notif-chevron {
  margin-left: auto;
  align-self: center;
  color: #c4c9d4;
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1;
}

.activity-card:hover .notif-chevron {
  color: #ff8a00;
}

.muted { color: #6b7280; font-size: 0.85rem; }

.linkish {
  border: none;
  background: none;
  color: #ff8a00;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.sub-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f7f8fa;
  border: 1px solid #e8eaee;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 14px;
}

.sub-box.pro {
  background: #fff5e8;
  border-color: #ffc98a;
}

.sub-box strong { display: block; margin-bottom: 2px; }
.sub-box p { color: #6b7280; font-size: 0.85rem; font-weight: 600; margin: 0; }

.membership-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.membership-hero.pro {
  background: linear-gradient(135deg, #fffaf3, #fff5e8);
  border-color: #ffc98a;
}

.membership-tier h2 {
  font-family: var(--display);
  font-size: 1.6rem;
  margin: 8px 0 4px;
  letter-spacing: -0.02em;
}

.membership-tier p {
  color: #6b7280;
  font-weight: 600;
}

.tier-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 800;
  background: #f3f4f6;
  color: #5b616c;
}

.tier-badge.pro {
  background: #fff5e8;
  color: #c45f00;
}

.membership-actions .btn {
  width: auto;
  min-width: 160px;
}

.membership-grid {
  display: grid;
  gap: 14px;
}

@media (min-width: 720px) {
  .membership-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.tier-card h3 {
  font-family: var(--display);
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.tier-card.pro {
  border-color: #ffc98a;
}

.tier-card.current {
  box-shadow: 0 0 0 2px rgba(255, 138, 0, 0.18);
}

.tier-price {
  margin-bottom: 14px;
  color: #6b7280;
  font-weight: 600;
}

.tier-price strong {
  color: #111;
  font-size: 1.35rem;
}

.tier-list {
  list-style: none;
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.tier-list li {
  position: relative;
  padding-left: 22px;
  color: #5b616c;
  font-weight: 600;
  font-size: 0.95rem;
}

.tier-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #ff8a00;
  font-weight: 800;
}

.current-pill {
  display: inline-flex;
  background: #fff5e8;
  color: #c45f00;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 800;
}

.test-banner {
  background: #fff3cd;
  color: #7a5b00;
  border: 1px solid #ffe08a;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
}

.test-banner.inline {
  margin-bottom: 16px;
}

.test-banner code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: rgba(255,255,255,0.7);
  padding: 1px 6px;
  border-radius: 6px;
}

/* Paywall */
.paywall-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 22, 0.62);
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

.paywall {
  width: min(480px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  background: #121624;
  color: #fff;
  border-radius: 24px;
  padding: 22px 20px 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
  position: relative;
}

.paywall-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

.paywall-hero {
  padding-right: 70px;
  margin-bottom: 18px;
}

.paywall-hero h2 {
  font-family: var(--display);
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.paywall-hero p {
  color: rgba(255,255,255,0.7);
  font-weight: 600;
  line-height: 1.4;
}

.paywall-benefits {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,210,100,0.22);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}

.paywall-benefits h3 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: #ffd24a;
}

.paywall-benefits ul {
  list-style: none;
  display: grid;
  gap: 12px;
}

.paywall-benefits li strong {
  display: block;
  margin-bottom: 2px;
}

.paywall-benefits li span {
  color: rgba(255,255,255,0.55);
  font-size: 0.88rem;
  font-weight: 600;
}

.plan-card {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.12);
  background: #1c2133;
  color: #fff;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plan-card.highlight {
  display: block;
  border-color: #e6b84a;
  border-width: 2px;
}

.plan-card strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.plan-card span { color: rgba(255,255,255,0.5); font-size: 0.85rem; font-weight: 600; }

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

.plan-price {
  text-align: right;
  flex-shrink: 0;
}

.plan-price b {
  display: block;
  color: #ffd24a;
  font-size: 1.25rem;
}

.plan-price small {
  color: rgba(255,255,255,0.5);
  font-weight: 700;
}

.plan-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.plan-badges .best {
  background: #ffe08a;
  color: #111;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 800;
}

.plan-badges .save {
  background: #2fbf56;
  color: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 800;
}

.paywall-fine {
  text-align: center;
  color: rgba(255,255,255,0.45);
  font-size: 0.82rem;
  font-weight: 600;
  margin: 8px 0 4px;
}

.paywall-links {
  text-align: center;
  margin-top: 14px;
  color: rgba(255,255,255,0.45);
  font-size: 0.82rem;
}

.paywall-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-weight: 700;
}

.plan-card:disabled,
.paywall-close:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.checkout-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: inherit;
  background: rgba(10, 12, 22, 0.88);
  backdrop-filter: blur(6px);
}

.checkout-loading-card {
  text-align: center;
  max-width: 260px;
}

.checkout-loading-card strong {
  display: block;
  font-family: var(--display);
  font-size: 1.15rem;
  margin: 14px 0 8px;
}

.checkout-loading-card p {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}

.checkout-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto;
  border-radius: 50%;
  border: 3px solid rgba(255, 210, 74, 0.22);
  border-top-color: #ffd24a;
  animation: checkoutSpin 0.75s linear infinite;
}

@keyframes checkoutSpin {
  to { transform: rotate(360deg); }
}

@media (min-width: 800px) {
  .paywall-backdrop { align-items: center; }
}

/* Desktop corporate dashboard */
@media (min-width: 980px) {
  .dash {
    flex-direction: row;
    align-items: stretch;
  }

  .sidebar {
    display: flex;
    flex-direction: column;
    width: 240px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #ebecef;
    padding: 22px 14px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
  }

  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px 22px;
    font-family: var(--display);
    font-size: 1.15rem;
    letter-spacing: -0.02em;
  }

  .pro-pill {
    margin-left: auto;
    background: #fff5e8;
    color: #c45f00;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 800;
    font-family: var(--font);
  }

  .mark {
    display: inline-flex;
    align-items: flex-end;
    gap: 3px;
    height: 18px;
  }

  .mark i {
    display: block;
    width: 5px;
    border-radius: 999px;
    background: #ff8a00;
  }

  .mark i:nth-child(1) { height: 8px; }
  .mark i:nth-child(2) { height: 13px; }
  .mark i:nth-child(3) { height: 18px; }

  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
  }

  .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: none;
    background: transparent;
    border-radius: 12px;
    padding: 12px 12px;
    font-weight: 700;
    color: #5b616c;
    cursor: pointer;
    text-align: left;
  }

  .nav-item:hover { background: #f7f8fa; }
  .nav-item.active {
    background: #fff5e8;
    color: #c45f00;
  }

  .nav-ico {
    width: 22px;
    text-align: center;
    opacity: 0.85;
  }

  .nav-badge {
    margin-left: auto;
    background: #ff8a00;
    color: #fff;
    border-radius: 999px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 0.72rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: none;
    background: #f7f8fa;
    border-radius: 14px;
    padding: 10px 12px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 12px;
  }

  .sidebar-user .chev {
    margin-left: auto;
    color: #8b909a;
    font-size: 1.2rem;
  }

  .dash-main {
    padding-bottom: 0;
  }

  .dash-top {
    padding: 16px 28px;
  }

  .dash-top .btn-create { display: inline-flex; }

  .dash-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 28px 28px 40px;
    align-items: start;
  }

  .dash-body:has(.quick-start) {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .dash-center {
    margin: 0;
    max-width: none;
  }

  .quick-start {
    display: block;
    position: sticky;
    top: 88px;
  }

  .quick-start h3 {
    font-family: var(--display);
    font-size: 1.2rem;
    margin-bottom: 4px;
  }

  .qs-sub {
    color: #8b909a;
    font-weight: 600;
    margin-bottom: 14px;
  }

  .qs-card {
    width: 100%;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-align: left;
    background: #fff;
    border: 1px solid #e8eaee;
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(20, 24, 40, 0.04);
  }

  .qs-card:hover { border-color: #ffc98a; background: #fffaf3; }

  .qs-ico {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #fff5e8;
    color: #ff8a00;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
  }

  .qs-card strong { display: block; margin-bottom: 2px; }
  .qs-card span { color: #6b7280; font-size: 0.85rem; font-weight: 600; }

  .qs-tip {
    margin-top: 16px;
    background: #f7f8fa;
    border-radius: 16px;
    padding: 14px;
  }

  .qs-tip strong { display: block; margin-bottom: 6px; }
  .qs-tip p { color: #6b7280; font-size: 0.88rem; font-weight: 600; line-height: 1.4; }

  .row-head .btn-create { display: inline-flex; }
  .tabbar, .fab { display: none; }

  .modal-backdrop { align-items: center; }
}

@media (min-width: 800px) and (max-width: 979px) {
  .modal-backdrop { align-items: center; }
}
