@font-face {
  font-family: Lora;
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/lora-italic-600-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Lora;
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/lora-italic-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: Lora;
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/lora-italic-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Lora;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/lora-600-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Lora;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/lora-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: Lora;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/lora-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Onest;
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Onest;
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/onest-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: Onest;
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --color-bg-page: #faf5ec;
  --color-bg-sunken: #f2e9da;
  --color-bg-surface: #fffdf8;
  --color-bg-scrim: rgba(42, 30, 47, 0.48);
  --color-text-primary: #2a1e2f;
  --color-text-secondary: #625466;
  --color-text-tertiary: #6e6272;
  --color-text-on-accent: #fff;
  --color-text-link: #3b2342;
  --color-border-subtle: #e8ddcc;
  --color-border-strong: #8c7e8f;
  --color-accent-default: #3b2342;
  --color-accent-hover: #533560;
  --color-accent-pressed: #24132a;
  --color-accent-soft: #efe6f0;
  --color-focus: #2f64c8;
  --color-festive-tomato: #d9532b;
  --color-festive-gold: #f2b53b;
  --color-festive-green: #2e9e7c;
  --color-festive-blue: #4f86d1;
  --color-festive-lilac: #8c6cc4;
  --color-tile-home: #fdf1d6;
  --color-tile-tech: #e3ecf7;
  --color-tile-hobbies: #ece5f6;
  --color-tile-sport: #dff1e8;
  --color-status-need-bg: #fde7de;
  --color-status-need-text: #a33a18;
  --color-status-similar-bg: #e3ecf7;
  --color-status-similar-text: #2d5a8e;
  --color-status-note-bg: #fdf1d6;
  --color-status-note-text: #7a5200;
  --color-status-note-border: #f2b53b;
  --color-status-mine-bg: #dff1e8;
  --color-status-mine-text: #1d6b55;
  --color-status-taken-bg: #f2e9da;
  --color-status-error-bg: #fde8e6;
  --color-status-error-text: #b42318;
  --color-status-error-hover: #8e1b12;
  --shadow-card: 0 1px 2px rgba(42, 30, 47, 0.06), 0 6px 16px rgba(42, 30, 47, 0.06);
  --shadow-raised: 0 2px 6px rgba(42, 30, 47, 0.08), 0 16px 40px rgba(42, 30, 47, 0.18);
  --shadow-key: 0 3px 0 #24132a;
  --shadow-key-soft: 0 2px 0 rgba(42, 30, 47, 0.22);
  --font-serif: Lora, Georgia, 'Times New Roman', serif;
  --font-sans: Onest, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --gutter: 16px;
  --ease-out-soft: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (min-width: 640px) {
  :root {
    --gutter: 24px;
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: 32px;
  }
}

body[data-time='evening']:not([data-view='login']) {
  color-scheme: dark;
  --color-bg-page: #1f1426;
  --color-bg-sunken: #170f1c;
  --color-bg-surface: #2b1d33;
  --color-bg-scrim: rgb(10 4 14 / 0.62);
  --color-text-primary: #fff4e4;
  --color-text-secondary: #dccbd8;
  --color-text-tertiary: #bba9b8;
  --color-text-on-accent: #2b1608;
  --color-text-link: #ffd97f;
  --color-border-subtle: #46324f;
  --color-border-strong: #9a879d;
  --color-accent-default: #f2b53b;
  --color-accent-hover: #ffc95e;
  --color-accent-pressed: #d99a22;
  --color-accent-soft: rgb(242 181 59 / 0.16);
  --color-focus: #8fb4ff;
  --color-tile-home: #3b2c22;
  --color-tile-tech: #222c3d;
  --color-tile-hobbies: #2f2541;
  --color-tile-sport: #1f3429;
  --color-status-need-bg: #4a2418;
  --color-status-need-text: #ffb59a;
  --color-status-similar-bg: #213149;
  --color-status-similar-text: #aac9f2;
  --color-status-note-bg: #3b2e14;
  --color-status-note-text: #f6d38a;
  --color-status-note-border: #f2b53b;
  --color-status-mine-bg: #173a2e;
  --color-status-mine-text: #8be0bd;
  --color-status-taken-bg: #362840;
  --color-status-error-bg: #4a1d1a;
  --color-status-error-text: #ff9b8f;
  --color-status-error-hover: #ffb3a9;
  --shadow-card: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 22px rgb(0 0 0 / 0.3);
  --shadow-raised: 0 2px 6px rgb(0 0 0 / 0.4), 0 16px 40px rgb(0 0 0 / 0.55);
  --shadow-key: 0 3px 0 #9c6a12;
  --shadow-key-soft: 0 2px 0 rgb(0 0 0 / 0.4);
}

:root:has(> body[data-time='evening']:not([data-view='login'])) {
  color-scheme: dark;
  scrollbar-color: #5c4668 #1f1426;
}

:root:has(> body[data-view='room'][data-time='day']) {
  scrollbar-color: #c9b59f #efe3d3;
}

body[data-time='evening']:not([data-view='login'], [data-view='room']) {
  background: radial-gradient(110% 520px at 50% 0, #3c2347 0%, rgb(31 20 38 / 0) 100%) no-repeat, #1f1426;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--color-bg-page);
  color: var(--color-text-primary);
  font: 400 16px/24px var(--font-sans);
}

body:has(dialog[open]) {
  overflow: hidden;
}

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

[hidden] {
  display: none !important;
}

button,
input {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.sprite {
  display: none;
}

.glyph {
  flex: none;
  width: 16px;
  height: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.frame {
  max-width: calc(1200px + 2 * var(--gutter));
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.overline {
  font: 600 12px/16px var(--font-sans);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px max(var(--gutter), calc((100% - 1440px) / 2 + var(--gutter)));
}

.langs {
  display: flex;
  gap: 2px;
  padding: 2px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: 999px;
}

.langs button {
  min-width: 48px;
  height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text-secondary);
  font: 600 14px/16px var(--font-sans);
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: background-color 150ms ease-out, color 150ms ease-out;
}

.langs button:hover {
  background: var(--color-accent-soft);
  color: var(--color-text-primary);
}

.langs button[aria-pressed='true'] {
  background: var(--color-accent-default);
  color: var(--color-text-on-accent);
}

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

.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 20px;
  text-align: left;
}

.banners .banner:not([hidden]) {
  animation: banner-in 200ms ease-out both;
}

.banner-owner {
  background: var(--color-accent-soft);
}

.banner-owner .glyph {
  color: var(--color-accent-default);
}

.banner-error {
  background: var(--color-status-error-bg);
}

.banner-error > .glyph {
  color: var(--color-status-error-text);
}

.banner-info {
  background: var(--color-bg-sunken);
}

.banner-info .glyph {
  color: var(--color-text-secondary);
}

.retry {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-left: auto;
  padding: 0 12px;
  border: 1.5px solid var(--color-status-error-text);
  border-radius: 8px;
  background: var(--color-bg-surface);
  color: var(--color-status-error-text);
  font: 600 13px/16px var(--font-sans);
  letter-spacing: 0.2px;
  cursor: pointer;
}

.confetti svg {
  display: block;
  width: 320px;
  max-width: 100%;
  height: auto;
}

.confetti.play rect,
.confetti.play path {
  animation: confetti-drop 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.confetti.play .c2 {
  animation-delay: 60ms;
}

.confetti.play .c3 {
  animation-delay: 120ms;
}

.confetti.play .c4 {
  animation-delay: 180ms;
}

.confetti.play .c5 {
  animation-delay: 240ms;
}

.hero {
  padding: 16px 0 32px;
}

.eyebrow {
  margin-top: 8px;
  color: var(--color-accent-default);
  font: italic 600 20px/26px var(--font-serif);
}

h1 {
  margin-top: 8px;
  font: 600 clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem) / 1.1 var(--font-serif);
  letter-spacing: -0.01em;
}

.lead {
  max-width: 640px;
  margin-top: 12px;
  color: var(--color-text-secondary);
  font-size: 18px;
  line-height: 28px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: 999px;
  font: 600 13px/16px var(--font-sans);
  letter-spacing: 0.2px;
}

.glyph-mine {
  color: var(--color-status-mine-text);
}

.glyph-muted {
  color: var(--color-text-secondary);
}

.group + .group {
  margin-top: 48px;
}

.group-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

.group h2 {
  font: 600 26px/32px var(--font-serif);
  letter-spacing: -0.01em;
}

.group-count {
  color: var(--color-text-tertiary);
  font: 600 13px/16px var(--font-sans);
  letter-spacing: 0.2px;
}

.cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 16px;
  padding: 16px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  transition: border-color 240ms ease-out, box-shadow 240ms ease-out;
}

.card .tile {
  grid-row: 1 / 3;
  grid-column: 1;
}

.tile {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--tile, var(--color-tile-home));
  transition: background-color 240ms ease-out;
}

.tile img {
  width: 96px;
  height: 96px;
  transition: opacity 240ms ease-out;
}

.tile img.fallback {
  width: 64px;
  height: 64px;
}

[data-group='Tech'] {
  --tile: var(--color-tile-tech);
}

[data-group='Hobbies'] {
  --tile: var(--color-tile-hobbies);
}

[data-group='Sport & Health'] {
  --tile: var(--color-tile-sport);
}

.card .title {
  grid-row: 1;
  grid-column: 2;
  font: 600 20px/26px var(--font-serif);
  overflow-wrap: anywhere;
}

.card .title:focus {
  outline: none;
}

.meta {
  display: contents;
}

.price {
  grid-row: 2;
  grid-column: 2;
  align-self: start;
  margin-top: 4px;
  font: 600 18px/24px var(--font-sans);
  font-variant-numeric: tabular-nums;
}

.model,
.badges,
.note,
.shop,
.card-foot {
  grid-column: 1 / -1;
  margin-top: 12px;
}

.model {
  order: 1;
  color: var(--color-text-secondary);
  font-size: 15px;
  line-height: 22px;
  overflow-wrap: anywhere;
}

.badges {
  order: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badges:empty {
  display: none;
}

.note {
  order: 3;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  background: var(--color-status-note-bg);
  border-left: 3px solid var(--color-status-note-border);
  border-radius: 12px;
}

.note-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-status-note-text);
}

