:root {
  --background: #f8f9ff;
  --surface: #ffffff;
  --surface-low: #eff4ff;
  --surface-mid: #e6eeff;
  --surface-high: #d9e3f6;
  --primary: #002532;
  --primary-container: #0d3b4c;
  --primary-soft: #bfe9fe;
  --primary-muted: #7da5b9;
  --ink: #121c2a;
  --muted: #41484c;
  --outline: #c1c7cc;
  --outline-soft: rgba(193, 199, 204, 0.38);
  --success: #147a3f;
  --success-bg: #e7f7ee;
  --error: #ba1a1a;
  --shadow: 0 18px 44px rgba(18, 28, 42, 0.075);
  --soft-shadow: 0 8px 22px rgba(18, 28, 42, 0.045);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% -10%, rgba(191, 233, 254, 0.24), transparent 36%),
    var(--background);
  color: var(--ink);
  font-family: Rubik, Arial, sans-serif;
  letter-spacing: 0;
  -webkit-tap-highlight-color: transparent;
}

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

button {
  cursor: pointer;
}

.material-symbols-outlined {
  direction: ltr;
  display: inline-block;
  font-variation-settings: "FILL" 0, "wght" 450, "GRAD" 0, "opsz" 24;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
}

.app-shell {
  width: min(100%, 600px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 24px 104px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  margin: 0 -24px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(217, 227, 246, 0.65);
  background: rgba(248, 249, 255, 0.82);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  display: block;
  width: 146px;
  max-height: 34px;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--primary);
}

.icon-button:active,
.bottom-nav-item:active,
.bento-card:active,
.primary:active,
.secondary:active {
  transform: scale(0.97);
}

.settings-panel {
  margin-top: 16px;
  border: 1px solid var(--outline-soft);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  padding: 18px;
  box-shadow: var(--shadow);
}

.setting-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.setting-icon,
.form-icon {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
}

.settings-panel h2,
.settings-panel p {
  margin: 0;
}

.settings-panel p {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.55;
}

.hero {
  padding: 54px 0 28px;
}

.hero-copy {
  text-align: center;
}

.kicker,
.eyebrow {
  margin: 0 0 8px;
  color: var(--primary-muted);
  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.18;
}

.hero p:not(.kicker) {
  max-width: 330px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 42px;
}

.bento-card {
  position: relative;
  display: grid;
  min-height: 174px;
  gap: 12px;
  align-content: space-between;
  border: 1px solid rgba(217, 227, 246, 0.9);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  padding: 22px;
  text-align: right;
  box-shadow: var(--soft-shadow);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.bento-card:hover {
  box-shadow: var(--shadow);
}

.bento-wide {
  grid-column: 1 / -1;
  grid-template-columns: auto 1fr auto;
  min-height: 132px;
  align-items: center;
}

.bento-card small,
.channel-card small,
.radio-card small,
.recipient-card small {
  display: block;
  color: rgba(65, 72, 76, 0.76);
  font-size: 13px;
  font-weight: 600;
}

.bento-card strong {
  color: var(--primary);
  font-size: 25px;
  font-weight: 800;
  line-height: 1.2;
}

.bento-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 20px;
  font-size: 30px;
}

.bento-icon.dark {
  background: var(--primary);
  color: white;
  box-shadow: 0 16px 24px rgba(0, 37, 50, 0.2);
}

.bento-icon.light {
  background: var(--primary-soft);
  color: var(--primary);
}

.bento-icon.warm {
  background: #e5e2df;
  color: var(--primary);
}

.bento-icon.ring {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary-soft);
}

.status-chip,
.quiet-button,
.pill {
  width: fit-content;
  border-radius: 999px;
  background: var(--surface-low);
  color: var(--muted);
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 800;
}

.status-chip {
  background: var(--success-bg);
  color: var(--success);
}

.chevron {
  color: var(--muted);
}

.life-card {
  overflow: hidden;
  border-color: transparent;
  background: var(--primary-container);
  color: var(--primary-soft);
}

