@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("../fonts/rubik-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1;
}
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("../fonts/rubik-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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("../fonts/rubik-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;
  /* ground and text */
  --bg: #FAF8FF;
  --card: #FFFFFF;
  --ink: #241E3D;
  --muted: #625A7E;
  /* violet */
  --violet: #6D5BD0;
  --violet-ink: #5443B8;
  --violet-deep: #4A3BA6;
  --violet-blob: #7B6AD8;
  --violet-quote: #5E4CC4;
  --violet-soft: #EEEAFB;
  --violet-soft-2: #ECE8FF;
  --violet-tint: #F2EFFD;
  --violet-line: #E7E1F8;
  --violet-line-2: #DAD3F7;
  --violet-dash: #C9C0F0;
  --violet-deco: #CFC6F2;
  --violet-wave: #B7ADEB;
  --input-line: #E4DEF7;
  --timeline-dot: #D6CEF4;
  /* coral */
  --coral: #E8505B;
  --coral-ink: #B02A37;
  --coral-soft: #FFE4E2;
  --coral-line: #F2CFCC;
  --coral-edge: #EBD3D6;
  --coral-blob: #FFE9E7;
  --coral-photo: #FFD9D6;
  /* sun */
  --sun-soft: #FFF0C7;
  --sun-ink: #8C5B00;
  --sun-line: #F0DEAA;
  /* status */
  --live: #22A06B;
  --live-ink: #137247;
  /* shape */
  --r-card: 24px; --r-card-sm: 20px; --r-row: 22px; --r-tile: 14px; --r-sticker: 20px;
  --r-nav: 26px; --r-pill: 999px;
  --gutter: 20px; --gap: 14px;
  --edge: 0 3px 0 var(--violet-line);
  --lift: 0 3px 0 var(--violet-line), 0 14px 30px -18px rgba(84, 67, 184, .35);
  --nav-h: 66px;
  --font: "Rubik", system-ui, -apple-system, "SF Arabic", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

[hidden] { display: none !important; }

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.35 var(--font);
  font-synthesis: none;
  overflow-x: hidden;
}

:lang(ar) body { line-height: 1.45; }

h1, .display { margin: 0 0 16px; font-size: 32px; line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; }
.display { margin: 8px 0 0; font-size: 35px; line-height: 1.02; }
.display--page { margin: 0; font-size: 32px; line-height: 1.05; }
:lang(ar) h1, :lang(ar) .display { line-height: 1.2; letter-spacing: 0; }
h2 { margin: 0 0 8px; font-size: 17px; line-height: 1.25; font-weight: 700; }

a { color: var(--violet-ink); }
a:hover { color: var(--coral-ink); }

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

.icon { flex: none; }

/* page frame */
.deco {
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  max-width: 430px;
  height: 300px;
  margin-inline: auto;
  overflow: hidden;
  pointer-events: none;
}
.deco__blob { position: absolute; inset-block-start: -70px; inset-inline-end: -80px; }
.deco__blob--coral { inset-block-start: -90px; inset-inline: -70px auto; }
.deco__spark-a { inset-block-start: 28px; inset-inline-end: 128px; }
.deco__spark-b { inset-block-start: 120px; inset-inline-end: 22px; }
.blob, .sparkle { position: absolute; pointer-events: none; }

.page {
  position: relative;
  max-width: 430px;
  margin-inline: auto;
  padding: 20px var(--gutter) calc(var(--nav-h) + 14px + env(safe-area-inset-bottom) + 24px);
  overflow-x: clip;
}

