:root {
  --paper: #fff8fa;
  --blush: #f3f1f8;
  --petal: #d2c7e6;
  --pink: #886abc;
  --pink-dark: #67479d;
  --berry: #372851;
  --muted: #665b79;
  --line: #d8cfe9;
  --display: "Iowan Old Style",Baskerville,Georgia,serif;
  --body: ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
  overflow-x: clip;
}

body {
  background: var(--paper);
  min-width: 320px;
  color: var(--berry);
  font-family: var(--body);
  margin: 0;
  overflow-x: clip;
}

button, input, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--petal);
  color: var(--berry);
}

:focus-visible {
  outline-offset: 4px;
  outline: 3px solid var(--pink-dark) !important;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
}

[hidden] {
  display: none !important;
}

.eyebrow {
  color: var(--pink-dark);
  letter-spacing: .17em;
  text-transform: uppercase;
  font-size: .67rem;
  font-weight: 800;
}

.primary-button, .outline-button {
  border: 1px solid #0000;
  border-radius: 999px;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 22px;
  font-size: .88rem;
  font-weight: 750;
  line-height: 1.25;
  transition: transform .2s, background .2s, box-shadow .2s;
  display: inline-flex;
}

.primary-button {
  background: var(--pink-dark);
  color: #fff;
  box-shadow: 0 8px 22px #734fb033;
}

.primary-button:not(:disabled):hover {
  background: #51377c;
  transform: translateY(-2px);
  box-shadow: 0 11px 26px #734fb047;
}

.outline-button {
  color: var(--berry);
  background: #fff9fc;
  border-color: #7e5eb6;
}

.outline-button:hover {
  background: var(--blush);
  transform: translateY(-2px);
}

.floating-nav {
  z-index: 50;
  backdrop-filter: blur(18px);
  background: #fffafbe8;
  border: 1px solid #d8cee9;
  border-radius: 999px;
  align-items: center;
  gap: 18px;
  width: min(1080px, 100% - 32px);
  min-height: 64px;
  padding: 8px 10px 8px 20px;
  display: flex;
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 12px 35px #46306c1c;
}

.nav-brand {
  white-space: nowrap;
  font-family: var(--display);
  letter-spacing: -.04em;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  font-size: 1.26rem;
  font-weight: 700;
  display: inline-flex;
}

.nav-links {
  align-items: center;
  gap: 1px;
  display: flex;
}

.nav-links a {
  color: #5a4d71;
  white-space: nowrap;
  border-radius: 40px;
  padding: 9px 10px;
  font-size: .75rem;
  font-weight: 700;
}

.nav-links a:hover {
  background: var(--blush);
}

.nav-reset {
  background: var(--berry);
  color: #fff;
  border: 0;
  border-radius: 999px;
  flex: none;
  min-height: 42px;
  padding: 8px 16px;
  font-size: .75rem;
  font-weight: 750;
}

.nav-reset:hover {
  background: var(--pink-dark);
}

.nav-toggle {
  color: var(--berry);
  background: none;
  border: 0;
  padding: 7px;
  font-size: 1.35rem;
  line-height: 1;
  display: none;
}

