/* ---------- Plan plaza ---------- */

.plans-page {
  background: var(--bg);
}

.plans-hero {
  position: relative;
  overflow: hidden;
  padding: 98px 0 104px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 45% 54% at 83% 28%, rgba(233, 194, 100, 0.13), transparent 64%),
    radial-gradient(ellipse 38% 45% at 6% 18%, rgba(80, 145, 255, 0.07), transparent 64%),
    var(--bg);
}

.plans-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 78px 78px;
  mask-image: linear-gradient(90deg, transparent 3%, #000 40%, #000);
}

.plans-hero-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: rgba(233, 194, 100, 0.15);
}

.plans-hero-lines .pitch-circle {
  left: 72%;
  width: min(54vw, 760px);
  opacity: 0.3;
}

.plans-hero-lines .pitch-arc {
  right: -7%;
  bottom: -38%;
  opacity: 0.23;
}

.plans-watermark {
  position: absolute;
  top: 14%;
  right: -2%;
  color: transparent;
  font-family: var(--font-display);
  font-size: clamp(220px, 29vw, 480px);
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.1em;
  -webkit-text-stroke: 1px rgba(242, 238, 228, 0.065);
  pointer-events: none;
  user-select: none;
}

.plans-hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(360px, 0.82fr);
  align-items: center;
  gap: clamp(44px, 6vw, 94px);
}

.plans-hero-title {
  margin: 24px 0 26px;
  font-family: var(--font-display);
  font-size: clamp(64px, 7.8vw, 118px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.085em;
}

.plans-hero-title .accent {
  color: var(--gold);
}

.plans-hero-title .title-dot {
  display: inline-block;
  margin-left: 9px;
  vertical-align: baseline;
}

.plans-hero-lead {
  max-width: 520px;
  color: #9da8b8;
  font-size: 14px;
  line-height: 1.95;
}

.plans-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.plans-hero-actions .btn-arrow svg,
.plans-prompt .btn-arrow svg {
  width: 15px;
}

.plans-hero-actions .btn-ghost svg {
  width: 15px;
  height: 15px;
}

.plans-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 4vw, 56px);
  margin-top: 43px;
  padding-top: 23px;
  border-top: 1px solid var(--line);
}

.plans-metrics > div {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.plans-metrics strong {
  color: #ebe6da;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.plans-metrics span {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.plans-hero-art {
  position: relative;
}

.plans-poster {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 460px);
  min-height: 466px;
  margin-left: auto;
  padding: 26px 27px 22px;
  overflow: hidden;
  border: 1px solid rgba(233, 194, 100, 0.24);
  border-radius: 30px;
  background:
    radial-gradient(circle at 86% 7%, rgba(233, 194, 100, 0.16), transparent 37%),
    linear-gradient(145deg, #15273e 0%, #0b1626 57%, #07101d 100%);
  color: var(--ink);
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
}

.plans-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, #000, transparent 70%);
  pointer-events: none;
}

.plans-poster-top,
.plans-poster-kicker,
.plans-poster-title,
.plans-poster-points,
.plans-poster-bottom {
  position: relative;
  z-index: 2;
}

.plans-poster-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #8190a5;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.plans-poster-top span:last-child {
  color: #a3adba;
}

.plans-poster-kicker {
  margin-top: 57px;
  color: var(--gold);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.19em;
}

.plans-poster-title {
  margin-top: 12px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(76px, 8.1vw, 106px);
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.09em;
}

.plans-poster-title span {
  color: var(--gold);
}

.plans-poster-ring {
  position: absolute;
  right: -100px;
  bottom: 28px;
  width: 370px;
  height: 370px;
  border: 1px solid rgba(233, 194, 100, 0.22);
  border-radius: 50%;
  pointer-events: none;
}

.plans-poster-ring::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 90px;
  height: 90px;
  border: 1px solid rgba(233, 194, 100, 0.17);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.plans-poster-points {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: auto;
  padding-top: 24px;
  color: #8290a2;
  font-size: 8px;
  letter-spacing: 0.06em;
}

.plans-poster-points span::before {
  content: "·";
  margin-right: 6px;
  color: var(--gold);
}

.plans-poster-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid rgba(242, 238, 228, 0.11);
  color: #8492a4;
  font-size: 7px;
  letter-spacing: 0.05em;
}

.plans-poster-bottom strong {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.plans-poster-stamp {
  position: absolute;
  right: 23px;
  top: 96px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border: 1px solid rgba(5, 9, 18, 0.3);
  border-radius: 50%;
  background: var(--gold);
  color: #050912;
  font-size: 7px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.06em;
  text-align: center;
  transform: rotate(10deg);
}

/* Plan board */

.plans-board {
  padding: 96px 0 104px;
  border-bottom: 1px solid var(--line);
  background: #090f1b;
}

.plans-board-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 32px;
}

.plans-board-head h2 {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.065em;
}

.plans-board-head .section-desc {
  max-width: 370px;
}

.plans-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.plan-filters {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
}

.plan-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 35px;
  padding: 0 15px;
  border-radius: 999px;
  background: transparent;
  color: #94a0b1;
  font-size: 10px;
  font-weight: 600;
  transition: color 0.25s ease, background 0.25s ease;
}

.plan-filter span {
  color: #667386;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
  transition: color 0.25s ease;
}

.plan-filter:hover {
  color: var(--ink);
}

.plan-filter.is-active {
  background: var(--gold);
  color: #050912;
}

.plan-filter.is-active span {
  color: rgba(5, 9, 18, 0.56);
}

.plans-count {
  color: #7f8c9e;
  font-size: 9px;
  letter-spacing: 0.05em;
}

