.town-web {
  --plum: #2e1945;
  --cream: #fff7e9;
  --outline: #7a655f;
  color: var(--plum);
  font-family: ParkRounded, ui-rounded, system-ui, sans-serif;
  background-color: var(--cream);
  background-image: radial-gradient(ellipse at 12% 3%, #ffedce55, transparent 48%),
    radial-gradient(ellipse at 88% 75%, #f9dfcf38, transparent 42%);
}
.town-wrap {
  max-width: 1540px;
  padding: 0 clamp(14px, 2vw, 34px) 26px;
  margin: auto;
}
.town-web button { color: inherit; font-weight: 900; }
.town-web button:not(:disabled):hover { filter: brightness(.96); }
.town-web h1, .town-web h2, .town-web h3, .town-brand, .card-caption {
  font-weight: 1000;
  letter-spacing: -.04em;
  line-height: 1.04;
}
.town-web h1 { font-size: clamp(32px, 4.5vw, 70px); }
.town-web h2 { font-size: clamp(26px, 3vw, 47px); }
.town-mast, .town-brand, .balances, .balances > span, .home-grades,
.town-subnav, .town-back, .grade-picker, .card-caption, .town-foot,
.town-foot-link, .map-pin, .town-crumb, .result-actions, .section-title,
.price-list div, .price-list dd, .reward-line, .journal-stamp { display: flex; align-items: center; }
.town-mast {
  justify-content: space-between;
  border-bottom: 2px solid var(--plum);
  padding: 7px 4px;
  gap: 12px;
}
.town-brand {
  font-size: clamp(20px, 2.6vw, 40px);
  min-height: 42px;
  gap: clamp(6px, 1vw, 15px);
  padding: 0;
  background: transparent;
  border: 0;
}
.town-brand img { width: clamp(37px, 6vw, 90px); mix-blend-mode: multiply; }
.balances { gap: clamp(10px, 1.65vw, 25px); font-weight: 950; font-size: clamp(15px, 1.9vw, 28px); }
.balance-retry { padding: .2em .55em; border: 1px solid var(--plum); border-radius: 99px; background: var(--cream); font-size: .85em; }
.balances > span { gap: .36em; white-space: nowrap; }
.balances > span + span { border-left: 1px solid var(--outline); padding-left: clamp(10px, 1.65vw, 25px); }
.balances img { width: 1.45em; height: 1.45em; object-fit: contain; mix-blend-mode: multiply; }
.battery { position: relative; display: inline-flex; width: 1.8em; height: .98em; border: 2px solid var(--plum); padding: 2px; border-radius: .22em; margin-right: .12em; }
.battery::after { content: ""; position: absolute; left: 100%; top: 21%; height: 53%; width: 3px; background: var(--plum); border-radius: 0 2px 2px 0; }
.battery i { display: block; border-radius: 1px; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(20% - 1px), #fff7cc 20%) left / auto, linear-gradient(#b3df49, #78ad37); }
.town-hero {
  margin-top: clamp(10px, 1.3vw, 20px); height: clamp(215px, 20.2vw, 312px);
  position: relative; isolation: isolate; overflow: hidden; border-radius: 20px;
  background: #aee0f2;
}
.town-hero > img { position: absolute; inset: 0 0 0 auto; height: 100%; width: 73%; object-fit: fill; z-index: -1; mask-image: linear-gradient(to right, transparent, black 14%); }
.town-hero > div { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 0 4%; }
.town-hero h1 { font-size: clamp(54px, 6.1vw, 94px); line-height: .88; }
.town-hero p { margin-top: .42em; font-size: clamp(15px, 1.7vw, 26px); font-weight: 750; }
.home-grades { gap: clamp(12px, 2vw, 34px); margin: clamp(16px, 2vw, 30px) 1% clamp(14px, 1.6vw, 24px); }
.home-grades h2 { white-space: nowrap; }
.grade-picker { flex: 1; gap: clamp(6px, .9vw, 14px); }
.grade-chip, .town-back, .town-secondary, .map-pin {
  border: 2px solid var(--plum); border-radius: 14px; background: var(--cream);
}
.grade-chip {
  flex: 1; min-width: 0; min-height: 44px; padding: 3px 8px;
  font-size: clamp(19px, 2vw, 30px); line-height: 1.2;
}
.grade-chip:first-child { flex: 1.2; white-space: nowrap; }
.grade-chip[aria-current] { color: #fff9e9; background: var(--plum); }
.game-shelf h2, .grade-shelf h1 { margin: 0 0 clamp(12px, 1.6vw, 23px) 1%; }
.town-catalog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.2vw, 20px); }
.illustrated-game, .catalog-game { min-width: 0; overflow: hidden; padding: 0; border: 1px solid #ad9790; border-radius: 17px; text-align: left; background: #fff6e8; }
.illustrated-game > img { width: 100%; aspect-ratio: 1.59; object-fit: cover; display: block; }
.card-caption { justify-content: space-between; gap: 6px; padding: clamp(12px, 1.45vw, 23px) clamp(11px, 1.6vw, 24px); font-size: clamp(19px, 2.55vw, 38px); }
.town-arrow { flex: none; display: inline-grid; place-items: center; width: 1.35em; height: 1.35em; border-radius: 50%; color: var(--cream); background: var(--plum); font: 900 .83em/1 ParkRounded, sans-serif; }
.catalog-game { display: flex; gap: 12px; align-items: center; padding: 15px; }
.catalog-game .catalog-symbol { background: var(--tint); border-radius: 14px; padding: 10px; }
.catalog-game strong, .catalog-game small { display: block; }
.catalog-game strong { font-size: 20px; }
.catalog-game small { font-size: 14px; font-weight: 650; }
.catalog-game .town-arrow { margin-left: auto; }
.town-subnav { justify-content: space-between; gap: 12px; margin: 12px 0; }
.town-back { gap: 4px; padding: 4px 16px; min-height: 44px; font-size: clamp(17px, 1.8vw, 27px); white-space: nowrap; border-radius: 99px; }
.town-subnav .grade-picker { max-width: 50%; }
.town-subnav .grade-chip { font-size: clamp(16px, 1.65vw, 25px); border-radius: 10px; }
.town-map { position: relative; border-radius: 22px; overflow: hidden; background: #a6d978; }
.map-picture { width: 100%; height: auto; display: block; aspect-ratio: 1751/898; }
.town-map h1 { position: absolute; inset: 2% auto auto 2.5%; font-size: clamp(28px, 4.35vw, 67px); }
.map-pin { position: absolute; translate: -50% -50%; gap: .45em; justify-content: center; min-height: 44px; padding: .2em .55em .2em .8em; border-radius: 99px; font-size: clamp(14px, 2.3vw, 35px); line-height: 1; white-space: nowrap; }
.pin-bakery { left: 22%; top: 92.5%; }
.pin-bridge { left: 52%; top: 42%; }
.pin-blocks { left: 81%; top: 84%; }
.placed-flowers { position: absolute; width: 9.3%; left: 28.8%; top: 75.3%; transform: translate(-50%, -50%); pointer-events: none; }
.town-foot { justify-content: center; margin-top: 9px; gap: clamp(15px, 3vw, 47px); }
.town-foot-link { gap: .55em; padding: .1em .5em; min-height: 44px; font-size: clamp(20px, 2.1vw, 32px); border: 0; background: transparent; text-decoration: underline; text-underline-offset: .18em; }
.town-foot-link + .town-foot-link { border-left: 1px solid var(--outline); padding-left: clamp(15px, 3vw, 47px); }
.town-foot-link img { object-fit: contain; width: 1.65em; max-height: 1.3em; }
.town-notice, .coin-hint { text-align: center; font-weight: 800; margin: 10px 0; }
.town-crumb, .delivery-sheet { width: min(96%, 160dvh); margin-inline: auto; }
.town-crumb { gap: .35em; margin-block: 4px; font-size: clamp(17px, 2vw, 30px); font-weight: 850; }
.crumb-link { min-height: 44px; padding: 0; border: 0; background: none; }
.crumb-link:hover { text-decoration: underline; }
.delivery-sheet { display: grid; grid-template-columns: 1.18fr 1fr; align-items: stretch; gap: clamp(12px, 2vw, 32px); padding: clamp(7px, .85vw, 14px); border: 2px solid #a27755; border-radius: 28px; }
.delivery-picture { border-radius: 20px; overflow: hidden; }
.delivery-picture img, .decor-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.delivery-copy { display: flex; flex-direction: column; justify-content: center; gap: clamp(8px, .9vw, 14px); padding: .4vw; }
.delivery-copy h1 { font-size: clamp(26px, 3.45vw, 53px); text-align: center; margin-bottom: .1em; }
.reward-line { padding: clamp(6px, .65vw, 10px); border: 1.5px solid #ac978b; border-radius: 18px; gap: 4%; }
.reward-line img { object-fit: contain; width: 28%; height: clamp(52px, 6.8vw, 96px); mix-blend-mode: multiply; }
.reward-line strong { border-left: 1px solid #af9988; padding: .4em 0 .4em 5%; font-size: clamp(21px, 2.45vw, 36px); font-weight: 1000; line-height: 1.05; letter-spacing: -.045em; }
.energy-used { display: flex; align-items: center; gap: .5em; font-size: clamp(15px, 1.8vw, 27px); font-weight: 900; }
.energy-used::before, .energy-used::after { content: ""; flex: 1; border-top: 1px solid var(--outline); }
.result-actions { gap: 10px; }
.town-primary, .town-secondary { padding: .38em .8em; min-height: 46px; font-size: clamp(18px, 2.2vw, 33px); line-height: 1.15; border-radius: 99px; }
.town-web .town-primary { background: var(--plum); color: var(--cream); border: 2px solid var(--plum); }
.result-actions button { flex: 1; white-space: nowrap; }
.section-title { margin: 16px 0; gap: 16px; }
.section-title h1 { flex: 1; text-align: center; background: #dcc4ec; border-radius: 99px; padding: .13em .35em; }
.decor-layout { display: grid; grid-template-columns: 1.75fr 1fr; gap: clamp(12px, 1.3vw, 22px); }
.decor-preview, .decor-card { border: 2px solid var(--outline); border-radius: 23px; overflow: hidden; }
.decor-preview { position: relative; }
.decor-preview span { position: absolute; top: 2.6%; left: 2%; font-weight: 950; font-size: clamp(19px, 2.3vw, 34px); padding: .1em .7em; border: 1.5px solid var(--plum); background: var(--cream); border-radius: 99px; }
.decor-card { display: flex; flex-direction: column; justify-content: center; padding: clamp(12px, 1.7vw, 26px); gap: clamp(8px, 1.2vw, 18px); }
.decor-item { width: 79%; max-height: 14vw; object-fit: contain; align-self: center; }
.decor-card h2 { text-align: center; font-size: clamp(25px, 3.1vw, 48px); }
.price-list { margin: 0; }
.price-list div { padding: .22em .3em; border-top: 1px solid var(--outline); justify-content: space-between; font-size: clamp(18px, 2.2vw, 33px); font-weight: 900; }
.price-list div:last-child { border-bottom: 1px solid var(--outline); }
.price-list dd { margin: 0; gap: .32em; }
.price-list img { width: 1.35em; height: 1.35em; object-fit: contain; mix-blend-mode: multiply; }
.decor-card .town-secondary { align-self: center; width: 78%; }
.journal-page, .town-message { max-width: 660px; margin: 30px auto; padding: clamp(20px, 3vw, 42px); border: 2px solid #ae9380; border-radius: 24px; background: #fff9ed; }
.journal-stamp { margin: 24px 0; gap: 20px; }
.journal-stamp h3 { font-size: 25px; }
.journal-stamp p, .town-message p { font-size: 18px; font-weight: 700; }
.journal-stamp img { width: 27%; }
.journal-stamp.uncollected img { filter: grayscale(1); opacity: .42; }
.town-message { text-align: center; }
.town-message > img { width: 55%; border-radius: 15px; margin-bottom: 14px; }
.town-message p { margin: 18px 0; }

@media (max-width: 760px) {
  .home-grades { flex-wrap: wrap; }
  .home-grades .grade-picker { flex-basis: 100%; }
  .town-subnav { flex-wrap: wrap; }
  .town-subnav .grade-picker { max-width: none; }
  .town-catalog { gap: 9px; }
  .catalog-game { align-items: flex-start; padding: 10px; }
  .catalog-game .catalog-symbol { display: none; }
  .catalog-game small { font-size: 12px; }
  .result-actions { flex-wrap: wrap; }
}
@media (max-width: 570px) {
  .town-wrap { padding-inline: 10px; }
  .town-mast { padding: 3px 0; gap: 4px; }
  .town-brand { gap: 4px; font-size: clamp(16px, 4.3vw, 23px); }
  .town-brand img { width: 25px; }
  .balances { gap: 4px; font-size: clamp(10px, 3.1vw, 15px); }
  .balances > span + span { padding-left: 5px; }
  .town-hero { height: clamp(176px, 47vw, 230px); border-radius: 16px; }
  .town-hero > img { width: 75%; height: 74%; inset: auto -1% 0 auto; object-fit: fill; mask-image: linear-gradient(to right, transparent, black 16%); }
  .town-hero > div { justify-content: flex-start; padding: 14px 0 0 4%; }
  .town-hero h1 { font-size: clamp(43px, 11vw, 57px); }
  .town-hero p { font-size: 13px; max-width: 43%; line-height: 1.12; }
  .home-grades { gap: 8px; margin: 17px 0; }
  .grade-picker { gap: 4px; }
  .grade-chip, .town-subnav .grade-chip { min-height: 44px; border-width: 1.5px; border-radius: 9px; padding-inline: 2px; font-size: 15px; }
  .town-subnav .grade-picker { flex-basis: 100%; }
  .town-subnav { gap: 6px; margin: 7px 0 10px; }
  .town-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .illustrated-game:first-child { grid-column: 1/-1; }
  .illustrated-game:first-child > img { aspect-ratio: 2.2; object-position: center 56%; }
  .card-caption { font-size: clamp(16px, 4.5vw, 23px); padding: 11px 8px; }
  .illustrated-game:first-child .card-caption { font-size: 23px; }
  .catalog-game strong { font-size: 16px; }
  .town-map { border-radius: 16px; }
  .map-picture { height: clamp(255px, 62vw, 335px); object-fit: fill; }
  .town-map h1 { top: 3%; font-size: clamp(24px, 6.5vw, 34px); }
  .map-pin { padding: 4px 8px; min-height: 40px; font-size: clamp(12px, 3.4vw, 17px); border-width: 1.5px; gap: 3px; }
  .pin-bakery { top: 91%; }
  .pin-blocks { left: 81.5%; }
  .town-foot { gap: 2px; justify-content: space-evenly; }
  .town-foot-link { padding-inline: 4px; gap: 4px; font-size: 17px; }
  .town-foot-link + .town-foot-link { padding-left: 12px; }
  .delivery-sheet, .decor-layout { grid-template-columns: 1fr; }
  .delivery-picture img { max-height: 32dvh; object-position: 50% 59%; }
  .delivery-sheet { border-radius: 18px; }
  .delivery-copy { gap: 6px; padding: 3px; }
  .reward-line { padding: 4px 8px; }
  .reward-line img { height: 46px; width: 23%; }
  .reward-line strong { font-size: 21px; }
  .section-title { gap: 6px; margin: 10px 0; }
  .section-title h1 { font-size: 26px; }
  .town-back { padding-inline: 8px; font-size: 15px; }
  .town-back svg { width: 15px; }
  .decor-preview img { max-height: 35dvh; object-position: center 60%; }
  .decor-item { max-height: 90px; }
  .decor-card { gap: 9px; }
}

.town-mast:has(.family-nav) { flex-wrap: wrap; }
.town-mast:has(.family-nav) .balances { margin-left: auto; }
@media (max-width: 800px) {
  .town-mast .family-nav { flex-basis: 100%; margin-bottom: .35rem; }
}

.home-family-nav { padding: 0; border: 0; background: transparent; gap: .45rem; }
.home-family-nav a {
  gap: .4em; padding: .4rem clamp(.55rem, 1.1vw, 1.1rem);
  border: 2px solid var(--plum); border-radius: .85rem;
  color: var(--plum); background: #d7e9cb;
  font-size: clamp(.95rem, 1.4vw, 1.3rem); font-weight: 950; white-space: nowrap;
}
.home-family-nav a[href="/parents/payment"] { color: var(--plum); background: #ffe397; }
.home-family-nav .icon { flex: none; }
@media (max-width: 360px) {
  .home-family-nav a { gap: .25rem; padding-inline: .35rem; }
  .home-family-nav .icon { width: 20px; height: 20px; }
}
