/* Trash Tax — playful, chunky, mobile-first. Palette per SPEC §6. */

@font-face {
  font-family: 'Nunito';
  src: url('/fonts/nunito-latin-wght.woff2') format('woff2');
  font-weight: 600 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fff8ec;
  --ink: #2b2d42;
  --muted: #8d8fa3;
  --muted-d: #6b6d82;
  --green: #34c46a;
  --green-d: #24964f;
  --teal: #1fb6c1;
  --teal-d: #148a93;
  --gold: #ffc93c;
  --gold-d: #e0a800;
  --coral: #ff6b5e;
  --coral-d: #d94c40;
  --purple: #8b6cf6;
  --purple-d: #6a4ed6;
  --stink: #a3d65c;
  --grey: #e6e6e6;
  --grey-d: #c9c9c9;
  --card: #ffffff;
  --line: #f1e5cd;
  --line-d: #e6d6b6;
  --field: #f7f5f0;
  --font: 'Nunito', ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --soft-bounce: cubic-bezier(0.3, 1.3, 0.6, 1);
  --sa-t: env(safe-area-inset-top, 0px);
  --sa-r: env(safe-area-inset-right, 0px);
  --sa-b: env(safe-area-inset-bottom, 0px);
  --sa-l: env(safe-area-inset-left, 0px);
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: manipulation;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

html.has-sheet,
html.has-sheet body {
  overflow: hidden;
}

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

button {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

[hidden] {
  display: none !important;
}

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

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

.muted {
  color: var(--muted-d);
}

/* ------------------------------------------------------------------ layout */

#app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: calc(var(--sa-t) + 10px) calc(var(--sa-r) + 20px) calc(var(--sa-b) + 18px) calc(var(--sa-l) + 20px);
}

.screen-enter {
  animation: screen-in 0.45s var(--soft-bounce) both;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
}

.topbar-spacer,
.icon-btn-spacer {
  flex: 1;
}

.icon-btn-spacer {
  flex: 0 0 44px;
}

.center-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 8px 0;
}