.plans-count strong {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

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

.plans-grid[hidden] {
  display: none;
}

.plan-card {
  --plan-accent: var(--gold);
  --plan-tint: rgba(233, 194, 100, 0.07);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 294px;
  overflow: hidden;
  padding: 23px 23px 0;
  border: 1px solid rgba(242, 238, 228, 0.1);
  border-radius: 21px;
  background:
    radial-gradient(circle at 100% 0%, var(--plan-tint), transparent 45%),
    #0d1829;
  color: var(--ink);
  text-align: left;
  transition: transform 0.4s var(--ease), border-color 0.35s ease, background 0.35s ease;
  animation: planIn 0.55s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}

.plan-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 23px;
  width: 48px;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: var(--plan-accent);
  opacity: 0.85;
}

.plan-card:hover {
  border-color: rgba(233, 194, 100, 0.3);
  transform: translateY(-5px);
}

.plan-card.is-new {
  border-color: rgba(233, 194, 100, 0.55);
  box-shadow: 0 0 0 1px rgba(233, 194, 100, 0.22), 0 20px 46px rgba(0, 0, 0, 0.18);
}

.plan-card[data-accent="blue"] {
  --plan-accent: #83b8f0;
  --plan-tint: rgba(92, 153, 214, 0.1);
}

.plan-card[data-accent="red"] {
  --plan-accent: #ed817c;
  --plan-tint: rgba(208, 86, 80, 0.09);
}

.plan-card[data-accent="sage"] {
  --plan-accent: #9fc6a9;
  --plan-tint: rgba(104, 159, 119, 0.09);
}

@keyframes planIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.plan-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plan-card-tag {
  color: #7f8b9c;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.plan-badge {
  padding: 5px 8px;
  border: 1px solid rgba(233, 194, 100, 0.18);
  border-radius: 999px;
  background: rgba(233, 194, 100, 0.055);
  color: var(--gold);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.plan-badge.is-mine {
  border-color: rgba(131, 184, 240, 0.25);
  background: rgba(92, 153, 214, 0.08);
  color: #9ac7f4;
}

.plan-match {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 19px;
  color: var(--plan-accent);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.plan-match svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  opacity: 0.8;
}

.plan-card h3 {
  position: relative;
  z-index: 1;
  margin-top: 11px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.1vw, 25px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.plan-note {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  margin-top: 9px;
  overflow: hidden;
  color: #96a2b2;
  font-size: 10px;
  line-height: 1.75;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.plan-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: auto;
  padding: 16px 0 13px;
  color: #778598;
  font-size: 8px;
  line-height: 1.5;
}

.plan-location {
  display: inline-flex;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
}

.plan-location svg {
  width: 11px;
  height: 12px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--plan-accent);
  opacity: 0.8;
}

.plan-card-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -23px;
  padding: 12px 23px;
  border-top: 1px solid rgba(242, 238, 228, 0.08);
  background: rgba(255, 255, 255, 0.015);
}

.plan-host {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.plan-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--plan-accent);
  color: #07101d;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 900;
}

.plan-host-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.plan-host-copy strong {
  color: #d8dce2;
  font-size: 9px;
  font-weight: 600;
}

.plan-host-copy small {
  color: #667386;
  font-size: 7px;
}

.plan-code {
  color: #59687b;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.plan-time {
  color: #647286;
  font-size: 7px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.plan-add {
  align-items: center;
  justify-content: center;
  min-height: 294px;
  padding: 24px;
  border: 1px dashed rgba(242, 238, 228, 0.2);
  background: transparent;
  color: #a6b0be;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.4s var(--ease);
}

.plan-add::before {
  display: none;
}

.plan-add:hover {
  border-color: rgba(233, 194, 100, 0.5);
  background: rgba(233, 194, 100, 0.04);
  transform: translateY(-5px);
}

.plan-add-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  margin-bottom: 13px;
  border: 1px solid rgba(233, 194, 100, 0.28);
  border-radius: 50%;
  background: rgba(233, 194, 100, 0.07);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 400;
  line-height: 1;
}

.plan-add strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.plan-add > span:last-child {
  max-width: 210px;
  margin-top: 6px;
  color: #7b8899;
  font-size: 9px;
  line-height: 1.7;
}

.plans-empty {
  padding: 58px 24px 54px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.015);
  text-align: center;
}

.plans-empty[hidden] {
  display: none;
}

.plans-empty-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 15px;
  border: 1px solid rgba(233, 194, 100, 0.24);
  border-radius: 50%;
  background: rgba(233, 194, 100, 0.055);
  color: var(--gold);
}

.plans-empty-icon svg {
  width: 26px;
  height: 26px;
}

.plans-empty strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.plans-empty p {
  max-width: 340px;
  margin: 7px auto 17px;
  color: #8591a2;
  font-size: 10px;
  line-height: 1.7;
}

.plans-empty .btn {
  height: 46px;
  font-size: 10px;
}

.plans-empty .btn-arrow {
  width: 26px;
  height: 26px;
}

/* Bottom prompt */

.plans-prompt {
  position: relative;
  overflow: hidden;
  padding: 76px 0;
  background: var(--gold);
  color: #050912;
}

.plans-prompt::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(5, 9, 18, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(5, 9, 18, 0.065) 1px, transparent 1px);
  background-size: 78px 78px;
  mask-image: linear-gradient(90deg, transparent, #000);
}