.note-text {
  font-size: 14px;
  line-height: 20px;
  overflow-wrap: anywhere;
}

.shop {
  order: 4;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  min-height: 44px;
  margin-top: 4px;
  color: var(--color-text-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  border-radius: 4px;
}

.card-foot {
  order: 5;
  display: grid;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 4px 12px 4px 8px;
  border-radius: 999px;
  font: 600 13px/16px var(--font-sans);
  letter-spacing: 0.2px;
}

.badge-need {
  background: var(--color-status-need-bg);
  color: var(--color-status-need-text);
}

.badge-similar {
  background: var(--color-status-similar-bg);
  color: var(--color-status-similar-text);
}

.badge-taken {
  background: linear-gradient(170deg, #efd8ad 0%, #ddb880 100%);
  color: #3b2312;
}

.badge-mine {
  background: var(--color-status-mine-text);
  color: var(--color-text-on-accent);
}

.status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--color-status-taken-bg);
  border-radius: 12px;
  animation: fade-in 240ms ease-out;
}

.status .glyph,
.status .overline {
  color: var(--color-text-secondary);
}

.status .name {
  font: 600 16px/22px var(--font-sans);
  overflow-wrap: anywhere;
}

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

.status-mine .glyph,
.status-mine .overline {
  color: var(--color-status-mine-text);
}

