:root {
  --bg: #f7f3ec;
  --surface: #fffdfa;
  --surface-strong: #ffffff;
  --ink: #243039;
  --muted: #6f787c;
  --line: #ded8cc;
  --teal: #176d68;
  --teal-soft: #dcefed;
  --coral: #df6a6d;
  --coral-soft: #fde7e4;
  --rose: #b94f61;
  --blush: #fff0ef;
  --sky-soft: #e6f2f6;
  --yellow: #f3ca4d;
  --olive: #6d7a43;
  --browser-bottom: 0px;
  --romance-bg: url("./assets/flower-bg.jpg");
  --shadow: 0 16px 32px rgba(36, 48, 57, 0.12);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: #ebe5da;
  color: var(--ink);
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0)),
    var(--bg);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

.lock-screen,
.letter-screen {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(247, 243, 236, 0.22), rgba(247, 243, 236, 0.92)),
    linear-gradient(115deg, rgba(230, 242, 246, 0.72), rgba(255, 240, 239, 0.68)),
    var(--romance-bg) center / cover;
}

.lock-screen::after,
.letter-screen::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  height: 42dvh;
  background:
    linear-gradient(180deg, transparent, rgba(247, 243, 236, 0.98)),
    repeating-linear-gradient(172deg, rgba(23, 109, 104, 0.1) 0 1px, transparent 1px 16px);
  content: "";
  opacity: 0.9;
}

.lock-panel,
.letter-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 390px);
  padding: 28px 22px 24px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.letter-screen {
  opacity: 0;
  transition: opacity 180ms ease;
  overflow-x: hidden;
  overflow-y: auto;
}

.letter-screen.is-ready {
  opacity: 1;
}

.letter-screen.show-letter {
  padding: 14px;
  overflow: hidden;
}

.letter-panel {
  position: relative;
  overflow: hidden;
  padding: 0;
  max-height: calc(100dvh - 32px);
  background: rgba(255, 253, 250, 0.88);
  backdrop-filter: blur(18px);
  overflow-y: auto;
  scrollbar-width: none;
}

.letter-screen.show-letter .letter-panel {
  height: calc(100dvh - 28px);
  max-height: calc(100dvh - 28px);
  overflow: hidden;
}