.plans-prompt-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.plans-prompt h2 {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 66px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.plans-prompt .accent-dot {
  color: #7a5a12;
}

.plans-prompt-side {
  max-width: 340px;
  padding-bottom: 3px;
}

.plans-prompt-side p {
  color: rgba(5, 9, 18, 0.62);
  font-size: 11px;
  line-height: 1.8;
}

.plans-prompt-side .btn {
  margin-top: 18px;
  height: 48px;
  font-size: 10px;
}

/* Light theme */

html[data-theme="light"] .plans-hero {
  background:
    radial-gradient(ellipse 45% 54% at 83% 28%, rgba(197, 154, 63, 0.16), transparent 64%),
    radial-gradient(ellipse 38% 45% at 6% 18%, rgba(56, 99, 170, 0.08), transparent 64%),
    var(--page-bg);
  border-bottom-color: var(--page-line);
}

html[data-theme="light"] .plans-hero::before {
  background-image:
    linear-gradient(rgba(11, 21, 38, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 21, 38, 0.045) 1px, transparent 1px);
}

html[data-theme="light"] .plans-hero-lines {
  color: rgba(138, 97, 20, 0.22);
}

html[data-theme="light"] .plans-watermark {
  -webkit-text-stroke-color: rgba(11, 21, 38, 0.07);
}

html[data-theme="light"] .plans-hero-title {
  color: var(--page-ink);
}

html[data-theme="light"] .plans-hero-title .accent {
  color: var(--page-gold);
}

html[data-theme="light"] .plans-hero-lead {
  color: #596477;
}

html[data-theme="light"] .plans-metrics {
  border-top-color: var(--page-line);
}

html[data-theme="light"] .plans-metrics strong {
  color: var(--page-ink);
}

html[data-theme="light"] .plans-metrics span {
  color: var(--page-muted-2);
}

html[data-theme="light"] .plans-hero-actions .btn-ghost {
  border-color: var(--page-line);
  background: rgba(255, 255, 255, 0.32);
  color: var(--page-ink);
}

html[data-theme="light"] .plans-hero-actions .btn-ghost:hover {
  border-color: rgba(11, 21, 38, 0.32);
  background: rgba(255, 255, 255, 0.62);
}

html[data-theme="light"] .plans-board {
  border-bottom-color: var(--page-line);
  background: #eee7db;
}

html[data-theme="light"] .plans-board .kicker {
  color: var(--page-gold);
}

html[data-theme="light"] .plans-board .kicker > span {
  background: var(--page-gold);
}

html[data-theme="light"] .plans-board .accent-dot {
  color: var(--page-gold);
}

html[data-theme="light"] .plans-board-head h2 {
  color: var(--page-ink);
}

html[data-theme="light"] .plan-filters {
  border-color: var(--page-line);
  background: rgba(255, 255, 255, 0.35);
}

html[data-theme="light"] .plan-filter {
  color: var(--page-muted);
}

html[data-theme="light"] .plan-filter span {
  color: var(--page-muted-2);
}

html[data-theme="light"] .plan-filter:hover {
  color: var(--page-ink);
}

html[data-theme="light"] .plan-filter.is-active {
  background: var(--gold);
  color: #050912;
}

html[data-theme="light"] .plan-filter.is-active span {
  color: rgba(5, 9, 18, 0.56);
}

html[data-theme="light"] .plans-count {
  color: var(--page-muted);
}

html[data-theme="light"] .plans-count strong {
  color: var(--page-gold);
}

html[data-theme="light"] .plan-card {
  border-color: var(--page-line);
  background:
    radial-gradient(circle at 100% 0%, var(--plan-tint), transparent 45%),
    #fbf8f1;
  color: var(--page-ink);
}

html[data-theme="light"] .plan-card:hover {
  border-color: rgba(138, 97, 20, 0.35);
}

html[data-theme="light"] .plan-card.is-new {
  border-color: rgba(138, 97, 20, 0.55);
  box-shadow: 0 0 0 1px rgba(138, 97, 20, 0.18), 0 20px 46px rgba(11, 21, 38, 0.08);
}

html[data-theme="light"] .plan-card-tag {
  color: var(--page-muted-2);
}

html[data-theme="light"] .plan-badge {
  border-color: rgba(138, 97, 20, 0.22);
  background: rgba(200, 157, 52, 0.1);
  color: var(--page-gold);
}

html[data-theme="light"] .plan-badge.is-mine {
  border-color: rgba(47, 96, 146, 0.25);
  background: rgba(58, 111, 165, 0.08);
  color: #2e638f;
}

html[data-theme="light"] .plan-card h3 {
  color: var(--page-ink);
}

html[data-theme="light"] .plan-note {
  color: var(--page-muted);
}

html[data-theme="light"] .plan-meta {
  color: var(--page-muted-2);
}

html[data-theme="light"] .plan-card-foot {
  border-top-color: var(--page-line);
  background: rgba(11, 21, 38, 0.025);
}

html[data-theme="light"] .plan-host-copy strong {
  color: var(--page-ink);
}

html[data-theme="light"] .plan-host-copy small,
html[data-theme="light"] .plan-code,
html[data-theme="light"] .plan-time {
  color: var(--page-muted-2);
}

html[data-theme="light"] .plan-add {
  border-color: rgba(11, 21, 38, 0.18);
  background: transparent;
  color: var(--page-muted);
}

html[data-theme="light"] .plan-add:hover {
  border-color: rgba(138, 97, 20, 0.45);
  background: rgba(200, 157, 52, 0.06);
}

html[data-theme="light"] .plan-add strong {
  color: var(--page-ink);
}

html[data-theme="light"] .plan-add > span:last-child {
  color: var(--page-muted);
}

html[data-theme="light"] .plans-empty {
  border-color: var(--page-line);
  background: rgba(255, 255, 255, 0.32);
}

html[data-theme="light"] .plans-empty strong {
  color: var(--page-ink);
}

html[data-theme="light"] .plans-empty p {
  color: var(--page-muted);
}

/* Responsive */

@media (max-width: 1020px) {
  .plans-hero {
    padding: 76px 0 86px;
  }

  .plans-hero-grid {
    grid-template-columns: 1fr;
    max-width: 700px;
    gap: 42px;
  }

  .plans-hero-title {
    font-size: clamp(60px, 9.6vw, 92px);
  }

  .plans-hero-art {
    max-width: 480px;
  }

  .plans-poster {
    margin-left: 0;
    transform: rotate(1.2deg);
  }

  .plans-watermark {
    top: 7%;
    right: -8%;
    opacity: 0.8;
  }

  .plans-board {
    padding: 82px 0 88px;
  }
}

@media (max-width: 860px) {
  .plans-board-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .plans-board-head .section-desc {
    max-width: 520px;
  }

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

  .plans-prompt-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .plans-prompt-side {
    max-width: 460px;
  }

  .plans-prompt-side .btn {
    margin-top: 16px;
  }
}

@media (max-width: 640px) {
  .plans-hero {
    padding: 58px 0 64px;
  }

  .plans-hero-grid {
    gap: 32px;
  }

  .plans-hero-title {
    margin: 20px 0 22px;
    font-size: clamp(52px, 16vw, 82px);
  }

  .plans-hero-lead {
    font-size: 12px;
    line-height: 1.9;
  }

  .plans-hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 24px;
  }

  .plans-hero-actions .btn {
    width: 100%;
    height: 49px;
    font-size: 11px;
  }

  .plans-metrics {
    gap: 22px;
    margin-top: 28px;
    padding-top: 18px;
  }

  .plans-metrics strong {
    font-size: 21px;
  }

  .plans-metrics span {
    font-size: 7px;
  }

  .plans-poster {
    min-height: 390px;
    padding: 20px 19px 17px;
    border-radius: 22px;
    transform: none;
  }

  .plans-poster-top {
    font-size: 6px;
  }

  .plans-poster-kicker {
    margin-top: 45px;
    font-size: 7px;
  }

  .plans-poster-title {
    font-size: clamp(66px, 19vw, 88px);
  }

  .plans-poster-ring {
    width: 300px;
    height: 300px;
    right: -95px;
    bottom: 0;
  }

  .plans-poster-points {
    gap: 11px;
    font-size: 7px;
  }

  .plans-poster-points span::before {
    margin-right: 4px;
  }

  .plans-poster-bottom {
    font-size: 6px;
  }

  .plans-poster-stamp {
    top: 76px;
    right: 16px;
    width: 56px;
    height: 56px;
    font-size: 6px;
  }

  .plans-board {
    padding: 72px 0;
  }

  .plans-board-head {
    margin-bottom: 24px;
  }

  .plans-board-head h2 {
    font-size: clamp(38px, 11vw, 50px);
  }

  .plans-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 11px;
    margin-bottom: 15px;
  }

  .plan-filters {
    width: 100%;
  }

  .plan-filter {
    flex: 1;
    justify-content: center;
    height: 33px;
    padding: 0 8px;
    font-size: 9px;
  }

  .plans-count {
    padding-left: 2px;
    font-size: 8px;
  }

  .plans-grid {
    gap: 11px;
  }

  .plan-card {
    min-height: 276px;
    padding: 20px 18px 0;
    border-radius: 18px;
  }

  .plan-card::before {
    left: 18px;
  }

  .plan-card h3 {
    font-size: 21px;
  }

  .plan-card-foot {
    margin: 0 -18px;
    padding: 11px 18px;
  }

  .plan-add {
    min-height: 235px;
    padding: 22px;
  }

  .plans-empty {
    padding: 40px 18px;
    border-radius: 18px;
  }

  .plans-prompt {
    padding: 58px 0;
  }

  .plans-prompt h2 {
    font-size: clamp(36px, 11vw, 48px);
  }

  .plans-prompt-side {
    max-width: none;
  }

  .plans-prompt-side .btn {
    width: 100%;
  }
}

