:root {
  color-scheme: dark;
  --bg: #050c18;
  --bg-deep: #071224;
  --bg-mid: #0b1a31;
  --surface: rgba(9, 19, 37, 0.7);
  --surface-strong: rgba(8, 16, 31, 0.86);
  --surface-soft: rgba(255, 255, 255, 0.05);
  --surface-soft-strong: rgba(255, 255, 255, 0.09);
  --ink: #edf6ff;
  --muted: #9eb4d3;
  --muted-strong: #cad8ea;
  --line: rgba(150, 186, 255, 0.14);
  --line-strong: rgba(139, 219, 255, 0.3);
  --accent: #63f0d6;
  --accent-strong: #2bcfbd;
  --accent-soft: rgba(99, 240, 214, 0.14);
  --accent-deep: rgba(39, 158, 163, 0.22);
  --warm: #ffbf78;
  --warm-strong: #ff9152;
  --warm-soft: rgba(255, 180, 97, 0.16);
  --danger: #ff7486;
  --danger-soft: rgba(255, 116, 134, 0.16);
  --info: #82d8ff;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.25);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 999px;
  --max-width: 1280px;
  --pointer-x: 50%;
  --pointer-y: 28%;
  --pointer-shift-x: 0px;
  --pointer-shift-y: 0px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(88, 255, 206, 0.12), transparent 28rem),
    radial-gradient(circle at 78% 12%, rgba(130, 216, 255, 0.14), transparent 24rem),
    radial-gradient(circle at 20% 80%, rgba(255, 163, 102, 0.08), transparent 24rem),
    linear-gradient(180deg, #071120 0%, #08101d 44%, #040914 100%);
  color: var(--ink);
  font-family: "Aptos", "Segoe UI Variable Text", "Trebuchet MS", sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

body::before {
  background:
    radial-gradient(circle at var(--pointer-x) var(--pointer-y), rgba(107, 246, 215, 0.14), transparent 18rem),
    radial-gradient(circle at calc(var(--pointer-x) - 16%) calc(var(--pointer-y) + 12%), rgba(133, 208, 255, 0.08), transparent 20rem);
  filter: blur(14px);
  transition: opacity 180ms ease;
}

body::after {
  z-index: -1;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.88), transparent 100%);
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button,
input,
select,
details,
summary,
.date-chip,
.summary-card,
.month-card,
.data-card,
.table-wrap,
.hint-button,
.hero-link {
  transition:
    transform 200ms ease,
    border-color 200ms ease,
    background-color 200ms ease,
    box-shadow 200ms ease,
    color 200ms ease,
    opacity 200ms ease;
}

.page-aurora {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -3;
}

.aurora,
.grid-haze {
  position: absolute;
  border-radius: 999px;
}

.aurora {
  filter: blur(36px);
  opacity: 0.65;
  mix-blend-mode: screen;
}

.aurora-one {
  inset: -10% auto auto -8%;
  width: 28rem;
  height: 28rem;
  background: radial-gradient(circle at 32% 32%, rgba(99, 240, 214, 0.8), rgba(99, 240, 214, 0.05) 68%, transparent 78%);
  animation: drift-one 18s ease-in-out infinite alternate;
}

.aurora-two {
  inset: 8% -6% auto auto;
  width: 30rem;
  height: 30rem;
  background: radial-gradient(circle at 38% 38%, rgba(130, 216, 255, 0.72), rgba(130, 216, 255, 0.06) 70%, transparent 82%);
  animation: drift-two 24s ease-in-out infinite alternate;
}

.aurora-three {
  inset: auto auto -18% 22%;
  width: 24rem;
  height: 24rem;
  background: radial-gradient(circle at 50% 50%, rgba(255, 179, 120, 0.5), rgba(255, 179, 120, 0.04) 70%, transparent 84%);
  animation: drift-three 22s ease-in-out infinite alternate;
}

.grid-haze {
  inset: auto 12% 12% auto;
  width: 24rem;
  height: 24rem;
  background:
    radial-gradient(circle at center, rgba(91, 130, 190, 0.12), transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 70%);
  filter: blur(18px);
}

.page-shell {
  position: relative;
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.6rem 0 3rem;
  isolation: isolate;
}