.card[data-state='taken'] {
  box-shadow: none;
}

.card[data-state='taken'] .tile {
  background: var(--color-status-taken-bg);
}

body[data-time='evening']:not([data-view='login']) .card[data-state='taken'] .tile:not(.showcase) img {
  opacity: 0.62;
}

.card[data-state='taken'] .tile:not(.showcase) img {
  opacity: 0.5;
}

.card[data-state='mine'] {
  border-color: var(--color-status-mine-text);
  box-shadow: 0 0 0 1px var(--color-status-mine-text), var(--shadow-card);
}

.card.enter {
  animation: card-in 240ms var(--ease-out-soft) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-width: 120px;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 12px;
  font: 600 16px/20px var(--font-sans);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 120ms ease-out, transform 80ms ease-out, box-shadow 80ms ease-out;
}

.btn-primary {
  background: var(--color-accent-default);
  color: var(--color-text-on-accent);
  box-shadow: var(--shadow-key);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
}

.btn-primary:active {
  background: var(--color-accent-pressed);
  box-shadow: 0 1px 0 #24132a;
  transform: translateY(2px);
}

.btn-secondary {
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  border: 1.5px solid var(--color-border-strong);
  box-shadow: var(--shadow-key-soft);
}

.btn-secondary:hover,
.btn-ghost:hover {
  background: var(--color-accent-soft);
}

.btn-secondary:active {
  background: var(--color-accent-soft);
  box-shadow: none;
  transform: translateY(2px);
}

.btn-danger {
  background: var(--color-status-error-text);
  color: var(--color-text-on-accent);
  box-shadow: var(--shadow-key-soft);
}