/* Image-led plan cards */

.plan-card {
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(242, 238, 228, 0.1);
  border-radius: 21px;
  background: #0d1829;
  color: var(--ink);
}

.plan-card::before {
  display: none;
}

.plan-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #08111e;
}

.plan-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.plan-card:hover .plan-cover img {
  transform: scale(1.035);
}

.plan-cover-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 8, 16, 0.31) 0%, transparent 36%, rgba(4, 8, 16, 0.1) 68%, rgba(4, 8, 16, 0.62) 100%),
    linear-gradient(90deg, rgba(4, 8, 16, 0.12), transparent 40%);
  pointer-events: none;
}

.plan-cover-top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.plan-cover .plan-card-tag {
  display: none;
}

.plan-cover .plan-badge {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(5, 9, 18, 0.42);
  color: var(--gold);
  backdrop-filter: blur(8px);
}

.plan-cover .plan-badge.is-mine {
  border-color: rgba(153, 201, 247, 0.35);
  background: rgba(15, 54, 89, 0.54);
  color: #b5dbff;
}

.plan-cover-code {
  position: absolute;
  right: 13px;
  bottom: 11px;
  z-index: 2;
  color: rgba(242, 238, 228, 0.66);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.plan-cover-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 78% 18%, var(--plan-tint), transparent 48%),
    linear-gradient(145deg, #15263d, #08111e);
}

.plan-cover-fallback::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%);
}

.plan-fallback-mark {
  color: transparent;
  font-family: var(--font-display);
  font-size: clamp(72px, 10vw, 110px);
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.09em;
  -webkit-text-stroke: 1px var(--plan-accent);
  opacity: 0.55;
}

.plan-fallback-word {
  margin-top: 13px;
  color: #738398;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.plan-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px 17px;
}

.plan-card-body h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(19px, 1.95vw, 23px);
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: -0.035em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.plan-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid rgba(242, 238, 228, 0.08);
  color: #68768a;
  font-size: 7px;
  line-height: 1.4;
  letter-spacing: 0.03em;
}

.plan-card-meta span:last-child {
  color: var(--plan-accent);
  opacity: 0.8;
}

.plan-add {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  justify-content: start;
  column-gap: 16px;
  min-height: 126px;
  padding: 24px 28px;
  border: 1px dashed rgba(242, 238, 228, 0.19);
  background: rgba(255, 255, 255, 0.012);
  color: #a6b0be;
  border-radius: 21px;
  text-align: left;
}