.page-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 40px;
  background:
    radial-gradient(circle at 16% 8%, rgba(255, 255, 255, 0.06), transparent 22rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 24%);
  opacity: 0.85;
  pointer-events: none;
  z-index: -1;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 1.25rem;
  align-items: stretch;
  margin-bottom: 1.4rem;
}

.hero-copy,
.hero-card,
.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(16, 29, 53, 0.76), rgba(7, 15, 29, 0.88));
  backdrop-filter: blur(28px) saturate(132%);
  box-shadow: var(--shadow);
}

.hero-copy::before,
.hero-card::before,
.panel::before,
.support-box::before,
.assumption-box::before,
.summary-card::before,
.data-card::before,
.month-card::before,
.accordion-card::before,
.table-wrap::before,
.calendar-dialog-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 32%),
    linear-gradient(180deg, transparent 68%, rgba(255, 255, 255, 0.03));
  pointer-events: none;
}

.hero-copy {
  padding: 2.3rem;
  animation: rise-in 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-copy h1 {
  margin: 0.2rem 0 0.8rem;
  font-family: "Aptos Display", "Bahnschrift", "Trebuchet MS", sans-serif;
  font-size: clamp(3rem, 6vw, 5.6rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.hero-text {
  max-width: 40rem;
  margin: 0;
  color: var(--muted-strong);
  font-size: 1.06rem;
  line-height: 1.75;
}

.eyebrow,
.hero-card-label,
.field span,
.field-group legend,
.summary-card .label,
th,
.month-limit-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 1.35rem;
}

.hero-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
  overflow: hidden;
}

.hero-link::before,
.primary-button::before,
.secondary-button::before,
.icon-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 18%, rgba(255, 255, 255, 0.24) 50%, transparent 78%);
  transform: translateX(-140%);
  transition: transform 420ms ease;
}

.hero-link:hover::before,
.hero-link:focus-visible::before,
.primary-button:hover::before,
.primary-button:focus-visible::before,
.secondary-button:hover::before,
.secondary-button:focus-visible::before {
  transform: translateX(130%);
}

.hero-link-primary {
  color: #031217;
  background: linear-gradient(135deg, #83ffe0, #44d3c6);
  box-shadow: 0 16px 36px rgba(47, 207, 189, 0.26);
}

.hero-link-secondary {
  color: var(--ink);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
}

.hero-link:hover,
.hero-link:focus-visible {
  transform: translateY(-2px);
}

.hero-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.35rem;
}

.hero-mini-card {
  padding: 1rem 1rem 1.05rem;
  border: 1px solid rgba(154, 194, 255, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hero-mini-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-mini-card strong {
  display: block;
  line-height: 1.45;
  font-size: 0.96rem;
}

.hero-orbit-panel {
  display: grid;
  align-items: end;
  min-height: 100%;
  padding: 1.65rem;
  animation: rise-in 980ms cubic-bezier(0.2, 0.8, 0.2, 1) 120ms both;
}

.hero-card-content {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 1rem;
  align-self: end;
}

.orb-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform: translate(calc(var(--pointer-shift-x) * 0.04), calc(var(--pointer-shift-y) * 0.04));
}

.orb-ring,
.orb-pulse,
.orb-core,
.orb-spark {
  position: absolute;
  border-radius: 999px;
}

.orb-ring {
  border: 1px solid rgba(158, 215, 255, 0.18);
  box-shadow:
    inset 0 0 30px rgba(99, 240, 214, 0.06),
    0 0 40px rgba(99, 240, 214, 0.08);
}

.orb-ring-one {
  width: 22rem;
  height: 22rem;
  inset: 0 auto auto 50%;
  transform: translate(-30%, -8%);
  animation: spin-orbit 26s linear infinite;
}

.orb-ring-two {
  width: 15rem;
  height: 15rem;
  inset: 2.4rem auto auto 56%;
  transform: translate(-22%, 2%);
  border-color: rgba(255, 183, 102, 0.16);
  animation: spin-orbit-reverse 16s linear infinite;
}

.orb-pulse {
  border: 1px solid rgba(99, 240, 214, 0.18);
  opacity: 0;
}

.orb-pulse-one {
  width: 8rem;
  height: 8rem;
  inset: 5.5rem auto auto 61%;
  animation: pulse-orb 4.4s ease-out infinite;
}

.orb-pulse-two {
  width: 8rem;
  height: 8rem;
  inset: 5.5rem auto auto 61%;
  animation: pulse-orb 4.4s ease-out 1.6s infinite;
}

.orb-core {
  box-shadow:
    0 0 32px rgba(99, 240, 214, 0.28),
    0 0 80px rgba(99, 240, 214, 0.14);
}

.orb-core-primary {
  width: 8.7rem;
  height: 8.7rem;
  inset: 5rem auto auto 61%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(123, 247, 212, 0.82) 24%, rgba(37, 125, 128, 0.92) 65%, rgba(7, 23, 47, 0.2) 100%);
  animation: bob-orb 6s ease-in-out infinite;
}