.btn-danger:hover,
.btn-danger:active {
  background: var(--color-status-error-hover);
}

.btn-danger:active {
  transform: translateY(2px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-accent-default);
}

.btn-quiet {
  color: var(--color-text-secondary);
}

.btn-quiet:hover {
  color: var(--color-text-primary);
}

.btn:disabled:not([aria-busy='true']) {
  background: var(--color-bg-sunken);
  color: var(--color-text-tertiary);
  border: 1px solid var(--color-border-subtle);
  box-shadow: none;
  cursor: default;
  transform: none;
}

.btn-ghost:disabled:not([aria-busy='true']) {
  background: transparent;
  border: 0;
}

.btn[aria-busy='true'] {
  cursor: progress;
}

.dots {
  display: inline-flex;
  gap: 3px;
}

.dots i {
  width: 4px;
  height: 4px;
  background: currentColor;
  opacity: 0.35;
  animation: dot 900ms steps(1, end) infinite;
}

.dots i:nth-child(2) {
  animation-delay: 300ms;
}

.dots i:nth-child(3) {
  animation-delay: 600ms;
}

.field {
  display: grid;
  gap: 8px;
  text-align: left;
}

.field label {
  font: 600 16px/22px var(--font-sans);
}

.field input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  background: var(--color-bg-surface);
  border: 1.5px solid var(--color-border-strong);
  border-radius: 12px;
  font: 400 16px/24px var(--font-sans);
}

.field input::placeholder {
  color: var(--color-text-tertiary);
}

.field input:focus {
  border: 2px solid var(--color-accent-default);
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.field input[aria-invalid='true'] {
  border: 2px solid var(--color-status-error-text);
}

.field input:disabled {
  background: var(--color-bg-sunken);
  border-color: var(--color-border-subtle);
  color: var(--color-text-tertiary);
}

.password {
  position: relative;
}

.password input {
  padding-right: 52px;
}

.eye {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
}

.field-error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--color-status-error-text);
  font-size: 14px;
  line-height: 20px;
}

.field-error .glyph {
  margin-top: 2px;
}

.field-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.hint,
.help {
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 20px;
}

.counter {
  flex: none;
  color: var(--color-text-tertiary);
  font-size: 14px;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
}

.counter.over {
  color: var(--color-status-error-text);
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 16px;
  background: var(--color-status-error-bg);
  border-radius: 12px;
  color: var(--color-status-error-text);
  font-size: 14px;
  line-height: 20px;
  text-align: left;
}

.alert .glyph {
  margin-top: 2px;
}

.shake {
  animation: shake 320ms linear;
}

.login {
  display: grid;
  justify-items: center;
  padding: 8px 0 64px;
}

.login .confetti {
  justify-self: center;
}

.login-card {
  display: grid;
  gap: 24px;
  width: 100%;
  max-width: 440px;
  padding: 32px 24px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.login-card > img {
  justify-self: center;
}

.login-card h1 {
  margin-top: -8px;
  font-size: 36px;
  line-height: 40px;
}

.login-card .lead {
  margin-top: -16px;
  font-size: 16px;
  line-height: 24px;
}

.state-block {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 40px 24px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: 24px;
  text-align: center;
}

.state-block h2 {
  font: 600 26px/32px var(--font-serif);
}

.state-block p {
  color: var(--color-text-secondary);
}

.state-block .btn {
  width: auto;
}

.skeleton {
  height: 228px;
  background: var(--color-bg-sunken);
  border-radius: 20px;
}

.footer {
  display: grid;
  gap: 4px;
  padding: 48px 0 64px;
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 20px;
}

dialog {
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: auto;
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  border: 0;
  border-radius: 20px;
  box-shadow: var(--shadow-raised);
  opacity: 0;
  transform: scale(0.98);
  transition:
    opacity 150ms cubic-bezier(0.4, 0, 1, 1),
    transform 150ms cubic-bezier(0.4, 0, 1, 1),
    overlay 200ms allow-discrete,
    display 200ms allow-discrete;
}

dialog[open] {
  opacity: 1;
  transform: none;
  transition-duration: 200ms;
  transition-timing-function: var(--ease-out-soft);
}

@starting-style {
  dialog[open] {
    opacity: 0;
    transform: scale(0.96);
  }
}

dialog::backdrop {
  background: var(--color-bg-scrim);
  opacity: 0;
  transition: opacity 200ms, overlay 200ms allow-discrete, display 200ms allow-discrete;
}

dialog[open]::backdrop {
  opacity: 1;
}

@starting-style {
  dialog[open]::backdrop {
    opacity: 0;
  }
}

.dialog-inner {
  position: relative;
  display: grid;
  gap: 20px;
  width: min(480px, 100vw - 48px);
  padding: 32px;
}

.handle {
  display: none;
  justify-self: center;
  width: 40px;
  height: 4px;
  background: var(--color-border-strong);
  border-radius: 2px;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dialog-head h2 {
  padding-top: 6px;
  font: 600 24px/30px var(--font-serif);
  letter-spacing: -0.01em;
}

.close {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--color-border-subtle);
  border-radius: 12px;
  color: var(--color-text-secondary);
  cursor: pointer;
}

.dialog-body,
.dialog-body > form {
  display: grid;
  gap: 20px;
}

.summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--color-bg-page);
  border: 1px solid var(--color-border-subtle);
  border-radius: 16px;
}