.letter-panel::-webkit-scrollbar {
  display: none;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.lock-panel h1,
.letter-panel h1,
.header-content h1,
.section-head h2 {
  margin: 0;
  line-height: 1.15;
}

.lock-panel h1 {
  font-size: 32px;
}

.letter-panel h1 {
  font-size: 27px;
}

.memory-intro {
  padding: 36px 0 22px;
  transition: opacity 420ms ease, transform 420ms ease;
}

.memory-intro > .eyebrow,
.memory-intro > h1,
.memory-copy,
.memory-footer {
  margin-right: 22px;
  margin-left: 22px;
}

.memory-intro h1 {
  margin: 0 28px;
  font-size: 29px;
  line-height: 1.12;
}

.memory-copy {
  margin-top: 12px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.memory-reel {
  position: relative;
  display: grid;
  gap: 10px;
  margin: 0 0 24px;
  padding: 8px 0;
  overflow: hidden;
}

.memory-reel::before,
.memory-reel::after {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 48px;
  content: "";
  pointer-events: none;
}

.memory-reel::before {
  left: 0;
  background: linear-gradient(90deg, rgba(255, 253, 250, 0.9), transparent);
}

.memory-reel::after {
  right: 0;
  background: linear-gradient(270deg, rgba(255, 253, 250, 0.9), transparent);
}

.memory-track {
  display: flex;
  width: max-content;
  gap: 10px;
  animation: memory-pan 42s linear infinite;
  will-change: transform;
}

.memory-track.is-reverse {
  animation-name: memory-pan-reverse;
  animation-duration: 48s;
  transform: translateX(-50%);
}

.memory-frame {
  flex: 0 0 128px;
  width: 128px;
  height: 172px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(222, 216, 204, 0.88);
  border-radius: 8px;
  background: #e6dfd2;
  box-shadow: 0 10px 18px rgba(36, 48, 57, 0.12);
}

.memory-frame:nth-child(3n) {
  flex-basis: 168px;
  width: 168px;
}

.memory-frame:nth-child(4n) {
  height: 138px;
  align-self: center;
}

.memory-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.memory-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.letter-link-button {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.letter-final {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 8px;
  height: calc(100dvh - 44px);
  padding: 24px 18px 16px;
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.98), rgba(255, 240, 239, 0.9)),
    repeating-linear-gradient(0deg, rgba(185, 79, 97, 0.08) 0 1px, transparent 1px 34px);
  border: 1px solid rgba(185, 79, 97, 0.18);
  border-radius: 8px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.letter-final::before,
.letter-final::after {
  position: absolute;
  z-index: 0;
  color: rgba(185, 79, 97, 0.2);
  font-size: 56px;
  line-height: 1;
  pointer-events: none;
}

.letter-final::before {
  top: 8px;
  right: 14px;
  content: "✿";
  font-size: 44px;
}

.letter-final::after {
  bottom: 62px;
  left: 12px;
  content: "❀";
  font-size: 32px;
  transform: rotate(-14deg);
}

.letter-final > * {
  position: relative;
  z-index: 1;
}

.letter-final h1 {
  color: var(--rose);
}

.letter-final h1::after {
  display: block;
  width: 52px;
  height: 2px;
  margin-top: 8px;
  background: var(--coral);
  border-radius: 999px;
  content: "";
}

.letter-ornament {
  position: relative;
  flex: 0 0 auto;
  margin: 10px 0 10px;
  overflow: hidden;
  border: 1px solid rgba(185, 79, 97, 0.16);
  border-radius: 8px;
  background: #f7f1ee;
  box-shadow: 0 10px 18px rgba(36, 48, 57, 0.08);
}

.letter-ornament img {
  width: 100%;
  height: 70px;
  object-fit: cover;
  object-position: 54% 62%;
  filter: saturate(0.82) brightness(1.08);
  opacity: 0.72;
}

.letter-ornament::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.2), rgba(255, 240, 239, 0.55)),
    linear-gradient(90deg, rgba(255, 253, 250, 0.38), transparent 46%, rgba(185, 79, 97, 0.12));
  content: "";
}

.letter-screen.show-letter .memory-intro {
  opacity: 0;
  transform: translateY(-16px);
}

.letter-screen.show-letter .letter-final {
  opacity: 1;
  transform: translateY(0);
}

@keyframes memory-pan {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes memory-pan-reverse {
  from {
    transform: translateX(-50%);
  }

  to {
    transform: translateX(0);
  }
}

.lock-copy {
  margin: 12px 0 22px;
  color: var(--muted);
  line-height: 1.6;
}

.unlock-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

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

.input-row input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf8f1;
  color: var(--ink);
  outline: none;
}

.input-row input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}

.input-row button,
.location-button,
.replay-button,
.mini-button,
.wide-link {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.input-row button {
  padding: 0 12px;
}

.form-message {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--coral);
  font-size: 13px;
  line-height: 1.45;
}

.letter-body {
  position: relative;
  display: block;
  flex: 1 1 auto;
  margin: 10px 0 8px;
  padding: 22px 18px 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.82), rgba(255, 247, 246, 0.9)),
    repeating-linear-gradient(180deg, transparent 0 30px, rgba(185, 79, 97, 0.08) 30px 31px);
  border: 1px solid rgba(185, 79, 97, 0.18);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.letter-body::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.6), rgba(255, 253, 250, 0.86)),
    url("./assets/letter-bouquet.jpg") center 18% / cover no-repeat;
  content: "";
  opacity: 0.18;
  pointer-events: none;
}

.letter-body p {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.64;
  text-align: left;
}