.orb-core-secondary {
  width: 2.9rem;
  height: 2.9rem;
  inset: 14rem auto auto 41%;
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.92), rgba(130, 216, 255, 0.78) 30%, rgba(19, 67, 120, 0.92) 75%);
  animation: bob-orb 5.4s ease-in-out infinite reverse;
}

.orb-core-tertiary {
  width: 2.4rem;
  height: 2.4rem;
  inset: 2.8rem auto auto 74%;
  background:
    radial-gradient(circle at 32% 32%, rgba(255, 255, 255, 0.92), rgba(255, 190, 121, 0.88) 34%, rgba(175, 83, 45, 0.88) 76%);
  animation: bob-orb 4.4s ease-in-out infinite;
}

.orb-spark {
  width: 0.45rem;
  height: 0.45rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.85);
}

.orb-spark-one {
  inset: 4rem auto auto 48%;
  animation: sparkle 4.8s ease-in-out infinite;
}

.orb-spark-two {
  inset: 12.5rem auto auto 73%;
  animation: sparkle 5.5s ease-in-out 1s infinite;
}

.orb-spark-three {
  inset: 16rem auto auto 56%;
  animation: sparkle 4.2s ease-in-out 2s infinite;
}

.feature-list {
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--muted-strong);
  line-height: 1.6;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--info));
  box-shadow: 0 0 16px rgba(99, 240, 214, 0.45);
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.78rem;
  border: 1px solid rgba(134, 202, 255, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted-strong);
  font-size: 0.83rem;
}

.layout {
  display: grid;
  grid-template-columns: 370px minmax(0, 1fr);
  gap: 1.25rem;
}

.panel {
  padding: 1.5rem;
  animation: rise-in 900ms cubic-bezier(0.2, 0.8, 0.2, 1) 180ms both;
}

.controls {
  background:
    linear-gradient(180deg, rgba(7, 16, 31, 0.8), rgba(5, 12, 24, 0.94));
}

.results {
  background:
    linear-gradient(180deg, rgba(8, 16, 31, 0.74), rgba(6, 14, 27, 0.9));
}

.panel-heading h2,
.section-header h3,
.month-card h4,
.data-card h4,
.data-card h5,
.assumption-box h3,
.support-box h3 {
  margin: 0.15rem 0 0;
  font-family: "Aptos Display", "Bahnschrift", "Trebuchet MS", sans-serif;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.planner-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.field,
.field-group {
  display: grid;
  gap: 0.48rem;
}

.field-group {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 0.85rem;
}

select,
input[type="number"] {
  width: 100%;
  min-height: 3.3rem;
  border: 1px solid rgba(153, 188, 255, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.035));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -18px 24px rgba(0, 0, 0, 0.08);
  padding: 0.9rem 0.95rem;
  color: var(--ink);
}

select:hover,
input[type="number"]:hover {
  border-color: rgba(145, 217, 255, 0.24);
}

select:focus,
input:focus,
button:focus-visible,
.hero-link:focus-visible,
summary:focus-visible,
.paypal-button-link:focus-visible {
  outline: none;
  border-color: var(--line-strong);
  box-shadow:
    0 0 0 3px rgba(99, 240, 214, 0.14),
    0 12px 26px rgba(7, 18, 38, 0.24);
}

input[type="radio"] {
  accent-color: var(--accent-strong);
}