.page-head { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.page-head--spaced { margin-block-start: 14px; }
.page-sub { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.section-title { margin: 22px 0 0; font-size: 17px; }

/* cards */
.card {
  position: relative;
  margin-block-start: var(--gap);
  padding: 14px 16px;
  border-radius: var(--r-card);
  background: var(--card);
  box-shadow: var(--lift);
}
.card--violet { overflow: hidden; background: var(--violet); color: #FFFFFF; box-shadow: 0 3px 0 var(--violet-ink); }
.card--violet a:not(.pill) { color: #FFFFFF; }
.card--violet .blob { inset-inline-end: -26px; inset-block-end: -34px; }
.card--violet > :not(.blob) { position: relative; }

.row-list { display: grid; gap: 10px; margin: var(--gap) 0 0; padding: 0; list-style: none; }
.row-link {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-block-start: 10px;
  padding: 11px 14px;
  border-radius: var(--r-row);
  background: var(--card);
  box-shadow: var(--edge);
  color: var(--ink);
  text-decoration: none;
}
.row-link:hover { color: var(--ink); }
.row-list .row-link { margin: 0; }
.row-link > .icon:last-child { color: var(--muted); }
.row-link__text { flex: 1; min-width: 0; }
.row-link__title { display: block; font-size: 15px; font-weight: 600; line-height: 1.25; }
.row-link__sub { display: block; margin-block-start: 3px; font-size: 13px; color: var(--muted); }
.tile {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-tile);
  transform: rotate(-6deg);
}
.tile--coral { background: var(--coral-soft); color: var(--coral-ink); }
.tile--violet { background: var(--violet-soft-2); color: var(--violet-ink); }
.tile--white { background: #FFFFFF; color: var(--violet-ink); }
.tile--sun { background: var(--sun-soft); color: var(--sun-ink); }

/* buttons */
button, .button, .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding-inline: 22px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--violet);
  color: #FFFFFF;
  box-shadow: 0 3px 0 var(--violet-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button:hover, .pill:hover { color: #FFFFFF; }
.pill--violet { background: var(--violet); color: #FFFFFF; box-shadow: 0 3px 0 var(--violet-ink); }
.pill--white { background: #FFFFFF; color: var(--violet-ink); box-shadow: 0 3px 0 var(--violet-deep); }
.pill--white:hover { color: var(--violet-ink); }
.pill--coral { background: var(--coral-ink); color: #FFFFFF; box-shadow: 0 3px 0 var(--coral-edge); }
.pill--ghost, button.secondary {
  background: var(--violet-tint);
  color: var(--violet-ink);
  border: 2px dashed var(--violet-dash);
  box-shadow: none;
}
.pill--ghost:hover { color: var(--violet-ink); }
.pill--small { min-height: 36px; padding-inline: 16px; font-size: 14px; }
.pill--block { display: flex; width: 100%; margin-block-start: 16px; }
a.pill--small { display: inline-flex; }
button:disabled { opacity: 0.6; cursor: default; }
form button { margin-block-start: 16px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.chip--violet { background: var(--violet-soft); color: var(--violet-ink); }
.chip--coral { background: var(--coral-soft); color: var(--coral-ink); }
.chip--white { background: #FFFFFF; color: var(--muted); }

.sticker {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 78px;
  padding: 4px;
  border: 3px solid #FFFFFF;
  border-radius: var(--r-sticker);
  background: var(--coral-soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
  transform: rotate(var(--tilt, 0deg));
  box-shadow: 0 3px 0 var(--coral-line), 0 10px 18px -12px rgba(176, 42, 55, .5);
}
.sticker .icon { color: var(--coral-ink); width: 24px; height: 24px; }
.sticker--violet { background: var(--violet-soft-2); box-shadow: 0 3px 0 var(--violet-line-2), 0 10px 18px -12px rgba(84, 67, 184, .5); }
.sticker--violet .icon { color: var(--violet-ink); }
.sticker--sun { background: var(--sun-soft); box-shadow: 0 3px 0 var(--sun-line), 0 10px 18px -12px rgba(140, 91, 0, .45); }
.sticker--sun .icon { color: var(--sun-ink); }

.fab {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  min-height: 0;
  padding: 0;
  border: 3px solid #FFFFFF;
  border-radius: var(--r-sticker);
  background: var(--coral-ink);
  color: #FFFFFF;
  transform: rotate(-6deg);
  box-shadow: 0 3px 0 var(--coral-edge), 0 12px 22px -12px rgba(176, 42, 55, .6);
}
.fab .icon { stroke-width: 3; }

/* small parts */
.date-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-inline-size: 42px;
  min-block-size: 48px;
  padding-inline: 6px;
  border-radius: var(--r-tile);
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 2px 0 var(--violet-line);
  white-space: nowrap;
}
.date-chip__day { font-size: 18px; font-weight: 800; line-height: 1; }
.date-chip__month { font-size: 12px; line-height: 1.2; color: var(--muted); }
:lang(ar) .date-chip__month { font-size: 11px; }

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--violet);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
}
.avatar--other { background: var(--coral-ink); }
.avatar--lg { width: 46px; height: 46px; border-radius: 16px; font-size: 18px; }

.badge {
  position: absolute;
  inset-block-start: -2px;
  inset-inline-end: 6px;
  min-width: 16px;
  height: 16px;
  padding-inline: 3px;
  border-radius: var(--r-pill);
  background: var(--coral-ink);
  color: #FFFFFF;
  box-shadow: 0 0 0 2px #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.live-dot {
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  animation: livepulse 2.2s ease-out infinite;
}
@keyframes livepulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 160, 107, .5); }
  70% { box-shadow: 0 0 0 7px rgba(34, 160, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 160, 107, 0); }
}

.here-line { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font-size: 13px; font-weight: 500; color: var(--live-ink); }
.here-line[hidden], .here-dot[hidden] { display: none; }
.us-card__other .here-line { justify-content: flex-end; }
.avatar-wrap { position: relative; flex: none; }
.here-dot {
  position: absolute;
  inset-block-end: -2px;
  inset-inline-end: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 3px #FFFFFF;
}
.chat-head__text { flex: 1; min-width: 0; }
.chat-head__text h1 { margin: 0; }
.chat-head__text .here-line { margin-block-start: 1px; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-block-start: 16px; }
.switch-row__text label { margin-block: 0; }
.switch-row__help { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

/* forms */
label, .field label { display: block; margin-block: 12px 4px; font-size: 14px; font-weight: 600; }

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]), textarea, select {
  width: 100%;
  min-height: 48px;
  padding: 10px 18px;
  border: 2px solid var(--input-line);
  border-radius: var(--r-pill);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  text-align: start;
}
textarea { min-height: 96px; border-radius: var(--r-card-sm); resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--violet); outline-offset: 0; }

.switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: none;
  width: 52px;
  height: 32px;
  margin: 0;
  border: 2px solid var(--muted);
  border-radius: var(--r-pill);
  background: var(--violet-soft);
  cursor: pointer;
  transition: background .15s;
}
.switch::before {
  content: "";
  position: absolute;
  inset-block-start: 3px;
  inset-inline-start: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--muted);
  transition: inset-inline-start .15s, background .15s;
}
.switch:checked { border-color: var(--violet-ink); background: var(--violet-ink); }
.switch:checked::before { inset-inline-start: 23px; background: #FFFFFF; }

.error { margin: 4px 0 0; color: var(--coral-ink); }
.notice { margin-block: var(--gap) 0; padding: 12px 14px; border-radius: 18px; background: var(--violet-soft); color: var(--ink); }
.notice--error { background: var(--coral-soft); color: var(--coral-ink); }

.toast {
  position: fixed;
  inset-block-start: calc(12px + env(safe-area-inset-top));
  inset-inline: 20px;
  z-index: 60;
  max-width: 390px;
  margin-inline: auto;
  padding: 12px 18px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}
.toast[hidden] { display: none; }

.sheet {
  width: 100%;
  max-width: 430px;
  margin-block: auto 0;
  margin-inline: auto;
  padding: 18px var(--gutter) calc(18px + env(safe-area-inset-bottom));
  border: 0;
  border-start-start-radius: var(--r-nav);
  border-start-end-radius: var(--r-nav);
  background: var(--card);
  color: var(--ink);
  animation: sheetup .2s ease-out;
}
.sheet::backdrop { background: rgba(36, 30, 61, .45); }
@keyframes sheetup { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* bottom menu */
.nav {
  position: fixed;
  inset-inline: 12px;
  inset-block-end: calc(14px + env(safe-area-inset-bottom));
  z-index: 40;
  max-width: 406px;
  height: var(--nav-h);
  margin-inline: auto;
  padding-inline: 4px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  border-radius: var(--r-nav);
  background: var(--card);
  box-shadow: var(--edge), 0 16px 30px -16px rgba(84, 67, 184, .45);
}
.nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 56px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}
.nav__item:hover { color: var(--muted); }
.nav__icon { position: relative; display: flex; align-items: center; justify-content: center; width: 48px; height: 28px; border-radius: var(--r-pill); }
.nav__item[aria-current="page"] { color: var(--coral-ink); font-weight: 600; }
.nav__item[aria-current="page"] .nav__icon { background: var(--coral-soft); }
.nav__item[aria-current="page"] .icon { stroke-width: 2.2; }

[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

/* shared small parts */
.muted { color: var(--muted); }
.small { font-size: 14px; }
.retry-note { margin-block-start: 8px; color: var(--muted); font-size: 14px; }
.passkey-button { width: 100%; min-height: 56px; margin-block: 16px; font-size: 17px; }
.backup-code { margin: 8px 0; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 1.25rem; letter-spacing: 0.06em; text-align: center; user-select: all; }
.push-box h2 { margin: 0 0 12px; }
.push-box form button { margin-block-start: 8px; }
.question-text { margin-block: 0 12px; font-size: 19px; font-weight: 600; line-height: 1.3; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-block-start: var(--gap); }
.photos-heading { margin: 20px 0 4px; font-size: 17px; }
.photo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin: 8px 0; padding: 0; list-style: none; }
.photo-list li { display: flex; flex-direction: column; gap: 4px; }
.photo-list img { display: block; width: 100%; aspect-ratio: 1; border-radius: var(--r-tile); background: var(--violet-soft); object-fit: cover; }
.photo-list button { min-height: 44px; margin-block-start: 0; font-size: 14px; }
.photo-list li[data-state="rejected"] .photo-status, .photo-list li[data-state="failed"] .photo-status { color: var(--coral-ink); }
.photo-add { margin-block-start: 8px; cursor: pointer; }
.photo-input:focus-visible + .photo-add { outline: 3px solid var(--violet-ink); outline-offset: 2px; }
.photo-note { margin-block: 8px; color: var(--coral-ink); }

/* home, question page, archive */
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon--back { transform: scaleX(-1); }
[dir="rtl"] .icon--back { transform: none; }

.home-head { align-items: flex-start; }
.home-head .display { text-wrap: balance; }
.home-head .pill { margin-block-start: 10px; }
.pair { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--muted); }
[dir="rtl"] .pair svg, [dir="rtl"] .us-card__art svg { transform: scaleX(-1); }

.us-card__art { position: relative; }
.us-card__art svg { display: block; inline-size: 100%; block-size: auto; }
.us-card__sky { position: absolute; inset-block-start: 61%; inset-inline: 0; margin: 0; font-size: 14px; font-weight: 500; text-align: center; color: var(--muted); }
.us-card__names { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-block-start: 4px; }
.us-card__names strong { display: block; font-size: 17px; font-weight: 700; line-height: 1.25; }
.us-card__sub { display: block; font-size: 13px; color: var(--muted); }
.us-card__other { text-align: end; }

.q-card { padding: 16px 18px; }
.q-card__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.q-card__text { margin: 10px 0 0; font-size: 19px; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
h1.q-card__text { letter-spacing: 0; }
.q-card__bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-block-start: 12px; font-size: 14px; }
.q-status { display: flex; align-items: center; gap: 8px; }
.check-dot { flex: none; display: inline-flex; align-items: center; justify-content: center; inline-size: 22px; block-size: 22px; border-radius: 50%; background: #FFFFFF; color: var(--violet-ink); }
.streak-pill { display: inline-flex; align-items: center; gap: 5px; block-size: 28px; padding-inline: 8px 11px; border-radius: var(--r-pill); background: #FFFFFF; color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; }
.streak-pill .icon { fill: var(--coral); }
.q-best { display: flex; justify-content: space-between; gap: 12px; margin: 8px 4px 0; font-size: 13px; color: var(--muted); }
.q-best strong { color: var(--ink); font-weight: 600; }

.milestone-card { padding-block: 28px; text-align: center; }
.milestone-number { margin: 0; font-size: 56px; font-weight: 800; line-height: 1.1; }
.milestone-text { margin: 4px 0 8px; font-size: 21px; font-weight: 600; }
.milestone-hint { margin: 0; font-size: 14px; }

.answers { display: flex; flex-direction: column; gap: 8px; margin-block-start: 12px; }
.bubble { max-inline-size: 90%; padding: 9px 14px; border-radius: 18px; background: var(--bg); box-shadow: 0 2px 0 var(--violet-line); color: var(--ink); }
.bubble--mine { align-self: flex-end; background: var(--violet-soft); box-shadow: none; border-end-end-radius: 6px; }
.bubble--theirs { align-self: flex-start; border-end-start-radius: 6px; }
.card--violet .bubble--theirs { background: #FFFFFF; box-shadow: none; }
.bubble__who { margin: 0 0 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.bubble__text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

.card > .notice:first-child { margin-block-start: 0; }
.card form + .notice { margin-block-start: 14px; }
.archive-item__head { display: flex; align-items: flex-start; gap: 12px; }
.archive-item__head .date-chip { flex: none; background: var(--bg); }
.archive-item .question-text { margin: 0; padding-block-start: 2px; font-size: 17px; }
.archive-item .notice { margin-block: 12px; }

.otd-card { display: flex; gap: 14px; padding: 12px; color: var(--ink); text-decoration: none; }
.otd-card:hover { color: var(--ink); }
.otd-card__photo {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  inline-size: 104px;
  block-size: 154px;
  overflow: hidden;
  border: 3px solid #FFFFFF;
  border-radius: 18px;
  background-color: var(--coral-photo);
  background-image: radial-gradient(rgba(176, 42, 55, .16) 1.5px, transparent 1.7px);
  background-size: 12px 12px;
  transform: rotate(-3deg);
  box-shadow: 0 6px 14px -8px rgba(176, 42, 55, .5);
}
.otd-card__photo img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
.otd-card__body { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.otd-card__text {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-block-start: 4px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.otd-card__date { margin-block-start: auto; font-size: 13px; color: var(--muted); }

/* dates, settings, sign-in and the other pages without a menu */
.since-card { padding: 18px 20px; }
.since-card__count { margin: 0; font-size: 28px; line-height: 1.1; font-weight: 800; }
.since-card__date { margin: 6px 0 0; font-size: 14px; }
.row-link .chip { flex: none; }
.card + .row-link { margin-block-start: var(--gap); }
ul.row-list > .notice { margin: 0; }

.auth { padding-block-start: 5vh; text-align: center; }
.auth h1 { margin-block: 0 8px; }
.auth .card { margin-block: 20px; text-align: start; }
.hero-art svg { display: block; margin-inline: auto; }
.lang-toggle { display: flex; justify-content: center; gap: 10px; margin-block-start: 28px; }
.lang-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 18px;
  border-radius: var(--r-pill);
  background: var(--violet-soft);
  color: var(--violet-ink);
  font-weight: 600;
  text-decoration: none;
}
.lang-chip:hover { color: var(--violet-ink); }
.lang-chip[aria-current] { background: var(--violet-ink); color: #FFFFFF; }
.lang-chip[aria-current]:hover { color: #FFFFFF; }
.welcome-intro { margin-block: 4px 0; text-align: center; }
.steps { counter-reset: step; list-style: none; }
.steps li { display: flex; align-items: flex-start; gap: 12px; margin-block: 10px; counter-increment: step; }
.steps li::before {
  content: counter(step);
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--violet-soft);
  color: var(--violet-ink);
  font-weight: 700;
}
.copy-field { margin-block-start: 12px; }

/* nudges */
.nudges { margin-block-start: var(--gap); }
.nudges__title { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
.nudge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.nudge-form { margin: 0; }
.nudge-form .sticker { inline-size: 100%; margin: 0; padding: 4px; cursor: pointer; }
.nudge-grid > :nth-child(1) .sticker { --tilt: -4deg; }
.nudge-grid > :nth-child(2) .sticker { --tilt: 3deg; }
.nudge-grid > :nth-child(3) .sticker { --tilt: -2deg; }
.nudge-grid > :nth-child(4) .sticker { --tilt: 4deg; }
.sticker--sent { animation: stickerbounce .45s ease-out; }
@keyframes stickerbounce {
  0%, 100% { transform: rotate(var(--tilt, 0deg)) scale(1); }
  40% { transform: rotate(var(--tilt, 0deg)) scale(1.14); }
}
.sheet-title { margin: 0 0 12px; font-size: 18px; font-weight: 700; }
.sheet .nudge-grid { margin-block-end: 14px; }

.nudge-pop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  pointer-events: none;
  animation: nudgefade .5s ease-in 2.2s forwards;
}
.nudge-pop__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 128px;
  height: 128px;
  border: 4px solid #FFFFFF;
  border-radius: 40px;
  background: var(--coral-soft);
  color: var(--coral-ink);
  box-shadow: 0 4px 0 var(--coral-line), 0 22px 40px -18px rgba(84, 67, 184, .55);
  animation: pop .6s cubic-bezier(.3, 1.4, .5, 1) both;
}
.nudge-pop__icon .icon { width: 72px; height: 72px; stroke-width: 1.8; }
.nudge-pop p {
  margin: 0;
  max-width: 300px;
  padding: 8px 18px;
  border-radius: var(--r-pill);
  background: var(--card);
  box-shadow: var(--edge);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  animation: pop .6s .1s cubic-bezier(.3, 1.4, .5, 1) both;
}
.nudge-pop__heart { position: absolute; inset-block-start: 52%; opacity: 0; animation: heartfloat 1.8s ease-out .3s forwards; }
.nudge-pop__heart:nth-of-type(1) { inset-inline-start: 38%; }
.nudge-pop__heart:nth-of-type(2) { inset-inline-start: 50%; animation-delay: .55s; }
.nudge-pop__heart:nth-of-type(3) { inset-inline-start: 60%; animation-delay: .8s; }
.nudge-pop__heart .icon { fill: var(--coral); }
@keyframes pop {
  0% { transform: scale(.6); opacity: 0; }
  70% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes heartfloat {
  0% { transform: translateY(0) scale(.8); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(-130px) scale(1.15); opacity: 0; }
}
@keyframes nudgefade { to { opacity: 0; } }

/* Moving between screens: the old screen fades away, the new one rises in, and the menu stays in place.
   iPhones on iOS 18.2+ do this between pages. Older ones get only a fade-in of the new page. */
@view-transition { navigation: auto; }
.nav { view-transition-name: nav; }
::view-transition-old(root) { animation: screenout .16s ease-in both; }
::view-transition-new(root) { animation: screenin .3s cubic-bezier(.2, .8, .2, 1) both; }
::view-transition-group(nav) { animation-duration: .3s; }
@supports not (view-transition-name: none) {
  .page { animation: pagein .3s ease-out both; }
}
@keyframes pagein { from { opacity: 0; } }
@keyframes screenout { to { opacity: 0; } }
@keyframes screenin { from { opacity: 0; transform: translateY(12px); } }
a, button { -webkit-tap-highlight-color: transparent; }
.nav__icon { transition: transform .12s ease-out, background .2s; }
.nav__item:active .nav__icon { transform: scale(.9); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
}

/* next visit badge on Home (not a nudge sticker) */
.visit-badge {
  flex: none; box-sizing: border-box; inline-size: 86px; block-size: 86px; margin-block-start: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  border-radius: 50%; border: 3px solid #FFFFFF; background: var(--coral-ink); color: #FFFFFF;
  box-shadow: 0 3px 0 var(--coral-edge), 0 12px 22px -12px rgba(176, 42, 55, .6);
  transform: rotate(8deg); text-decoration: none;
}
[dir="rtl"] .visit-badge { transform: rotate(-8deg); }
.visit-badge__small { max-inline-size: 64px; font-size: 12px; font-weight: 500; line-height: 1.1; }
.visit-badge__big { font-size: 30px; font-weight: 800; line-height: 1; }
.visit-badge__big--word { font-size: 20px; line-height: 1.1; padding-inline: 6px; }

/* Radio choices (games, the date form) */
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  margin-block: 8px;
  padding: 8px 14px;
  border: 2px solid var(--input-line);
  border-radius: 18px;
  background: var(--card);
  font-weight: 500;
  cursor: pointer;
}
.choice input[type="radio"] { flex: none; width: 22px; height: 22px; accent-color: var(--violet-ink); }
.choice:has(input:checked) { border-color: var(--violet); background: var(--violet-tint); box-shadow: 0 3px 0 var(--violet-line); }
.choice:has(input:focus-visible) { outline: 3px solid var(--violet-ink); outline-offset: 2px; }
.for-whom { min-width: 0; margin: 12px 0 0; padding: 0; border: 0; }
.for-whom legend { padding: 0; font-weight: 600; }
.fav-list dl { margin: 0; }
.fav-list dt { margin-block-start: 14px; font-weight: 600; color: var(--violet-ink); }
.fav-list dt:first-child { margin-block-start: 0; }
.fav-list dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.budget-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.budget-row > div { min-width: 0; }
.gift-batch__title { margin: 0; font-size: 20px; }
.gift-list { margin: 12px 0 0; padding-inline-start: 22px; }
.gift-list li { margin-block-end: 14px; overflow-wrap: anywhere; }
.gift-list p { margin: 2px 0; }
.gift-list__what { font-weight: 600; }
.gift-list__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); }