.plan-add .plan-add-icon {
  grid-row: 1 / 3;
  width: 48px;
  height: 48px;
  margin: 0;
}

.plan-add strong {
  align-self: end;
  color: var(--ink);
  font-size: 15px;
}

.plan-add > span:last-child {
  align-self: start;
  max-width: none;
  margin-top: 4px;
  font-size: 9px;
}

html[data-theme="light"] .plan-card {
  border-color: var(--page-line);
  background: #fbf8f1;
  color: var(--page-ink);
}

html[data-theme="light"] .plan-card-body h3 {
  color: var(--page-ink);
}

html[data-theme="light"] .plan-card-meta {
  border-top-color: var(--page-line);
  color: var(--page-muted-2);
}

html[data-theme="light"] .plan-card-meta span:last-child {
  color: var(--page-gold);
}

html[data-theme="light"] .plan-add {
  border-color: rgba(11, 21, 38, 0.2);
  background: transparent;
  color: var(--page-muted);
}

html[data-theme="light"] .plan-add strong {
  color: var(--page-ink);
}

html[data-theme="light"] .plan-add > span:last-child {
  color: var(--page-muted);
}

@media (max-width: 640px) {
  .plan-cover {
    aspect-ratio: 16 / 10;
  }

  .plan-card-body {
    padding: 14px 15px 15px;
  }

  .plan-card-body h3 {
    font-size: 20px;
  }

  .plan-card-meta {
    padding-top: 9px;
  }

  .plan-add {
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 13px;
    min-height: 108px;
    padding: 20px 18px;
  }

  .plan-add .plan-add-icon {
    width: 40px;
    height: 40px;
  }

  .plan-add strong {
    font-size: 13px;
  }
}

/* Admin management */

.admin-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -8px 0 16px;
  padding: 12px 15px;
  border: 1px solid rgba(233, 194, 100, 0.25);
  border-radius: 13px;
  background:
    linear-gradient(90deg, rgba(233, 194, 100, 0.08), rgba(233, 194, 100, 0.025)),
    rgba(255, 255, 255, 0.012);
}

.admin-mode-bar[hidden] {
  display: none;
}

.admin-mode-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-mode-pulse {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(233, 194, 100, 0.08);
}

