/* ---------------------------------------------------------------------------
   Love Rose Abverkauf
   Same brand tokens and fonts as the Love Rose Hub, turned up to rose: blush
   surfaces, berry for everything that can be tapped, Didot for every emphasis
   (Gotham ships in one weight, so nothing here relies on a synthesised bold).
--------------------------------------------------------------------------- */

@font-face {
  font-family: 'Gotham';
  src: url('/fonts/gotham-book.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Didot';
  src: url('/fonts/didot-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Fallbacks until/unless the licensed fonts load. */
@font-face {
  font-family: 'GFS Didot';
  src: url('/fonts/gfsdidot-latin-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --blush: #fdeff2;
  --petal: #fbdde4;
  --pink: #f8c4cf;
  --rose: #cf788b;
  --berry: #8f485a;
  --berry-deep: #7d3b4d;
  --plum: #4a1f2e;
  --plum-soft: rgba(74, 31, 46, 0.66);
  --white: #ffffff;
  --gold: #e2c17a;
  --gold-deep: #b98d3a;
  --silver: #e3dde1;
  --silver-deep: #a39aa1;
  --bronze: #eab39c;
  --bronze-deep: #b0705a;
  --error: #9c2f3f;

  --font-display: 'Didot', 'GFS Didot', Georgia, serif;
  --font-body: 'Gotham', 'Montserrat', system-ui, sans-serif;

  --shadow-soft: 0 1px 2px rgba(143, 72, 90, 0.08), 0 10px 26px rgba(143, 72, 90, 0.14);
  --shadow-lift: 0 2px 4px rgba(143, 72, 90, 0.12), 0 18px 40px rgba(143, 72, 90, 0.24);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--rose) 65%, #ffffff) transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--blush);
  color: var(--plum);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Rose glow that stays put while the page scrolls (a fixed layer instead of
   background-attachment: fixed, which iOS ignores). */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(46rem 30rem at 108% -8%, #ffd3dd 0%, rgba(255, 211, 221, 0) 62%),
    radial-gradient(40rem 28rem at -18% 104%, var(--pink) 0%, rgba(248, 196, 207, 0) 64%),
    radial-gradient(30rem 22rem at 50% 38%, #ffffff 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

h1,
h2,
p,
ul,
ol {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-synthesis: none;
  line-height: 1.08;
}

button,
input {
  font: inherit;
  color: inherit;
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.app {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 20px 18px calc(36px + env(safe-area-inset-bottom));
}

.app[data-view='highscore'] {
  width: min(100%, 720px);
}

.petals {
  position: fixed;
  inset: 0;
  z-index: 50;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.fatal,
.noscript {
  padding: 48px 20px;
  text-align: center;
}

/* --- buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  letter-spacing: 0.02em;
  transition: background-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.55;
  cursor: progress;
}

.btn--primary {
  background: linear-gradient(180deg, #a2586b 0%, var(--berry) 100%);
  box-shadow: 0 10px 22px rgba(143, 72, 90, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: var(--white);
}

.btn--primary:hover:not(:disabled) {
  background: linear-gradient(180deg, var(--berry) 0%, var(--berry-deep) 100%);
}

.btn--quiet {
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(143, 72, 90, 0.35);
  color: var(--berry);
}

.btn--quiet:hover {
  background: rgba(255, 255, 255, 0.7);
}

.btn--wide {
  width: 100%;
}

/* Destructive actions (reset page): a red that still belongs to the rose family. */
.btn--danger {
  background: linear-gradient(180deg, #b43f52 0%, var(--error) 100%);
  box-shadow: 0 10px 22px rgba(156, 47, 63, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: var(--white);
}

.btn--danger:hover:not(:disabled) {
  background: linear-gradient(180deg, var(--error) 0%, #84232f 100%);
}

.btn--danger:focus-visible {
  outline-color: var(--error);
}

.btn--big {
  min-height: 68px;
  padding: 16px 36px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0;
}

.btn--remove {
  min-height: 42px;
  padding: 6px 18px;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(156, 47, 63, 0.4);
  color: var(--error);
}

.btn--remove:hover:not(:disabled) {
  background: rgba(156, 47, 63, 0.08);
}

.btn--board {
  min-height: 46px;
  padding: 8px 18px 8px 14px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  color: var(--berry);
}

.btn--board svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--gold-deep);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link {
  padding: 6px 2px;
  border: 0;
  background: none;
  color: var(--berry);
  text-decoration: underline;
  text-decoration-color: rgba(143, 72, 90, 0.45);
  text-underline-offset: 3px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-left: -8px;
  padding: 6px 12px 6px 8px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--berry);
}

.back::before {
  content: '';
  width: 9px;
  height: 9px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.back:hover {
  background: rgba(255, 255, 255, 0.6);
}

a.back {
  text-decoration: none;
}

.form-error {
  color: var(--error);
  font-size: 15px;
}

/* --- start --------------------------------------------------------------- */

.start {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100dvh - 76px);
  padding-top: clamp(12px, 6vh, 56px);
  text-align: center;
}

/* Love Rose – Your Beauty Time, redrawn as a vector in the colours of this page. */
.start__logo {
  width: min(62vw, 250px);
  height: auto;
}

.start__title {
  margin-top: 26px;
  font-size: clamp(58px, 17vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.01em;
  color: var(--plum);
}

.start__date {
  margin-top: 14px;
  color: var(--plum-soft);
}

.start__choices {
  display: grid;
  gap: 14px;
  width: min(100%, 420px);
  margin-top: clamp(28px, 6vh, 48px);
}

.choice {
  display: grid;
  gap: 2px;
  padding: 20px 24px 21px;
  border: 0;
  border-radius: 26px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  text-align: left;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.choice:hover {
  box-shadow: var(--shadow-lift);
}

.choice:active {
  transform: scale(0.985);
}

.choice__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 27px;
  line-height: 1.15;
  color: var(--berry);
}

.choice__text {
  color: var(--plum-soft);
}

.choice--primary {
  background: linear-gradient(160deg, #a85d70 0%, var(--berry) 55%, var(--berry-deep) 100%);
  box-shadow: 0 16px 34px rgba(143, 72, 90, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.choice--primary .choice__title {
  color: var(--white);
}

.choice--primary .choice__text {
  color: rgba(255, 255, 255, 0.84);
}

.start__team {
  min-height: 24px;
  margin-top: 22px;
  color: var(--berry);
}

.start__roses {
  width: 120px;
  height: auto;
  margin-top: auto;
  padding-top: 20px;
}

/* --- join ---------------------------------------------------------------- */

.join {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.join .back {
  align-self: flex-start;
}

.join__roses {
  width: 110px;
  height: auto;
  margin-top: clamp(12px, 6vh, 48px);
}

.join__title {
  margin-top: 14px;
  font-size: clamp(40px, 11vw, 54px);
}

.join__text {
  margin-top: 10px;
  color: var(--plum-soft);
}

/* Shown after the server dropped this name (reset or deletion). */
.join__notice {
  max-width: 400px;
  margin-top: 18px;
  padding: 12px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 0 0 1px rgba(207, 120, 139, 0.35);
  color: var(--berry);
}

.join__form {
  display: grid;
  gap: 14px;
  width: min(100%, 400px);
  margin-top: 28px;
}

.field {
  width: 100%;
  min-height: 60px;
  padding: 12px 22px;
  border: 1.5px solid rgba(207, 120, 139, 0.5);
  border-radius: 999px;
  background: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  text-align: center;
  color: var(--plum);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field::placeholder {
  color: rgba(143, 72, 90, 0.4);
}

.field:focus-visible {
  outline: none;
  border-color: var(--berry);
  box-shadow: 0 0 0 4px rgba(207, 120, 139, 0.25);
}

/* --- sell ---------------------------------------------------------------- */

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

.sell__who {
  min-width: 0;
}

.sell__hello {
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
  text-overflow: ellipsis;
  color: var(--berry);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chip {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 0 0 1px rgba(207, 120, 139, 0.3);
  font-size: 14px;
  color: var(--plum);
}

.chip--place {
  background: var(--berry);
  box-shadow: none;
  color: var(--white);
}

.sell__question {
  margin: 28px 0 16px;
  font-size: clamp(30px, 8.4vw, 40px);
}

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

@media (min-width: 520px) {
  .products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.product {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 104px;
  padding: 16px 8px;
  border: 0;
  border-radius: 22px;
  background: linear-gradient(170deg, var(--white) 0%, #fff4f6 100%);
  box-shadow: var(--shadow-soft), inset 0 0 0 1px rgba(255, 255, 255, 0.9);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

/* Four shades of rose take turns, so the grid reads as a bouquet rather than a table. */
.product:nth-child(4n + 2) {
  background: linear-gradient(170deg, #fff6f8 0%, #fde6ec 100%);
}

.product:nth-child(4n + 3) {
  background: linear-gradient(170deg, #ffeef2 0%, var(--petal) 100%);
}

.product:nth-child(4n + 4) {
  background: linear-gradient(170deg, #fde3ea 0%, #f9cdd7 100%);
}

.product:hover {
  box-shadow: var(--shadow-lift), inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.product:active {
  transform: scale(0.96);
}

/* Product picture as a small icon above the name. */
.product__icon {
  flex: none;
  width: 68px;
  height: 68px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(207, 120, 139, 0.22), 0 6px 14px rgba(143, 72, 90, 0.16);
}

.product__icon img,
.sheet__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product__name {
  font-family: var(--font-display);
  font-weight: 700;
  /* scales with the tile, so long single words ("Reinigungsroutine") stay on one line on small phones */
  font-size: clamp(15px, 4.4vw, 18px);
  line-height: 1.2;
  text-align: center;
  text-wrap: balance;
  overflow-wrap: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
  max-width: 100%;
  color: var(--plum);
}

.product__count {
  position: absolute;
  top: -6px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--berry);
  box-shadow: 0 0 0 3px var(--blush);
  font-size: 14px;
  color: var(--white);
}

.recent {
  margin-top: 34px;
}

.recent__title {
  font-size: 22px;
  color: var(--berry);
}

.recent__list {
  margin-top: 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(207, 120, 139, 0.22);
}

.recent__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 4px 16px;
}

.recent__item + .recent__item {
  border-top: 1px solid rgba(207, 120, 139, 0.2);
}

.recent__time {
  font-variant-numeric: tabular-nums;
  color: var(--plum-soft);
}

.recent__what {
  overflow-wrap: anywhere;
}

.sell__switch {
  margin-top: 30px;
  text-align: center;
  font-size: 15px;
  color: var(--plum-soft);
}

/* --- highscore ----------------------------------------------------------- */

.board {
  text-align: center;
}

.board__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.board__logo {
  width: 50px;
  height: auto;
  filter: invert(31%) sepia(18%) saturate(1560%) hue-rotate(293deg) brightness(92%) contrast(88%);
}

.board__title {
  margin-top: 4px;
  font-size: clamp(50px, 14vw, 84px);
  line-height: 1;
  color: var(--plum);
}

.board__team {
  min-height: 24px;
  margin-top: 10px;
  color: var(--berry);
}

.segmented {
  position: relative;
  z-index: 1;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 18px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px rgba(207, 120, 139, 0.28);
}

.segmented button {
  position: relative;
  min-height: 40px;
  padding: 6px 20px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--berry);
  transition: background-color 140ms ease, color 140ms ease;
}

.segmented button[aria-pressed='true'] {
  background: var(--berry);
  color: var(--white);
}

/* Countdown until the ranking switches to the other sorting. */
.segmented__fill {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.8);
  transform-origin: left;
  animation: segment-countdown 8s linear both;
}

.podium {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  max-width: 480px;
  margin: 22px auto 0;
  padding-top: 44px;
}

/* Light rays behind the winner. */
.podium::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 30%;
  width: 400px;
  height: 400px;
  margin: -200px 0 0 -200px;
  /* purely decorative and larger than the podium: must never catch taps meant for the sort buttons */
  pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.85) 0deg 7deg, rgba(255, 255, 255, 0) 7deg 20deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.55) 30%, transparent 64%);
  mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.55) 30%, transparent 64%);
}

.slot {
  --block: 64px;
  --medal-light: var(--bronze);
  --medal-deep: var(--bronze-deep);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.slot[data-place='2'] {
  --block: 92px;
  --medal-light: var(--silver);
  --medal-deep: var(--silver-deep);
}

.slot[data-place='1'] {
  --block: 128px;
  --medal-light: var(--gold);
  --medal-deep: var(--gold-deep);
}

.crown {
  position: absolute;
  z-index: 2;
  top: -31px;
  left: 50%;
  width: 42px;
  height: 30px;
  margin-left: -21px;
  fill: var(--gold);
  stroke: var(--gold-deep);
  stroke-width: 1;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 6px rgba(185, 141, 58, 0.45));
  transform: rotate(-8deg);
}

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--medal-light), var(--medal-deep));
  box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--medal-light), 0 10px 22px rgba(74, 31, 46, 0.22);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  color: var(--white);
  text-shadow: 0 1px 2px rgba(74, 31, 46, 0.35);
}

.slot[data-place='1'] .avatar {
  width: 76px;
  height: 76px;
  font-size: 27px;
}

.avatar__me,
.rank__me {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--berry);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.4;
  color: var(--white);
  text-shadow: none;
}

.avatar__me {
  position: absolute;
  bottom: -9px;
  left: 50%;
  box-shadow: 0 0 0 2px var(--white);
  transform: translateX(-50%);
}

.slot__name {
  max-width: 100%;
  margin-top: 14px;
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.15;
  /* first and last name: up to three lines instead of cutting the surname off */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.slot[data-place='1'] .slot__name {
  font-size: 20px;
}

.slot__value {
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
  color: var(--berry);
}

.slot__sub {
  min-height: 20px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--plum-soft);
}

.slot__block {
  display: grid;
  place-items: start center;
  width: 100%;
  height: var(--block);
  margin-top: 8px;
  padding-top: 8px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(180deg, var(--white) 0%, rgba(255, 255, 255, 0.35) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), inset 0 4px 0 var(--medal-light);
}

.slot__place {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.1;
  color: var(--medal-deep);
}

.slot--empty .avatar {
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 0 2px rgba(207, 120, 139, 0.3);
  color: rgba(143, 72, 90, 0.5);
  text-shadow: none;
}

.slot--empty .slot__name,
.slot--empty .slot__value {
  color: var(--plum-soft);
}

.ranks {
  max-width: 480px;
  margin: 0 auto;
  border-radius: 0 0 20px 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(207, 120, 139, 0.22);
  text-align: left;
}

.podium[hidden] + .ranks {
  margin-top: 22px;
  border-radius: 20px;
}

.rank {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  grid-template-areas: 'place name value' 'place name sub';
  align-items: center;
  column-gap: 10px;
  min-height: 60px;
  padding: 8px 16px;
}

.rank + .rank {
  border-top: 1px solid rgba(207, 120, 139, 0.2);
}

.rank--me {
  background: rgba(248, 196, 207, 0.4);
}

.rank__place {
  grid-area: place;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  text-align: center;
  color: var(--berry);
}

.rank__name {
  grid-area: name;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.2;
}

.rank__value {
  grid-area: value;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--berry);
}

.rank__sub {
  grid-area: sub;
  text-align: right;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--plum-soft);
}

.rank__sub:empty {
  display: none;
}

.rank__value:has(+ .rank__sub:empty) {
  grid-row: 1 / -1;
  color: var(--plum-soft);
}

.board__empty {
  max-width: 360px;
  margin: 34px auto 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.25;
  color: var(--berry);
}

.board .btn--wide {
  max-width: 400px;
  margin-top: 30px;
}

.board__note {
  max-width: 400px;
  margin: 18px auto 0;
  font-size: 14px;
  color: var(--plum-soft);
}

/* Big screen next to the till: let the board breathe. */
@media (min-width: 900px) {
  .podium,
  .ranks {
    max-width: 600px;
  }

  .slot__name {
    font-size: 22px;
  }

  .slot[data-place='1'] .slot__name {
    font-size: 27px;
  }

  .slot__value,
  .rank__value {
    font-size: 19px;
  }
}

/* --- reset page (/reset-req) --------------------------------------------- */

.reset {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.reset .back {
  align-self: flex-start;
}

.reset__title {
  margin-top: clamp(16px, 7vh, 64px);
  font-size: clamp(40px, 11vw, 56px);
}

.reset__text {
  max-width: 380px;
  margin-top: 12px;
  color: var(--plum-soft);
}

.reset .btn--big {
  margin-top: clamp(28px, 7vh, 56px);
}

.reset .form-error {
  margin-top: 16px;
}

.people {
  width: 100%;
  margin-top: clamp(40px, 9vh, 72px);
  text-align: left;
}

.people__title {
  font-size: 24px;
  color: var(--berry);
}

.people__empty {
  margin-top: 10px;
  color: var(--plum-soft);
}

.people__list {
  margin-top: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(207, 120, 139, 0.22);
}

.people__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 10px 14px 10px 18px;
}

.people__row + .people__row {
  border-top: 1px solid rgba(207, 120, 139, 0.2);
}

.people__who {
  display: grid;
  min-width: 0;
}

.people__name {
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.2;
}

.people__sum {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--plum-soft);
}

/* --- dialogs ------------------------------------------------------------- */

dialog {
  border: 0;
  padding: 0;
  color: var(--plum);
}

dialog::backdrop {
  background: rgba(74, 31, 46, 0.5);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.sheet {
  width: 100%;
  max-width: 480px;
  max-height: 100dvh;
  margin: auto auto 0;
  border-radius: 30px 30px 0 0;
  background:
    radial-gradient(120% 60% at 50% 0%, var(--white) 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, var(--blush) 0%, var(--petal) 100%);
  box-shadow: 0 -20px 60px rgba(74, 31, 46, 0.35);
}

.sheet[open] {
  animation: sheet-up 260ms cubic-bezier(0.2, 0.9, 0.25, 1) both;
}

@media (min-width: 560px) {
  .sheet {
    margin: auto;
    border-radius: 30px;
  }
}

.sheet__form {
  display: grid;
  justify-items: center;
  padding: 26px 22px calc(22px + env(safe-area-inset-bottom));
  text-align: center;
}

.sheet__image {
  width: 96px;
  height: 96px;
  margin-bottom: 14px;
  border-radius: 26px;
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(207, 120, 139, 0.22), 0 10px 22px rgba(143, 72, 90, 0.2);
}

.sheet__lead {
  color: var(--plum-soft);
}

.sheet__title {
  margin-top: 4px;
  font-size: clamp(28px, 8vw, 36px);
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.stepper {
  display: grid;
  grid-template-columns: 68px minmax(0, 132px) 68px;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.stepper__btn {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  color: var(--berry);
  transition: transform 120ms ease;
}

.stepper__btn:active:not(:disabled) {
  transform: scale(0.92);
}

.stepper__btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.stepper__btn svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.stepper__value {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: none;
  font-family: var(--font-display);
  font-weight: 700;
  height: 92px;
  font-size: 76px;
  line-height: 92px;
  text-align: center;
  color: var(--plum);
  -moz-appearance: textfield;
  appearance: textfield;
}

.stepper__value::-webkit-outer-spin-button,
.stepper__value::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.sheet__unit {
  color: var(--plum-soft);
}

.sheet .form-error {
  margin-top: 14px;
}

.sheet__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 10px;
  width: 100%;
  margin-top: 24px;
}

.ask {
  width: min(calc(100% - 36px), 400px);
  padding: 28px 24px 22px;
  border-radius: 28px;
  background: linear-gradient(180deg, var(--white) 0%, var(--blush) 100%);
  box-shadow: 0 30px 80px rgba(74, 31, 46, 0.4);
  text-align: center;
}

.ask__title {
  font-size: 28px;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.ask__text {
  margin-top: 10px;
  color: var(--plum-soft);
}

.ask__actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

/* --- toast & offline ----------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  max-width: calc(100% - 28px);
  padding: 12px 14px 12px 20px;
  border-radius: 999px;
  background: var(--plum);
  box-shadow: 0 14px 34px rgba(74, 31, 46, 0.4);
  color: var(--white);
  transform: translateX(-50%);
  animation: toast-in 220ms cubic-bezier(0.2, 0.9, 0.25, 1) both;
}

.toast__action {
  flex: none;
  min-height: 36px;
  padding: 4px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--pink);
  color: var(--plum);
}

.toast :focus-visible {
  outline-color: var(--white);
}

.offline {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top));
  left: 50%;
  z-index: 55;
  width: max-content;
  max-width: calc(100% - 28px);
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--shadow-lift);
  font-size: 14px;
  color: var(--error);
  transform: translateX(-50%);
}

@keyframes segment-countdown {
  from {
    transform: scaleX(0);
  }
}

@keyframes sheet-up {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
}

@keyframes toast-in {
  from {
    transform: translate(-50%, 16px);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