.foot {
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.stack {
  display: flex;
  flex-direction: column;
}

/* ------------------------------------------------------------------ type */

.headline {
  font-size: clamp(26px, 7.4vw, 32px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.lede {
  color: var(--muted-d);
  font-size: 17px;
  max-width: 340px;
}

/* Animated text (captions, titles). Words never break internally. */
.pop-text .pt-word {
  display: inline-block;
  white-space: nowrap;
}

.pop-text .pt-ch {
  display: inline-block;
  animation: pt-pop 0.55s var(--bounce) both;
  animation-delay: calc(var(--d0, 0ms) + var(--i) * var(--step, 28ms));
}

.pop-text.pt-wave .pt-ch {
  animation: pt-pop 0.55s var(--bounce) both, pt-wave 3.4s ease-in-out infinite;
  animation-delay: calc(var(--d0, 0ms) + var(--i) * var(--step, 28ms)), calc(var(--d0, 0ms) + var(--n) * var(--step, 28ms) + 700ms + var(--i) * 70ms);
}

@keyframes pt-pop {
  0% {
    opacity: 0;
    transform: translateY(0.5em) scale(0.3) rotate(-14deg);
  }
  55% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes pt-wave {
  0%,
  55%,
  100% {
    transform: none;
  }
  25% {
    transform: translateY(-0.09em) rotate(-3deg);
  }
}

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

.btn {
  --c: var(--teal);
  --d: var(--teal-d);
  --fg: #fff;
  --lift: 5px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 12px 20px;
  margin-bottom: var(--lift);
  border: 0;
  border-radius: 16px;
  background: var(--c);
  color: var(--fg);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 var(--lift) 0 var(--d);
  transition:
    transform 0.09s ease,
    box-shadow 0.09s ease,
    background-color 0.25s ease,
    color 0.25s ease,
    filter 0.15s;
}

.btn:active:not(:disabled):not(.is-disabled) {
  transform: translateY(var(--lift));
  box-shadow: 0 0 0 var(--d);
}

@media (hover: hover) {
  .btn:hover:not(:disabled):not(.is-disabled) {
    filter: brightness(1.05);
  }
}

.btn .icon {
  width: 22px;
  height: 22px;
  flex: none;
}

.btn-teal {
  --c: var(--teal);
  --d: var(--teal-d);
}
.btn-green {
  --c: var(--green);
  --d: var(--green-d);
}
.btn-gold {
  --c: var(--gold);
  --d: var(--gold-d);
  --fg: var(--ink);
}
.btn-coral {
  --c: var(--coral);
  --d: var(--coral-d);
}
.btn-purple {
  --c: var(--purple);
  --d: var(--purple-d);
}
.btn-white {
  --c: #fff;
  --d: var(--grey-d);
  --fg: var(--ink);
  box-shadow:
    inset 0 0 0 2px var(--grey),
    0 var(--lift) 0 var(--d);
}
.btn-white:active:not(:disabled) {
  box-shadow:
    inset 0 0 0 2px var(--grey),
    0 0 0 var(--d);
}
.btn-grey,
.btn:disabled {
  --c: var(--grey);
  --d: var(--grey-d);
  --fg: var(--muted-d);
  cursor: default;
}

.btn-lg {
  min-height: 60px;
  font-size: 19px;
  border-radius: 18px;
}

.btn-big {
  --lift: 6px;
  min-height: 76px;
  padding: 14px 22px;
  font-size: 24px;
  font-weight: 900;
  border-radius: 22px;
}

.btn-sm {
  --lift: 4px;
  width: auto;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 15px;
  border-radius: 12px;
}

.btn.is-busy {
  pointer-events: none;
  filter: saturate(0.85) brightness(0.97);
}

.btn.is-busy .btn-label::after {
  content: '';
  display: inline-block;
  width: 0.9em;
  text-align: left;
  animation: dots 1s steps(4) infinite;
}

@keyframes dots {
  0% {
    content: '';
  }
  25% {
    content: '.';
  }
  50% {
    content: '..';
  }
  75% {
    content: '...';
  }
}

.btn-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-row {
  display: flex;
  gap: 10px;
}

.btn-row .btn {
  flex: 1;
  padding-left: 10px;
  padding-right: 10px;
}

.link {
  background: none;
  border: 0;
  color: var(--teal-d);
  font-weight: 800;
  font-size: 15px;
  min-height: 40px;
  padding: 8px 10px;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.icon-btn {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 3px 0 var(--line-d);
  cursor: pointer;
  transition: transform 0.09s, box-shadow 0.09s;
}

.icon-btn:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--line-d);
}

.icon-btn .icon {
  width: 20px;
  height: 20px;
}

.icon-btn-sm {
  width: 36px;
  height: 36px;
}

.icon-btn-sm .icon {
  width: 16px;
  height: 16px;
}

/* The one big roommate button */
.btn-main {
  overflow: hidden;
  isolation: isolate;
}

.btn-main .btn-label {
  font-variant-numeric: tabular-nums;
}

.btn-main .btn-ico {
  display: inline-grid;
  place-items: center;
  font-size: 28px;
  line-height: 1;
}

.btn-main .btn-ico:empty {
  display: none;
}

.btn-main .btn-ico .icon {
  width: 26px;
  height: 26px;
}

.btn-main.btn-grey {
  font-size: 20px;
}

.btn-main .btn-label {
  text-wrap: balance;
}

.btn-main.btn-grey .btn-ico {
  font-size: 24px;
}

.btn-main.shine::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.5) 48%, rgba(255, 255, 255, 0.5) 52%, transparent 70%);
  transform: translateX(-130%);
  animation: shine 4s ease-in-out 1.4s infinite;
  pointer-events: none;
}

.btn-main.btn-gold.shine::after {
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.7) 48%, rgba(255, 255, 255, 0.7) 52%, transparent 70%);
}

@keyframes shine {
  0%,
  62% {
    transform: translateX(-130%);
  }
  100% {
    transform: translateX(130%);
  }
}

.btn-main.shine .btn-emoji {
  display: inline-block;
  animation: wiggle 4s ease-in-out 1.4s infinite;
}

@keyframes wiggle {
  0%,
  60%,
  100% {
    transform: none;
  }
  66% {
    transform: rotate(-16deg) scale(1.15);
  }
  74% {
    transform: rotate(12deg) scale(1.15);
  }
  82% {
    transform: rotate(-6deg);
  }
}

.btn-main.is-loading {
  --c: var(--grey);
  --d: var(--grey-d);
}

.btn-main.is-loading .btn-label {
  width: 46%;
  height: 20px;
  border-radius: 10px;
  background: linear-gradient(90deg, #dadada 0%, #ececec 50%, #dadada 100%);
  background-size: 200% 100%;
  animation: skel 1.2s linear infinite;
}

@keyframes skel {
  to {
    background-position: -200% 0;
  }
}

.btn-main.nope {
  animation: nope 0.45s ease;
}

@keyframes nope {
  0%,
  100% {
    transform: none;
  }
  20% {
    transform: translateX(-9px) rotate(-1deg);
  }
  40% {
    transform: translateX(8px) rotate(1deg);
  }
  60% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(3px);
  }
}