.summary .tile {
  width: 64px;
  height: 64px;
  border-radius: 12px;
}

.summary .tile img {
  width: 64px;
  height: 64px;
}

.summary .tile.muted {
  background: var(--color-bg-sunken);
}

.summary .tile.muted img {
  opacity: 0.5;
}

.summary-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.summary-title {
  font: 600 16px/22px var(--font-sans);
}

.summary-model {
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 20px;
  overflow-wrap: anywhere;
}

.summary .badge {
  justify-self: start;
  margin-top: 4px;
}

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

.success-art {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
}

.success-art .tile {
  position: relative;
  width: 96px;
  height: 96px;
  overflow: visible;
}

.success-art .tile img {
  width: 96px;
  height: 96px;
}

.success-text {
  text-align: center;
}

.success-rule {
  display: flex;
  justify-content: center;
  gap: 8px;
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 20px;
}

.success-rule .glyph {
  margin-top: 2px;
}

.burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.burst i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--s);
  height: var(--s);
  background: var(--c);
  animation: burst 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (max-width: 639px) {
  dialog {
    width: 100%;
    margin: auto 0 0;
    border-radius: 24px 24px 0 0;
    opacity: 1;
    transform: translateY(100%);
    transition-duration: 200ms;
  }

  dialog[open] {
    transform: none;
    transition-duration: 280ms;
    transition-timing-function: cubic-bezier(0.32, 0.72, 0, 1);
  }

  @starting-style {
    dialog[open] {
      opacity: 1;
      transform: translateY(100%);
    }
  }

  .dialog-inner {
    width: 100%;
    padding: 8px 20px calc(32px + env(safe-area-inset-bottom));
  }

  .handle {
    display: block;
  }
}

@media (min-width: 640px) {
  .topbar {
    padding-block: 24px;
  }

  .login .confetti svg {
    width: 480px;
  }

  .login-card {
    padding: 40px;
  }

  .group-head {
    margin-bottom: 24px;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
  }

  .card .tile {
    width: 100%;
    height: 184px;
    border-radius: 0;
  }

  .card .tile img {
    width: 128px;
    height: 128px;
  }

  .card > :not(.tile) {
    margin-inline: 20px;
  }

  .model,
  .badges,
  .note,
  .shop,
  .card-foot {
    order: 0;
  }

  .badges,
  .tile + .badges:empty + .title {
    margin-top: 20px;
  }

  .card .title {
    margin-top: 12px;
  }

  .meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 12px;
    margin-top: 12px;
  }

  .price,
  .shop {
    align-self: center;
    margin-top: 0;
  }

  .card-foot {
    margin-top: auto;
    margin-bottom: 24px;
    padding-top: 16px;
  }

  .dialog-body,
  .dialog-body > form,
  .dialog-inner {
    gap: 24px;
  }

  .state-block {
    max-width: 560px;
    margin-inline: auto;
  }
}

@media (min-width: 1024px) {
  .hero {
    padding: 32px 0 56px;
  }

  .group + .group {
    margin-top: 64px;
  }

  .group h2,
  .state-block h2 {
    font-size: 32px;
    line-height: 38px;
  }

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

  .footer {
    padding: 64px 0 80px;
  }
}