.choice-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.92rem 1rem;
  border: 1px solid rgba(153, 188, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.choice-card + .choice-card {
  margin-top: 0.55rem;
}

.choice-card:hover {
  transform: translateY(-1px);
  border-color: rgba(129, 216, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.choice-card:has(input:checked) {
  border-color: rgba(99, 240, 214, 0.34);
  background:
    linear-gradient(180deg, rgba(99, 240, 214, 0.12), rgba(99, 240, 214, 0.05));
  box-shadow: 0 14px 34px rgba(26, 143, 136, 0.14);
}

.button-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.icon-button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.primary-button,
.secondary-button {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.92rem 1.26rem;
  cursor: pointer;
  font-weight: 700;
}

.primary-button {
  color: #021015;
  background: linear-gradient(135deg, #88ffe6, #3dd6c6 55%, #2bc0cb);
  box-shadow: 0 16px 34px rgba(45, 214, 198, 0.24);
}

.secondary-button {
  color: var(--muted-strong);
  border-color: rgba(153, 188, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.primary-button:hover,
.primary-button:focus-visible,
.secondary-button:hover:not(:disabled),
.secondary-button:focus-visible:not(:disabled),
.icon-button:hover,
.icon-button:focus-visible {
  transform: translateY(-2px);
}

.secondary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.icon-button {
  width: 2.55rem;
  height: 2.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 124, 143, 0.18);
  border-radius: 999px;
  background: rgba(255, 116, 134, 0.08);
  color: var(--danger);
  cursor: pointer;
}

.icon-button svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.icon-button.neutral {
  border-color: rgba(153, 188, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 1.28rem;
}

.support-box,
.assumption-box {
  position: relative;
  overflow: hidden;
  margin-top: 1.25rem;
  padding: 1rem 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px);
}

.support-box {
  background:
    linear-gradient(135deg, rgba(255, 189, 110, 0.12), rgba(255, 145, 82, 0.08) 54%, rgba(255, 255, 255, 0.04));
}

.assumption-box {
  background:
    linear-gradient(135deg, rgba(99, 240, 214, 0.1), rgba(129, 216, 255, 0.06) 56%, rgba(255, 255, 255, 0.03));
}

.assumption-box p,
.status-text,
.section-header p,
.site-footer,
.support-box p,
.support-status,
.month-meta,
.month-add-note,
.calendar-selection,
.data-card p,
.data-meta,
.data-list,
.reason-list {
  color: var(--muted);
  line-height: 1.65;
}

.support-form {
  display: grid;
  gap: 0.9rem;
  margin-top: 0.9rem;
}

.support-field {
  max-width: 12rem;
}

.paypal-button-wrap {
  display: flex;
  align-items: center;
}

.paypal-button-link {
  display: inline-flex;
  line-height: 0;
  border-radius: 14px;
}

.paypal-donate-button {
  display: block;
  width: 147px;
  height: 47px;
  border: 0;
  cursor: pointer;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.22));
}

.paypal-button-link:hover .paypal-donate-button,
.paypal-button-link:focus-visible .paypal-donate-button {
  transform: translateY(-2px) scale(1.01);
}

.support-status {
  margin: 0;
  font-size: 0.94rem;
}

.shortfall-box {
  margin-top: 0.9rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(255, 179, 120, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(255, 180, 97, 0.08);
}

.shortfall-box strong {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--warm);
}

.shortfall-box ul,
.data-list,
.reason-list {
  margin: 0;
  padding-left: 1rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.95rem;
  margin-top: 1.2rem;
}

.summary-grid-advanced {
  margin-top: 1rem;
}

.summary-card {
  position: relative;
  overflow: hidden;
  padding: 1rem 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.04));
  box-shadow: var(--shadow-soft);
  animation: rise-in 620ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.summary-card:hover {
  transform: translateY(-4px);
  border-color: rgba(130, 216, 255, 0.24);
}

.summary-card .value {
  display: block;
  margin-top: 0.42rem;
  font-family: "Aptos Display", "Bahnschrift", "Trebuchet MS", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.summary-card .hint {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.93rem;
}

.result-section {
  margin-top: 1.55rem;
}

.accordion-card {
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
}

.accordion-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  list-style: none;
  cursor: pointer;
  padding: 1.05rem 1.15rem;
  color: var(--ink);
  font-weight: 700;
}

.accordion-card summary::-webkit-details-marker {
  display: none;
}

.accordion-card summary::after {
  content: "";
  width: 0.72rem;
  height: 0.72rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.accordion-card[open] summary::after {
  transform: rotate(-135deg);
}

.accordion-card summary:hover {
  background: rgba(255, 255, 255, 0.035);
}

.accordion-content {
  padding: 0 1.15rem 1.15rem;
}

.accordion-content .result-section:first-child {
  margin-top: 1rem;
}

.section-header {
  margin-bottom: 0.85rem;
}

.section-header h3 {
  font-size: 1.3rem;
}

.section-header p {
  margin: 0.28rem 0 0;
}

.split-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.table-wrap {
  position: relative;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.035));
  box-shadow: var(--shadow-soft);
}

.table-wrap {
  scrollbar-width: thin;
  scrollbar-color: rgba(130, 216, 255, 0.42) rgba(255, 255, 255, 0.05);
}

.table-wrap::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.table-wrap::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(130, 216, 255, 0.75), rgba(99, 240, 214, 0.52)) padding-box;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.table-wrap::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(180deg, rgba(130, 216, 255, 0.9), rgba(99, 240, 214, 0.72)) padding-box;
}