/* ------------------------------------------------------------------ avatar + pill */

.avatar {
  --hue: var(--purple);
  position: relative;
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--hue);
  color: #fff;
  font-weight: 900;
  font-size: 21px;
  line-height: 1;
  box-shadow:
    inset 0 -4px 0 rgba(0, 0, 0, 0.16),
    0 3px 0 rgba(43, 45, 66, 0.14);
  padding: 0 0 3px;
}

button.avatar {
  cursor: pointer;
  transition: transform 0.09s;
}

button.avatar:active {
  transform: translateY(2px) scale(0.96);
}

.avatar-sm {
  width: 38px;
  height: 38px;
  font-size: 17px;
}

.avatar-xl {
  width: 64px;
  height: 64px;
  font-size: 29px;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.16);
}

.owed-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: calc(100% - 60px);
  min-height: 40px;
  padding: 4px 14px 4px 5px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: #fff;
  box-shadow: 0 3px 0 var(--line-d);
  font-size: 14px;
  font-weight: 800;
  color: var(--muted-d);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  /* backwards, not both: a held end state would pin transform and kill :active */
  animation: pop-in 0.5s var(--bounce) 0.4s backwards;
}

.owed-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.owed-pill b {
  flex: none;
  color: var(--ink);
  font-weight: 900;
}

.owed-pill:active {
  transform: translateY(3px);
  box-shadow: none;
}

.coin {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: inset 0 -3px 0 var(--gold-d);
  color: #7a5a00;
  font-weight: 900;
  font-size: 15px;
  padding-bottom: 2px;
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------------------------ chips */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--grey);
  color: var(--muted-d);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.chip .icon {
  width: 14px;
  height: 14px;
}

.chip-gold {
  background: #fff0c2;
  color: #8a6400;
}
.chip-green {
  background: #dcf5e5;
  color: var(--green-d);
}
.chip-coral {
  background: #ffe2de;
  color: var(--coral-d);
}
.chip-lock {
  background: #ece7ff;
  color: var(--purple-d);
  padding: 6px 12px;
  font-size: 14px;
}

/* ------------------------------------------------------------------ cards */

.card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 4px 0 var(--line);
  padding: 18px;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted-d);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.kicker .count {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0;
  text-align: center;
}

.card-lede {
  font-size: 15px;
  margin: -2px 0 12px;
}

/* ------------------------------------------------------------------ forms */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field-label {
  color: var(--muted-d);
  font-size: 14px;
  font-weight: 800;
}

.input-box {
  display: flex;
  align-items: center;
  background: var(--field);
  border: 2px solid var(--grey);
  border-radius: 14px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    background-color 0.15s;
}

.input-box:focus-within {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(31, 182, 193, 0.18);
}

.input {
  flex: 1;
  min-width: 0;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  font-size: 17px;
  font-weight: 700;
  outline: none;
  border-radius: 12px;
}

.input::placeholder {
  color: #8d8fa3;
  font-weight: 700;
}

.input-prefix {
  padding-left: 14px;
  color: var(--muted);
  font-weight: 900;
  font-size: 18px;
}

.has-prefix .input {
  padding-left: 3px;
}

.field-hint {
  color: var(--muted-d);
  font-size: 13px;
  line-height: 1.3;
}

.field-error {
  color: var(--coral-d);
  font-size: 14px;
  font-weight: 800;
}

.field-error:empty {
  display: none;
}

.field.has-error .input-box {
  border-color: var(--coral);
  background: #fff6f5;
}

.form-error {
  display: none;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffe9e6;
  color: var(--coral-d);
  font-size: 15px;
  font-weight: 800;
}

.form-error.show {
  display: block;
}

.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%,
  100% {
    transform: none;
  }
  25% {
    transform: translateX(-7px);
  }
  50% {
    transform: translateX(6px);
  }
  75% {
    transform: translateX(-3px);
  }
}

.input-date {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 0 8px;
  border: 2px solid var(--grey);
  border-radius: 14px;
  background: var(--field);
  font-size: 16px;
  font-weight: 700;
  -webkit-appearance: none;
  appearance: none;
  text-align: left;
}

.input-date:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(31, 182, 193, 0.18);
}

.input-date::-webkit-date-and-time-value {
  text-align: left;
}

.notice {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff0c2;
  color: #7a5a00;
  font-size: 15px;
}

/* ------------------------------------------------------------------ scenes */

.stage {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  position: relative;
}

.stage > svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden; /* intros start above the viewBox; never draw over the caption */
}