.hero {
  isolation: isolate;
  background: radial-gradient(circle at 82% 42%, #eeeaf5, #0000 35%), radial-gradient(circle at 12% 75%, #e5dff033, #0000 35%);
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  align-items: center;
  max-width: 1440px;
  min-height: 680px;
  margin: auto;
  padding: 125px max(5vw, 28px) 62px;
  display: grid;
  position: relative;
  overflow: hidden;
}

.hero:after {
  content: "";
  z-index: -1;
  background: linear-gradient(90deg,transparent,var(--line),transparent);
  height: 1px;
  position: absolute;
  inset: auto 0 0;
}

.hero-content {
  z-index: 2;
  position: relative;
}

.hero-content .eyebrow {
  align-items: center;
  gap: 9px;
  display: flex;
}

.live-dot {
  background: #af9ad2;
  border-radius: 50%;
  width: 7px;
  height: 7px;
  display: inline-block;
  box-shadow: 0 0 0 4px #efebf6;
}

.hero h1 {
  letter-spacing: -.075em;
  max-width: 760px;
  margin: 20px 0 24px;
  font-size: clamp(4.2rem, 7.6vw, 8.3rem);
  line-height: .91;
}

.hero h1 em {
  color: var(--pink-dark);
  font-style: italic;
  font-weight: 400;
  display: block;
}

.hero-content > p {
  color: #504464;
  max-width: 450px;
  font-family: var(--display);
  margin-bottom: 25px;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.3;
}

.hero-button {
  min-width: 158px;
}

.hero-content > small {
  color: var(--muted);
  margin-top: 15px;
  font-size: .77rem;
  display: block;
}

.hero-art {
  z-index: 1;
  filter: drop-shadow(0 18px 35px #9276c233);
  justify-self: center;
  width: min(44vw, 590px);
  height: auto;
  position: relative;
}

.hero-stars {
  z-index: -1;
  pointer-events: none;
  position: absolute;
  inset: 0;
}

.hero-stars span {
  color: #987dc577;
  font-size: 10px;
  animation: 4s ease-in-out infinite twinkle;
  position: absolute;
}

.content-wrap {
  width: min(990px, 100% - 42px);
  margin: auto;
}

.cozy-section {
  border-bottom: 1px solid var(--line);
  padding: 76px 0;
}

.section-intro {
  margin-bottom: 25px;
}

.section-intro h2 {
  letter-spacing: -.06em;
  margin: 10px 0 0;
  font-size: clamp(2.6rem, 5vw, 4.7rem);
  line-height: 1.03;
}

.mood-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  display: grid;
}

.mood-button {
  border: 1px solid var(--line);
  min-width: 0;
  min-height: 88px;
  color: var(--berry);
  text-align: left;
  background: #fff;
  border-radius: 19px;
  align-items: center;
  gap: 10px;
  padding: 14px;
  font-size: .83rem;
  font-weight: 700;
  transition: transform .2s, border-color .2s, background .2s, box-shadow .2s;
  display: flex;
}

.mood-button span {
  flex: none;
  font-size: 26px;
}

.mood-button:hover, .mood-button.selected {
  background: #f7f5fa;
  border-color: #a088c9;
  transform: translateY(-2px);
  box-shadow: 0 9px 20px #6948a120;
}

.mood-note {
  border-left: 3px solid var(--pink);
  min-height: 90px;
  font-family: var(--display);
  background: #f0ecf7;
  border-radius: 5px 17px 17px 5px;
  align-items: center;
  margin: 16px 0 0;
  padding: 18px 23px;
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
  line-height: 1.34;
  display: flex;
}

.mood-next {
  color: var(--pink-dark);
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 8px 1px;
  font-size: .88rem;
  font-weight: 800;
  display: inline-flex;
}

.mood-next:hover {
  text-underline-offset: 4px;
  text-decoration: underline;
}

.fresh {
  animation: .38s both arrive;
}

.smile-card {
  background: linear-gradient(125deg, #fff, #f7f5fa);
  border: 1px solid #d0c4e4;
  border-radius: 28px;
  justify-items: start;
  gap: 15px;
  padding: clamp(24px, 4vw, 38px);
  display: grid;
  box-shadow: 0 20px 45px #8465ba16;
}

.smile-symbol {
  width: 48px;
  height: 48px;
  color: var(--pink-dark);
  background: #e9e3f3;
  border-radius: 15px;
  place-items: center;
  font-size: 26px;
  display: grid;
}

.smile-card #smile-note {
  max-width: 760px;
  min-height: 60px;
  font-family: var(--display);
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1.24;
}

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

.smile-card .emergency-note {
  background: #e8e2f2;
  border-radius: 12px;
  max-width: 660px;
  margin: 0;
  padding: 14px 18px;
  font-size: .9rem;
  line-height: 1.5;
}

.bubble-details {
  border: 1px solid var(--line);
  background: #fbf9fd;
  border-radius: 25px;
  margin-top: 17px;
  padding: 22px;
}

.bubble-heading {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  display: flex;
}

.bubble-heading h3 {
  letter-spacing: -.04em;
  margin: 0;
  font-size: 1.54rem;
}

.bubble-heading span {
  color: var(--pink);
  font-size: 1.3rem;
}

.bubble-field {
  touch-action: manipulation;
  background: radial-gradient(circle at 36% 25%, #f6f3fa, #0000 35%), linear-gradient(135deg, #d7cde8, #e8e2f2);
  border: 1px solid #d2c6e6;
  border-radius: 18px;
  height: 195px;
  position: relative;
  overflow: hidden;
}

.bubble {
  background: radial-gradient(circle at 28% 25%, #ffffffeb, #0000 24%), radial-gradient(circle at 65% 70%, #b7a5d766, #a189ca67);
  border: 1px solid #fffafce8;
  border-radius: 50%;
  animation: 3s ease-in-out infinite alternate float;
  position: absolute;
  box-shadow: inset -5px -6px 10px #ffffff79, 0 5px 12px #62439636;
}

.bubble:nth-child(2n) {
  animation-delay: -1s;
}

.bubble.popped {
  animation: .22s forwards pop;
}

.bubble-score {
  color: var(--muted);
  margin: 11px 2px 0;
  font-size: .76rem;
}

.game-shell {
  border: 1px solid #cfc3e4;
  background: #fffafd;
  border-radius: 27px;
  padding: clamp(15px, 3vw, 26px);
  box-shadow: 0 18px 42px #6f4caa14;
}

.game-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-width: 430px;
  margin-bottom: 21px;
  padding: 5px;
  border-radius: 999px;
  background: #ebe6f4;
}

.game-tab {
  min-height: 43px;
  padding: 9px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 750;
}

.game-tab.selected {
  background: #fff;
  color: var(--berry);
  box-shadow: 0 4px 14px #67479e24;
}

.game-topline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin: 0 2px 11px;
  color: var(--muted);
  font-size: .8rem;
}

.game-topline strong {
  flex: none;
  color: var(--pink-dark);
  font-size: .9rem;
}

.game-stage {
  position: relative;
  height: 285px;
  overflow: hidden;
  border: 1px solid #ccbfe2;
  border-radius: 19px;
  touch-action: manipulation;
}

.macaron-stage {
  background:
    radial-gradient(circle at 21% 20%, #ffffffa8, transparent 25%),
    radial-gradient(circle at 81% 24%, #fff8fcc9, transparent 19%),
    linear-gradient(180deg, #e8e2f2, #d7cde8 78%, #ac97d1);
  cursor: pointer;
}

.macaron-stage::before {
  content: "✦";
  position: absolute;
  top: 30px;
  left: 10%;
  color: #fbf9fd;
  font-size: 28px;
  text-shadow: 0 0 12px #fff;
}

.macaron-stage::after {
  content: "✦";
  position: absolute;
  top: 75px;
  right: 13%;
  color: #fbf9fd;
  font-size: 17px;
}

.macaron-plate {
  position: absolute;
  bottom: 12px;
  left: 50%;
  z-index: 1;
  width: 174px;
  height: 19px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: linear-gradient(#fff, #e9e3f3 55%, #b5a3d5);
  box-shadow: 0 8px 15px #634b8b52;
}

.macaron-plate::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 19%;
  width: 62%;
  height: 8px;
  border-radius: 50%;
  background: #faf9fc;
}

.macaron-stack {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.macaron {
  position: absolute;
  z-index: 2;
  width: 108px;
  height: 49px;
  transform: translateX(-50%);
  pointer-events: none;
  background: url("assets/macaron.webp") center / contain no-repeat;
  filter: drop-shadow(0 4px 4px #58408242);
}

.macaron-stack .macaron:nth-child(2n) { filter: hue-rotate(-9deg) drop-shadow(0 4px 4px #58408242); }
.macaron-stack .macaron:nth-child(3n) { filter: saturate(.84) drop-shadow(0 4px 4px #58408242); }

.game-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  background: #faf9fcab;
  color: var(--berry);
  text-align: center;
  pointer-events: none;
  backdrop-filter: blur(3px);
}

.game-overlay > span { color: var(--pink-dark); font-size: 2.5rem; line-height: 1; }
.game-overlay strong { font-family: var(--display); font-size: clamp(1.55rem, 4vw, 2.15rem); font-weight: 500; }
.game-overlay small { max-width: 240px; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.game-overlay[hidden] { display: none; }

.game-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
}

.game-bottom p {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.45;
}

.game-bottom button { flex: none; min-width: 158px; }

.petal-stage {
  background:
    radial-gradient(circle at 75% 20%, #fff9f9 0 8%, transparent 18%),
    linear-gradient(180deg, #ede9f5, #d6cce8 71%, #bfafdb);
}

.petal-hills {
  position: absolute;
  right: -15%;
  bottom: -93px;
  left: -15%;
  height: 150px;
  border-radius: 50% 50% 0 0;
  background: #876bb7a8;
  box-shadow: -130px 30px 0 35px #ac97d0, 150px 20px 0 20px #a38ccb;
  pointer-events: none;
}

.falling-petal {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  touch-action: manipulation;
}

.falling-petal::before {
  content: "";
  display: block;
  width: 27px;
  height: 35px;
  transform: rotate(38deg);
  border: 1px solid #f9f8fcb3;
  border-radius: 85% 0 80% 7%;
  background: linear-gradient(135deg, #faf9fc, #b8a6d7 62%, #9074c0);
  box-shadow: 0 4px 9px #63469552, inset 5px 4px 7px #ffffffa1;
}

.falling-petal.caught { opacity: 0; transition: opacity .16s; }

.breathing-card {
  text-align: center;
  background: radial-gradient(circle at 50% 43%, #eeeaf5, #0000 40%), linear-gradient(135deg, #fffbfd, #f1eef7);
  border: 1px solid #ccbfe2;
  border-radius: 28px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 348px;
  padding: 31px 24px;
  display: flex;
}

.breath-orb {
  color: #fff;
  background: radial-gradient(circle at 34% 26%, #fffdfd, #cbbee2 50%, #967cc4 86%);
  border-radius: 50%;
  place-items: center;
  width: 128px;
  height: 128px;
  font-size: 25px;
  display: grid;
  box-shadow: 0 0 0 12px #e8e2f2, 0 12px 42px #9378c266, inset -12px -16px 20px #6f4caaaa;
}

.breath-orb.active {
  animation: 10s ease-in-out infinite breathe;
}

.breathing-card p {
  min-height: 31px;
  font-family: var(--display);
  margin: 26px 0 15px;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

.minute-track {
  background: #d0c4e5;
  border-radius: 99px;
  width: min(290px, 100%);
  height: 6px;
  margin-top: 23px;
  overflow: hidden;
}

.minute-track span {
  background: var(--pink-dark);
  height: 100%;
  transition: width 1s linear;
  display: block;
}

.breathing-card small {
  color: var(--muted);
  margin-top: 8px;
}

.sky-section {
  color: #fff8fb;
  background: linear-gradient(#51377c66, #46306bba), linear-gradient(145deg, #433c5c, #635875) center / cover;
}

.sky-inner {
  text-align: center;
  max-width: 990px;
  min-height: 570px;
  margin: auto;
  padding: 70px 21px 50px;
}

.sky-inner .eyebrow {
  color: #f0ecf7;
}

.sky-inner h2 {
  letter-spacing: -.06em;
  margin: 12px 0;
  font-size: clamp(2.7rem, 6vw, 5.5rem);
}

.sky-field {
  height: 330px;
  position: relative;
}

.sky-star {
  color: #f7f5fa;
  text-shadow: 0 0 10px #fff, 0 0 25px #d7cde8;
  background: none;
  border: 0;
  padding: 8px;
  animation: 3s ease-in-out infinite alternate twinkle;
  position: absolute;
  transform: translate(-50%, -50%);
}

.sky-star:nth-child(2n) {
  animation-delay: -1.3s;
}

.sky-star:hover {
  transform: translate(-50%, -50%) scale(1.3);
}

.sky-moon {
  color: #f3f0f8;
  text-shadow: 0 0 34px #f7f5fa;
  pointer-events: none;
  font-size: 82px;
  position: absolute;
  top: 12%;
  right: 14%;
}

.sky-note {
  color: #fff8fa;
  min-height: 53px;
  font-family: var(--display);
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
}

.final-note {
  grid-template-columns: minmax(230px, .75fr) minmax(0, 1.25fr);
  align-items: center;
  gap: 20px;
  max-width: 1200px;
  margin: auto;
  padding: 75px 25px;
  display: grid;
  position: relative;
}

.letter-art {
  filter: drop-shadow(0 16px 26px #724faf2d);
  width: 100%;
  height: auto;
}

.letter {
  background: #fffafc;
  border: 1px solid #d0c4e5;
  border-radius: 28px;
  padding: clamp(27px, 5vw, 52px);
  box-shadow: 0 18px 44px #6f4caa14;
}

.letter h2 {
  letter-spacing: -.06em;
  margin: 12px 0 19px;
  font-size: clamp(2.9rem, 5.5vw, 5.2rem);
}

.letter p {
  color: #504662;
  font-family: var(--display);
  margin-bottom: 17px;
  font-size: clamp(1.14rem, 2vw, 1.43rem);
  line-height: 1.52;
}

.feelings-final {
  background: radial-gradient(circle at 80% 0, #d4c8e789, #0000 37%), #eeeaf6;
  padding: 73px 20px 95px;
}

.feelings-final-inner {
  max-width: 760px;
  margin: auto;
}

.feelings-final h2 {
  letter-spacing: -.06em;
  margin: 12px 0 8px;
  font-size: clamp(2.9rem, 6vw, 5rem);
  line-height: 1;
}

.feelings-final-inner > p {
  color: var(--muted);
  font-family: var(--display);
  margin-bottom: 25px;
  font-size: 1.34rem;
}

.feelings-card {
  background: #fffafc;
  border: 1px solid #cfc2e4;
  border-radius: 26px;
  padding: clamp(22px, 4vw, 40px);
  box-shadow: 0 24px 55px #6c4aa526;
}

.feelings-card > label:first-child {
  color: var(--berry);
  margin-bottom: 12px;
  font-size: .89rem;
  font-weight: 750;
  display: block;
}

.feelings-card textarea {
  resize: vertical;
  width: 100%;
  min-height: 155px;
  color: var(--berry);
  background: #fff;
  border: 1px solid #bbaad9;
  border-radius: 14px;
  padding: 16px;
  line-height: 1.6;
  display: block;
}

.feelings-card textarea::placeholder {
  color: #867b98;
}

.feelings-card textarea:focus {
  border-color: var(--pink-dark);
}

.form-under {
  color: var(--muted);
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 22px;
  font-size: .71rem;
  display: flex;
}

.honeypot {
  width: 1px;
  height: 1px;
  position: absolute;
  left: -9999px;
  overflow: hidden;
}

.form-success, .form-error {
  margin: 17px 0 0;
  font-size: .88rem;
}

.form-success {
  color: #206b4a;
}

.form-error {
  color: #583d87;
}

.site-footer {
  color: var(--muted);
  text-align: center;
  background: #eeeaf6;
  padding: 22px 20px 27px;
  font-size: .73rem;
}

.effects-layer {
  z-index: 90;
  pointer-events: none;
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.effects-layer span {
  color: var(--pink-dark);
  text-shadow: 0 0 15px #ffe9c6;
  font-size: 1.4rem;
  animation: .95s ease-out forwards burst-away;
  position: absolute;
}

.mobile-dock {
  display: none;
}

.reset-dialog {
  width: min(440px, 100% - 28px);
  max-height: min(650px, 100% - 30px);
  color: var(--berry);
  background: #fffafd;
  border: 1px solid #c9bbe1;
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 28px 90px #261a3ba8;
}

.reset-dialog::backdrop {
  backdrop-filter: blur(4px);
  background: #241a34b8;
}

.reset-dialog h2 {
  letter-spacing: -.06em;
  margin: 12px 0 4px;
  font-size: 2.9rem;
  line-height: 1;
}

.reset-dialog p {
  color: var(--muted);
  margin: 10px 0 20px;
  font-size: .93rem;
}

.reset-close {
  background: var(--blush);
  width: 36px;
  height: 36px;
  color: var(--berry);
  border: 0;
  border-radius: 50%;
  place-items: center;
  font-size: 1.7rem;
  line-height: 1;
  display: grid;
  position: absolute;
  top: 15px;
  right: 16px;
}

.reset-choices {
  gap: 9px;
  display: grid;
}

.reset-choices a {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 17px;
  font-weight: 750;
  display: flex;
}

.reset-choices a:hover {
  border-color: var(--pink);
  background: var(--blush);
}

.sound-toggle {
  width: 100%;
  min-height: 46px;
  color: var(--berry);
  background: #f0ecf6;
  border: 1px solid #c7b9e0;
  border-radius: 99px;
  margin-top: 18px;
  font-size: .84rem;
  font-weight: 750;
}

.sound-toggle[aria-pressed="true"] {
  background: var(--berry);
  color: #fff;
}

@keyframes twinkle {
  0%, 100% {
    opacity: .35;
  }

  50% {
    opacity: 1;
  }
}

@keyframes float {
  to {
    transform: translateY(-10px);
  }
}

@keyframes pop {
  to {
    opacity: 0;
    transform: scale(1.6);
  }
}

@keyframes breathe {
  0%, 100% {
    transform: scale(.85);
  }

  40%, 60% {
    transform: scale(1.12);
  }
}

@keyframes arrive {
  from {
    opacity: .2;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes burst-away {
  to {
    opacity: 0;
    transform: translate(var(--dx),var(--dy)) rotate(130deg) scale(.4);
  }
}

@media (width <= 850px) {
  .nav-links a {
    padding-inline: 7px;
    font-size: .7rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(240px, .75fr);
  }
}

@media (width <= 800px) {
  html {
    scroll-padding-top: 77px;
  }

  .floating-nav {
    width: calc(100% - 20px);
    min-height: 56px;
    padding: 7px 14px 7px 17px;
    top: 10px;
  }

  .nav-brand {
    font-size: 1.14rem;
  }

  .nav-reset {
    display: none;
  }

  .nav-toggle {
    place-items: center;
    display: grid;
  }

  .nav-links {
    border: 1px solid var(--line);
    background: #fffafcf7;
    border-radius: 18px;
    grid-template-columns: 1fr;
    padding: 8px;
    display: none;
    position: absolute;
    top: calc(100% + 7px);
    left: 0;
    right: 0;
    box-shadow: 0 16px 32px #4e367721;
  }

  .nav-links.open {
    display: grid;
  }

  .nav-links a {
    padding: 12px 15px;
    font-size: .82rem;
  }

  .mobile-dock {
    z-index: 48;
    right: 12px;
    bottom: max(11px,env(safe-area-inset-bottom));
    backdrop-filter: blur(16px);
    background: #fffafcf2;
    border: 1px solid #c4b5de;
    border-radius: 19px;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    max-width: 520px;
    margin: auto;
    padding: 6px;
    display: grid;
    position: fixed;
    left: 12px;
    box-shadow: 0 9px 35px #4e367738;
  }

  .mobile-dock a, .mobile-dock button {
    min-height: 50px;
    color: var(--berry);
    background: none;
    border: 0;
    border-radius: 13px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    padding: 4px 2px;
    font-size: .64rem;
    font-weight: 750;
    display: flex;
  }

  .mobile-dock span {
    color: var(--pink-dark);
    font-size: 1.22rem;
    line-height: 1;
  }

  .mobile-dock a:hover, .mobile-dock button:hover {
    background: var(--blush);
  }

  .hero {
    min-height: 545px;
    padding: 112px 24px 50px;
    display: block;
  }

  .hero h1 {
    max-width: 510px;
    margin: 17px 0 19px;
    font-size: clamp(3.6rem, 13vw, 5.8rem);
  }

  .hero-content > p {
    max-width: 345px;
    font-size: 1.36rem;
  }

  .hero-art {
    z-index: 0;
    opacity: .52;
    width: min(85vw, 405px);
    position: absolute;
    bottom: -85px;
    right: -76px;
  }

  .hero-content > small {
    max-width: 260px;
  }

  .content-wrap {
    width: min(620px, 100% - 32px);
  }

  .cozy-section {
    padding: 56px 0;
  }

  .mood-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mood-button {
    min-height: 78px;
  }

  .game-stage { height: 275px; }
  .game-bottom { align-items: stretch; flex-direction: column; gap: 12px; }
  .game-bottom button { width: 100%; }

  .sky-inner {
    min-height: 485px;
    padding-top: 57px;
  }

  .sky-field {
    height: 275px;
  }

  .sky-moon {
    font-size: 65px;
    right: 12%;
  }

  .final-note {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 50px 16px 57px;
  }

  .letter-art {
    max-width: 350px;
    margin: -12px auto -22px;
  }

  .letter {
    padding: 28px;
    position: relative;
  }

  .feelings-final {
    padding: 55px 16px 105px;
  }

  .site-footer {
    padding-bottom: 95px;
  }
}

@media (width <= 390px) {
  .hero {
    min-height: 525px;
    padding-inline: 18px;
  }

  .hero h1 {
    font-size: clamp(3.35rem, 13.2vw, 4.15rem);
  }

  .hero-art {
    opacity: .4;
    bottom: -62px;
    right: -92px;
  }

  .section-intro h2 {
    font-size: 2.5rem;
  }

  .mood-button {
    gap: 7px;
    padding: 11px;
    font-size: .76rem;
  }

  .mood-button span {
    font-size: 23px;
  }

  .game-tab { padding-inline: 6px; font-size: .76rem; }
  .game-topline { font-size: .72rem; }

  .smile-actions, .smile-actions button {
    width: 100%;
  }

  .bubble-details {
    padding: 15px;
  }

  .form-under {
    font-size: .66rem;
  }

  .reset-dialog {
    padding: 28px 22px;
  }
}

.dashboard-shell {
  background: radial-gradient(circle at 88% 5%,#d2c7e6a8,transparent 38%),radial-gradient(circle at 10% 90%,#e4ddf0,transparent 35%),var(--paper);
  align-items: center;
  min-height: 100svh;
  padding: 75px 20px;
  display: grid;
}

.dashboard-content {
  width: 100%;
  max-width: 920px;
  margin: auto;
}

.dashboard-card {
  border: 1px solid var(--line);
  background: #fffafc;
  border-radius: 26px;
  width: 100%;
  max-width: 600px;
  margin: auto;
  padding: clamp(27px, 5vw, 45px);
  box-shadow: 0 22px 60px #6b49a420;
}

.login-card {
  position: relative;
  overflow: hidden;
}

.login-card:after {
  content: "✦";
  color: #b8a6d7;
  font-size: 2.1rem;
  position: absolute;
  top: 22px;
  right: 28px;
}

.login-art {
  pointer-events: none;
  width: min(200px, 50%);
  height: auto;
  margin: -36px auto -21px;
  display: block;
}

.dashboard-card h1, .dashboard-header h1 {
  letter-spacing: -.06em;
  margin: 13px 0;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  line-height: 1;
}

.dashboard-card p, .dashboard-header p {
  color: var(--muted);
  line-height: 1.5;
}

.dashboard-card form {
  gap: 10px;
  margin-top: 25px;
  display: grid;
}

.dashboard-card form label {
  font-size: .85rem;
  font-weight: 750;
}

.dashboard-card form input {
  width: 100%;
  min-height: 48px;
  color: var(--berry);
  background: #fff;
  border: 1px solid #bfaedb;
  border-radius: 12px;
  padding: 12px 14px;
}

.dashboard-card form .primary-button {
  justify-self: start;
  margin-top: 9px;
}

.dashboard-back {
  color: var(--pink-dark);
  margin: 26px 0 0;
  font-size: .84rem;
  font-weight: 750;
  display: inline-block;
}

.dashboard-header {
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 28px;
  display: flex;
}

.dashboard-header .outline-button {
  margin-top: 10px;
}

.note-list {
  gap: 13px;
  display: grid;
}

.saved-note {
  border: 1px solid var(--line);
  background: #fffafc;
  border-radius: 18px;
  padding: 24px;
}

.saved-note time {
  color: var(--pink-dark);
  letter-spacing: .05em;
  font-size: .75rem;
}

.saved-note p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 12px 0 0;
  line-height: 1.6;
}

.empty-notes {
  max-width: none;
  color: var(--muted);
}

.dashboard-pagination {
  color: var(--muted);
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin: 25px 0;
  font-size: .85rem;
  display: flex;
}

.dashboard-pagination a, .dashboard-card code {
  color: var(--pink-dark);
  overflow-wrap: anywhere;
}

.dashboard-pagination span {
  margin: 0 auto;
}

@media (width <= 430px) {
  .dashboard-header {
    flex-direction: column;
  }
}

.saved-note form {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.saved-note form .outline-button {
  min-height: 36px;
  padding: 7px 14px;
  font-size: .76rem;
}