.admin-mode-info div {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.admin-mode-info strong {
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.admin-mode-info span {
  color: #8d99aa;
  font-size: 8px;
}

.admin-mode-settings {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid rgba(233, 194, 100, 0.25);
  border-radius: 999px;
  background: rgba(233, 194, 100, 0.06);
  color: var(--gold);
  font-size: 8px;
  font-weight: 600;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.admin-mode-settings:hover {
  border-color: rgba(233, 194, 100, 0.45);
  background: rgba(233, 194, 100, 0.11);
}

.plan-cover-top {
  justify-content: flex-end;
}

.plan-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(5, 9, 18, 0.5);
  color: #ffb1ad;
  backdrop-filter: blur(8px);
  transition: background 0.25s ease, color 0.25s ease, width 0.25s ease;
}

.plan-delete:hover {
  background: rgba(199, 75, 69, 0.7);
  color: #fff;
}

.plan-delete svg {
  width: 12px;
  height: 12px;
}

.plan-delete.is-confirming {
  width: auto;
  padding: 0 9px;
  border-color: transparent;
  border-radius: 999px;
  background: #c74b45;
  color: #fff;
  font-size: 8px;
  font-weight: 600;
  white-space: nowrap;
}

html[data-theme="light"] .admin-mode-bar {
  border-color: rgba(138, 97, 20, 0.24);
  background:
    linear-gradient(90deg, rgba(200, 157, 52, 0.11), rgba(200, 157, 52, 0.025)),
    rgba(255, 255, 255, 0.25);
}

html[data-theme="light"] .admin-mode-info strong {
  color: var(--page-gold);
}

html[data-theme="light"] .admin-mode-info span {
  color: var(--page-muted);
}

html[data-theme="light"] .admin-mode-settings {
  border-color: rgba(138, 97, 20, 0.25);
  background: rgba(200, 157, 52, 0.08);
  color: var(--page-gold);
}

@media (max-width: 640px) {
  .admin-mode-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
    margin-top: -4px;
  }

  .admin-mode-info {
    align-items: flex-start;
  }

  .admin-mode-info div {
    flex-direction: column;
    gap: 3px;
  }

  .admin-mode-settings {
    margin-left: 16px;
  }
}

/* Clickable image cards and the full-screen viewer */

.plan-card {
  cursor: pointer;
}

.plan-open {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: zoom-in;
}

.plan-open:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.plan-open::after {
  content: "查看大图 ↗";
  position: absolute;
  left: 14px;
  bottom: 12px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(5, 9, 18, 0.56);
  color: #f2eee4;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(3px);
  backdrop-filter: blur(8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.3s var(--ease);
}

.plan-card:hover .plan-open::after,
.plan-open:focus-visible::after {
  opacity: 1;
  transform: none;
}

.plan-cover-top {
  justify-content: flex-start;
}

.plan-delete {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
}

.plan-viewer {
  width: min(1000px, calc(100% - 40px));
  max-height: 92vh;
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(233, 194, 100, 0.24);
  border-radius: 24px;
  background: #08111e;
  color: var(--ink);
  box-shadow: 0 46px 120px rgba(0, 0, 0, 0.64);
}

.plan-viewer::backdrop {
  background: rgba(2, 5, 13, 0.88);
  backdrop-filter: blur(9px);
}

.plan-viewer[open] {
  animation: dialogIn 0.35s var(--ease);
}

.plan-viewer-close {
  top: 16px;
  right: 16px;
}

.plan-viewer-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  max-height: 72vh;
  overflow: hidden;
  border-bottom: 1px solid rgba(242, 238, 228, 0.1);
  background:
    radial-gradient(circle at 50% 40%, rgba(50, 84, 120, 0.16), transparent 60%),
    #040910;
}

.plan-viewer-stage img {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
}

.plan-viewer-stage img[hidden] {
  display: none;
}

.plan-viewer-kicker {
  position: absolute;
  top: 18px;
  left: 20px;
  z-index: 3;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(5, 9, 18, 0.5);
  color: #c2c9d2;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.09em;
  backdrop-filter: blur(8px);
}

.plan-viewer-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 420px;
  background:
    radial-gradient(circle at 72% 22%, rgba(233, 194, 100, 0.15), transparent 45%),
    linear-gradient(145deg, #15263d, #07101d);
}

.plan-viewer-fallback[hidden] {
  display: none;
}

.plan-viewer-fallback > span {
  color: transparent;
  font-family: var(--font-display);
  font-size: clamp(110px, 16vw, 190px);
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.09em;
  -webkit-text-stroke: 1px rgba(233, 194, 100, 0.5);
}

.plan-viewer-fallback small {
  margin-top: 17px;
  color: rgba(233, 194, 100, 0.6);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.plan-viewer-info {
  padding: 21px 26px 24px;
}

.plan-viewer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: #738196;
  font-size: 8px;
  letter-spacing: 0.04em;
}

.plan-viewer-meta span:first-child {
  color: var(--gold);
  font-weight: 600;
}

.plan-viewer-info h2 {
  margin-top: 9px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.plan-viewer-info > p {
  margin-top: 8px;
  color: #68768a;
  font-size: 8px;
}

@media (max-width: 640px) {
  .plan-open::after {
    display: none;
  }

  .plan-viewer {
    width: calc(100% - 24px);
    max-height: 94vh;
    border-radius: 19px;
  }

  .plan-viewer-close {
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
  }

  .plan-viewer-stage {
    min-height: 200px;
    max-height: 58vh;
  }

  .plan-viewer-stage img {
    max-height: 58vh;
  }

  .plan-viewer-kicker {
    top: 13px;
    left: 13px;
    font-size: 6px;
  }

  .plan-viewer-fallback {
    min-height: 300px;
  }

  .plan-viewer-info {
    padding: 17px 18px 20px;
  }

  .plan-viewer-info h2 {
    font-size: 23px;
  }

  .plan-delete {
    top: 11px;
    right: 11px;
  }
}

/* Guests can preview plans but need a fan login for the full image */

html[data-user="guest"]:not([data-role="admin"]) .plan-cover img {
  filter: blur(7px) brightness(0.62);
  transform: scale(1.045);
}

html[data-user="guest"]:not([data-role="admin"]) .plan-cover-fallback {
  filter: blur(4px) brightness(0.6);
}

html[data-user="guest"]:not([data-role="admin"]) .plan-cover::after {
  content: "登录后查看完整计划";
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 9, 18, 0.24);
  color: #f2eee4;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: center;
  pointer-events: none;
}

html[data-user="guest"]:not([data-role="admin"]) .plan-open {
  cursor: pointer;
}

html[data-user="guest"]:not([data-role="admin"]) .plan-open::after {
  content: "登录查看";
}

/* Comments inside the plan viewer */

.plan-comments {
  margin-top: 19px;
  padding-top: 16px;
  border-top: 1px solid rgba(242, 238, 228, 0.1);
}

.plan-comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.plan-comments-head h3 {
  color: #e1e4e8;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.plan-comments-head h3 span {
  margin-left: 5px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
}

.plan-comments-head > span {
  color: #6d7b8f;
  font-size: 8px;
}

.plan-comment-list {
  max-height: 235px;
  margin-top: 7px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #344259 transparent;
}

.plan-comment {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(242, 238, 228, 0.07);
}

.plan-comment:last-child {
  border-bottom: 0;
}

.plan-comment-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--comment-color, #07c160);
  color: #06110b;
  font-size: 9px;
  font-weight: 700;
}

.plan-comment-body {
  min-width: 0;
}

.plan-comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.plan-comment-meta strong {
  color: #c9d2dc;
  font-size: 9px;
  font-weight: 600;
}

.plan-comment-meta span {
  color: #647287;
  font-size: 7px;
  white-space: nowrap;
}

.plan-comment-body p {
  margin-top: 3px;
  color: #96a4b4;
  font-size: 9px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.plan-comment-empty {
  padding: 16px 0 10px;
  color: #718095;
  font-size: 9px;
  line-height: 1.7;
}

.plan-comment-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.plan-comment-form[hidden],
.plan-comment-guest[hidden] {
  display: none;
}

.plan-comment-form textarea {
  min-width: 0;
  flex: 1;
  min-height: 58px;
  max-height: 120px;
  padding: 10px 12px;
  border: 1px solid rgba(242, 238, 228, 0.14);
  border-radius: 10px;
  outline: 0;
  background: #07101d;
  color: var(--ink);
  font: inherit;
  font-size: 10px;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.25s ease;
}

.plan-comment-form textarea:focus {
  border-color: rgba(233, 194, 100, 0.55);
}

.plan-comment-form textarea::placeholder {
  color: #657286;
}

.plan-comment-form .btn {
  height: 42px;
  flex: 0 0 auto;
  padding: 0 11px 0 16px;
  font-size: 9px;
}

.plan-comment-form .btn-arrow {
  width: 23px;
  height: 23px;
}

.plan-comment-guest {
  margin-top: 11px;
  padding: 10px 12px;
  border: 1px dashed rgba(242, 238, 228, 0.13);
  border-radius: 10px;
  color: #718095;
  font-size: 8px;
  line-height: 1.6;
}

@media (max-width: 640px) {
  html[data-user="guest"]:not([data-role="admin"]) .plan-cover img {
    filter: blur(5px) brightness(0.62);
  }

  html[data-user="guest"]:not([data-role="admin"]) .plan-cover::after {
    font-size: 9px;
  }

  .plan-comment-form {
    align-items: stretch;
    flex-direction: column;
  }

  .plan-comment-form .btn {
    width: 100%;
  }

  .plan-comments-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .plan-comment-list {
    max-height: 210px;
  }
}

/* Plan title search */
.plans-toolbar-right {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: auto;
}

.plan-search {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 220px;
  height: 36px;
  padding: 0 9px 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted-2);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.plan-search:focus-within {
  border-color: rgba(233, 194, 100, 0.55);
  background: rgba(233, 194, 100, 0.05);
}

.plan-search svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.plan-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 9px;
}