.table-wrap table {
  min-width: 760px;
}

.table-wrap .plan-table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: rgba(255, 255, 255, 0.05);
}

th,
td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(153, 188, 255, 0.08);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(6, 16, 31, 0.94);
  backdrop-filter: blur(14px);
  color: var(--muted);
}

tbody tr {
  transition: background-color 180ms ease, transform 180ms ease;
}

tbody tr:hover {
  background: rgba(99, 240, 214, 0.05);
}

.plan-table th,
.plan-table td {
  overflow-wrap: anywhere;
}

.plan-table-date-col {
  width: 15.5rem;
}

.plan-table-score-col,
.plan-table-office-col,
.plan-table-commute-col {
  width: 7.25rem;
  white-space: nowrap;
}

.plan-table-hints-col {
  min-width: 0;
}

.plan-table-action-col {
  width: 5.75rem;
  min-width: 5.75rem;
  text-align: center;
  white-space: nowrap;
}

.plan-table th.plan-table-action-col,
.plan-table td.plan-table-action-col {
  position: sticky;
  right: 0;
  z-index: 2;
  background: rgba(8, 16, 31, 0.88);
  box-shadow: -10px 0 16px rgba(4, 10, 20, 0.14);
}

.plan-table thead .plan-table-action-col {
  z-index: 4;
}

.month-group-row.month-tone-a td.plan-table-action-col {
  background: rgba(99, 240, 214, 0.035);
}

.month-group-row.month-tone-b td.plan-table-action-col {
  background: rgba(255, 180, 97, 0.04);
}

.plan-table .hint-button-list {
  max-width: 100%;
}

.plan-table .hint-button-wrap {
  max-width: 100%;
}

.plan-table .hint-button {
  max-width: min(100%, 18rem);
  align-items: flex-start;
  white-space: normal;
  text-align: left;
  line-height: 1.35;
}

.plan-table .icon-button {
  margin: 0 auto;
}

.month-group-header td {
  padding: 0;
  border-bottom: 0;
  border-top: 0;
}

.month-group-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.028));
}

.month-group-bar strong {
  display: block;
  font-family: "Aptos Display", "Bahnschrift", "Trebuchet MS", sans-serif;
  font-size: 1.14rem;
  letter-spacing: -0.03em;
}

.month-group-bar span {
  color: var(--muted);
  font-size: 0.92rem;
}

.month-group-header.month-tone-a td,
.month-group-row.month-tone-a {
  background: rgba(99, 240, 214, 0.035);
}

.month-group-header.month-tone-b td,
.month-group-row.month-tone-b {
  background: rgba(255, 180, 97, 0.04);
}