@keyframes confetti-drop {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes banner-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes dot {
  0%,
  33% {
    opacity: 1;
  }

  34%,
  100% {
    opacity: 0.35;
  }
}

@keyframes shake {
  20% {
    transform: translateX(-6px);
  }

  40% {
    transform: translateX(6px);
  }

  60% {
    transform: translateX(-4px);
  }

  80% {
    transform: translateX(4px);
  }
}

@keyframes burst {
  to {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) rotate(var(--r));
  }
}

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

  *,
  *::before,
  *::after,
  dialog::backdrop {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  dialog,
  dialog[open] {
    transform: none;
  }
}

:root {
  --spot: rgb(255 255 255 / 0.9);
  --floor: rgb(120 88 56 / 0.12);
  --contact: rgb(60 40 24 / 0.32);
  --mine-gold: #b8730c;
}

body[data-time='evening']:not([data-view='login']) {
  --spot: rgb(255 214 160 / 0.3);
  --mine-gold: #f2b53b;
  --floor: rgb(0 0 0 / 0.24);
  --contact: rgb(0 0 0 / 0.55);
}

body[data-view='list'][data-time='evening']::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(240px 240px at 9% 26%, rgb(255 186 100 / 0.08), rgb(0 0 0 / 0) 70%),
    radial-gradient(300px 300px at 91% 14%, rgb(196 120 220 / 0.08), rgb(0 0 0 / 0) 70%),
    radial-gradient(220px 220px at 86% 68%, rgb(255 186 100 / 0.06), rgb(0 0 0 / 0) 70%),
    radial-gradient(280px 280px at 12% 84%, rgb(196 120 220 / 0.06), rgb(0 0 0 / 0) 70%);
}

.hero {
  text-align: center;
}

.hero .lead,
.hero .lead-money {
  margin-inline: auto;
  text-wrap: balance;
}

.hero .chips {
  justify-content: center;
}

.garland {
  height: 64px;
  margin: 0 calc(-1 * var(--gutter)) 4px;
  background: url('/assets/ui/garland-day.svg') center top / auto 64px repeat-x;
}

body[data-time='evening']:not([data-view='login']) .garland {
  background-image: url('/assets/ui/garland-evening.svg');
}

.hero .lead-money {
  display: block;
  max-width: 620px;
}

.lead-money .glyph-piggy {
  display: block;
  width: 30px;
  height: auto;
  margin: 0 auto 6px;
}

.group-head {
  align-items: center;
  justify-content: center;
}

.group-head::before,
.group-head::after {
  content: '';
  flex: 0 1 120px;
  height: 1px;
  background: linear-gradient(90deg, rgb(0 0 0 / 0), var(--color-border-strong));
  opacity: 0.55;
}

.group-head::after {
  background: linear-gradient(90deg, var(--color-border-strong), rgb(0 0 0 / 0));
}