.plan-search input::placeholder {
  color: var(--muted-2);
}

.plan-search input::-webkit-search-cancel-button {
  display: none;
}

.plan-search button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  line-height: 1;
}

.plan-search button:hover {
  background: rgba(233, 194, 100, 0.16);
  color: var(--gold);
}

.plan-search button[hidden] {
  display: none;
}

html[data-theme="light"] .plan-search {
  border-color: var(--page-line);
  background: rgba(255, 255, 255, 0.35);
  color: var(--page-muted-2);
}

html[data-theme="light"] .plan-search:focus-within {
  border-color: rgba(138, 97, 20, 0.45);
  background: rgba(255, 255, 255, 0.62);
}

html[data-theme="light"] .plan-search input {
  color: var(--page-ink);
}

html[data-theme="light"] .plan-search button {
  background: rgba(11, 21, 38, 0.07);
  color: var(--page-muted);
}

html[data-theme="light"] .plan-search button:hover {
  background: rgba(138, 97, 20, 0.14);
  color: var(--page-gold);
}

@media (max-width: 760px) {
  .plans-toolbar-right {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  .plan-search {
    width: auto;
    min-width: 0;
    flex: 1;
    height: 34px;
  }

  .plans-toolbar-right .plans-count {
    white-space: nowrap;
  }
}

/* Plan customer service chat */
.plan-chat-link {
  position: relative;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 3px 7px;
  border: 1px solid rgba(233, 194, 100, 0.3);
  border-radius: 999px;
  background: rgba(233, 194, 100, 0.08);
  color: var(--gold);
  font: inherit;
  font-size: 7px;
  white-space: nowrap;
  cursor: pointer;
}

.plan-chat-link::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #62d49a;
  box-shadow: 0 0 0 3px rgba(98, 212, 154, 0.1);
}

.plan-chat-link:hover {
  border-color: rgba(233, 194, 100, 0.65);
  background: rgba(233, 194, 100, 0.14);
}

.plan-chat-dialog,
.chat-inbox-dialog {
  width: min(580px, calc(100% - 34px));
  max-height: 88vh;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(233, 194, 100, 0.24);
  border-radius: 18px;
  background: #08111e;
  color: var(--ink);
  box-shadow: 0 46px 120px rgba(0, 0, 0, 0.62);
}

.plan-chat-dialog::backdrop,
.chat-inbox-dialog::backdrop {
  background: rgba(2, 6, 13, 0.76);
  backdrop-filter: blur(5px);
}

.plan-chat-close,
.chat-inbox-close {
  z-index: 3;
}

.plan-chat-head {
  padding: 25px 26px 17px;
  border-bottom: 1px solid var(--line);
}

.plan-chat-kicker {
  color: var(--gold);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.plan-chat-head h2 {
  margin: 9px 0 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.plan-chat-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.7;
}

.plan-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 47vh;
  min-height: 150px;
  overflow-y: auto;
  padding: 18px 26px;
}

.plan-chat-empty {
  margin: auto;
  color: var(--muted-2);
  font-size: 9px;
  text-align: center;
}

.plan-chat-message {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  max-width: 86%;
}

.plan-chat-message.is-admin {
  align-self: flex-end;
  align-items: flex-end;
}

.plan-chat-message.is-user {
  align-self: flex-start;
}

.plan-chat-message-meta {
  color: var(--muted-2);
  font-size: 7px;
}

.plan-chat-message p {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 3px 9px 9px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  font-size: 9px;
  line-height: 1.65;
  word-break: break-word;
}

.plan-chat-message.is-admin p {
  border-color: rgba(233, 194, 100, 0.28);
  border-radius: 9px 3px 9px 9px;
  background: rgba(233, 194, 100, 0.1);
}

.plan-chat-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 13px 26px 18px;
  border-top: 1px solid var(--line);
}

.plan-chat-form textarea {
  min-height: 38px;
  max-height: 100px;
  flex: 1;
  resize: vertical;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  font: inherit;
  font-size: 9px;
  line-height: 1.5;
}

.plan-chat-form textarea:focus {
  outline: 0;
  border-color: rgba(233, 194, 100, 0.55);
}

.plan-chat-form .btn {
  min-height: 37px;
  padding: 0 12px;
  font-size: 8px;
  white-space: nowrap;
}

.plan-chat-error {
  margin: 0;
  padding: 0 26px 15px;
  color: var(--red);
  font-size: 8px;
}

.chat-inbox-list {
  max-height: 58vh;
  overflow-y: auto;
  padding: 11px 26px 22px;
}

.chat-inbox-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.chat-inbox-item:last-child {
  border-bottom: 0;
}

.chat-inbox-item:hover strong {
  color: var(--gold);
}

.chat-inbox-item > div {
  min-width: 0;
}