/* ------------------------------------------------------------------ boot */

.boot {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.boot-fail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  text-align: center;
}

.boot-fail-msg {
  color: var(--muted-d);
  font-size: 16px;
  font-weight: 800;
}

.boot-can {
  font-size: 64px;
  animation: bob 1.2s ease-in-out infinite;
}

.boot-dots i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 4px;
  border-radius: 50%;
  background: var(--green);
  animation: dot 1s ease-in-out infinite;
}

.boot-dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.boot-dots i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes dot {
  0%,
  100% {
    transform: none;
    opacity: 0.4;
  }
  40% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

@keyframes bob {
  0%,
  100% {
    transform: none;
  }
  50% {
    transform: translateY(-6px) rotate(-3deg);
  }
}

.noscript {
  padding: 40px 20px;
  text-align: center;
}

/* ------------------------------------------------------------------ auth */

.auth {
  gap: 14px;
  justify-content: center;
}

.auth-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 4px;
}

.stage-auth {
  width: min(200px, 52vw);
  width: clamp(120px, min(240px, 58vw, calc(100dvh - 560px)), 240px);
  margin-bottom: -6px;
}

.app-title {
  font-size: 46px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--green);
  text-shadow: 0 4px 0 var(--green-d);
  margin-bottom: 6px;
}

.tagline {
  color: var(--muted-d);
  font-weight: 800;
  font-size: 17px;
}

.auth-card {
  padding: 14px 16px 16px;
}

.seg {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  margin-bottom: 16px;
  border-radius: 15px;
  background: #f6eedf;
}

.seg-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 0 var(--line-d);
  transition: transform 0.4s var(--bounce);
}

.seg.right .seg-thumb {
  transform: translateX(100%);
}

.seg-btn {
  position: relative;
  z-index: 1;
  min-height: 44px;
  border: 0;
  background: none;
  border-radius: 12px;
  color: var(--muted-d);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  transition: color 0.2s;
}

.seg-btn[aria-selected='true'] {
  color: var(--ink);
}

.auth-form.swap {
  animation: fade-up 0.35s ease both;
}

.auth-form .btn {
  margin-top: 4px;
}

.auth-hint {
  margin-top: 10px;
  color: var(--muted-d);
  font-size: 14px;
  text-align: center;
}

.auth-hint:empty {
  display: none;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------------------------ waiting + onboarding */

.stage-waiting {
  width: min(230px, 60vw);
  width: clamp(150px, min(250px, 62vw, calc(100dvh - 430px)), 250px);
}

.waiting-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-d);
  font-size: 14px;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(52, 196, 106, 0.45);
  }
  60% {
    box-shadow: 0 0 0 9px rgba(52, 196, 106, 0);
  }
}

.hero-emoji {
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: inset 0 -7px 0 var(--gold-d);
  font-size: 58px;
  animation:
    pop-in 0.6s var(--bounce) both,
    bob 3s ease-in-out 0.6s infinite;
}

.onboarding .card,
.fatal .btn {
  width: 100%;
  text-align: left;
  margin-top: 6px;
}

/* ------------------------------------------------------------------ roommate home */

.home {
  gap: 0;
}

.home-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding-bottom: 8px;
}

.home-cap {
  padding: 0 2px;
  text-align: center;
}

.caption {
  font-size: clamp(26px, 7.7vw, 34px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.home-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0 0;
  min-height: 0;
}

.stage-home {
  width: min(300px, 80vw);
  width: clamp(170px, min(360px, 90vw, calc(100dvh - 360px)), 360px);
}

.home-action {
  padding-top: 4px;
}

.status-line {
  min-height: 22px;
  margin-top: 10px;
  color: var(--muted-d);
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}

/* ------------------------------------------------------------------ sheets */

.sheet-root {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(43, 45, 66, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--kb, 0px) - 40px);
  max-width: 520px;
  max-height: calc(100vh - 24px - var(--sa-t) - var(--kb, 0px) + 40px);
  max-height: calc(100dvh - 24px - var(--sa-t) - var(--kb, 0px) + 40px);
  margin: 0 auto;
  padding: 0 calc(20px + var(--sa-r)) calc(60px + var(--sa-b)) calc(20px + var(--sa-l));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: 28px 28px 0 0;
  background: var(--bg);
  transform: translateY(110%);
  transition: transform 0.42s var(--soft-bounce);
  outline: none;
}

.sheet-root.open .sheet-backdrop {
  opacity: 1;
}

.sheet-root.open .sheet {
  transform: none;
}