.group-count {
  min-width: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--color-accent-soft);
  color: var(--color-text-secondary);
  text-align: center;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.card {
  display: flex;
  flex: 0 0 100%;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

.card > :not(.tile) {
  margin-inline: 16px;
}

.model,
.badges,
.note,
.shop,
.card-foot {
  order: 0;
}

.badges,
.tile + .badges:empty + .title {
  margin-top: 16px;
}

.card .title {
  margin-top: 12px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  margin-top: 12px;
}

.price,
.shop {
  align-self: center;
  margin-top: 0;
}

.card-foot {
  margin-top: auto;
  margin-bottom: 20px;
  padding-top: 16px;
}

.card .tile {
  width: 100%;
  height: 160px;
  border-radius: 0;
}

.card .tile.showcase {
  position: relative;
  height: 196px;
  container-type: size;
  background:
    radial-gradient(56% 74% at 50% 60%, var(--spot), rgb(0 0 0 / 0) 72%),
    linear-gradient(180deg, rgb(0 0 0 / 0) 60%, var(--floor) 100%),
    var(--tile, var(--color-tile-home));
}

.card .tile.showcase .scene-part {
  width: 100%;
  height: auto;
}

.card .tile.showcase .scene-frame {
  height: auto;
}

.scene {
  position: relative;
  width: min(80cqw, calc(68cqh * var(--r)), calc(var(--uw) * 1.6px));
  transform-origin: 50% 100%;
  aspect-ratio: var(--r);
  margin-top: 8cqh;
  transition: transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scene img {
  user-select: none;
  -webkit-user-drag: none;
}

.scene-item {
  position: absolute;
  display: block;
}

.scene-part {
  display: block;
  width: 100%;
  height: auto;
}

.scene-frame {
  position: absolute;
  display: block;
  height: auto;
  opacity: 0;
  pointer-events: none;
}

.scene-shine,
.scene-print,
.scene-ghost {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.scene-ghost {
  -webkit-mask: url('/assets/items/room/printer-object.webp') center / 100% 100% no-repeat;
  mask: url('/assets/items/room/printer-object.webp') center / 100% 100% no-repeat;
  background: rgb(40 32 34 / 0.86);
  clip-path: inset(0 0 30% 0);
}

.scene-shine {
  -webkit-mask: var(--mask) center / 100% 100% no-repeat;
  mask: var(--mask) center / 100% 100% no-repeat;
  background: linear-gradient(100deg, rgb(255 255 255 / 0) 38%, rgb(255 255 255 / 0.7) 50%, rgb(255 255 255 / 0) 62%) 160% 0 / 260% 100% no-repeat;
}

.scene-print {
  -webkit-mask: url('/assets/items/room/printer-object.webp') center / 100% 100% no-repeat;
  mask: url('/assets/items/room/printer-object.webp') center / 100% 100% no-repeat;
  background: linear-gradient(180deg, rgb(255 200 120 / 0), rgb(255 248 220) 40%, rgb(255 170 60) 62%, rgb(255 150 50 / 0)) 0 76% / 100% 11% no-repeat;
  filter: drop-shadow(0 0 3px rgb(255 170 60 / 0.95));
}

.scene-nozzle {
  position: absolute;
  left: 50%;
  top: 31%;
  width: 5.5%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff1c9;
  box-shadow: 0 0 5px 3px rgb(255 150 40 / 0.95), 0 0 14px 3px rgb(255 120 30 / 0.5);
  opacity: 0;
  translate: -50% -50%;
  pointer-events: none;
}

.scene-part {
  filter: var(--outline-off);
  transition: filter 260ms ease-out;
}

.scene::before {
  content: '';
  position: absolute;
  z-index: 0;
  bottom: -7%;
  left: 50%;
  width: max(88%, 72px);
  height: max(16%, 14px);
  translate: -50% 0;
  background: radial-gradient(closest-side, var(--contact), rgb(0 0 0 / 0));
  transition: opacity 320ms ease-out, transform 320ms ease-out;
}

.scene-tag {
  position: absolute;
  z-index: 50;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 28px);
  padding: 5px 12px 5px 9px;
  background: linear-gradient(170deg, #efd8ad 0%, #ddb880 100%);
  border: 1px solid rgb(118 76 34 / 0.45);
  border-radius: 5px 10px 10px 5px;
  box-shadow: 0 6px 16px rgb(20 8 16 / 0.28), inset 0 1px 0 rgb(255 255 255 / 0.45);
  color: #3b2312;
  font: 650 13px/16px var(--font-sans);
  rotate: 2deg;
  white-space: nowrap;
}

.card .tile.showcase .scene-tag img {
  flex: none;
  width: 18px;
  height: auto;
}

.scene-tag span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.scene-tag-mine {
  background: linear-gradient(170deg, #ffdf86 0%, #e9a42e 100%);
  border-color: rgb(140 90 10 / 0.55);
  color: #3a2208;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover .scene {
    transform: translateY(-6px);
  }

  .card:hover .scene-part {
    filter: var(--outline);
  }

  .card:is([data-state='taken'], [data-state='mine']):hover .scene {
    animation: gift-wobble 700ms ease-in-out;
  }

  .card:hover .scene::before {
    opacity: 0.6;
    transform: translateY(6px) scale(0.9);
  }
}

@media (min-width: 640px) {
  .card {
    flex-basis: calc((100% - 24px) / 2);
  }

  .card > :not(.tile) {
    margin-inline: 20px;
  }

  .badges,
  .tile + .badges:empty + .title {
    margin-top: 20px;
  }

  .card-foot {
    margin-bottom: 24px;
  }

  .card .tile,
  .card .tile.showcase {
    height: 216px;
  }
}

@media (min-width: 1024px) {
  .card {
    flex-basis: calc((100% - 48px) / 3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene,
  .scene::before,
  .scene-part {
    transition: none;
    animation: none !important;
  }
}

.card[data-state='mine'] {
  border-color: var(--mine-gold);
  box-shadow: 0 0 0 1px var(--mine-gold), var(--shadow-card);
}

.card[data-state='mine'] .status-mine {
  background: rgb(242 181 59 / 0.16);
}

.card[data-state='mine'] .status-mine .glyph,
.card[data-state='mine'] .status-mine .overline {
  color: var(--mine-gold);
}

@keyframes gift-wobble {
  20% {
    rotate: -3deg;
  }

  45% {
    rotate: 3deg;
  }

  70% {
    rotate: -1.5deg;
  }
}

[data-group='Sport & Health'] .tile.showcase {
  --spot: rgb(255 236 200 / 0.42);
}

body[data-time='day'] [data-group='Sport & Health'] .tile.showcase {
  --spot: rgb(255 255 255 / 0.95);
}

@media (max-width: 479px) {
  .group-head {
    flex-wrap: wrap;
  }

  .group-head::before,
  .group-head::after {
    display: none;
  }

  .group h2 {
    text-align: center;
  }
}

.card.act-ding .scene-frame,
.card.act-print .scene-frame {
  animation: frame-hold 2.4s ease-in-out;
}

.card.act-ding .scene {
  animation: list-ding 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 1.5s;
}

.card.act-print .scene-print {
  animation: print-layer 2.4s linear;
}

.card.act-print .scene-ghost {
  animation: print-ghost 2.4s linear;
}

.card.act-print .scene-nozzle {
  animation: nozzle-print 2.4s linear;
}

.card.act-print .scene-item {
  animation: list-hum 0.16s linear 0.3s 12;
}

.card.act-glint .scene-frame {
  animation: knife-sharpen 2.3s linear;
}

.card.act-glint .scene-shine {
  animation: shine 0.8s ease-out 2.15s;
}

.card.act-buzz .scene-item {
  animation: list-buzz 0.72s linear 0.2s;
}

.card.act-buzz .scene-frame {
  animation: frame-hold 1.4s ease-in-out;
}

.card.act-buzz [data-sprite='trimmer'] .scene-frame {
  filter: drop-shadow(0 0 6px rgb(74 222 128 / 0.9));
}

.card.act-bounce [data-sprite='ball'] {
  animation: list-hop 1.3s linear;
}

.card.act-glow .scene-part {
  animation: neon 1.8s ease-in-out;
}

.card.act-glow .scene-shine {
  animation: shine 1.1s ease-out 0.35s;
}

.card.act-gleam .scene-item {
  transform-origin: 50% 85%;
  animation: cable-spring 1.6s ease-in-out;
}

.card.act-gleam .scene-shine {
  background-image: linear-gradient(100deg, rgb(255 255 255 / 0) 45%, rgb(255 255 255 / 0.85) 50%, rgb(255 255 255 / 0) 55%);
  animation: shine 1.3s ease-in-out 0.15s;
}

.card.act-drive [data-sprite='vacuum'] {
  animation: list-drive 2.8s ease-in-out;
}

.card.act-drive [data-sprite='vacuum'] .scene-frame {
  animation: frame-hold 2.8s ease-in-out;
}

.card.act-wobble .scene {
  animation: gift-wobble 700ms ease-in-out;
}

@keyframes list-ding {
  30% {
    translate: 0 -6%;
  }

  55% {
    translate: 0 1.5%;
  }

  75% {
    translate: 0 -1%;
  }
}

@keyframes list-hum {
  25% {
    translate: 0.5% 0;
  }

  75% {
    translate: -0.5% 0;
  }
}

@keyframes list-buzz {
  10%,
  30%,
  50%,
  70%,
  90% {
    translate: -2.5% 0;
    rotate: -2deg;
  }

  20%,
  40%,
  60%,
  80% {
    translate: 2.5% 0;
    rotate: 2deg;
  }
}

@keyframes list-hop {
  8% {
    scale: 1.12 0.86;
  }

  30% {
    translate: 0 -140%;
    scale: 0.95 1.06;
  }

  52% {
    translate: 0 0;
    scale: 1.14 0.84;
  }

  70% {
    translate: 0 -55%;
    scale: 1;
  }

  86% {
    translate: 0 0;
    scale: 1.06 0.94;
  }
}

@keyframes list-drive {
  30%,
  38% {
    translate: -45% 4%;
    scale: 1 1;
  }

  44%,
  50% {
    translate: -45% 4%;
    scale: -1 1;
  }

  82% {
    translate: -6% 1%;
    scale: -1 1;
  }

  88% {
    translate: -6% 1%;
    scale: 1 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card[class*='act-'] .scene,
  .card[class*='act-'] .scene * {
    animation: none !important;
  }
}