.month-group-header td {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.month-group-header.month-tone-a td {
  border-top-color: rgba(99, 240, 214, 0.18);
}

.month-group-header.month-tone-b td {
  border-top-color: rgba(255, 180, 97, 0.2);
}

.month-group-row.month-section-end td {
  border-bottom-width: 2px;
}

.month-group-row.month-section-end.month-tone-a td {
  border-bottom-color: rgba(99, 240, 214, 0.12);
}

.month-group-row.month-section-end.month-tone-b td {
  border-bottom-color: rgba(255, 180, 97, 0.14);
}

.month-group-empty td {
  color: var(--muted);
  font-style: italic;
}

.month-group-row.month-tone-a:hover td {
  background: rgba(99, 240, 214, 0.07);
}

.month-group-row.month-tone-b:hover td {
  background: rgba(255, 180, 97, 0.08);
}

.month-group-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.month-limit-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.month-limit-field {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.month-limit-field span {
  white-space: nowrap;
}

.month-limit-input {
  width: 5.4rem;
  min-height: 3rem;
  padding: 0.7rem 0.78rem;
}

.month-limit-button,
.table-add-button {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.month-limit-button {
  padding: 0.72rem 1rem;
}

.score-pill,
.tone-pill,
.tag,
.hint-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.34rem 0.68rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.score-pill {
  background: rgba(99, 240, 214, 0.14);
  color: var(--accent);
  font-weight: 700;
}

.tone-pill {
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted-strong);
}

.tone-pill.bad {
  background: var(--danger-soft);
  color: #ffb3bd;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-bottom: 0.5rem;
}

.tag {
  background: rgba(255, 180, 97, 0.14);
  color: #ffd3aa;
}

.hint-button-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.hint-button-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hint-button {
  border: 1px solid rgba(99, 240, 214, 0.14);
  background: rgba(99, 240, 214, 0.08);
  color: var(--muted-strong);
  font: inherit;
  cursor: help;
}

.hint-button:hover,
.hint-button-wrap:focus-within .hint-button {
  background: rgba(99, 240, 214, 0.14);
  border-color: rgba(99, 240, 214, 0.24);
}

.hint-tooltip {
  display: none;
}

.global-tooltip {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: max(1rem, env(safe-area-inset-bottom, 1rem));
  z-index: 80;
  width: min(32rem, calc(100vw - 1rem));
  max-width: calc(100vw - 1rem);
  min-width: 0;
  max-height: min(40vh, 18rem);
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(153, 188, 255, 0.12);
  border-radius: 18px;
  background: rgba(6, 14, 26, 0.96);
  color: var(--ink);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow: auto;
  transform: translate(-50%, 8px);
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
  white-space: normal;
  text-align: left;
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: normal;
  line-break: auto;
  hyphens: auto;
  text-wrap: pretty;
  scrollbar-gutter: stable;
}

.global-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.global-tooltip strong {
  display: block;
  margin-bottom: 0.45rem;
}

.global-tooltip ul {
  margin: 0;
  padding-left: 1.05rem;
  display: grid;
  gap: 0.28rem;
}

.global-tooltip li {
  margin: 0;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.month-card,
.data-card {
  position: relative;
  overflow: hidden;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.04));
  box-shadow: var(--shadow-soft);
  animation: rise-in 660ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.month-card:hover,
.data-card:hover {
  transform: translateY(-4px);
  border-color: rgba(130, 216, 255, 0.22);
}

.month-meta {
  margin: 0.35rem 0 0.85rem;
  font-size: 0.93rem;
}

.date-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
}

.date-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 80px;
  padding: 0.55rem 0.62rem;
  border-radius: 16px;
  border: 1px solid rgba(153, 188, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(99, 240, 214, 0.12), rgba(99, 240, 214, 0.05));
}

.date-chip.manual {
  background:
    linear-gradient(180deg, rgba(255, 180, 97, 0.2), rgba(255, 180, 97, 0.08));
}

.date-chip:hover {
  transform: translateY(-2px);
}

.date-chip strong {
  font-family: "Consolas", "SFMono-Regular", monospace;
  font-size: 0.89rem;
}

.date-chip span {
  color: var(--muted);
  font-size: 0.79rem;
}

.empty-card {
  color: var(--muted);
  font-style: italic;
}

.month-add-wrap {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(153, 188, 255, 0.1);
}

.month-add-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted-strong);
  font-weight: 700;
}

.month-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
}

.month-add-button {
  align-self: stretch;
}

.calendar-dialog {
  width: min(800px, calc(100% - 2rem));
  border: 0;
  border-radius: 28px;
  padding: 0;
  background: transparent;
}

.calendar-dialog::backdrop {
  background:
    radial-gradient(circle at center, rgba(99, 240, 214, 0.08), transparent 18rem),
    rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
}