.sheet-root.closing .sheet {
  transform: translateY(110%);
  transition: transform 0.24s ease-in;
}

.sheet-root.closing .sheet-backdrop {
  opacity: 0;
}

.sheet-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding-top: 12px;
  margin: 0 -4px 6px;
  background: var(--bg);
}

.sheet-grab {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 44px;
  height: 5px;
  margin-left: -22px;
  border-radius: 3px;
  background: var(--grey-d);
}

.sheet-title {
  font-size: 19px;
  font-weight: 900;
}

.sheet-x {
  position: absolute;
  top: 14px;
  right: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f1e9da;
  color: var(--muted-d);
  cursor: pointer;
}

.sheet-x .icon {
  width: 16px;
  height: 16px;
}

.sheet-confirm .sheet-body {
  text-align: center;
  padding-top: 0;
}

.sheet-emoji {
  font-size: 64px;
  line-height: 1;
  margin: -8px 0 8px;
  animation: pop-in 0.5s var(--bounce) 0.1s both;
}

.confirm-title {
  font-size: 25px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 8px;
}

.confirm-text,
.sheet-lede {
  color: var(--muted-d);
  font-size: 16px;
  margin-bottom: 20px;
}

/* profile sheet */
.pf-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
}

.pf-id {
  min-width: 0;
}

.pf-name {
  font-size: 23px;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.pf-user {
  color: var(--muted-d);
  font-size: 15px;
}

.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.tile {
  min-width: 0;
  padding: 12px 14px 14px;
  border-radius: 18px;
}

.tile-k {
  font-size: 13px;
  font-weight: 800;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile-v {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.tile-v-long {
  font-size: 21px;
  line-height: 1.4;
}

.tile-green {
  background: var(--green);
  color: #fff;
  box-shadow: inset 0 -5px 0 var(--green-d);
}

.tile-gold {
  background: var(--gold);
  color: var(--ink);
  box-shadow: inset 0 -5px 0 var(--gold-d);
}

.tile-plain {
  background: #fff;
  color: var(--ink);
  box-shadow:
    inset 0 0 0 2px var(--line),
    inset 0 -5px 0 var(--line);
}

.pf-section {
  margin-bottom: 14px;
}

.pf-form {
  padding: 16px 16px 12px;
  border-radius: 20px;
  background: #fff;
  border: 2px solid var(--line);
}

.pf-form .btn {
  margin-top: 2px;
}

.pf-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.row-link,
.pf-details > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 4px 0 var(--line);
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.09s,
    box-shadow 0.09s;
}

.row-link:active,
.pf-details > summary:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--line);
}

.row-link .icon,
.pf-details > summary .icon {
  width: 22px;
  height: 22px;
  color: var(--muted-d);
  flex: none;
}

.row-link .chev,
.pf-details > summary .chev {
  margin-left: auto;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: transform 0.25s var(--bounce);
}

.pf-details > summary {
  list-style: none;
}

.pf-details > summary::-webkit-details-marker {
  display: none;
}

.pf-details[open] > summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: none;
}

.pf-details[open] > summary .chev {
  transform: rotate(90deg);
}

.pf-details > form {
  padding: 16px 16px 12px;
  border: 2px solid var(--line);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: #fff;
  box-shadow: 0 4px 0 var(--line);
  animation: fade-up 0.3s ease both;
}

.btn-logout {
  margin-top: 6px;
  --fg: var(--coral-d);
}

.btn-logout .icon {
  width: 20px;
  height: 20px;
}

/* ------------------------------------------------------------------ toast */

.toast-host {
  position: fixed;
  top: calc(var(--sa-t) + 12px);
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  pointer-events: none;
}

.toast {
  max-width: 420px;
  padding: 12px 18px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 4px 0 #15161f;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  animation: toast-in 0.45s var(--bounce) both;
}

.toast-success {
  background: var(--green);
  box-shadow: 0 4px 0 var(--green-d);
}

.toast-error {
  background: var(--coral);
  box-shadow: 0 4px 0 var(--coral-d);
}

.toast.out {
  animation: toast-out 0.28s ease-in both;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-24px) scale(0.85);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-16px) scale(0.92);
  }
}

/* ------------------------------------------------------------------ celebration overlays */

.overlay {
  --ox: 50vw;
  --oy: 75vh;
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  overflow: hidden;
  color: #fff;
  outline: none;
  cursor: pointer;
  -webkit-clip-path: circle(0px at var(--ox) var(--oy));
  clip-path: circle(0px at var(--ox) var(--oy));
  animation: ov-reveal 0.62s cubic-bezier(0.7, 0, 0.25, 1) forwards;
}