.life-card::before {
  position: absolute;
  inset: auto -32px -48px auto;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(191, 233, 254, 0.11);
  content: "";
}

.life-card strong,
.life-card small {
  color: inherit;
}

.quiet-button {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: var(--primary-soft);
}

.atmosphere-card {
  position: relative;
  display: grid;
  height: 230px;
  align-items: end;
  margin-top: 34px;
  overflow: hidden;
  border-radius: 28px;
  background:
    linear-gradient(180deg, transparent 18%, rgba(0, 37, 50, 0.66) 100%),
    radial-gradient(circle at 50% 28%, rgba(255, 239, 177, 0.95), transparent 18%),
    linear-gradient(165deg, #c7964c 0%, #f3d78d 39%, #9d6731 58%, #47301f 100%);
  box-shadow: var(--soft-shadow);
}

.atmosphere-card::before {
  position: absolute;
  right: 49%;
  bottom: 66px;
  width: 32px;
  height: 86px;
  border-radius: 999px 999px 4px 4px;
  background: rgba(61, 45, 26, 0.78);
  box-shadow:
    -38px -34px 0 18px rgba(61, 45, 26, 0.24),
    37px -30px 0 16px rgba(61, 45, 26, 0.22),
    0 -56px 0 30px rgba(61, 45, 26, 0.3);
  content: "";
}

.atmosphere-card::after {
  position: absolute;
  right: -10%;
  bottom: -38px;
  width: 120%;
  height: 92px;
  border-radius: 50%;
  background: repeating-linear-gradient(172deg, rgba(50, 34, 22, 0.68) 0 7px, rgba(83, 55, 29, 0.7) 7px 14px);
  content: "";
}

.atmosphere-quote {
  position: relative;
  z-index: 1;
  padding: 0 24px 28px;
  color: white;
  font-size: 21px;
  font-style: italic;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.workspace {
  padding-top: 28px;
}

.tabs {
  display: flex;
  gap: 10px;
  margin: 0 0 22px;
}

.tab {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  border: 1px solid rgba(217, 227, 246, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-weight: 800;
}

.tab.active {
  border-color: transparent;
  background: var(--primary-container);
  color: white;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
  color: var(--primary);
  font-size: 27px;
  font-weight: 800;
  line-height: 1.2;
}

.section-head.compact h3 {
  font-size: 22px;
}

.note-form,
.activation-panel,
.readiness-panel,
.saved-list,
.checkup-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(193, 199, 204, 0.58);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  min-height: 54px;
  padding: 14px 16px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary-muted);
  box-shadow: 0 0 0 4px rgba(191, 233, 254, 0.48);
}

.recipient-card,
.channel-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(217, 227, 246, 0.7);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  padding: 16px;
  box-shadow: var(--soft-shadow);
}

.recipient-card span:nth-child(2),
.channel-card span:nth-child(2) {
  flex: 1;
}

.recipient-card input {
  min-height: auto;
  border: 0;
  border-radius: 0;
  padding: 2px 0 0;
  background: transparent;
  color: var(--primary);
  font-size: 24px;
  font-weight: 800;
}

.message-box {
  position: relative;
  min-height: 370px;
  border: 1px solid rgba(217, 227, 246, 0.65);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.88);
  padding: 32px 22px 56px;
  box-shadow: var(--soft-shadow);
}

.message-box textarea {
  min-height: 280px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.65;
}

.quote-mark {
  position: absolute;
  top: 12px;
  right: 20px;
  color: rgba(18, 28, 42, 0.08);
  font-size: 82px;
  font-weight: 800;
  line-height: 1;
}

.active-writing {
  position: absolute;
  bottom: 18px;
  left: 22px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.primary,
.secondary,
.input-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  border-radius: 12px;
  padding: 14px 18px;
  font-weight: 800;
  transition: transform 160ms ease;
}

.primary,
.input-row button {
  border: 0;
  background: var(--primary);
  color: white;
  box-shadow: 0 12px 24px rgba(0, 37, 50, 0.16);
}