.chat-inbox-item strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 9px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-inbox-item span {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-inbox-count {
  flex: 0 0 auto;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
}

.chat-inbox-empty {
  padding: 28px 0;
  color: var(--muted-2);
  font-size: 9px;
  text-align: center;
}

html[data-theme="light"] .plan-chat-dialog,
html[data-theme="light"] .chat-inbox-dialog {
  border-color: var(--page-line);
  background: #fbf8f1;
  color: var(--page-ink);
}

html[data-theme="light"] .plan-chat-head {
  border-bottom-color: var(--page-line);
}

html[data-theme="light"] .plan-chat-head h2,
html[data-theme="light"] .plan-chat-message p,
html[data-theme="light"] .chat-inbox-item strong {
  color: var(--page-ink);
}

html[data-theme="light"] .plan-chat-kicker {
  color: var(--page-gold);
}

html[data-theme="light"] .plan-chat-head p,
html[data-theme="light"] .plan-chat-message-meta,
html[data-theme="light"] .chat-inbox-item span {
  color: var(--page-muted);
}

html[data-theme="light"] .plan-chat-message p {
  border-color: var(--page-line);
  background: rgba(255, 255, 255, 0.55);
}

html[data-theme="light"] .plan-chat-message.is-admin p {
  border-color: rgba(138, 97, 20, 0.3);
  background: rgba(138, 97, 20, 0.09);
}

html[data-theme="light"] .plan-chat-form {
  border-top-color: var(--page-line);
}

html[data-theme="light"] .plan-chat-form textarea {
  border-color: var(--page-line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--page-ink);
}

html[data-theme="light"] .chat-inbox-item {
  border-bottom-color: var(--page-line);
}

html[data-theme="light"] .plan-chat-link {
  border-color: rgba(138, 97, 20, 0.3);
  background: rgba(138, 97, 20, 0.07);
  color: var(--page-gold);
}

@media (max-width: 760px) {
  .plan-chat-dialog,
  .chat-inbox-dialog {
    width: calc(100% - 22px);
    max-height: 90vh;
  }

  .plan-chat-head,
  .plan-chat-messages,
  .plan-chat-form {
    padding-left: 17px;
    padding-right: 17px;
  }

  .plan-chat-messages {
    max-height: 42vh;
  }

  .chat-inbox-list {
    padding-left: 17px;
    padding-right: 17px;
  }
}

.plan-chat-form[hidden] {
  display: none;
}

.plan-viewer-gallery {
  display: flex;
  gap: 7px;
  max-width: 100%;
  overflow-x: auto;
  padding: 10px 2px 0;
}

.plan-viewer-thumb {
  width: 58px;
  height: 42px;
  flex: 0 0 auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  opacity: 0.62;
}

.plan-viewer-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.plan-viewer-thumb.is-active,
.plan-viewer-thumb:hover {
  border-color: var(--gold);
  opacity: 1;
}

html[data-theme="light"] .plan-viewer-thumb {
  border-color: var(--page-line);
  background: rgba(255, 255, 255, 0.45);
}

html[data-theme="light"] .plan-viewer-thumb.is-active {
  border-color: var(--page-gold);
}

.plan-image-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 11px;
}

.plan-image-gallery[hidden] {
  display: none;
}

.plan-image-gallery-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
}

.plan-image-gallery-item img {
  display: block;
  width: 100%;
  height: 78px;
  object-fit: cover;
}

.plan-image-gallery-item button {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(5, 9, 18, 0.72);
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

.plan-image-gallery-item button:hover {
  background: rgba(255, 111, 106, 0.85);
}

html[data-theme="light"] .plan-image-gallery-item {
  border-color: var(--page-line);
  background: rgba(255, 255, 255, 0.45);
}

@media (max-width: 760px) {
  .plan-image-gallery-item img {
    height: 66px;
  }
}

#planViewerImage {
  cursor: zoom-in;
}

.plan-viewer-expand {
  position: absolute;
  right: 16px;
  bottom: 14px;
  z-index: 3;
  padding: 7px 11px;
  border: 1px solid rgba(233, 194, 100, 0.4);
  border-radius: 999px;
  background: rgba(5, 9, 18, 0.68);
  color: var(--gold);
  font: inherit;
  font-size: 8px;
  backdrop-filter: blur(8px);
}

.plan-viewer-expand:hover {
  background: rgba(233, 194, 100, 0.14);
}

.plan-lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: rgba(2, 5, 10, 0.96);
  color: #f2eee4;
}

.plan-lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.plan-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.9);
}

.plan-lightbox img {
  display: block;
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.plan-lightbox-close,
.plan-lightbox-nav {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(5, 9, 18, 0.62);
  color: #f2eee4;
  backdrop-filter: blur(8px);
}

.plan-lightbox-close {
  top: 20px;
  right: 20px;
}

.plan-lightbox-nav.is-prev {
  left: 20px;
}

.plan-lightbox-nav.is-next {
  right: 20px;
}

.plan-lightbox-close:hover,
.plan-lightbox-nav:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.plan-lightbox svg {
  width: 18px;
  height: 18px;
}

.plan-lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(5, 9, 18, 0.6);
  color: #c7ced8;
  font-size: 8px;
  transform: translateX(-50%);
}

@media (max-width: 760px) {
  .plan-lightbox img {
    max-width: 96vw;
    max-height: 80vh;
  }

  .plan-lightbox-nav.is-prev {
    left: 8px;
  }

  .plan-lightbox-nav.is-next {
    right: 8px;
  }

  .plan-lightbox-close {
    top: 10px;
    right: 10px;
  }

  .plan-viewer-expand {
    right: 8px;
    bottom: 8px;
  }
}

.plan-viewer-gallery[hidden],
.plan-lightbox-nav[hidden] {
  display: none !important;
}

.plan-viewer-zoom-hint {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 3;
  color: rgba(242, 238, 228, 0.62);
  font-size: 7px;
  pointer-events: none;
}

@media (max-width: 760px) {
  .plan-viewer-zoom-hint {
    left: 8px;
    bottom: 9px;
  }
}