@keyframes ov-reveal {
  to {
    -webkit-clip-path: circle(150vmax at var(--ox) var(--oy));
    clip-path: circle(150vmax at var(--ox) var(--oy));
  }
}

.overlay.leaving {
  animation: ov-leave 0.3s ease-in forwards;
}

@keyframes ov-leave {
  from {
    opacity: 1;
    transform: none;
    -webkit-clip-path: circle(150vmax at var(--ox) var(--oy));
    clip-path: circle(150vmax at var(--ox) var(--oy));
  }
  to {
    opacity: 0;
    transform: scale(1.06);
    -webkit-clip-path: circle(150vmax at var(--ox) var(--oy));
    clip-path: circle(150vmax at var(--ox) var(--oy));
  }
}

.overlay-notify {
  background: radial-gradient(circle at 50% 38%, #3fd0da 0%, var(--teal) 55%, #18a2ac 100%);
}

.overlay-charge,
.overlay-clear {
  background: radial-gradient(circle at 50% 38%, #4fd885 0%, var(--green) 55%, #2bb05d 100%);
}

.ov-inner {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: calc(var(--sa-t) + 24px) calc(var(--sa-r) + 24px) calc(var(--sa-b) + 20px) calc(var(--sa-l) + 24px);
}

.ov-rays {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 220vmax;
  height: 220vmax;
  margin: -110vmax 0 0 -110vmax;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.1) 0deg 9deg, transparent 9deg 18deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 32%);
  mask-image: radial-gradient(circle, #000 0%, transparent 32%);
  animation: spin 40s linear infinite;
  pointer-events: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.ov-center {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
}

.ov-badge {
  width: 136px;
  height: 136px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    inset 0 -8px 0 rgba(43, 45, 66, 0.08),
    0 8px 0 rgba(0, 0, 0, 0.12);
  animation:
    badge-in 0.7s var(--bounce) 0.28s both,
    badge-wiggle 2.6s ease-in-out 1.3s infinite;
}

.ov-emoji {
  font-size: 70px;
  line-height: 1;
}

@keyframes badge-in {
  from {
    opacity: 0;
    transform: scale(0.2) rotate(-30deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes badge-wiggle {
  0%,
  70%,
  100% {
    transform: none;
  }
  76% {
    transform: rotate(-10deg) scale(1.06);
  }
  84% {
    transform: rotate(8deg) scale(1.06);
  }
  92% {
    transform: rotate(-3deg);
  }
}

.ov-title {
  font-size: clamp(29px, 8.4vw, 38px);
  font-weight: 900;
  line-height: 1.13;
  letter-spacing: -0.01em;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.13);
  text-wrap: balance;
}

.ov-sub {
  max-width: 330px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  opacity: 0.95;
  animation: fade-up 0.5s ease 1.5s both;
}

.ov-foot {
  position: relative;
  z-index: 3;
  animation: fade-up 0.5s ease 1.2s both;
}

.overlay .btn-white {
  --d: rgba(0, 0, 0, 0.18);
  box-shadow: 0 var(--lift) 0 var(--d);
}

.overlay-notify .btn-white {
  --fg: var(--teal-d);
}

.overlay-charge .btn-white {
  --fg: var(--green-d);
}

.ov-title-charge {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ov-line {
  display: block;
  font-size: clamp(26px, 7.4vw, 32px);
  animation: fade-up 0.45s ease 0.35s both;
}

.ov-line-2 {
  animation-delay: 1.45s;
}

.ov-amount-wrap {
  display: block;
  margin: 2px 0 4px;
  animation: pop-in 0.5s var(--bounce) 0.45s both;
}

.ov-amount {
  display: inline-block;
  font-size: min(clamp(68px, 23vw, 108px), calc(170vw / var(--len, 4)));
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-shadow: 0 7px 0 var(--green-d);
}

.ov-amount.landed {
  animation: landed 0.5s var(--bounce);
}

@keyframes landed {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.18) rotate(-3deg);
  }
  100% {
    transform: none;
  }
}

.ov-lifetime {
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 17px;
}

.ov-lifetime b {
  font-weight: 900;
}

.floaters,
.confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.floaters {
  z-index: 1;
}

.confetti {
  z-index: 2;
}

.floater {
  position: absolute;
  bottom: -70px;
  filter: saturate(0.9);
  left: var(--x);
  font-size: calc(28px * var(--s));
  opacity: 0;
  animation: float-up var(--t) ease-in var(--d) infinite;
}

@keyframes float-up {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0);
  }
  12% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: translateY(-115vh) rotate(var(--r));
  }
}