.secondary {
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--primary);
}

.icon-text {
  min-width: 92px;
}

.readiness-panel,
.activation-panel,
.empty-state,
.note-item,
.confirm-card {
  border: 1px solid rgba(217, 227, 246, 0.72);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  padding: 20px;
  box-shadow: var(--soft-shadow);
}

.activation-panel {
  margin-top: 18px;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.status-line {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.safety-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-radius: 18px;
  background: rgba(230, 238, 255, 0.78);
  padding: 14px;
}

.safety-box span {
  color: var(--primary);
}

.safety-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
}

.check-list span {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-low);
  color: var(--muted);
  font-weight: 800;
}

.check-list .done {
  color: var(--ink);
}

.check-list .done span,
.pill.ok {
  background: var(--success-bg);
  color: var(--success);
}

.saved-list {
  margin-top: 22px;
}

.saved-list h3 {
  margin: 0;
  color: var(--primary);
  font-size: 22px;
}

.note-item {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.note-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.note-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.dev-link-box {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  border: 1px dashed var(--outline);
  border-radius: 14px;
  background: var(--surface-low);
  padding: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.dev-link-box a {
  width: fit-content;
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}

.life-visual {
  display: grid;
  height: 176px;
  place-items: end start;
  margin-bottom: 24px;
  border: 1px solid rgba(193, 199, 204, 0.58);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(0, 37, 50, 0.08), rgba(0, 37, 50, 0.5)),
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.7), transparent 30%),
    linear-gradient(135deg, #b58b58, #f1dec0 48%, #2f251d);
  color: white;
  padding: 20px;
  font-size: 20px;
  font-weight: 800;
}

.radio-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  align-items: center;
  border: 2px solid rgba(193, 199, 204, 0.78);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  padding: 16px;
}

.radio-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-card span {
  grid-row: 1 / span 2;
  color: var(--primary);
}

.radio-card.selected {
  border-color: var(--primary-container);
  background: rgba(230, 238, 255, 0.88);
}

.timeline {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--outline);
  padding: 16px 0;
}

.timeline strong {
  color: var(--primary);
}

.timeline span {
  color: var(--muted);
  line-height: 1.6;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: flex;
  justify-content: space-around;
  width: min(100%, 600px);
  height: 78px;
  margin: 0 auto;
  border-top: 1px solid rgba(193, 199, 204, 0.45);
  background: rgba(255, 255, 255, 0.92);
  padding: 10px 24px 14px;
  backdrop-filter: blur(14px);
}

.bottom-nav-item {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--muted);
}

.bottom-nav-item.active {
  background: rgba(191, 233, 254, 0.5);
  color: var(--primary);
}

.confirm-shell {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 24px;
}

.confirm-card {
  width: min(100%, 520px);
  text-align: center;
}

.confirm-card .brand-logo {
  width: 140px;
  margin: 0 auto 30px;
}

.confirm-card h1 {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 30px;
}

.confirm-card p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.confirm-actions {
  display: grid;
  gap: 12px;
}

.confirm-status {
  margin-top: 18px;
  border-radius: 14px;
  background: var(--surface-low);
  padding: 14px;
  color: var(--muted);
}

@media (min-width: 760px) {
  body {
    background:
      linear-gradient(90deg, rgba(217, 227, 246, 0.45), transparent 28%, transparent 72%, rgba(217, 227, 246, 0.45)),
      var(--background);
  }

  .app-shell {
    padding-inline: 28px;
  }
}

@media (max-width: 420px) {
  .app-shell {
    padding-right: 16px;
    padding-left: 16px;
  }

  .topbar {
    margin-right: -16px;
    margin-left: -16px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .brand-logo {
    width: 132px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .dashboard-grid {
    gap: 12px;
  }

  .bento-card {
    padding: 16px;
  }

  .bento-card strong,
  .recipient-card input {
    font-size: 22px;
  }

  .actions,
  .input-row {
    grid-template-columns: 1fr;
  }

  .message-box {
    min-height: 300px;
  }
}