.letter-body p:last-child {
  margin-bottom: 0;
}

.letter-signature {
  flex: 0 0 auto;
  margin: 0 0 10px;
  color: var(--rose);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.letter-button {
  flex: 0 0 auto;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 900;
}

@media (max-height: 760px) {
  .letter-final {
    padding: 20px 16px 14px;
  }

  .letter-panel h1 {
    font-size: 23px;
  }

  .letter-ornament {
    margin: 7px 0 8px;
  }

  .letter-ornament img {
    height: 52px;
  }

  .letter-body {
    margin: 8px 0 7px;
    padding: 16px 14px 14px;
  }

  .letter-body p {
    margin-bottom: 9px;
    font-size: 13px;
    line-height: 1.46;
  }

  .letter-signature {
    margin-bottom: 7px;
    font-size: 12px;
  }

  .letter-button {
    min-height: 38px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .memory-track,
  .memory-track.is-reverse {
    animation-duration: 1ms;
    animation-iteration-count: 1;
  }
}

.app {
  min-height: 100dvh;
  background: var(--bg);
  opacity: 0;
  transition: opacity 180ms ease;
}

.app.is-ready {
  opacity: 1;
}

.app-header {
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.92), rgba(249, 240, 233, 0.96)),
    var(--romance-bg) center 54% / cover;
  border-bottom: 1px solid var(--line);
}

.hero-image {
  height: 214px;
  background: #d4dfda;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-content {
  padding: 18px 18px 16px;
}

.profile-head {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.profile-head > div:last-child {
  min-width: 0;
}

.photo-frame {
  width: 128px;
  aspect-ratio: 1 / 1;
  padding: 7px;
  min-width: 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 253, 250, 0.96), rgba(255, 240, 239, 0.9)),
    var(--surface-strong);
  border: 1px solid rgba(222, 216, 204, 0.95);
  border-radius: 8px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.78),
    0 12px 22px rgba(36, 48, 57, 0.16);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #eef3ef;
  border-radius: 6px;
}

.header-content h1 {
  font-size: 24px;
  overflow-wrap: anywhere;
}

.next-plan {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.header-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 8px;
}

.location-button {
  width: 100%;
  padding: 0 16px;
  background: var(--ink);
}

.replay-button {
  width: 100%;
  padding: 0 12px;
  background: rgba(255, 253, 250, 0.9);
  border: 1px solid rgba(185, 79, 97, 0.24);
  color: var(--rose);
  font-size: 13px;
  box-shadow: 0 8px 16px rgba(36, 48, 57, 0.08);
}

.location-button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.location-status {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.page-shell {
  padding: 16px 14px calc(28px + env(safe-area-inset-bottom));
}

.screen {
  display: none;
}

.screen.is-active {
  display: block;
}

.section-head {
  margin: 0 4px 14px;
}

.section-head h2 {
  font-size: 24px;
}

.weather-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 0 0 14px;
  padding: 15px;
  background:
    linear-gradient(135deg, rgba(230, 242, 246, 0.9), rgba(255, 253, 250, 0.98) 52%, rgba(253, 231, 228, 0.76)),
    var(--surface-strong);
  border: 1px solid rgba(222, 216, 204, 0.92);
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(36, 48, 57, 0.08);
}

.weather-summary {
  min-width: 0;
}

.weather-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.weather-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.weather-days {
  display: grid;
  gap: 8px;
}

.weather-day {
  display: grid;
  grid-template-columns: minmax(0, 82px) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 9px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(222, 216, 204, 0.72);
  border-radius: 8px;
}

.weather-day strong,
.weather-day span {
  display: block;
  min-width: 0;
}

.weather-day strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.weather-day span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.weather-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
}

.weather-card dl div {
  min-width: 0;
  padding: 6px 4px;
  background: rgba(247, 243, 236, 0.72);
  border: 1px solid rgba(222, 216, 204, 0.58);
  border-radius: 8px;
  text-align: center;
}