.cf {
  position: absolute;
  top: -24px;
  left: var(--x);
  width: var(--sz);
  height: calc(var(--sz) * 0.62);
  border-radius: 2px;
  background: var(--c);
  animation: cf-fall var(--t) cubic-bezier(0.22, 0.6, 0.45, 1) var(--d) both;
  will-change: transform;
}

.cf-strip {
  width: calc(var(--sz) * 0.42);
  height: calc(var(--sz) * 1.7);
  border-radius: 3px;
}

.cf-dot {
  height: var(--sz);
  border-radius: 50%;
}

@keyframes cf-fall {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  100% {
    transform: translate3d(var(--dx), calc(100vh + 60px), 0) rotate(var(--rot));
  }
}

/* ------------------------------------------------------------------ admin */

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: block;
  animation: bob 3.2s ease-in-out 1s infinite;
}

.hello {
  padding: 10px 2px 16px;
}

.hello-title {
  font-size: 32px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.hello-sub {
  margin-top: 4px;
  color: var(--muted-d);
  font-size: 16px;
  min-height: 1.35em;
}

.cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cards.loading .card {
  opacity: 0.6;
}

.admin.intro .cards > * {
  animation: card-in 0.55s var(--soft-bounce) both;
}

.admin.intro .cards > :nth-child(2) {
  animation-delay: 0.06s;
}
.admin.intro .cards > :nth-child(3) {
  animation-delay: 0.12s;
}
.admin.intro .cards > :nth-child(4) {
  animation-delay: 0.18s;
}
.admin.intro .cards > :nth-child(5) {
  animation-delay: 0.24s;
}
.admin.intro .cards > :nth-child(6) {
  animation-delay: 0.3s;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.card-status.is-open {
  border-color: #ffd5cf;
  box-shadow: 0 4px 0 #ffd5cf;
  background: linear-gradient(180deg, #fff3f1 0%, #fff 60%);
}

.card-status.is-open .kicker {
  color: var(--coral-d);
}

.card-status.is-clear {
  background: linear-gradient(180deg, #effbf3 0%, #fff 60%);
  border-color: #d3f1de;
  box-shadow: 0 4px 0 #d3f1de;
}

.card-status.is-clear .kicker {
  color: var(--green-d);
}

.status-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.status-slot {
  flex: 1;
  min-width: 0;
}

.stage-mini {
  flex: none;
  width: 104px;
  margin: -14px -8px -10px 0;
}

.status-h {
  font-size: 23px;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 12px;
}

.sparkle {
  display: inline-block;
  animation: twinkle 2.4s ease-in-out infinite;
}

@keyframes twinkle {
  0%,
  100% {
    transform: none;
  }
  50% {
    transform: scale(1.25) rotate(15deg);
  }
}

.all-clear {
  padding-bottom: 14px;
}

.status-h-clear {
  font-size: 28px;
  margin-bottom: 4px;
  color: var(--green-d);
}

.all-clear p {
  font-size: 15px;
  margin-bottom: 10px;
}

.ep-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ep {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.ep-body {
  min-width: 0;
  flex: 1;
}

.ep-who {
  font-size: 17px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ep-who b {
  font-weight: 900;
}

.ep-next {
  margin-top: 2px;
  color: var(--muted-d);
  font-size: 15px;
}

.ep-next .amt {
  color: var(--ink);
}

.live {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stage-mini > svg {
  overflow: hidden;
}

.ep-next .live {
  color: var(--ink);
  font-weight: 900;
}

.ep.urgent .ep-next,
.ep.urgent .ep-next .live,
.ep.urgent .ep-next .amt {
  color: var(--coral-d);
}

.ep-charges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  color: var(--muted-d);
  font-size: 13px;
}

.tab-total {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}

.tab-total-k,
.tab-total-s {
  color: var(--muted-d);
  font-size: 15px;
}

.tab-total-v {
  font-size: 46px;
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.tab-total.square .tab-total-v {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 32px;
  color: var(--green-d);
}

.tab-total.square .icon {
  width: 30px;
  height: 30px;
}

.tab-rows {
  display: flex;
  flex-direction: column;
}

.tab-row {
  padding: 14px 0 4px;
  border-top: 2px dashed var(--line);
}

.tab-row:not(.owed) {
  padding-bottom: 10px;
}

.tab-who {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tab-info {
  flex: 1;
  min-width: 0;
}

.tab-line {
  font-size: 17px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.tab-line b {
  font-weight: 900;
}

.tab-line .amt {
  color: var(--coral-d);
  font-weight: 900;
}

.tab-meta {
  color: var(--muted-d);
  font-size: 13px;
}

.tab-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 12px;
}

.tab-actions .link {
  font-size: 14px;
  color: var(--muted-d);
}

.away-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.away-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 8px 8px 8px 12px;
  border-radius: 16px;
  background: var(--bg);
}

.away-row.active {
  background: #fff1ef;
}

.away-emoji {
  font-size: 22px;
}

.away-range {
  flex: 1;
  font-size: 17px;
  font-weight: 900;
}

.away-empty {
  padding: 12px;
  border-radius: 16px;
  background: var(--bg);
  font-size: 15px;
  text-align: center;
}

.date-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.date-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.join-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.join-row {
  display: flex;
  align-items: center;
  gap: 10px 12px;
  flex-wrap: wrap;
}

.join-row + .join-row {
  padding-top: 12px;
  border-top: 2px dashed var(--line);
}

.join-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.join-name {
  font-weight: 900;
  overflow-wrap: anywhere;
}

.join-meta {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.join-actions {
  flex: 1 0 100%;
}

.join-actions .btn {
  min-height: 48px;
}

.notif-status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  font-weight: 800;
  line-height: 1.3;
}

.ns-dot {
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--grey-d);
}

.ns-on .ns-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(52, 196, 106, 0.2);
}

.ns-todo .ns-dot {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(255, 201, 60, 0.25);
}

.ns-off .ns-dot {
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 107, 94, 0.2);
}

.notif-devices {
  margin-top: 6px;
  font-size: 13px;
}

.hint {
  margin-top: 8px;
  color: var(--muted-d);
  font-size: 14px;
  line-height: 1.4;
}

.hint i {
  font-style: normal;
  color: var(--muted-d);
  font-weight: 900;
}

.card-link {
  margin-bottom: 8px;
}

/* ------------------------------------------------------------------ activity */

.topbar-title {
  margin-bottom: 4px;
}

.page-title {
  flex: 1;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
}

.timeline {
  position: relative;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 22px;
  width: 4px;
  border-radius: 2px;
  background: var(--line);
}

.tl-item {
  --c: var(--grey-d);
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 7px 0;
  animation: fade-up 0.4s ease both;
  animation-delay: calc(var(--i) * 35ms);
}

.tl-dot {
  position: relative;
  z-index: 1;
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    inset 0 0 0 3px var(--c),
    0 3px 0 var(--c);
  font-size: 22px;
}

.k-teal {
  --c: var(--teal);
}
.k-gold {
  --c: var(--gold);
}
.k-green {
  --c: var(--green);
}
.k-purple {
  --c: var(--purple);
}
.k-coral {
  --c: var(--coral);
}
.k-grey {
  --c: var(--grey-d);
}

.tl-text {
  min-width: 0;
  padding-top: 4px;
}

.tl-what {
  font-size: 16px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.tl-when {
  color: var(--muted-d);
  font-size: 13px;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 60px 20px;
  text-align: center;
}

.empty-emoji {
  font-size: 56px;
  animation: bob 3s ease-in-out infinite;
}

.empty-title {
  font-size: 20px;
  font-weight: 900;
}

.empty .btn {
  margin-top: 12px;
  max-width: 240px;
}

.skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 12px;
}

.sk-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sk-dot,
.sk-line {
  background: linear-gradient(90deg, #f1e8d8 0%, #f9f3e8 50%, #f1e8d8 100%);
  background-size: 200% 100%;
  animation: skel 1.2s linear infinite;
}

.sk-dot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.sk-line {
  flex: 1;
  height: 18px;
  border-radius: 9px;
}

/* ------------------------------------------------------------------ misc */

.fatal .btn {
  max-width: 320px;
}

/* Short screens (e.g. iPhone SE in Safari) */
@media (max-height: 640px) {
  .caption {
    font-size: clamp(23px, 6.8vw, 28px);
  }
  .btn-big {
    min-height: 68px;
    font-size: 22px;
  }
  .app-title {
    font-size: 40px;
  }
}

/* Desktop: keep it phone-shaped and centered. */
@media (min-width: 700px) {
  body {
    background: radial-gradient(circle at 50% 0%, #fff 0%, var(--bg) 60%);
  }
}

/* ------------------------------------------------------------------ reduced motion */

@media (prefers-reduced-motion: reduce) {
  body *:not(svg):not(svg *),
  body *:not(svg):not(svg *)::before,
  body *:not(svg):not(svg *)::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .btn-main.shine::after,
  .floaters,
  .ov-rays {
    display: none;
  }
}