.calendar-dialog-inner {
  position: relative;
  overflow: hidden;
  padding: 1.4rem;
  border: 1px solid rgba(153, 188, 255, 0.14);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(11, 22, 41, 0.95), rgba(7, 15, 29, 0.96));
  box-shadow: var(--shadow);
}

.calendar-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}

.calendar-weekday,
.calendar-spacer,
.calendar-day {
  min-height: 3.15rem;
}

.calendar-weekday {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.calendar-spacer {
  pointer-events: none;
}

.calendar-day {
  border: 1px solid rgba(153, 188, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  cursor: pointer;
}

.calendar-day:hover {
  transform: translateY(-2px);
  border-color: rgba(130, 216, 255, 0.22);
}

.calendar-day small {
  color: var(--muted);
}

.calendar-day.disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.calendar-day.in-range {
  background: rgba(99, 240, 214, 0.1);
}

.calendar-day.selected {
  background: linear-gradient(135deg, #7bffe0, #37d2c4 58%, #21aebb);
  color: #031015;
  border-color: transparent;
  box-shadow: 0 14px 26px rgba(45, 214, 198, 0.24);
}

.calendar-day.selected small {
  color: rgba(3, 16, 21, 0.74);
}

.calendar-selection {
  min-height: 1.6rem;
  margin: 1rem 0 0.8rem;
}

.data-meta {
  margin: 0;
}

.data-foundation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.data-card h5 {
  margin-top: 1rem;
  font-size: 1rem;
}

.data-card p {
  margin: 0.35rem 0 0;
}

.data-list li + li,
.reason-list li + li {
  margin-top: 0.38rem;
}

.site-footer {
  padding: 1.5rem 0 0;
  text-align: center;
  font-size: 0.93rem;
}

.noscript-note {
  margin: 0 auto 2rem;
  width: min(860px, calc(100% - 2rem));
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 116, 134, 0.18);
  background: rgba(255, 116, 134, 0.08);
  color: #ffd3da;
}

.summary-card {
  overflow: visible;
}

.summary-card .value {
  display: flex;
  align-items: flex-start;
  margin-top: 0.42rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
}

.summary-card .hint {
  display: none;
}

.hover-reveal {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hover-note {
  display: none;
}

.metric-badge {
  min-height: 2.5rem;
  min-width: 2.5rem;
  padding: 0.45rem 0.62rem;
  border: 1px solid rgba(153, 188, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  cursor: help;
}

.metric-badge:hover,
.metric-badge:focus-within {
  border-color: rgba(130, 216, 255, 0.24);
  transform: translateY(-1px);
}

.count-badge {
  min-width: 3rem;
  justify-content: center;
}

.count-badge-value {
  font-family: "Aptos Display", "Bahnschrift", "Trebuchet MS", sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.count-badge-compact {
  min-height: 2.1rem;
  min-width: 2.1rem;
  padding: 0.3rem 0.52rem;
  border-radius: 999px;
}

.count-badge-compact .count-badge-value {
  font-size: 0.96rem;
  letter-spacing: 0;
}

.star-badge {
  padding-inline: 0.72rem;
}

.star-rating {
  display: inline-flex;
  gap: 0.14rem;
}

.star {
  color: rgba(255, 255, 255, 0.18);
  font-size: 1rem;
  line-height: 1;
}

.star.is-on {
  color: #ffd977;
  text-shadow: 0 0 16px rgba(255, 217, 119, 0.32);
}

.star.compact {
  font-size: 0.78rem;
}

.signal-badge {
  min-width: 3rem;
  padding-inline: 0.72rem;
}

.signal-lights {
  display: inline-flex;
  gap: 0.28rem;
  align-items: center;
}

.signal-lamp {
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.signal-lamp.signal-high.is-on {
  background: #ff7486;
  box-shadow: 0 0 16px rgba(255, 116, 134, 0.35);
}

.signal-lamp.signal-medium.is-on {
  background: #ffbf78;
  box-shadow: 0 0 16px rgba(255, 191, 120, 0.28);
}

.signal-lamp.signal-low.is-on {
  background: #63f0d6;
  box-shadow: 0 0 16px rgba(99, 240, 214, 0.28);
}

.hint-button-list {
  gap: 0.38rem;
}

.hint-icon-button {
  min-width: 2.05rem;
  min-height: 2.05rem;
  justify-content: center;
  padding: 0.28rem;
  font-size: 0.92rem;
}

.hint-manual {
  border-color: rgba(255, 191, 120, 0.18);
  background: rgba(255, 180, 97, 0.12);
}

.hint-bridge,
.hint-before,
.hint-after,
.hint-quiet,
.hint-busy,
.hint-office-break,
.hint-home-break,
.hint-holiday,
.hint-neutral {
  border-color: rgba(99, 240, 214, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.plan-table .hint-button {
  max-width: none;
  white-space: nowrap;
}

.plan-table .hint-button-wrap {
  overflow: visible;
}

.date-chip {
  position: relative;
  align-items: flex-start;
  min-width: 82px;
  cursor: help;
}

.date-chip-icons {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 1rem;
}

.date-chip-marker {
  color: #ffd977;
  font-size: 0.78rem;
  line-height: 1;
}

.month-card {
  overflow: visible;
}

.month-meta {
  margin: 0.35rem 0 0.85rem;
}

.month-meta .count-badge {
  min-height: 1.9rem;
}

.plan-table-score-col,
.plan-table-office-col,
.plan-table-commute-col {
  text-align: center;
}

.plan-table .metric-badge,
.compact-metric-table .metric-badge {
  margin-inline: auto;
}

@keyframes rise-in {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.985);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes drift-one {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  100% {
    transform: translate3d(4rem, 2rem, 0) scale(1.08);
  }
}

@keyframes drift-two {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  100% {
    transform: translate3d(-3rem, 3rem, 0) scale(1.12);
  }
}

@keyframes drift-three {
  0% {
    transform: translate3d(0, 0, 0) scale(0.96);
  }

  100% {
    transform: translate3d(2.4rem, -2rem, 0) scale(1.08);
  }
}

@keyframes spin-orbit {
  from {
    transform: translate(-30%, -8%) rotate(0deg);
  }

  to {
    transform: translate(-30%, -8%) rotate(360deg);
  }
}

@keyframes spin-orbit-reverse {
  from {
    transform: translate(-22%, 2%) rotate(360deg);
  }

  to {
    transform: translate(-22%, 2%) rotate(0deg);
  }
}

@keyframes pulse-orb {
  0% {
    opacity: 0;
    transform: scale(0.7);
  }

  20% {
    opacity: 0.4;
  }

  100% {
    opacity: 0;
    transform: scale(2.3);
  }
}

@keyframes bob-orb {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes sparkle {
  0%,
  100% {
    opacity: 0.28;
    transform: scale(0.8);
  }

  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}

@media (max-width: 1100px) {
  .hero,
  .layout,
  .split-section,
  .data-foundation-grid {
    grid-template-columns: 1fr;
  }

  .hero-orbit-panel {
    min-height: 26rem;
  }

  .orb-ring-one {
    inset: 0 auto auto 56%;
  }
}

@media (max-width: 980px) {
  .field-row,
  .month-add-row {
    grid-template-columns: 1fr;
  }

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

  .month-group-actions {
    width: 100%;
  }

  .month-limit-controls {
    flex-wrap: wrap;
    width: 100%;
  }

  .month-limit-field {
    flex: 1 1 8rem;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 1rem, 100%);
    padding-top: 1rem;
  }

  .hero-copy,
  .hero-card,
  .panel,
  .calendar-dialog-inner {
    border-radius: 26px;
  }

  .hero-copy {
    padding: 1.5rem;
  }

  .hero-orbit-panel {
    padding: 1.2rem;
    min-height: 23rem;
  }

  .orb-ring-one {
    width: 16rem;
    height: 16rem;
    inset: 0 auto auto 52%;
  }

  .orb-ring-two {
    width: 11rem;
    height: 11rem;
    inset: 2.6rem auto auto 58%;
  }

  .orb-core-primary {
    width: 6.7rem;
    height: 6.7rem;
    inset: 5rem auto auto 60%;
  }

  .orb-core-secondary {
    inset: 12rem auto auto 41%;
  }

  .orb-core-tertiary {
    inset: 3rem auto auto 75%;
  }

  th,
  td {
    padding: 0.78rem 0.76rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