.weather-card dt {
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
}

.weather-card dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.weather-source {
  display: inline-block;
  margin-top: 7px;
  color: var(--olive);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.day-band,
.tips-band,
.place-group {
  margin: 0 0 14px;
}

.day-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px 8px;
}

.day-title span {
  flex: 0 0 auto;
  color: var(--olive);
  font-size: 13px;
  font-weight: 900;
}

.day-title h3,
.place-group h3,
.tips-band h3 {
  margin: 0;
  font-size: 17px;
}

.timeline {
  display: grid;
  gap: 8px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  padding: 14px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.timeline-item.is-next {
  border-color: var(--yellow);
  box-shadow: inset 4px 0 0 var(--yellow);
}

.timeline-item time {
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
}

.timeline-item h3,
.place-card h3,
.feature-card h3,
.tip-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.timeline-item p,
.place-card p,
.tip-card p,
.status-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.place-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.place-pill,
.chip {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.place-pill {
  color: var(--teal);
  background: var(--teal-soft);
  border-color: transparent;
}

.chip-row {
  display: flex;
  gap: 8px;
  margin: 0 -14px 14px;
  padding: 0 14px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.search-box {
  position: relative;
  margin: 0 0 12px;
}

.search-box::before {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--teal);
  border-radius: 50%;
  content: "";
  transform: translateY(-58%);
}

.search-box::after {
  position: absolute;
  top: 50%;
  left: 27px;
  width: 8px;
  height: 2px;
  background: var(--teal);
  border-radius: 999px;
  content: "";
  transform: translateY(4px) rotate(45deg);
}

.search-box input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 14px 0 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.92);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  outline: none;
}

.search-box input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}

.chip {
  flex: 0 0 auto;
}

.chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
}

.status-card,
.place-card,
.feature-card,
.tip-card {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.status-card {
  padding: 14px;
  margin-bottom: 10px;
}

.status-card strong {
  display: block;
  line-height: 1.45;
}

.place-list {
  display: grid;
  gap: 10px;
}

.place-list.compact {
  gap: 8px;
}

.place-card {
  padding: 14px;
  scroll-margin: 92px;
}

.place-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.place-meta {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  margin: 0 0 6px !important;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--coral-soft);
  color: #9a3d42 !important;
  font-size: 12px !important;
  font-weight: 900;
}

.category-dot {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 4px rgba(243, 202, 77, 0.18);
}

.place-card address {
  margin-top: 8px;
  color: var(--ink);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.mini-button,
.wide-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-size: 14px;
}

.mini-button {
  background: var(--teal-soft);
  color: var(--teal);
}

.mini-button.is-accent {
  background: var(--ink);
  color: #ffffff;
}

.feature-card {
  overflow: hidden;
}

.feature-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  background: #dbe6e0;
}

.feature-body {
  padding: 16px;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

.info-list div {
  display: grid;
  gap: 3px;
}

.info-list dt {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.info-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

.tip-list {
  display: grid;
  gap: 9px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.tip-list li {
  padding: 13px 14px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}

.wide-link {
  width: 100%;
  background: var(--coral);
}

.recipe-grid {
  display: grid;
  gap: 10px;
}

.tip-card {
  padding: 14px;
}

.recipe-card {
  display: grid;
  gap: 12px;
}

.recipe-section {
  display: grid;
  gap: 7px;
}

.recipe-section strong {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.ingredient-list,
.recipe-steps {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}

.ingredient-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
  padding-left: 16px;
}

.recipe-steps {
  display: grid;
  gap: 5px;
}

.top-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  background: rgba(255, 253, 250, 0.9);
  border-bottom: 1px solid rgba(222, 216, 204, 0.86);
  box-shadow: 0 12px 26px rgba(36, 48, 57, 0.18);
  backdrop-filter: blur(14px);
}

.tab-button {
  flex: 1 1 0;
  min-width: 0;
  height: 46px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: flex 180ms ease, background 180ms ease, color 180ms ease;
}

.tab-button span {
  display: inline-block;
}

.tab-button span:not(.tab-icon) {
  width: auto;
  overflow: hidden;
  opacity: 1;
  white-space: nowrap;
  transition: width 180ms ease, opacity 180ms ease;
}

.tab-icon {
  position: relative;
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  color: currentColor;
}

.tab-icon::before,
.tab-icon::after {
  position: absolute;
  content: "";
  display: block;
}

.tab-icon-today::before {
  inset: 3px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.tab-icon-today::after {
  top: 6px;
  left: 10px;
  width: 5px;
  height: 7px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.tab-icon-nearby::before {
  inset: 3px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.tab-icon-nearby::after {
  top: 9px;
  left: 9px;
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
}

.tab-icon-places::before {
  top: 3px;
  left: 5px;
  width: 12px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 8px 8px 8px 2px;
  transform: rotate(45deg);
}

.tab-icon-places::after {
  top: 7px;
  left: 9px;
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
}

.tab-icon-cake::before {
  left: 3px;
  right: 3px;
  bottom: 4px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.tab-icon-cake::after {
  top: 3px;
  left: 10px;
  width: 2px;
  height: 7px;
  background: currentColor;
  box-shadow: -5px 4px 0 currentColor, 5px 4px 0 currentColor;
}

.tab-icon-tips::before {
  top: 4px;
  left: 9px;
  width: 4px;
  height: 15px;
  background: currentColor;
  border-radius: 2px;
  transform: rotate(42deg);
}

.tab-icon-tips::after {
  right: 3px;
  bottom: 3px;
  width: 11px;
  height: 2px;
  background: currentColor;
  transform: rotate(-16deg);
}

.tab-button.is-active {
  flex: 1.18 1 0;
  background: var(--ink);
  color: #ffffff;
}

.tab-button.is-active span:not(.tab-icon) {
  width: auto;
  opacity: 1;
}

.scroll-top-button {
  position: fixed;
  right: max(16px, calc((100vw - 480px) / 2 + 16px));
  bottom: calc(18px + env(safe-area-inset-bottom) + var(--browser-bottom, 0px));
  z-index: 30;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(222, 216, 204, 0.86);
  border-radius: 50%;
  background: rgba(36, 48, 57, 0.94);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(36, 48, 57, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.94);
  transition: opacity 180ms ease, transform 180ms ease, bottom 180ms ease;
  backdrop-filter: blur(12px);
}

.scroll-top-button.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.scroll-top-button span {
  position: relative;
  width: 18px;
  height: 20px;
}

.scroll-top-button span::before,
.scroll-top-button span::after {
  position: absolute;
  content: "";
}

.scroll-top-button span::before {
  top: 2px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
}

.scroll-top-button span::after {
  top: 6px;
  left: 8px;
  width: 2px;
  height: 12px;
  background: currentColor;
  border-radius: 999px;
}

@media (min-width: 520px) {
  body {
    display: flex;
    justify-content: center;
  }

  .app {
    width: min(100%, 480px);
    box-shadow: 0 0 0 1px rgba(36, 48, 57, 0.08), var(--shadow);
  }
}

@media (max-width: 360px) {
  .timeline-item {
    grid-template-columns: 52px 1fr;
    padding: 12px;
  }

  .header-content h1 {
    font-size: 21px;
  }

  .profile-head {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
  }

  .photo-frame {
    width: 112px;
  }

  .weather-card {
    grid-template-columns: 1fr;
  }

  .weather-day {
    grid-template-columns: minmax(0, 72px) minmax(0, 1fr);
  }

  .weather-card dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ingredient-list {
    grid-template-columns: 1fr;
  }

  .header-actions {
    grid-template-columns: 1fr;
  }

  .tab-button {
    font-size: 9px;
    gap: 2px;
  }

  .tab-icon {
    flex-basis: 18px;
    width: 18px;
    height: 18px;
  }
}
