/* ==========================================================================
   真的想买吗 · visual system
   Warm paper, deep green, terracotta. Mobile-first interactions, desktop shell.
   ========================================================================== */

:root {
  --bg: #f4f0e6;
  --bg-deep: #e9e3d5;
  --paper: #fffdf8;
  --paper-soft: #fbf8f1;
  --paper-warm: #f7f1e3;
  --ink: #23261f;
  --ink-soft: #4f5349;
  --muted: #717368;
  --muted-light: #8c8e82;
  --line: #e6e0d3;
  --line-strong: #d5ccbb;
  --forest: #204335;
  --forest-deep: #173529;
  --forest-light: #2c5a47;
  --forest-soft: #e7eee7;
  --sage: #a8b7a5;
  --sage-deep: #627d68;
  --cream: #fbf6ea;
  --terracotta: #d96046;
  --terracotta-deep: #b74b35;
  --terracotta-soft: #f9e5dd;
  --gold: #bd9a4e;
  --gold-soft: #f4e8c7;
  --danger: #b5483f;
  --danger-soft: #f8e5e1;
  --shadow-sm: 0 2px 9px rgba(50, 45, 32, 0.045);
  --shadow-md: 0 12px 30px rgba(45, 40, 27, 0.08);
  --shadow-lg: 0 26px 70px rgba(31, 37, 28, 0.2);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --sans: "Avenir Next", "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Songti SC",
    "STSong", "SimSun", serif;
  --sidebar-width: 252px;
}

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

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% -10%, rgba(238, 214, 178, 0.55), transparent 33rem),
    radial-gradient(circle at 8% 110%, rgba(202, 214, 198, 0.32), transparent 30rem),
    var(--bg);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.dialog-open {
  overflow: hidden;
}

::selection {
  color: var(--cream);
  background: var(--forest);
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
fieldset,
legend,
dl,
dd {
  margin: 0;
}

fieldset {
  border: 0;
  padding: 0;
  min-width: 0;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--terracotta-deep);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   App shell + sidebar
   -------------------------------------------------------------------------- */

.app-shell {
  min-height: 100dvh;
}

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  padding: 30px 20px 20px;
  overflow-y: auto;
  background: rgba(250, 247, 239, 0.82);
  border-right: 1px solid rgba(213, 204, 187, 0.7);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  flex: none;
  place-items: center;
  color: #f1e5c9;
  background: var(--forest);
  border-radius: 15px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(32, 67, 53, 0.16);
}

.brand-mark svg {
  width: 34px;
  height: 34px;
}

.brand-mark-small {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.brand-mark-small svg {
  width: 29px;
  height: 29px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.brand-copy small {
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.sidebar-tagline {
  margin: 19px 0 0 3px;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 42px;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  color: #6e7167;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 560;
  transition:
    color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.nav-link .icon {
  width: 19px;
  height: 19px;
  opacity: 0.8;
}

.nav-link:hover {
  color: var(--forest);
  background: rgba(231, 238, 231, 0.72);
}

.nav-link.is-active {
  color: var(--cream);
  background: var(--forest);
  box-shadow: 0 8px 18px rgba(32, 67, 53, 0.16);
}

.nav-link.is-active .icon {
  opacity: 1;
}

.nav-badge {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  margin-left: auto;
  padding: 0 5px;
  place-items: center;
  color: var(--cream);
  background: var(--terracotta);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.nav-link.is-active .nav-badge {
  color: var(--forest);
  background: var(--cream);
}

.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: auto;
  padding-top: 28px;
}

.sidebar-note {
  position: relative;
  padding: 18px 17px 16px;
  overflow: hidden;
  background: #eee5d1;
  border: 1px solid #e2d7c0;
  border-radius: 20px;
}

.sidebar-note::after {
  position: absolute;
  right: -18px;
  bottom: -29px;
  width: 84px;
  height: 84px;
  border: 1px solid rgba(101, 97, 74, 0.13);
  border-radius: 50%;
  content: "";
}

.note-leaf {
  width: 17px;
  height: 17px;
  margin-bottom: 10px;
  color: var(--sage-deep);
}

.sidebar-note blockquote {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0.02em;
}

.sidebar-note figcaption {
  margin-top: 9px;
  color: #8e8979;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.mini-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-radius: 14px;
  transition: background 180ms ease;
}

.mini-profile:hover {
  background: rgba(255, 253, 248, 0.7);
}

.mini-profile-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.mini-profile-copy strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-profile-copy small {
  margin-top: 1px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-profile > .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.avatar {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  color: var(--forest);
  background: #e5dcc7;
  border: 1px solid #d9ceb7;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
}

.avatar-small {
  width: 34px;
  height: 34px;
  font-size: 14px;
}

/* Mobile chrome is hidden on desktop */
.mobile-header,
.bottom-nav {
  display: none;
}

/* --------------------------------------------------------------------------
   Main workspace + generic page elements
   -------------------------------------------------------------------------- */

.view {
  min-height: 100dvh;
  margin-left: var(--sidebar-width);
  padding: 34px clamp(26px, 4vw, 54px) 70px;
}

.page {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  animation: page-in 420ms cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.page-head-copy {
  min-width: 0;
}

.page-head .eyebrow {
  margin-bottom: 10px;
}

.page-title {
  font-size: clamp(27px, 2.6vw, 36px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.3;
}

.page-subtitle {
  max-width: 560px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.75;
}

.page-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
}

.date-stamp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 15px;
  color: var(--ink-soft);
  background: rgba(255, 253, 248, 0.65);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11.5px;
  white-space: nowrap;
}

.date-stamp .icon {
  width: 15px;
  height: 15px;
  color: var(--terracotta);
}

.button {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.button .icon {
  width: 17px;
  height: 17px;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button:focus-visible,
.icon-button:focus-visible,
.filter-chip:focus-visible,
.nav-link:focus-visible,
.bottom-nav-link:focus-visible,
.wish-card:focus-visible,
.recent-item:focus-visible,
.record-item:focus-visible {
  outline: 3px solid rgba(217, 96, 70, 0.28);
  outline-offset: 2px;
}

.button-primary {
  color: var(--cream);
  background: var(--forest);
  box-shadow: 0 7px 16px rgba(32, 67, 53, 0.16);
}

.button-primary:hover:not(:disabled) {
  background: var(--forest-deep);
  box-shadow: 0 10px 22px rgba(32, 67, 53, 0.2);
}

.button-accent {
  color: #fffaf3;
  background: var(--terracotta);
  box-shadow: 0 7px 16px rgba(183, 75, 53, 0.16);
}

.button-accent:hover:not(:disabled) {
  background: var(--terracotta-deep);
}

.button-ghost {
  color: var(--ink-soft);
  background: transparent;
  border-color: var(--line-strong);
}

.button-ghost:hover:not(:disabled) {
  color: var(--ink);
  background: var(--paper);
  border-color: #bdb3a0;
}

.button-soft {
  color: var(--forest);
  background: var(--forest-soft);
}

.button-soft:hover:not(:disabled) {
  background: #dce8dd;
}

.button-danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.button-danger:hover:not(:disabled) {
  background: #f3d5cf;
}

.button-quiet {
  min-height: 36px;
  padding: 0 5px;
  color: var(--muted);
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 560;
}

.button-quiet:hover:not(:disabled) {
  color: var(--ink);
}

.button:disabled {
  opacity: 0.42;
  box-shadow: none;
}

.button.is-loading {
  color: transparent !important;
  pointer-events: none;
}

.button.is-loading::after {
  position: absolute;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #fffaf0;
  border-radius: 50%;
  content: "";
  animation: spin 700ms linear infinite;
}

.button-ghost.is-loading::after,
.button-quiet.is-loading::after {
  border-color: rgba(32, 67, 53, 0.18);
  border-top-color: var(--forest);
}

.button:focus-visible,
.hero-link:focus-visible,
.text-button:focus-visible {
  outline: 3px solid rgba(217, 96, 70, 0.28);
  outline-offset: 3px;
}

.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: none;
  padding: 0;
  place-items: center;
  color: var(--ink-soft);
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid var(--line);
  border-radius: 50%;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.icon-button:hover {
  color: var(--ink);
  background: var(--paper);
  transform: rotate(-4deg);
}

.icon-button .icon {
  width: 18px;
  height: 18px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  color: var(--forest);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: rgba(32, 67, 53, 0.25);
  text-underline-offset: 3px;
}

.text-button:hover {
  text-decoration-color: currentColor;
}

.text-button .icon {
  width: 14px;
  height: 14px;
}

/* --------------------------------------------------------------------------
   Home · hero
   -------------------------------------------------------------------------- */

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
  align-items: start;
}

.home-main {
  min-width: 0;
}

.hero {
  position: relative;
  min-height: 334px;
  overflow: hidden;
  padding: 33px 36px 0;
  color: var(--cream);
  background: var(--forest);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 44px rgba(32, 67, 53, 0.17);
  isolation: isolate;
}

.hero::before {
  position: absolute;
  z-index: -1;
  top: -180px;
  right: -120px;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(200, 169, 103, 0.18), transparent 68%);
  border-radius: 50%;
  content: "";
}

.hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.07;
  background-image: radial-gradient(rgba(255, 251, 240, 0.8) 0.8px, transparent 0.8px);
  background-size: 14px 14px;
  mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
  content: "";
}

.hero-inner {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 540px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  color: #d5e2d1;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.live-dot {
  position: relative;
  width: 6px;
  height: 6px;
  background: #cfb36d;
  border-radius: 50%;
}

.live-dot::after {
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(207, 179, 109, 0.45);
  border-radius: 50%;
  content: "";
  animation: live-pulse 2.4s ease-out infinite;
}

.hero-label {
  margin-top: 21px;
  color: rgba(247, 241, 228, 0.57);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.hero-amount {
  display: flex;
  align-items: flex-start;
  margin-top: 8px;
  font-family: var(--serif);
  font-size: clamp(54px, 6.4vw, 78px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
}

.hero-amount .currency {
  margin: 11px 5px 0 0;
  color: #d8c28a;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0;
}

.hero-desc {
  max-width: 400px;
  margin-top: 15px;
  color: rgba(247, 241, 228, 0.7);
  font-size: 12px;
  line-height: 1.8;
}

.hero-desc strong {
  color: #f0dfae;
  font-weight: 600;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  padding: 0;
  color: #e9d69b;
  background: transparent;
  border: 0;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 650;
  transition: gap 180ms ease;
}

.hero-link:hover {
  gap: 10px;
}

.hero-link .icon {
  width: 15px;
  height: 15px;
}

.hero-art {
  position: relative;
  width: 238px;
  height: 220px;
  flex: none;
  margin-top: -2px;
  pointer-events: none;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(247, 241, 228, 0.16);
  border-radius: 50%;
}

.orbit-a {
  inset: 8px;
  border-style: dashed;
  animation: slow-spin 44s linear infinite;
}

.orbit-b {
  inset: 34px;
  border-color: rgba(247, 241, 228, 0.1);
}

.orbit-a::before,
.orbit-a::after {
  position: absolute;
  width: 7px;
  height: 7px;
  background: #d8c28a;
  border-radius: 50%;
  content: "";
}

.orbit-a::before {
  top: 20px;
  right: 22px;
}

.orbit-a::after {
  bottom: 10px;
  left: 47px;
  width: 4px;
  height: 4px;
  background: rgba(247, 241, 228, 0.55);
}

.hero-sun {
  position: absolute;
  inset: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--forest);
  background: #e5d3a8;
  border: 1px solid rgba(255, 250, 238, 0.3);
  border-radius: 50%;
  box-shadow:
    0 0 0 12px rgba(247, 241, 228, 0.04),
    0 18px 32px rgba(12, 28, 21, 0.16);
}

.sun-label {
  color: #7b673c;
  font-size: 7px;
  font-weight: 750;
  letter-spacing: 0.16em;
}

.sun-number {
  margin: 2px 0 -3px;
  font-family: var(--serif);
  font-size: 45px;
  font-weight: 500;
  letter-spacing: -0.07em;
  line-height: 1.1;
}

.sun-unit {
  color: #7b673c;
  font-size: 7px;
  font-weight: 650;
  letter-spacing: 0.1em;
}

.art-star {
  position: absolute;
  color: #e5d3a8;
  font-family: var(--serif);
  font-size: 17px;
}

.star-one {
  top: 18px;
  left: 16px;
}

.star-two {
  right: 16px;
  bottom: 24px;
  font-size: 10px;
  opacity: 0.55;
}

.hero-metrics {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 26px;
  border-top: 1px solid rgba(247, 241, 228, 0.13);
}

.hero-metric {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
  padding: 15px 20px 21px 0;
}

.hero-metric + .hero-metric {
  padding-left: 22px;
  border-left: 1px solid rgba(247, 241, 228, 0.12);
}

.hero-metric-label {
  color: rgba(247, 241, 228, 0.5);
  font-size: 9.5px;
  letter-spacing: 0.06em;
}

.hero-metric-value {
  overflow: hidden;
  color: #f8f2e3;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-metric-value em {
  color: #d8c28a;
  font-family: var(--sans);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0;
}

/* --------------------------------------------------------------------------
   Home · wishlist
   -------------------------------------------------------------------------- */

.wishlist {
  margin-top: 33px;
  scroll-margin-top: 92px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 17px;
}

.section-heading-main {
  min-width: 0;
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-heading h2 {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.section-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
}

.add-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 0;
  color: var(--forest);
  background: transparent;
  border: 0;
  font-size: 11.5px;
  font-weight: 650;
}

.add-mini .icon {
  width: 15px;
  height: 15px;
}

.add-mini:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 19px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-chip {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.42);
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 560;
  transition:
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.filter-chip:hover {
  color: var(--ink);
  background: rgba(255, 253, 248, 0.9);
}

.filter-chip.is-active {
  color: var(--cream);
  background: var(--ink);
}

.chip-count {
  display: inline-grid;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  place-items: center;
  color: var(--muted);
  background: rgba(35, 38, 31, 0.07);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.filter-chip.is-active .chip-count {
  color: var(--ink);
  background: var(--cream);
}

.filter-chip.has-ready:not(.is-active) {
  color: var(--terracotta-deep);
  background: var(--terracotta-soft);
}

.filter-chip.has-ready:not(.is-active) .chip-count {
  color: var(--terracotta-deep);
  background: rgba(255, 255, 255, 0.5);
}

.wish-count-note {
  color: var(--muted-light);
  font-size: 10px;
  white-space: nowrap;
}

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

.wish-grid > .empty-state {
  grid-column: 1 / -1;
}

.wish-card {
  --cat-bg: #e9e5da;
  --cat-ink: #6f6a5d;
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 262px;
  flex-direction: column;
  padding: 21px;
  overflow: hidden;
  color: var(--ink);
  text-align: left;
  background: var(--paper);
  border: 1px solid rgba(212, 203, 187, 0.76);
  border-radius: 23px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  opacity: 1;
  animation: card-in 460ms cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
}

.wish-card:nth-child(2) {
  animation-delay: 55ms;
}

.wish-card:nth-child(3) {
  animation-delay: 100ms;
}

.wish-card:nth-child(4) {
  animation-delay: 145ms;
}

.wish-card:nth-child(5) {
  animation-delay: 190ms;
}

.wish-card:nth-child(6) {
  animation-delay: 235ms;
}

.wish-card::after {
  position: absolute;
  top: -52px;
  right: -52px;
  width: 124px;
  height: 124px;
  border: 1px solid rgba(78, 74, 60, 0.045);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

@media (hover: hover) {
  .wish-card:hover {
    z-index: 2;
    border-color: var(--line-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
  }

  .wish-card:hover .wish-arrow {
    color: var(--cream);
    background: var(--forest);
    transform: translateX(2px);
  }
}

.wish-card:active {
  transform: scale(0.995);
}

.wish-card.status-ready {
  border-color: rgba(217, 96, 70, 0.34);
  background:
    linear-gradient(140deg, rgba(249, 229, 221, 0.62), transparent 42%),
    var(--paper);
}

.wish-card.status-ready::before {
  position: absolute;
  top: 0;
  left: 21px;
  right: 21px;
  height: 2px;
  background: linear-gradient(90deg, var(--terracotta), transparent);
  border-radius: 0 0 999px 999px;
  content: "";
}

.wish-card.status-resisted {
  background:
    linear-gradient(145deg, rgba(231, 238, 231, 0.5), transparent 45%),
    var(--paper);
}

.wish-card.status-bought {
  background:
    linear-gradient(145deg, rgba(244, 232, 199, 0.34), transparent 45%),
    var(--paper);
}

.cat-digital {
  --cat-bg: #e4ebf0;
  --cat-ink: #3f5d6b;
}

.cat-home {
  --cat-bg: #f0e7d8;
  --cat-ink: #7b6242;
}

.cat-clothes {
  --cat-bg: #ede4df;
  --cat-ink: #775d51;
}

.cat-beauty {
  --cat-bg: #f2e4e4;
  --cat-ink: #7d575e;
}

.cat-sport {
  --cat-bg: #e3eee5;
  --cat-ink: #486750;
}

.cat-hobby {
  --cat-bg: #ebe6ef;
  --cat-ink: #665572;
}

.cat-other {
  --cat-bg: #eeeae0;
  --cat-ink: #706b5d;
}

.wish-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.wish-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: none;
  place-items: center;
  background: var(--cat-bg);
  border-radius: 14px;
  font-size: 22px;
  line-height: 1;
}

.status-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status-dot {
  width: 5px;
  height: 5px;
  flex: none;
  background: currentColor;
  border-radius: 50%;
}

.status-pill.status-cooling {
  color: #8b6d2b;
  background: #f4ebd4;
}

.status-pill.status-ready {
  color: var(--terracotta-deep);
  background: var(--terracotta-soft);
}

.status-pill.status-ready .status-dot {
  animation: soft-blink 2.1s ease-in-out infinite;
}

.status-pill.status-resisted {
  color: #486a51;
  background: #e6eee4;
}

.status-pill.status-bought {
  color: #746a51;
  background: #f1eadd;
}

.wish-category {
  margin-top: 15px;
  color: var(--cat-ink);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wish-name {
  display: -webkit-box;
  margin-top: 3px;
  overflow: hidden;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.wish-note {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.wish-price-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 15px;
}

.wish-price {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
}

.wish-price .currency {
  margin-right: 2px;
  color: var(--muted);
  font-size: 13px;
}

.wish-price-meta {
  color: var(--muted-light);
  font-size: 9px;
  text-align: right;
  white-space: nowrap;
}

.wish-progress {
  margin-top: auto;
  padding-top: 18px;
}

.progress-track {
  position: relative;
  height: 4px;
  overflow: hidden;
  background: #ebe5d9;
  border-radius: 999px;
}

.progress-fill {
  display: block;
  height: 100%;
  background: var(--forest-light);
  border-radius: inherit;
  transition: width 700ms cubic-bezier(0.2, 0.8, 0.3, 1);
}

.wish-card.status-ready .progress-fill {
  background: var(--terracotta);
}

.wish-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 9.5px;
}

.wish-progress-meta .countdown {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  font-weight: 560;
  white-space: nowrap;
}

.wish-card.status-bought .progress-fill {
  background: var(--gold);
}

.wish-card.status-ready .wish-progress-meta .countdown {
  color: var(--terracotta-deep);
}

.wish-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid rgba(230, 224, 211, 0.75);
}

.wish-footer-label {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wish-footer-label .icon {
  width: 13px;
  height: 13px;
}

.wish-arrow {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: var(--muted);
  background: #f6f1e7;
  border-radius: 50%;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.wish-arrow .icon {
  width: 14px;
  height: 14px;
}

.wish-result-mark {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--sage-deep);
  font-size: 10px;
  font-weight: 600;
}

.wish-result-mark.is-bought {
  color: #9b8350;
}

.wish-result-mark .icon {
  width: 13px;
  height: 13px;
}

.wish-verdict {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

/* Empty states */
.empty-state {
  position: relative;
  display: flex;
  min-height: 295px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  padding: 36px 24px;
  text-align: center;
  background: rgba(255, 253, 248, 0.5);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
}

.empty-art {
  position: relative;
  display: grid;
  width: 82px;
  height: 82px;
  margin-bottom: 17px;
  place-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.empty-art::before,
.empty-art::after {
  position: absolute;
  border: 1px solid rgba(32, 67, 53, 0.1);
  border-radius: 50%;
  content: "";
}

.empty-art::before {
  inset: -11px;
  border-style: dashed;
}

.empty-art::after {
  inset: 12px;
  border-color: rgba(217, 96, 70, 0.18);
}

.empty-art span {
  position: relative;
  z-index: 1;
  font-size: 29px;
}

.empty-title {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.empty-text {
  max-width: 390px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.8;
}

.empty-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}

.empty-state .button {
  min-height: 40px;
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   Home · right rail
   -------------------------------------------------------------------------- */

.home-rail {
  position: sticky;
  top: 30px;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 15px;
}

.rail-card {
  padding: 20px;
  background: var(--paper);
  border: 1px solid rgba(212, 203, 187, 0.7);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
}

.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.rail-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 650;
}

.rail-title .icon {
  width: 16px;
  height: 16px;
  color: var(--terracotta);
}

.rail-link {
  color: var(--muted);
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 9.5px;
}

.rail-link:hover {
  color: var(--ink);
}

.budget-top {
  display: flex;
  align-items: center;
  gap: 15px;
}

.budget-ring {
  --pct: 0;
  position: relative;
  display: grid;
  width: 76px;
  height: 76px;
  flex: none;
  place-items: center;
  background: conic-gradient(
    var(--forest) calc(var(--pct) * 1%),
    #ebe5d9 calc(var(--pct) * 1%) 100%
  );
  border-radius: 50%;
  transform: rotate(-90deg);
}

.budget-ring::after {
  position: absolute;
  inset: 7px;
  background: var(--paper);
  border-radius: 50%;
  content: "";
}

.budget-ring.is-over {
  background: conic-gradient(
    var(--terracotta) calc(var(--pct) * 1%),
    #ebe5d9 calc(var(--pct) * 1%) 100%
  );
}

.budget-ring-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-direction: column;
  transform: rotate(90deg);
}

.budget-ring-inner strong {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.budget-ring-inner small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.budget-copy {
  min-width: 0;
}

.budget-copy small {
  display: block;
  color: var(--muted);
  font-size: 9.5px;
}

.budget-amount {
  margin-top: 2px;
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.1;
}

.budget-amount span {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 9.5px;
}

.budget-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9.5px;
}

.budget-meta strong {
  color: var(--ink-soft);
  font-weight: 600;
}

.budget-tip {
  margin-top: 10px;
  padding: 9px 11px;
  color: #65705d;
  background: #edf2e9;
  border-radius: 10px;
  font-size: 9.5px;
  line-height: 1.6;
}

.budget-tip.is-over {
  color: var(--danger);
  background: var(--danger-soft);
}

.quote-card {
  position: relative;
  padding: 22px 20px 19px;
  overflow: hidden;
  color: #5f5234;
  background: #f0e3c5;
  border-color: #e7d6b3;
}

.quote-card::after {
  position: absolute;
  right: -27px;
  bottom: -35px;
  width: 104px;
  height: 104px;
  border: 1px solid rgba(128, 105, 57, 0.16);
  border-radius: 50%;
  content: "";
}

.quote-mark {
  height: 24px;
  color: #b79855;
  font-family: var(--serif);
  font-size: 43px;
  line-height: 1;
}

.quote-copy {
  max-width: 230px;
  margin-top: 2px;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

.quote-signature {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: #90805f;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.quote-signature::before {
  width: 18px;
  height: 1px;
  background: rgba(117, 96, 56, 0.35);
  content: "";
}

.recent-list {
  display: flex;
  flex-direction: column;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 0;
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(230, 224, 211, 0.7);
}

.recent-item:first-child {
  border-top: 0;
}

.recent-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: none;
  place-items: center;
  background: var(--cat-bg);
  border-radius: 10px;
  font-size: 15px;
}

.recent-copy {
  min-width: 0;
  flex: 1;
}

.recent-copy strong {
  display: block;
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-copy span {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 8.5px;
}

.recent-amount {
  flex: none;
  font-family: var(--serif);
  font-size: 12.5px;
  text-align: right;
}

.recent-amount.is-saved {
  color: var(--sage-deep);
}

.recent-amount.is-spent {
  color: #8b8170;
}

.recent-empty {
  padding: 5px 0 2px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
}

.rail-note {
  color: var(--muted-light);
  font-size: 8.5px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Records / archive page
   -------------------------------------------------------------------------- */

.stats-grid {
  display: grid;
  grid-template-columns: 1.16fr 1fr 1fr 1fr;
  gap: 13px;
  margin-bottom: 25px;
}

.stat-card {
  position: relative;
  display: flex;
  min-height: 142px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 19px 20px;
  background: var(--paper);
  border: 1px solid rgba(212, 203, 187, 0.7);
  border-radius: 21px;
  box-shadow: var(--shadow-sm);
}

.stat-card::after {
  position: absolute;
  right: -28px;
  bottom: -38px;
  width: 100px;
  height: 100px;
  border: 1px solid rgba(32, 67, 53, 0.055);
  border-radius: 50%;
  content: "";
}

.stat-primary {
  color: var(--cream);
  background: var(--forest);
  border-color: var(--forest);
  box-shadow: 0 16px 30px rgba(32, 67, 53, 0.15);
}

.stat-primary::after {
  border-color: rgba(247, 241, 228, 0.13);
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.03em;
}

.stat-label .icon {
  width: 14px;
  height: 14px;
}

.stat-primary .stat-label {
  color: rgba(247, 241, 228, 0.58);
}

.stat-value {
  margin-top: 15px;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 35px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.stat-value .stat-unit {
  margin-left: 2px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0;
}

.stat-foot {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.stat-primary .stat-foot {
  color: rgba(247, 241, 228, 0.62);
}

.stat-mark {
  display: inline-grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: var(--sage-deep);
  background: var(--forest-soft);
  border-radius: 8px;
}

.stat-mark .icon {
  width: 14px;
  height: 14px;
}

.records-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 306px;
  gap: 22px;
  align-items: start;
}

.records-main {
  min-width: 0;
}

.panel {
  background: var(--paper);
  border: 1px solid rgba(212, 203, 187, 0.7);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.records-panel {
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 22px 16px;
}

.panel-title {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.panel-subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  background: #f2ece0;
  border-radius: 999px;
}

.segment {
  min-height: 29px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 600;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.segment.is-active {
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 2px 5px rgba(43, 39, 28, 0.07);
}

.record-list {
  padding: 0 22px 12px;
}

.record-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  width: 100%;
  padding: 16px 0;
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(230, 224, 211, 0.72);
}

.record-item:first-child {
  border-top: 0;
}

.record-date {
  display: flex;
  width: 38px;
  flex: none;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 4px;
}

.record-date strong {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}

.record-date span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.record-icon {
  display: grid;
  width: 41px;
  height: 41px;
  flex: none;
  place-items: center;
  background: var(--cat-bg);
  border-radius: 12px;
  font-size: 20px;
}

.record-copy {
  min-width: 0;
  flex: 1;
}

.record-topline {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.record-title {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.record-meta .dot {
  width: 2px;
  height: 2px;
  background: var(--muted-light);
  border-radius: 50%;
}

.record-reason {
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.record-amount {
  flex: none;
  padding-top: 3px;
  text-align: right;
}

.record-amount strong {
  display: block;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.record-amount.is-saved strong {
  color: var(--sage-deep);
}

.record-amount.is-spent strong {
  color: #877c68;
}

.record-amount span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.mini-verdict {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  color: #806c42;
  background: var(--gold-soft);
  border-radius: 999px;
  font-size: 7.5px;
  white-space: nowrap;
}

.records-empty {
  padding: 40px 22px 46px;
  text-align: center;
}

.records-empty p {
  color: var(--muted);
  font-size: 11.5px;
}

.records-empty .button {
  margin-top: 16px;
}

.records-side {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.insight-card {
  padding: 21px;
}

.insight-head {
  margin-bottom: 17px;
}

.insight-title {
  font-size: 14px;
  font-weight: 650;
}

.insight-desc {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.65;
}

.insight-bars {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.bar-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 8px;
}

.bar-label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 9.5px;
}

.bar-label span {
  font-size: 12px;
}

.bar-track {
  height: 5px;
  overflow: hidden;
  background: #eee8dc;
  border-radius: 999px;
}

.bar-fill {
  height: 100%;
  background: var(--forest-light);
  border-radius: inherit;
}

.bar-fill.is-saved {
  background: var(--sage-deep);
}

.bar-count {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 12px;
  text-align: right;
}

.insight-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9.5px;
}

.insight-total strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
}

.insight-empty {
  padding: 12px 0 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.archive-quote {
  padding: 20px;
  color: #5f5234;
  background: #f0e3c5;
  border-color: #e7d6b3;
}

.archive-quote p {
  margin-top: 9px;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.75;
}

.archive-quote small {
  display: block;
  margin-top: 11px;
  color: #8e7e5e;
  font-size: 8.5px;
  letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------------
   Settings page
   -------------------------------------------------------------------------- */

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 20px;
  align-items: start;
}

.settings-column {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 16px;
}

.settings-card {
  padding: 24px;
  background: var(--paper);
  border: 1px solid rgba(212, 203, 187, 0.7);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.card-head h2 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.card-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.65;
}

.card-glyph {
  display: grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  color: var(--terracotta);
  background: var(--terracotta-soft);
  border-radius: 12px;
}

.card-glyph .icon {
  width: 18px;
  height: 18px;
}

.profile-intro {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 20px;
  padding-bottom: 19px;
  border-bottom: 1px solid var(--line);
}

.avatar-large {
  width: 52px;
  height: 52px;
  font-size: 21px;
}

.profile-intro-copy strong {
  display: block;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
}

.profile-intro-copy span {
  color: var(--muted);
  font-size: 9.5px;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.settings-form .field-label {
  font-size: 11px;
}

.settings-form input {
  min-height: 45px;
}

.default-choice-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.default-choice {
  position: relative;
  display: flex;
  min-height: 57px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1px;
  padding: 8px 4px;
  text-align: center;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.default-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.default-choice strong {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
}

.default-choice small {
  color: var(--muted);
  font-size: 8px;
}

.default-choice:has(input:checked) {
  background: var(--forest-soft);
  border-color: var(--forest);
}

.default-choice:has(input:checked) strong {
  color: var(--forest);
}

.default-choice:has(input:focus-visible) {
  outline: 3px solid rgba(217, 96, 70, 0.25);
  outline-offset: 2px;
}

.settings-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
}

.settings-submit-row p {
  max-width: 280px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

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

.data-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.data-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.data-row:last-child {
  padding-bottom: 0;
}

.data-glyph {
  display: grid;
  width: 36px;
  height: 36px;
  flex: none;
  place-items: center;
  color: var(--ink-soft);
  background: #f3eee4;
  border-radius: 11px;
}

.data-glyph .icon {
  width: 16px;
  height: 16px;
}

.data-row-copy {
  min-width: 0;
  flex: 1;
}

.data-row-copy strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
}

.data-row-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.data-row .button {
  min-height: 34px;
  flex: none;
  padding: 0 13px;
  font-size: 10px;
}

.danger-text {
  color: var(--danger);
}

.about-card {
  position: relative;
  overflow: hidden;
  min-height: 262px;
  padding: 25px;
  color: var(--cream);
  background: var(--forest);
  border: 1px solid var(--forest);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 38px rgba(32, 67, 53, 0.15);
  isolation: isolate;
}

.about-card::before {
  position: absolute;
  z-index: -1;
  top: -76px;
  right: -66px;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(247, 241, 228, 0.14);
  border-radius: 50%;
  box-shadow:
    0 0 0 24px rgba(247, 241, 228, 0.035),
    0 0 0 55px rgba(247, 241, 228, 0.02);
  content: "";
}

.about-card .eyebrow {
  color: #d8c28a;
}

.about-card h2 {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.45;
}

.about-card p {
  max-width: 280px;
  margin-top: 12px;
  color: rgba(247, 241, 228, 0.67);
  font-size: 10.5px;
  line-height: 1.8;
}

.about-stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 21px;
  padding: 7px 11px;
  color: rgba(247, 241, 228, 0.73);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  font-size: 8.5px;
  letter-spacing: 0.05em;
}

.about-stamp .icon {
  width: 13px;
  height: 13px;
  color: #d8c28a;
}

.privacy-card {
  padding: 20px;
}

.privacy-card h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 650;
}

.privacy-card h3 .icon {
  width: 15px;
  height: 15px;
  color: var(--sage-deep);
}

.privacy-card p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.75;
}

.version-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted-light);
  font-size: 8px;
  letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   Forms shared
   -------------------------------------------------------------------------- */

.field {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.field-label em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 400;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
  font-size: 13px;
  line-height: 1.6;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #aeaa9d;
}

.field input:hover,
.field textarea:hover {
  border-color: var(--line-strong);
}

.field input:focus,
.field textarea:focus,
.money-input:focus-within {
  background: var(--paper);
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(32, 67, 53, 0.08);
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.field.has-error input,
.field.has-error textarea,
.field.has-error .money-input {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(181, 72, 63, 0.07);
}

.field-error {
  min-height: 0;
  color: var(--danger);
  font-size: 9.5px;
  line-height: 1.4;
}

.money-input {
  display: flex;
  min-height: 44px;
  align-items: center;
  padding: 0 12px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.money-input > span {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 15px;
}

.money-input input {
  min-height: 42px;
  padding: 0 0 0 6px;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-family: var(--serif);
  font-size: 18px;
  box-shadow: none !important;
}

.money-input input:focus {
  background: transparent;
  border: 0;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.char-count {
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: var(--muted-light);
  font-size: 8px;
  letter-spacing: 0.03em;
}

.field textarea {
  padding-bottom: 23px;
}

.form-error {
  min-height: 17px;
  color: var(--danger);
  font-size: 10.5px;
  line-height: 1.6;
}

.form-row-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 156px;
  gap: 13px;
}

.choice-group {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.category-options {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.category-choice {
  position: relative;
  display: flex;
  min-height: 67px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 8px 3px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.category-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.category-choice .category-emoji {
  font-size: 20px;
  line-height: 1;
}

.category-choice .category-name {
  color: var(--muted);
  font-size: 9px;
}

.category-choice:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.category-choice:has(input:checked) {
  background: var(--forest-soft);
  border-color: var(--forest);
}

.category-choice:has(input:checked) .category-name {
  color: var(--forest);
  font-weight: 650;
}

.category-choice:has(input:focus-visible) {
  outline: 3px solid rgba(217, 96, 70, 0.25);
  outline-offset: 2px;
}

.cooling-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.cooling-choice {
  position: relative;
  display: flex;
  min-height: 72px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.cooling-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.cooling-choice strong {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.cooling-choice small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.cooling-choice:has(input:checked) {
  background: var(--forest-soft);
  border-color: var(--forest);
}

.cooling-choice:has(input:checked) strong {
  color: var(--forest);
}

.cooling-choice:has(input:checked)::after {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 14px;
  height: 14px;
  place-items: center;
  color: var(--cream);
  background: var(--forest);
  border-radius: 50%;
  content: "✓";
  font-size: 8px;
  font-weight: 700;
}

.cooling-choice:has(input:focus-visible) {
  outline: 3px solid rgba(217, 96, 70, 0.25);
  outline-offset: 2px;
}

.field-hint {
  color: var(--muted-light);
  font-size: 9px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Dialogs
   -------------------------------------------------------------------------- */

dialog {
  color: var(--ink);
  background: transparent;
  border: 0;
  padding: 0;
}

dialog::backdrop {
  background: rgba(28, 32, 26, 0.42);
  backdrop-filter: blur(7px);
  animation: backdrop-in 220ms ease both;
}

.sheet {
  width: min(680px, calc(100vw - 32px));
  max-width: none;
  max-height: min(92dvh, 920px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  background: var(--paper);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
}

.sheet[open] {
  animation: dialog-in 260ms cubic-bezier(0.2, 0.85, 0.3, 1) both;
}

.add-sheet {
  width: min(680px, calc(100vw - 32px));
}

.add-sheet[open] {
  display: flex;
  flex-direction: column;
}

.add-sheet form {
  display: flex;
  min-height: 0;
  max-height: min(92dvh, 920px);
  flex: 1 1 auto;
  flex-direction: column;
}

.sheet-head {
  display: flex;
  flex: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 27px 28px 17px;
}

.sheet-head .eyebrow {
  margin-bottom: 7px;
}

.sheet-head h2 {
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.35;
}

.sheet-subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11.5px;
}

.sheet-head .icon-button {
  margin-top: 2px;
}

.sheet-body {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 20px;
  padding: 8px 28px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.sheet-footer {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 16px 28px 22px;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.sheet-footer .button-primary {
  min-width: 146px;
}

/* Detail dialog */
.detail-dialog {
  width: min(810px, calc(100vw - 32px));
  max-height: 92dvh;
  overflow: hidden;
  background: var(--paper);
  border-radius: 29px;
  box-shadow: var(--shadow-lg);
}

.detail-dialog[open] {
  display: flex;
  flex-direction: column;
}

.detail-shell {
  display: flex;
  min-height: 0;
  max-height: 92dvh;
  flex: 1 1 auto;
  flex-direction: column;
}

.detail-head {
  position: relative;
  display: flex;
  flex: none;
  align-items: flex-start;
  gap: 16px;
  padding: 25px 30px 21px;
  background:
    radial-gradient(circle at 100% 0, rgba(230, 215, 184, 0.3), transparent 21rem),
    var(--paper);
  border-bottom: 1px solid var(--line);
}

.detail-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 15px;
  flex: 1;
}

.detail-icon {
  display: grid;
  width: 62px;
  height: 62px;
  flex: none;
  place-items: center;
  background: var(--cat-bg);
  border-radius: 18px;
  font-size: 30px;
  line-height: 1;
}

.detail-title-block {
  min-width: 0;
  flex: 1;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.detail-meta .dot {
  width: 2px;
  height: 2px;
  background: var(--muted-light);
  border-radius: 50%;
}

.detail-title {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: clamp(20px, 2.6vw, 27px);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.detail-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 10px;
}

.detail-price strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.detail-head .icon-button {
  position: relative;
  z-index: 2;
}

.detail-scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 30px 28px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.status-panel {
  position: relative;
  overflow: hidden;
  padding: 20px 22px;
  border-radius: 19px;
}

.status-panel::after {
  position: absolute;
  right: -26px;
  top: -42px;
  width: 130px;
  height: 130px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
  opacity: 0.07;
}

.status-panel.status-cooling {
  color: #6e592b;
  background: #f5eedc;
}

.status-panel.status-ready {
  color: #9b422e;
  background: #faeae3;
}

.status-panel.status-resisted {
  color: var(--forest);
  background: #eaf0e7;
}

.status-panel.status-bought {
  color: #665b43;
  background: #f2eadc;
}

.status-panel-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.status-panel-copy small {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.status-panel-copy h3 {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.3;
}

.status-panel-copy p {
  max-width: 480px;
  margin-top: 5px;
  color: inherit;
  font-size: 10px;
  line-height: 1.7;
  opacity: 0.75;
}

.status-panel-countdown {
  flex: none;
  padding-top: 4px;
  font-family: var(--serif);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-align: right;
}

.status-panel-countdown span {
  display: block;
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.55;
}

.status-panel-countdown > div {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.status-panel-countdown.is-amount > div {
  font-size: 21px;
  letter-spacing: -0.03em;
}

.status-panel .progress-track {
  position: relative;
  z-index: 1;
  margin-top: 17px;
  background: rgba(255, 255, 255, 0.38);
}

.status-panel.status-cooling .progress-fill {
  background: #9b7b3c;
}

.status-panel.status-ready .progress-fill {
  background: var(--terracotta);
}

.detail-pair {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 12px;
  margin-top: 13px;
}

.detail-card {
  min-width: 0;
  padding: 18px 19px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.card-label {
  color: var(--terracotta-deep);
  font-size: 7.5px;
  font-weight: 750;
  letter-spacing: 0.16em;
}

.detail-card h3 {
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 650;
}

.why-quote {
  margin-top: 9px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.8;
  overflow-wrap: break-word;
  white-space: pre-line;
  word-break: break-word;
}

.why-empty {
  color: var(--muted-light);
  font-size: 10.5px;
}

.math-list {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
}

.math-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 9px;
  padding: 6px 0;
  border-top: 1px dashed rgba(213, 204, 187, 0.75);
  color: var(--muted);
  font-size: 9.5px;
}

.math-row:first-child {
  border-top: 0;
}

.math-row strong {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}

.math-foot {
  margin-top: 6px;
  color: var(--muted-light);
  font-size: 8px;
  line-height: 1.5;
}

.timeline-card {
  margin-top: 13px;
  padding: 18px 19px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.timeline-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.timeline-card-head h3 {
  font-size: 12.5px;
  font-weight: 650;
}

.timeline-card-head span {
  color: var(--muted-light);
  font-size: 9px;
}

.timeline {
  display: flex;
  flex-direction: column;
  margin-top: 14px;
}

.timeline-item {
  position: relative;
  padding: 0 0 15px 25px;
}

.timeline-item::before {
  position: absolute;
  top: 5px;
  left: 2px;
  width: 7px;
  height: 7px;
  background: var(--paper);
  border: 1.5px solid var(--sage-deep);
  border-radius: 50%;
  content: "";
}

.timeline-item::after {
  position: absolute;
  top: 14px;
  bottom: -1px;
  left: 5px;
  width: 1px;
  background: var(--line);
  content: "";
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item:last-child::after {
  display: none;
}

.timeline-item.is-future::before {
  border-color: var(--line-strong);
}

.timeline-item.is-decision::before {
  background: var(--forest);
  border-color: var(--forest);
}

.timeline-item.is-decision.is-saved::before {
  background: var(--sage-deep);
  border-color: var(--sage-deep);
}

.timeline-time {
  color: var(--muted-light);
  font-size: 8.5px;
}

.timeline-title {
  margin-top: 1px;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 600;
}

.timeline-desc {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.reflection-card {
  margin-top: 13px;
  padding: 21px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 21px;
}

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

.reflection-head .card-label {
  display: block;
  margin-bottom: 4px;
}

.reflection-head h3 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.reflection-head p {
  max-width: 450px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.quiz-progress-pill {
  display: inline-flex;
  min-height: 25px;
  flex: none;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  color: var(--forest);
  background: var(--forest-soft);
  border-radius: 999px;
  font-size: 8.5px;
  font-weight: 650;
  white-space: nowrap;
}

.quiz-progress-pill.is-complete {
  color: var(--terracotta-deep);
  background: var(--terracotta-soft);
}

.locked-panel {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 16px;
  padding: 16px;
  background: #f7f2e7;
  border: 1px dashed var(--line-strong);
  border-radius: 15px;
}

.locked-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  color: #99804d;
  background: #efe3c7;
  border-radius: 11px;
}

.locked-mark .icon {
  width: 17px;
  height: 17px;
}

.locked-copy strong {
  display: block;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 600;
}

.locked-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.quiz-list {
  margin-top: 13px;
}

.quiz-question {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.quiz-question legend {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  padding: 0;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.6;
}

.question-number {
  flex: none;
  padding-top: 1px;
  color: var(--terracotta);
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.question-hint {
  margin: 4px 0 0 29px;
  color: var(--muted-light);
  font-size: 8.5px;
  line-height: 1.6;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0 0 29px;
}

.quiz-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.quiz-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.quiz-option span {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  color: var(--ink-soft);
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 10px;
  line-height: 1.45;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease;
}

.quiz-option span::before {
  width: 12px;
  height: 12px;
  flex: none;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  content: "";
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.quiz-option:hover span {
  border-color: var(--line-strong);
}

.quiz-option input:checked + span {
  color: var(--forest);
  background: var(--forest-soft);
  border-color: var(--forest);
  font-weight: 560;
}

.quiz-option input:checked + span::before {
  background: var(--forest);
  border-color: var(--forest);
  box-shadow: inset 0 0 0 3px var(--forest-soft);
}

.quiz-option input:focus-visible + span {
  outline: 3px solid rgba(217, 96, 70, 0.25);
  outline-offset: 2px;
}

.quiz-result {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 5px;
  padding: 15px;
  background: #f4ecdc;
  border: 1px solid #eadcc1;
  border-radius: 15px;
}

.quiz-result[hidden] {
  display: none;
}

.quiz-result[data-verdict="rational"] {
  background: #eaf0e7;
  border-color: #dce7d9;
}

.quiz-result[data-verdict="warm"] {
  background: #f5eedf;
  border-color: #eadfc8;
}

.quiz-result[data-verdict="impulse"] {
  background: #fae9e3;
  border-color: #f0d7cd;
}

.quiz-score-ring {
  --score: 0;
  --ring-color: #a28a56;
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  flex: none;
  place-items: center;
  background: conic-gradient(
    var(--ring-color) calc(var(--score) * 1%),
    rgba(255, 255, 255, 0.65) calc(var(--score) * 1%) 100%
  );
  border-radius: 50%;
}

.quiz-score-ring::after {
  position: absolute;
  inset: 5px;
  background: inherit;
  background: var(--paper);
  border-radius: 50%;
  content: "";
}

.quiz-result[data-verdict="rational"] .quiz-score-ring {
  --ring-color: var(--sage-deep);
}

.quiz-result[data-verdict="impulse"] .quiz-score-ring {
  --ring-color: var(--terracotta);
}

.quiz-score-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
}

.quiz-score-inner strong {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.quiz-score-inner small {
  color: var(--muted);
  font-size: 7px;
}

.quiz-result-copy {
  min-width: 0;
}

.quiz-result-copy small {
  display: block;
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.quiz-result-copy h4 {
  margin-top: 2px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

.quiz-result-copy p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

.quiz-result-note {
  margin-top: 9px;
  color: var(--muted-light);
  font-size: 8px;
  line-height: 1.6;
  text-align: center;
}

.decision-reason-field {
  margin-top: 13px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.decision-reason-field textarea {
  min-height: 70px;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.7;
}

.detail-utility {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 15px;
  padding: 2px 2px 0;
}

.detail-utility .text-button {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 500;
  text-decoration-color: transparent;
}

.detail-utility .text-button:hover {
  color: var(--danger);
  text-decoration-color: currentColor;
}

.detail-utility .text-button .icon {
  width: 13px;
  height: 13px;
}

.detail-utility > span {
  color: var(--muted-light);
  font-size: 8px;
  text-align: right;
}

.answer-review {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
}

.answer-review-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px dashed var(--line);
}

.answer-review-item:first-child {
  border-top: 0;
}

.answer-review-num {
  color: var(--terracotta);
  font-family: var(--serif);
  font-size: 11px;
}

.answer-review-q {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.answer-review-a {
  color: var(--forest);
  font-size: 9px;
  font-weight: 600;
  text-align: right;
}

.outcome-note {
  margin-top: 13px;
  padding: 15px 17px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--sage-deep);
  border-radius: 0 13px 13px 0;
}

.outcome-note.is-bought {
  border-left-color: var(--gold);
}

.outcome-note small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.outcome-note p {
  margin-top: 4px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.75;
}

.detail-footer {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 30px 19px;
  background: rgba(255, 253, 248, 0.92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.footer-note {
  min-width: 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.6;
}

.footer-note strong {
  display: block;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 600;
}

.footer-note.is-warning {
  color: var(--terracotta-deep);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.detail-actions .button {
  min-height: 40px;
  padding: 0 16px;
  font-size: 11.5px;
}

.detail-actions .decision-primary.is-loading::after {
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #fffaf0;
}

.detail-actions .decision-buy.is-loading::after {
  border-color: rgba(183, 75, 53, 0.22);
  border-top-color: var(--terracotta-deep);
}

.settings-card code {
  padding: 1px 4px;
  color: var(--forest);
  background: var(--forest-soft);
  border-radius: 4px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.92em;
}

.detail-actions .button-quiet {
  padding: 0 4px;
}

.detail-actions .decision-primary {
  color: var(--cream);
  background: var(--forest);
}

.detail-actions .decision-buy {
  color: var(--terracotta-deep);
  background: transparent;
  border-color: #dfb8aa;
}

.detail-actions .decision-buy:hover:not(:disabled) {
  background: var(--terracotta-soft);
}

/* Confirm dialog */
.confirm-dialog {
  width: min(410px, calc(100vw - 28px));
  margin: auto;
  padding: 25px;
  overflow: hidden;
  background: var(--paper);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}

.confirm-dialog[open] {
  animation: dialog-in 220ms cubic-bezier(0.2, 0.85, 0.3, 1) both;
}

.confirm-mark {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 15px;
  place-items: center;
  color: #8b6d2b;
  background: #f4ebd4;
  border-radius: 13px;
}

.confirm-mark .icon {
  width: 19px;
  height: 19px;
}

.confirm-dialog.is-danger .confirm-mark {
  color: var(--danger);
  background: var(--danger-soft);
}

.confirm-copy .eyebrow {
  font-size: 8px;
}

.confirm-copy h2 {
  margin-top: 5px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.4;
}

.confirm-copy p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.75;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

.confirm-actions .button {
  min-height: 39px;
  font-size: 11.5px;
}

#confirmOk.is-danger {
  background: var(--danger);
  color: var(--cream);
}

/* Toast */
.toast {
  position: fixed;
  z-index: 1000;
  top: auto;
  right: auto;
  bottom: 28px;
  left: 50%;
  display: flex;
  width: max-content;
  max-width: min(480px, calc(100vw - 28px));
  min-height: 50px;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 9px 17px 9px 9px;
  color: var(--cream);
  background: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  box-shadow: 0 16px 35px rgba(27, 30, 24, 0.25);
  opacity: 0;
  overflow: visible;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition:
    opacity 220ms ease,
    transform 260ms cubic-bezier(0.2, 0.8, 0.3, 1);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast-icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: none;
  place-items: center;
  color: #d9e5d2;
  background: rgba(225, 239, 218, 0.12);
  border-radius: 9px;
}

.toast-icon .icon {
  width: 16px;
  height: 16px;
}

.toast.is-error .toast-icon {
  color: #f4c4bb;
  background: rgba(217, 96, 70, 0.17);
}

.toast-copy {
  min-width: 0;
  padding-right: 2px;
  font-size: 11.5px;
  line-height: 1.55;
}

/* Loading / failure / noscript */
.page-loading {
  display: flex;
  min-height: 62dvh;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 15px;
  color: var(--muted);
  font-size: 11.5px;
}

.loading-mark {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 27px;
}

.loading-mark span {
  width: 4px;
  height: 12px;
  background: var(--forest);
  border-radius: 999px;
  animation: loading-bars 1s ease-in-out infinite;
}

.loading-mark span:nth-child(2) {
  height: 22px;
  background: var(--terracotta);
  animation-delay: 120ms;
}

.loading-mark span:nth-child(3) {
  height: 16px;
  animation-delay: 240ms;
}

.error-state {
  display: flex;
  min-height: 62dvh;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 9px;
  padding: 30px;
  text-align: center;
}

.error-state .error-glyph {
  display: grid;
  width: 62px;
  height: 62px;
  margin-bottom: 6px;
  place-items: center;
  color: var(--terracotta);
  background: var(--terracotta-soft);
  border-radius: 18px;
}

.error-state h2 {
  font-size: 19px;
  font-weight: 650;
}

.error-state p {
  max-width: 380px;
  color: var(--muted);
  font-size: 11.5px;
}

.error-state .button {
  margin-top: 12px;
}

.noscript {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--cream);
  background: var(--forest);
  font-size: 15px;
  text-align: center;
}

/* Scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1390px) {
  .home-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-rail {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .recent-rail {
    display: none;
  }

  .records-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .stats-grid {
    grid-template-columns: 1.1fr 1fr 1fr;
  }

  .stat-card:last-child {
    display: none;
  }
}

@media (max-width: 1080px) {
  :root {
    --sidebar-width: 228px;
  }

  .sidebar {
    padding-right: 15px;
    padding-left: 15px;
  }

  .view {
    padding-right: 28px;
    padding-left: 28px;
  }

  .records-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .records-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .settings-layout {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
  }

  .hero {
    padding-right: 28px;
    padding-left: 28px;
  }

  .hero-art {
    width: 210px;
    opacity: 0.85;
  }
}

@media (max-width: 980px) {
  .sidebar {
    display: none;
  }

  .view {
    margin-left: 0;
    padding: 10px 22px calc(100px + env(safe-area-inset-bottom));
  }

  .mobile-header {
    position: sticky;
    z-index: 25;
    top: 0;
    display: flex;
    height: calc(62px + env(safe-area-inset-top));
    align-items: center;
    justify-content: space-between;
    padding: env(safe-area-inset-top) 22px 0;
    background: rgba(244, 240, 230, 0.82);
    border-bottom: 1px solid rgba(213, 204, 187, 0.04);
    backdrop-filter: blur(17px);
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.02em;
  }

  .mobile-add {
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    color: var(--cream);
    background: var(--forest);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 6px 14px rgba(32, 67, 53, 0.17);
  }

  .mobile-add .icon {
    width: 18px;
    height: 18px;
  }

  .bottom-nav {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: calc(66px + env(safe-area-inset-bottom));
    padding: 7px 14px env(safe-area-inset-bottom);
    background: rgba(255, 253, 248, 0.91);
    border-top: 1px solid rgba(213, 204, 187, 0.75);
    backdrop-filter: blur(18px);
  }

  .bottom-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    color: #929287;
    border-radius: 13px;
    font-size: 9px;
    font-weight: 560;
    transition: color 160ms ease;
  }

  .bottom-nav-link .icon {
    width: 21px;
    height: 21px;
    stroke-width: 1.7;
  }

  .bottom-icon-wrap {
    position: relative;
    display: inline-flex;
  }

  .bottom-nav-link .nav-badge {
    position: absolute;
    top: -7px;
    left: 12px;
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    font-size: 8px;
  }

  .bottom-nav-link.is-active {
    color: var(--forest);
    font-weight: 700;
  }

  .bottom-nav-link.is-active::before {
    position: absolute;
    top: 3px;
    width: 17px;
    height: 3px;
    background: var(--terracotta);
    border-radius: 999px;
    content: "";
  }

  .page-head {
    margin-top: 20px;
    margin-bottom: 21px;
  }

  .page-title {
    font-size: clamp(25px, 4.3vw, 32px);
  }

  .refresh-hint {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1.1fr 1fr 1fr;
  }

  .wish-grid {
    gap: 13px;
  }

  .wish-card {
    min-height: 252px;
  }

  .toast {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 760px) {
  .view {
    padding-right: 16px;
    padding-left: 16px;
  }

  .mobile-header {
    padding-right: 16px;
    padding-left: 16px;
  }

  .page-head {
    align-items: flex-start;
    gap: 12px;
  }

  .page-title {
    font-size: 26px;
    letter-spacing: -0.04em;
  }

  .page-subtitle {
    max-width: 90%;
    margin-top: 7px;
    font-size: 11.5px;
    line-height: 1.7;
  }

  .page-actions .date-stamp {
    display: none;
  }

  .page-actions .button {
    min-height: 39px;
    padding: 0 14px;
    font-size: 11.5px;
  }

  .hero {
    min-height: 300px;
    padding: 25px 22px 0;
    border-radius: 25px;
  }

  .hero-copy {
    width: 100%;
    max-width: none;
  }

  .hero-eyebrow {
    padding: 5px 9px;
    font-size: 9px;
  }

  .hero-label {
    margin-top: 18px;
    font-size: 10.5px;
  }

  .hero-amount {
    font-size: clamp(48px, 14vw, 64px);
  }

  .hero-amount .currency {
    margin-top: 8px;
    font-size: 18px;
  }

  .hero-desc {
    max-width: 78%;
    color: rgba(247, 241, 228, 0.78);
    font-size: 10.5px;
  }

  .hero-link {
    margin-top: 14px;
    font-size: 10.5px;
  }

  .hero-art {
    position: absolute;
    top: 7px;
    right: -36px;
    width: 192px;
    height: 190px;
    margin: 0;
    opacity: 0.72;
    transform: scale(0.92);
  }

  .hero-sun {
    inset: 48px;
  }

  .sun-number {
    font-size: 37px;
  }

  .hero-metrics {
    margin-top: 20px;
  }

  .hero-metric {
    padding: 12px 8px 17px 0;
  }

  .hero-metric + .hero-metric {
    padding-left: 12px;
  }

  .hero-metric-label {
    font-size: 8.5px;
  }

  .hero-metric-value {
    font-size: 18px;
  }

  .hero-metric-value em {
    font-size: 8.5px;
  }

  .wishlist {
    margin-top: 26px;
  }

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

  .section-heading h2 {
    font-size: 19px;
  }

  .filter-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
  }

  .filter-chips {
    width: calc(100% + 16px);
    flex-wrap: nowrap;
    gap: 6px;
    margin-right: -16px;
    padding: 0 16px 3px 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .filter-chips::-webkit-scrollbar {
    display: none;
  }

  .filter-chip {
    min-height: 32px;
    flex: none;
    padding: 0 12px;
    font-size: 10.5px;
  }

  .wish-count-note {
    display: none;
  }

  .wish-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 11px;
  }

  .wish-card {
    min-height: 240px;
    padding: 18px;
    border-radius: 20px;
  }

  .wish-card::after {
    right: -66px;
  }

  .wish-card.status-ready::before {
    left: 18px;
    right: 18px;
  }

  .wish-name {
    font-size: 16.5px;
  }

  .wish-price {
    font-size: 26px;
  }

  .wish-progress {
    padding-top: 15px;
  }

  .wish-grid .wish-card:nth-child(2),
  .wish-grid .wish-card:nth-child(3) {
    animation-delay: 45ms;
  }

  .home-rail {
    display: flex;
    margin-top: 15px;
    flex-direction: column;
  }

  .home-rail .quote-card,
  .home-rail .recent-rail {
    display: none;
  }

  .budget-rail {
    padding: 17px 18px;
    border-radius: 19px;
  }

  .budget-rail .rail-head {
    margin-bottom: 13px;
  }

  .budget-top {
    align-items: center;
  }

  .budget-ring {
    width: 66px;
    height: 66px;
  }

  .budget-amount {
    font-size: 22px;
  }

  .budget-meta {
    margin-top: 12px;
    padding-top: 10px;
  }

  .empty-state {
    min-height: 270px;
    padding: 30px 18px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-bottom: 16px;
  }

  .stat-card {
    min-height: 129px;
    padding: 16px;
    border-radius: 18px;
  }

  .stat-value {
    margin-top: 12px;
    font-size: 27px;
  }

  .stat-foot {
    margin-top: 8px;
    line-height: 1.45;
  }

  .stat-label {
    font-size: 8.5px;
  }

  .stat-primary {
    grid-column: 1 / -1;
    min-height: 122px;
  }

  .stat-primary .stat-value {
    font-size: 34px;
  }

  .stat-card:last-child {
    display: flex;
  }

  .stat-card.stat-avg {
    display: none;
  }

  .records-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .records-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 17px 13px;
  }

  .panel-head .segmented {
    align-self: stretch;
    justify-content: space-between;
  }

  .segment {
    flex: 1;
    padding: 0 6px;
  }

  .record-list {
    padding: 0 17px 9px;
  }

  .record-item {
    gap: 10px;
    padding: 14px 0;
  }

  .record-date {
    display: none;
  }

  .record-icon {
    width: 37px;
    height: 37px;
    border-radius: 11px;
    font-size: 18px;
  }

  .record-reason {
    -webkit-line-clamp: 2;
  }

  .record-amount strong {
    font-size: 15px;
  }

  .mini-verdict {
    display: none;
  }

  .settings-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .settings-column {
    gap: 13px;
  }

  .settings-card {
    padding: 19px;
    border-radius: 20px;
  }

  .card-head {
    margin-bottom: 17px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .default-choice-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  .default-choice {
    min-height: 54px;
    border-radius: 10px;
  }

  .default-choice strong {
    font-size: 10px;
  }

  .default-choice small {
    font-size: 7px;
  }

  .settings-submit-row {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-submit-row .button {
    width: 100%;
  }

  .data-row {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 13px 0;
  }

  .data-row-copy {
    min-width: calc(100% - 50px);
  }

  .data-row .button {
    margin-left: 48px;
  }

  .about-card {
    min-height: 245px;
    padding: 21px;
    border-radius: 21px;
  }

  .about-card h2 {
    font-size: 23px;
  }

  .privacy-card {
    padding: 18px;
  }

  /* Full-screen sheets on phones */
  .sheet,
  .detail-dialog {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  .sheet[open] {
    animation: sheet-up 280ms cubic-bezier(0.2, 0.82, 0.3, 1) both;
  }

  .add-sheet form {
    height: 100%;
    max-height: none;
  }

  .sheet-head {
    padding: calc(18px + env(safe-area-inset-top)) 18px 15px;
  }

  .sheet-head h2 {
    font-size: 21px;
  }

  .sheet-subtitle {
    font-size: 10.5px;
  }

  .sheet-body {
    gap: 18px;
    padding: 6px 18px 16px;
  }

  .sheet-footer {
    padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
  }

  .sheet-footer .button {
    min-width: 0;
    flex: 1;
    min-height: 44px;
  }

  .category-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .category-choice {
    min-height: 61px;
    border-radius: 11px;
  }

  .cooling-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .cooling-choice {
    min-height: 65px;
    padding: 9px;
    border-radius: 11px;
  }

  .cooling-choice strong {
    font-size: 16px;
  }

  .form-row-split {
    grid-template-columns: minmax(0, 1fr) 116px;
    gap: 9px;
  }

  .field input,
  .field textarea,
  .settings-form input {
    font-size: 16px;
  }

  .money-input input {
    font-size: 19px;
  }

  .form-error {
    min-height: 15px;
  }

  .detail-shell {
    height: 100%;
    max-height: none;
  }

  .detail-head {
    padding: calc(16px + env(safe-area-inset-top)) 18px 15px;
    gap: 11px;
  }

  .detail-identity {
    gap: 11px;
  }

  .detail-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    font-size: 25px;
  }

  .detail-title {
    font-size: 20px;
  }

  .detail-price strong {
    font-size: 18px;
  }

  .detail-head .icon-button {
    width: 36px;
    height: 36px;
  }

  .detail-scroll {
    padding: 15px 16px 22px;
  }

  .status-panel {
    padding: 17px;
    border-radius: 17px;
  }

  .status-panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .status-panel-copy h3 {
    font-size: 21px;
  }

  .status-panel-countdown {
    padding: 0;
    font-size: 23px;
    text-align: left;
  }

  .status-panel-countdown span {
    display: inline;
    margin: 0 0 0 5px;
  }

  .detail-pair {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    margin-top: 9px;
  }

  .detail-card {
    padding: 16px;
    border-radius: 16px;
  }

  .why-quote {
    font-size: 14px;
  }

  .timeline-card {
    margin-top: 9px;
    padding: 16px;
    border-radius: 16px;
  }

  .reflection-card {
    margin-top: 9px;
    padding: 17px;
    border-radius: 18px;
  }

  .reflection-head {
    gap: 8px;
  }

  .reflection-head h3 {
    font-size: 16px;
  }

  .quiz-question {
    padding: 14px 0;
  }

  .quiz-question legend {
    font-size: 12px;
  }

  .quiz-options {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    margin-left: 0;
  }

  .question-hint {
    margin-left: 0;
  }

  .quiz-option span {
    min-height: 41px;
  }

  .quiz-result {
    gap: 11px;
    padding: 13px;
  }

  .answer-review-item {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .answer-review-a {
    grid-column: 2;
    text-align: left;
  }

  .detail-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 11px 16px calc(12px + env(safe-area-inset-bottom));
  }

  .footer-note {
    padding: 0 2px;
    font-size: 9px;
  }

  .footer-note strong {
    display: inline;
    margin-right: 4px;
    font-size: 9.5px;
  }

  .detail-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .detail-actions .button {
    width: 100%;
    min-height: 43px;
    padding: 0 10px;
    font-size: 11px;
  }

  .detail-actions .button.is-wide {
    grid-column: 1 / -1;
  }

  .detail-actions .button-quiet {
    grid-column: 1 / -1;
    min-height: 27px;
  }

  .detail-actions .button:only-child {
    grid-column: 1 / -1;
  }

  .detail-utility {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .detail-utility > span {
    text-align: left;
  }

  .confirm-dialog {
    width: calc(100vw - 28px);
    padding: 22px;
    border-radius: 22px;
  }

  .toast {
    bottom: calc(82px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 420px) {
  .page-actions .button-label {
    display: none;
  }

  .page-actions .button {
    width: 39px;
    padding: 0;
  }

  .hero {
    min-height: 286px;
  }

  .hero-art {
    right: -55px;
    opacity: 0.55;
  }

  .hero-desc {
    max-width: 85%;
  }

  .hero-metric-value {
    font-size: 16.5px;
  }

  .section-heading h2 {
    font-size: 18px;
  }

  .date-stamp {
    display: none;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-value {
    font-size: 24px;
  }

  .stat-primary .stat-value {
    font-size: 31px;
  }

  .record-title {
    max-width: 175px;
  }

  .record-meta {
    gap: 4px 6px;
  }

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

  .default-choice {
    min-height: 51px;
  }

  .category-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sheet-head h2 {
    font-size: 20px;
  }

  .detail-title {
    font-size: 18.5px;
  }

  .detail-meta {
    font-size: 8.5px;
  }

  .detail-price {
    margin-top: 4px;
  }
}

@media (max-width: 360px) {
  .hero-art {
    display: none;
  }

  .hero-desc {
    max-width: 100%;
  }

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

  .hero-metric-value {
    font-size: 15px;
  }

  .form-row-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .cooling-options {
    grid-template-columns: 1fr 1fr;
  }
}

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

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

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

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.975);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes live-pulse {
  0% {
    opacity: 0.8;
    transform: scale(0.6);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.45);
  }
}

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

@keyframes soft-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

@keyframes loading-bars {
  0%,
  100% {
    transform: scaleY(0.55);
  }
  50% {
    transform: scaleY(1);
  }
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   Public review · owner side
   -------------------------------------------------------------------------- */

.wish-category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 15px;
}

.wish-category-row .wish-category {
  min-width: 0;
  margin-top: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-mini {
  display: inline-flex;
  min-height: 21px;
  flex: none;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  color: var(--muted);
  background: #f0ebe0;
  border: 1px solid rgba(213, 204, 187, 0.6);
  border-radius: 999px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.review-mini .icon {
  width: 10px;
  height: 10px;
}

.review-mini.is-live {
  color: var(--terracotta-deep);
  background: var(--terracotta-soft);
  border-color: rgba(217, 96, 70, 0.16);
}

.review-mini.is-closed {
  color: var(--sage-deep);
  background: var(--forest-soft);
  border-color: rgba(98, 125, 104, 0.12);
}

.button-soft.is-loading::after {
  border-color: rgba(32, 67, 53, 0.18);
  border-top-color: var(--forest);
}

.review-owner-card {
  margin-top: 13px;
  padding: 21px;
  background:
    linear-gradient(145deg, rgba(240, 227, 197, 0.22), transparent 48%),
    var(--paper);
  border: 1px solid var(--line);
  border-radius: 21px;
}

.review-owner-card.is-live {
  border-color: rgba(217, 96, 70, 0.24);
  background:
    linear-gradient(145deg, rgba(249, 229, 221, 0.42), transparent 46%),
    var(--paper);
}

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

.review-owner-head .card-label {
  display: block;
  margin-bottom: 4px;
}

.review-owner-head h3 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.review-owner-head p {
  max-width: 520px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.review-state {
  display: inline-flex;
  min-height: 25px;
  flex: none;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  color: var(--muted);
  background: #f2ede3;
  border-radius: 999px;
  font-size: 8.5px;
  font-weight: 650;
  white-space: nowrap;
}

.review-state i {
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}

.review-state.is-live {
  color: var(--terracotta-deep);
  background: var(--terracotta-soft);
}

.review-state.is-live i {
  animation: soft-blink 2.1s ease-in-out infinite;
}

.review-summary {
  margin-top: 15px;
  padding: 14px 15px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 15px;
}

.review-summary-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 10px;
}

.review-summary-head strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.review-summary-head small {
  color: var(--muted-light);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.review-result-bar {
  height: 7px;
  margin-top: 10px;
  overflow: hidden;
  background: #91a793;
  border-radius: 999px;
}

.review-buy-fill {
  display: block;
  height: 100%;
  background: var(--terracotta);
  border-radius: inherit;
  transition: width 500ms cubic-bezier(0.2, 0.8, 0.3, 1);
}

.review-tally {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 13px;
  margin-top: 9px;
}

.review-tally-item {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
}

.review-tally-dot {
  width: 5px;
  height: 5px;
  flex: none;
  background: var(--terracotta);
  border-radius: 50%;
}

.review-tally-item.is-skip .review-tally-dot {
  background: #6f8b75;
}

.review-tally-item strong {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
}

.review-tally-item em {
  color: var(--muted-light);
  font-size: 8.5px;
  font-style: normal;
}

.review-reading {
  margin-top: 8px;
  color: var(--muted-light);
  font-size: 8.5px;
  line-height: 1.55;
}

.review-awaiting {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 14px;
  padding: 12px 13px;
  background: rgba(255, 253, 248, 0.55);
  border: 1px dashed var(--line-strong);
  border-radius: 13px;
}

.review-awaiting-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: none;
  place-items: center;
  background: var(--forest-soft);
  border-radius: 10px;
  font-size: 15px;
}

.review-awaiting strong,
.review-awaiting span {
  display: block;
}

.review-awaiting strong {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
}

.review-awaiting div span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.55;
}

.review-share {
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px dashed var(--line);
}

.review-share-url {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.review-share-url span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.review-share-url code {
  overflow: hidden;
  color: var(--ink-soft);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 9.5px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
}

.review-actions .button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 10px;
}

.review-actions .button .icon {
  width: 13px;
  height: 13px;
}

.review-actions .danger-text {
  color: var(--danger);
}

.review-share-hint {
  margin-top: 8px;
  color: var(--muted-light);
  font-size: 8.5px;
  line-height: 1.6;
}

.review-start {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 14px;
  background: rgba(231, 238, 231, 0.5);
  border: 1px solid rgba(98, 125, 104, 0.13);
  border-radius: 14px;
}

.review-start-copy {
  min-width: 0;
}

.review-start-copy strong {
  display: block;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 600;
}

.review-start-copy p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

.review-start .button {
  min-height: 36px;
  flex: none;
  padding: 0 13px;
  font-size: 10.5px;
}

.review-decision-note {
  margin-top: 11px;
  color: var(--muted-light);
  font-size: 8.5px;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .wish-category-row {
    margin-top: 13px;
  }

  .review-owner-card {
    margin-top: 9px;
    padding: 17px;
    border-radius: 18px;
  }

  .review-owner-head {
    flex-wrap: wrap;
  }

  .review-owner-head h3 {
    font-size: 16px;
  }

  .review-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .review-actions .button {
    width: 100%;
    min-height: 40px;
    padding: 0 8px;
    font-size: 10.5px;
  }

  .review-start {
    align-items: stretch;
    flex-direction: column;
    gap: 11px;
  }

  .review-start .button {
    width: 100%;
    min-height: 41px;
  }

  .review-share-url code {
    font-size: 9px;
  }

  .review-tally {
    gap: 8px;
  }

  .review-tally-item {
    gap: 4px;
    font-size: 8.5px;
  }
}

/* --------------------------------------------------------------------------
   Boot splash and account entry
   -------------------------------------------------------------------------- */

.boot-splash {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: var(--forest);
  background:
    radial-gradient(circle at 50% 38%, rgba(217, 96, 70, 0.07), transparent 22rem),
    var(--paper);
}

.boot-splash .brand-mark {
  color: var(--forest);
  animation: boot-float 2.6s ease-in-out infinite;
}

.boot-splash p {
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.08em;
}

.boot-splash-line {
  width: 44px;
  height: 2px;
  margin-top: 7px;
  overflow: hidden;
  background: rgba(32, 67, 53, 0.12);
  border-radius: 99px;
}

.boot-splash-line::after {
  display: block;
  width: 18px;
  height: 100%;
  background: var(--terracotta);
  border-radius: inherit;
  animation: boot-slide 1.4s ease-in-out infinite;
  content: "";
}

@keyframes boot-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes boot-slide {
  0% {
    transform: translateX(-20px);
  }
  100% {
    transform: translateX(48px);
  }
}

.auth-screen {
  min-height: 100dvh;
}

.auth-page {
  display: grid;
  min-height: 100dvh;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  background: var(--paper);
}

.auth-story {
  position: relative;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  padding: 46px clamp(38px, 5vw, 78px) 35px;
  color: var(--cream);
  background:
    radial-gradient(circle at 82% 16%, rgba(210, 180, 113, 0.2), transparent 20rem),
    radial-gradient(circle at 12% 95%, rgba(217, 96, 70, 0.15), transparent 24rem),
    var(--forest);
}

.auth-story::before,
.auth-story::after {
  position: absolute;
  border: 1px solid rgba(247, 241, 228, 0.07);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.auth-story::before {
  right: -90px;
  bottom: -140px;
  width: 420px;
  height: 420px;
}

.auth-story::after {
  right: 90px;
  bottom: 60px;
  width: 160px;
  height: 160px;
}

.auth-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 11px;
  color: var(--cream);
}

.auth-brand .brand-mark {
  color: #f5edd9;
  border-color: rgba(247, 241, 228, 0.2);
  background: rgba(255, 253, 248, 0.08);
}

.auth-brand .brand-copy strong {
  color: #f7f1e4;
}

.auth-brand .brand-copy small {
  color: rgba(247, 241, 228, 0.45);
}

.auth-story-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: auto 0;
  padding: 72px 0 48px;
}

.auth-story-copy .eyebrow {
  color: #d9bd7c;
}

.auth-story-copy h1 {
  margin-top: 18px;
  color: #f7f1e4;
  font-family: var(--serif);
  font-size: clamp(40px, 4.5vw, 65px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.22;
}

.auth-story-copy > p:last-child {
  max-width: 440px;
  margin-top: 22px;
  color: rgba(247, 241, 228, 0.55);
  font-size: 12px;
  line-height: 1.9;
}

.auth-quote {
  position: relative;
  z-index: 1;
  display: flex;
  max-width: 390px;
  align-items: flex-start;
  gap: 11px;
  padding-top: 21px;
  border-top: 1px solid rgba(247, 241, 228, 0.13);
}

.auth-quote > span {
  color: rgba(217, 189, 124, 0.55);
  font-family: var(--serif);
  font-size: 35px;
  line-height: 0.8;
}

.auth-quote p {
  color: rgba(247, 241, 228, 0.63);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.02em;
  line-height: 1.7;
}

.auth-story-foot {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 34px;
  color: rgba(247, 241, 228, 0.28);
  font-size: 8.5px;
  letter-spacing: 0.08em;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 42px clamp(24px, 4vw, 62px);
}

.auth-card {
  width: 100%;
  max-width: 390px;
}

.auth-tabs {
  display: flex;
  width: fit-content;
  gap: 3px;
  padding: 3px;
  background: #eee7da;
  border: 1px solid rgba(211, 201, 184, 0.7);
  border-radius: 999px;
}

.auth-tab {
  min-width: 76px;
  padding: 8px 16px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition:
    color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.auth-tab.is-active {
  color: var(--ink);
  background: var(--paper-soft);
  box-shadow: 0 2px 7px rgba(64, 57, 43, 0.08);
}

.auth-heading {
  margin-top: 26px;
}

.auth-heading .eyebrow {
  color: var(--terracotta-deep);
}

.auth-heading h2 {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: clamp(26px, 2.4vw, 33px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.35;
}

.auth-heading > p:last-child {
  max-width: 340px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.75;
}

.auth-error {
  margin-top: 16px;
  padding: 10px 12px;
  color: #9c3827;
  background: #f7e8e2;
  border: 1px solid #ebcfc5;
  border-radius: 10px;
  font-size: 10px;
  line-height: 1.6;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-top: 22px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field > span {
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 600;
}

.auth-field input {
  width: 100%;
  height: 47px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 12px;
  outline: none;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.auth-field input::placeholder {
  color: var(--muted-light);
  font-size: 10px;
}

.auth-field input:focus {
  background: #fffdf9;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(32, 67, 53, 0.08);
}

.auth-submit {
  width: 100%;
  min-height: 48px;
  justify-content: center;
  margin-top: 5px;
  gap: 7px;
  font-size: 11.5px;
}

.auth-submit .icon {
  width: 15px;
  height: 15px;
  transform: rotate(-45deg);
}

.auth-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.7;
}

.auth-note .text-button {
  margin-left: 3px;
  color: var(--terracotta-deep);
  font-size: 9.5px;
  font-weight: 650;
}

.auth-privacy {
  margin-top: 30px;
  padding-top: 15px;
  color: var(--muted-light);
  border-top: 1px solid var(--line);
  font-size: 8px;
  line-height: 1.7;
}

@media (max-width: 980px) {
  .auth-page {
    grid-template-columns: minmax(0, 0.9fr) minmax(390px, 1.1fr);
  }

  .auth-story {
    padding: 34px 30px 28px;
  }

  .auth-story-copy {
    padding: 40px 0 30px;
  }

  .auth-story-copy h1 {
    font-size: 37px;
  }

  .auth-quote {
    display: none;
  }
}

@media (max-width: 760px) {
  .auth-page {
    display: flex;
    flex-direction: column;
  }

  .auth-story {
    min-height: auto;
    padding: 22px 22px 26px;
    border-radius: 0 0 24px 24px;
  }

  .auth-story-copy {
    padding: 28px 0 4px;
  }

  .auth-story-copy h1 {
    margin-top: 10px;
    font-size: 30px;
  }

  .auth-story-copy > p:last-child {
    margin-top: 12px;
    font-size: 10.5px;
    line-height: 1.7;
  }

  .auth-story-foot {
    display: none;
  }

  .auth-panel {
    align-items: flex-start;
    padding: 24px 20px 40px;
  }

  .auth-card {
    max-width: 100%;
  }

  .auth-heading {
    margin-top: 21px;
  }

  .auth-heading h2 {
    font-size: 27px;
  }

  .auth-field input {
    height: 49px;
    font-size: 16px;
  }

  .auth-field input::placeholder {
    font-size: 12px;
  }

  .auth-submit {
    min-height: 49px;
    font-size: 12px;
  }

  .auth-privacy {
    margin-top: 22px;
  }
}

@media (max-width: 360px) {
  .auth-story {
    padding: 18px 17px 22px;
  }

  .auth-story-copy h1 {
    font-size: 27px;
  }

  .auth-panel {
    padding: 20px 15px 32px;
  }

  .auth-tab {
    min-width: 68px;
  }
}


/* --------------------------------------------------------------------------
   Community identity, square and groups
   -------------------------------------------------------------------------- */

.social-mini {
  display: inline-flex;
  min-width: 0;
  min-height: 21px;
  flex: none;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  overflow: hidden;
  color: var(--muted);
  background: #f0ebe0;
  border: 1px solid rgba(213, 204, 187, 0.6);
  border-radius: 999px;
  font-size: 8px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-mini .icon {
  width: 10px;
  height: 10px;
}

.social-mini > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.social-mini.is-public {
  color: var(--terracotta-deep);
  background: var(--terracotta-soft);
  border-color: rgba(217, 96, 70, 0.13);
}

.social-mini.is-group {
  color: var(--sage-deep);
  background: var(--forest-soft);
  border-color: rgba(98, 125, 104, 0.13);
}

.social-mini.is-private {
  color: #8f8063;
  background: #f2ead9;
  border-color: #e5d8bf;
}

/* Visibility picker in the add sheet */
.visibility-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.visibility-choice {
  position: relative;
  display: flex;
  min-height: 76px;
  align-items: flex-start;
  gap: 9px;
  padding: 11px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.visibility-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.visibility-icon {
  display: grid;
  width: 27px;
  height: 27px;
  flex: none;
  place-items: center;
  color: var(--muted);
  background: #f1ebdf;
  border-radius: 8px;
}

.visibility-icon .icon {
  width: 14px;
  height: 14px;
}

.visibility-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.visibility-copy strong {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.4;
}

.visibility-copy small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.visibility-choice:hover {
  border-color: var(--line-strong);
}

.visibility-choice:has(input:checked) {
  background: var(--forest-soft);
  border-color: var(--forest);
}

.visibility-choice:has(input:checked) .visibility-icon {
  color: var(--forest);
  background: rgba(32, 67, 53, 0.09);
}

.visibility-choice:has(input:checked) .visibility-copy strong {
  color: var(--forest);
}

.visibility-choice:has(input:focus-visible) {
  outline: 3px solid rgba(217, 96, 70, 0.25);
  outline-offset: 2px;
}

.visibility-choice.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.group-target-field {
  margin-top: 8px;
}

.field select {
  width: 100%;
  min-height: 43px;
  padding: 0 36px 0 13px;
  color: var(--ink);
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
  font-size: 13px;
  outline: none;
}

.field select:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(32, 67, 53, 0.08);
}

/* Shared square toolbar and social empty states */
.social-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 19px 0 17px;
}

.social-refresh {
  display: inline-flex;
  min-height: 34px;
  flex: none;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  transition:
    color 160ms ease,
    background 160ms ease;
}

.social-refresh:hover {
  color: var(--ink);
  background: var(--paper);
}

.social-refresh:disabled {
  opacity: 0.5;
}

.social-refresh .icon {
  width: 13px;
  height: 13px;
}

.social-refresh.is-loading .icon {
  animation: spin 800ms linear infinite;
}

.social-empty {
  display: flex;
  min-height: 290px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 34px 22px;
  text-align: center;
  background: rgba(255, 253, 248, 0.55);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
}

.social-empty-icon {
  display: grid;
  width: 65px;
  height: 65px;
  margin-bottom: 14px;
  place-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 25px;
  box-shadow: var(--shadow-sm);
}

.social-empty h2 {
  font-size: 16px;
  font-weight: 650;
}

.social-empty p {
  max-width: 410px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.75;
}

.social-empty .button {
  margin-top: 17px;
  min-height: 40px;
  font-size: 11.5px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 550;
}

.back-link:hover {
  color: var(--ink);
}

.back-link .icon {
  width: 14px;
  height: 14px;
  transform: rotate(180deg);
}

/* Square */
.square-note-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 25px 27px;
  color: var(--cream);
  background:
    radial-gradient(circle at 90% 15%, rgba(200, 169, 103, 0.19), transparent 18rem),
    var(--forest);
  border-radius: 24px;
  box-shadow: 0 16px 30px rgba(32, 67, 53, 0.14);
}

.square-note-copy .card-label {
  color: #d8c28a;
}

.square-note-copy h2 {
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.square-note-copy p {
  max-width: 580px;
  margin-top: 7px;
  color: rgba(247, 241, 228, 0.62);
  font-size: 10px;
  line-height: 1.75;
}

.square-metric {
  display: flex;
  flex: none;
  align-items: flex-end;
  flex-direction: column;
  padding-left: 22px;
  border-left: 1px solid rgba(247, 241, 228, 0.14);
}

.square-metric strong {
  color: #f7f1e4;
  font-family: var(--serif);
  font-size: 43px;
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
}

.square-metric span {
  margin-top: 4px;
  color: rgba(247, 241, 228, 0.55);
  font-size: 8.5px;
}

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

.community-card {
  --cat-bg: #e9e5da;
  --cat-ink: #6f6a5d;
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  padding: 20px;
  color: var(--ink);
  text-align: left;
  background: var(--paper);
  border: 1px solid rgba(212, 203, 187, 0.76);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition:
    transform 200ms ease,
    box-shadow 200ms ease,
    border-color 200ms ease;
}

.community-card::after {
  position: absolute;
  right: -48px;
  top: -52px;
  width: 110px;
  height: 110px;
  border: 1px solid rgba(83, 77, 59, 0.05);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

@media (hover: hover) {
  .community-card:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
  }
}

.community-card:focus-visible {
  outline: 3px solid rgba(217, 96, 70, 0.28);
  outline-offset: 2px;
}

.community-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.community-author {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.community-author .avatar {
  width: 29px;
  height: 29px;
  font-size: 12px;
}

.community-author-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.community-author-copy strong {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-author-copy strong em {
  padding: 1px 4px;
  color: var(--terracotta-deep);
  background: var(--terracotta-soft);
  border-radius: 4px;
  font-size: 7px;
  font-style: normal;
  font-weight: 650;
}

.community-author-copy span {
  color: var(--muted-light);
  font-size: 8px;
}

.community-wish {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
}

.community-wish .wish-icon {
  width: 43px;
  height: 43px;
  border-radius: 13px;
  font-size: 21px;
}

.community-wish-copy {
  min-width: 0;
  flex: 1;
}

.community-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--cat-ink);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.scope-chip {
  max-width: 128px;
  padding: 2px 5px;
  overflow: hidden;
  color: var(--muted);
  background: #f3eee4;
  border-radius: 4px;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scope-chip.is-group {
  color: var(--sage-deep);
  background: var(--forest-soft);
}

.community-name {
  margin-top: 2px;
  overflow: hidden;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-price {
  display: inline-flex;
  align-items: flex-start;
  margin-top: 3px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
}

.community-price > span {
  margin: 2px 2px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.community-note {
  display: -webkit-box;
  margin-top: 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.community-advice {
  margin-top: auto;
  padding-top: 16px;
}

.community-advice-bar {
  height: 4px;
  overflow: hidden;
  background: #b4c4b5;
  border-radius: 999px;
}

.community-buy-fill {
  display: block;
  height: 100%;
  background: var(--terracotta);
  border-radius: inherit;
}

.community-advice-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  color: var(--muted-light);
  font-size: 8px;
}

.community-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid rgba(230, 224, 211, 0.8);
}

.community-countdown {
  color: var(--muted);
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
}

.community-countdown [data-countdown] {
  color: var(--ink-soft);
  font-weight: 550;
}

.community-card.status-ready .community-countdown {
  color: var(--terracotta-deep);
}

.community-cta {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  color: var(--forest);
  font-size: 9px;
  font-weight: 650;
}

.community-cta .icon {
  width: 12px;
  height: 12px;
}

/* Groups landing */
.group-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 30px;
}

.group-tool-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--paper);
  border: 1px solid rgba(212, 203, 187, 0.75);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
}

.group-tool-card.is-join {
  background:
    linear-gradient(145deg, rgba(240, 227, 197, 0.33), transparent 46%),
    var(--paper);
}

.group-tool-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.group-tool-icon {
  display: grid;
  width: 37px;
  height: 37px;
  flex: none;
  place-items: center;
  color: var(--forest);
  background: var(--forest-soft);
  border-radius: 11px;
}

.group-tool-icon.is-warm {
  color: #927746;
  background: var(--gold-soft);
}

.group-tool-icon .icon {
  width: 17px;
  height: 17px;
}

.group-tool-head .card-label {
  display: block;
  margin-bottom: 2px;
}

.group-tool-head h2 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.group-tool-card > p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.group-form-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
}

.group-form-row input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 13px;
  color: var(--ink);
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 12px;
  outline: none;
}

.group-form-row input:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(32, 67, 53, 0.08);
}

.group-form-row .code-input {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-weight: 600;
}

.group-form-row .button {
  min-height: 42px;
  flex: none;
  padding: 0 14px;
  font-size: 10.5px;
}

.group-form-error {
  min-height: 14px;
  margin-top: 7px;
  color: var(--danger);
  font-size: 9px;
  line-height: 1.5;
}

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

.group-card {
  display: block;
  padding: 20px;
  background: var(--paper);
  border: 1px solid rgba(212, 203, 187, 0.76);
  border-radius: 21px;
  box-shadow: var(--shadow-sm);
  transition:
    transform 190ms ease,
    border-color 190ms ease,
    box-shadow 190ms ease;
}

.group-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.group-card:focus-visible {
  outline: 3px solid rgba(217, 96, 70, 0.28);
  outline-offset: 2px;
}

.group-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.group-card-mark {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  color: var(--forest);
  background: var(--forest-soft);
  border-radius: 10px;
}

.group-card-mark .icon {
  width: 17px;
  height: 17px;
}

.group-role {
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
}

.group-card h3 {
  margin-top: 14px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.group-card > p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
}

.group-card-members {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 13px;
}

.group-avatar-row {
  display: flex;
  align-items: center;
  padding-left: 4px;
}

.group-avatar {
  width: 26px;
  height: 26px;
  margin-left: -4px;
  font-size: 10px;
  border: 1.5px solid var(--paper);
}

.group-avatar-more {
  display: inline-grid;
  min-width: 26px;
  height: 26px;
  margin-left: -4px;
  padding: 0 4px;
  place-items: center;
  color: var(--muted);
  background: #f0ebe0;
  border: 1.5px solid var(--paper);
  border-radius: 50%;
  font-size: 8px;
}

.group-code {
  margin-left: auto;
  padding: 4px 7px;
  color: #7b6b4c;
  background: #f5ecda;
  border-radius: 6px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.group-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  color: var(--muted-light);
  border-top: 1px solid var(--line);
  font-size: 8.5px;
}

.group-card-foot > span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--forest);
  font-size: 9px;
  font-weight: 600;
}

.group-card-foot .icon {
  width: 12px;
  height: 12px;
}

/* Group detail page */
.group-detail-page {
  max-width: 1120px;
}

.group-detail-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.group-detail-copy {
  min-width: 0;
}

.group-detail-copy .eyebrow {
  margin-bottom: 7px;
}

.group-detail-copy .page-title {
  font-size: clamp(27px, 3vw, 36px);
}

.group-detail-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}

.group-code-button {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  letter-spacing: 0.04em;
}

.group-roster {
  padding: 17px 20px;
  background: rgba(255, 253, 248, 0.62);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.group-roster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 8.5px;
}

.group-roster-head > span:first-child {
  color: var(--ink-soft);
  font-weight: 600;
}

.group-roster-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
}

.group-member {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 10px;
}

.group-member .avatar {
  width: 25px;
  height: 25px;
  font-size: 10px;
}

.group-member.is-me {
  color: var(--forest);
  font-weight: 600;
}

.group-member em {
  padding: 1px 5px;
  color: #8d784b;
  background: var(--gold-soft);
  border-radius: 4px;
  font-size: 7px;
  font-style: normal;
}

.group-feed {
  margin-top: 30px;
}

.group-detail-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  max-width: 700px;
  margin: 22px auto 0;
  color: var(--muted-light);
  font-size: 9px;
  line-height: 1.7;
  text-align: left;
}

.group-detail-note .icon {
  width: 13px;
  height: 13px;
  margin-top: 1px;
  flex: none;
}

.group-loading {
  min-height: 48dvh;
}

.group-error {
  margin-top: 28px;
}

/* Advice shared by owner and community views */
.advice-panel {
  margin-top: 13px;
  padding: 21px;
  background:
    linear-gradient(145deg, rgba(240, 227, 197, 0.2), transparent 45%),
    var(--paper);
  border: 1px solid var(--line);
  border-radius: 21px;
}

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

.advice-panel-head .card-label {
  display: block;
  margin-bottom: 4px;
}

.advice-panel-head h3 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.advice-panel-head p {
  max-width: 520px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.advice-count-pill {
  display: inline-flex;
  min-height: 25px;
  flex: none;
  align-items: center;
  padding: 0 9px;
  color: var(--forest);
  background: var(--forest-soft);
  border-radius: 999px;
  font-size: 8.5px;
  font-weight: 650;
  white-space: nowrap;
}

.advice-summary {
  margin-top: 15px;
  padding: 14px 15px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 15px;
}

.advice-summary-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 9.5px;
}

.advice-summary-head strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.advice-summary-head > span:last-child {
  color: var(--muted-light);
  font-size: 8px;
}

.advice-bar {
  height: 6px;
  margin-top: 9px;
  overflow: hidden;
  background: #b4c4b5;
  border-radius: 999px;
}

.advice-buy-fill {
  display: block;
  height: 100%;
  background: var(--terracotta);
  border-radius: inherit;
}

.advice-tally {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 8.5px;
}

.advice-tally > span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.advice-tally i {
  width: 5px;
  height: 5px;
  flex: none;
  background: var(--terracotta);
  border-radius: 50%;
}

.advice-tally .is-skip i {
  background: #6f8b75;
}

.advice-tally strong {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
}

.advice-tally em {
  color: var(--muted-light);
  font-size: 8px;
  font-style: normal;
}

.advice-list {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
}

.advice-item {
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.advice-item:first-child {
  border-top: 0;
}

.advice-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.advice-avatar {
  width: 29px;
  height: 29px;
  font-size: 11px;
}

.advice-author-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 7px;
}

.advice-author-copy strong {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.advice-author-copy strong em {
  padding: 1px 4px;
  color: var(--terracotta-deep);
  background: var(--terracotta-soft);
  border-radius: 4px;
  font-size: 7px;
  font-style: normal;
}

.advice-author-copy > span {
  flex: none;
  color: var(--muted-light);
  font-size: 8px;
}

.advice-stance {
  flex: none;
  padding: 3px 7px;
  color: var(--terracotta-deep);
  background: var(--terracotta-soft);
  border-radius: 999px;
  font-size: 7.5px;
  font-weight: 650;
}

.advice-item.is-skip .advice-stance {
  color: var(--sage-deep);
  background: var(--forest-soft);
}

.advice-text {
  margin: 7px 0 0 37px;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.72;
  overflow-wrap: break-word;
  white-space: pre-line;
}

.advice-text.is-empty {
  color: var(--muted-light);
  font-size: 9px;
}

.advice-empty {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 14px;
  padding: 13px;
  background: rgba(255, 253, 248, 0.55);
  border: 1px dashed var(--line-strong);
  border-radius: 13px;
}

.advice-empty-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  color: var(--terracotta);
  background: var(--terracotta-soft);
  border-radius: 10px;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
}

.advice-empty strong,
.advice-empty span {
  display: block;
}

.advice-empty strong {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
}

.advice-empty div span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.55;
}

.advice-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted-light);
  font-size: 8px;
}

.advice-panel-foot .text-button {
  color: var(--sage-deep);
  font-size: 8.5px;
  font-weight: 600;
}

.advice-compose {
  margin-top: 17px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

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

.advice-compose-head .card-label {
  display: block;
  margin-bottom: 4px;
}

.advice-compose-head h3 {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.advice-compose-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.6;
}

.advice-saved {
  flex: none;
  padding: 3px 7px;
  color: var(--sage-deep);
  background: var(--forest-soft);
  border-radius: 999px;
  font-size: 7.5px;
  font-weight: 600;
}

.advice-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.advice-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 55px;
  padding: 9px 11px;
  color: var(--ink-soft);
  text-align: left;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
  cursor: pointer;
  transition:
    background 150ms ease,
    border-color 150ms ease;
}

.advice-choice:hover {
  border-color: var(--line-strong);
}

.advice-choice.is-selected.is-buy {
  background: var(--terracotta-soft);
  border-color: var(--terracotta);
}

.advice-choice.is-selected.is-skip {
  background: var(--forest-soft);
  border-color: var(--sage-deep);
}

.advice-choice-icon {
  display: grid;
  width: 27px;
  height: 27px;
  flex: none;
  place-items: center;
  color: var(--terracotta-deep);
  background: #f6e5dd;
  border-radius: 8px;
}

.advice-choice.is-skip .advice-choice-icon {
  color: var(--sage-deep);
  background: var(--forest-soft);
}

.advice-choice-icon .icon {
  width: 14px;
  height: 14px;
}

.advice-choice strong,
.advice-choice small {
  display: block;
}

.advice-choice strong {
  font-size: 10px;
  font-weight: 650;
}

.advice-choice small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.advice-text-field {
  display: block;
  margin-top: 9px;
}

.advice-text-field textarea {
  width: 100%;
  min-height: 76px;
  padding: 11px 12px;
  resize: vertical;
  color: var(--ink);
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.65;
  outline: none;
}

.advice-text-field textarea:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(32, 67, 53, 0.08);
}

.advice-compose-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.advice-compose-foot > span {
  color: var(--muted-light);
  font-size: 8px;
}

.advice-compose-foot .button {
  min-height: 38px;
  font-size: 10.5px;
}

.community-own-note {
  margin-top: 15px;
  padding: 13px;
  color: var(--muted);
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 9.5px;
  line-height: 1.7;
}

.community-own-note .text-button {
  margin-left: 5px;
  font-size: 9px;
}

.community-detail-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 14px;
  color: var(--muted-light);
  font-size: 8.5px;
  line-height: 1.65;
}

.community-detail-note .icon {
  width: 13px;
  height: 13px;
  flex: none;
}

.community-byline-avatar {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  color: var(--forest);
  background: var(--forest-soft);
  border-radius: 50%;
  font-size: 7px;
  font-weight: 650;
}

.community-status {
  margin-bottom: 0;
}

.community-status .progress-track {
  margin-top: 17px;
}

/* Responsive additions */
@media (max-width: 1080px) {
  .community-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .group-tools {
    gap: 12px;
  }

  .group-detail-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .group-detail-actions {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .social-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
    margin: 15px 0 13px;
  }

  .social-toolbar .filter-chips {
    width: calc(100% + 16px);
    flex-wrap: nowrap;
    margin-right: -16px;
    padding-bottom: 3px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .social-toolbar .filter-chips::-webkit-scrollbar {
    display: none;
  }

  .social-refresh {
    align-self: flex-end;
    min-height: 32px;
  }

  .square-note-panel {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    border-radius: 21px;
  }

  .square-note-copy h2 {
    font-size: 21px;
  }

  .square-metric {
    align-items: flex-start;
    width: 100%;
    padding: 12px 0 0;
    border-top: 1px solid rgba(247, 241, 228, 0.13);
    border-left: 0;
    flex-direction: row;
    gap: 9px;
    align-items: baseline;
  }

  .square-metric strong {
    font-size: 29px;
  }

  .square-metric span {
    margin-top: 0;
  }

  .community-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .community-card {
    padding: 17px;
    border-radius: 19px;
  }

  .community-name {
    font-size: 16px;
  }

  .community-note {
    font-size: 10.5px;
    -webkit-line-clamp: 3;
  }

  .group-tools {
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 24px;
  }

  .group-tool-card {
    padding: 18px;
    border-radius: 19px;
  }

  .group-form-row {
    flex-wrap: wrap;
  }

  .group-form-row input {
    min-height: 43px;
    font-size: 16px;
  }

  .group-form-row .button {
    width: 100%;
    min-height: 41px;
  }

  .group-form-error {
    font-size: 9px;
  }

  .group-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .group-card {
    padding: 17px;
    border-radius: 18px;
  }

  .group-detail-head {
    margin-bottom: 14px;
  }

  .group-detail-copy .page-title {
    font-size: 27px;
  }

  .group-detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .group-detail-actions .button {
    min-height: 42px;
    padding: 0 10px;
    font-size: 10.5px;
  }

  .group-roster {
    padding: 14px;
  }

  .group-roster-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .group-roster-list {
    gap: 7px 11px;
    margin-top: 10px;
  }

  .group-member {
    font-size: 9.5px;
  }

  .group-feed {
    margin-top: 24px;
  }

  .group-detail-note {
    margin-top: 17px;
  }

  .visibility-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .visibility-choice {
    min-height: 62px;
    align-items: center;
  }

  .field select {
    min-height: 46px;
    font-size: 16px;
  }

  .advice-panel {
    margin-top: 9px;
    padding: 17px;
    border-radius: 18px;
  }

  .advice-panel-head {
    gap: 8px;
  }

  .advice-panel-head h3 {
    font-size: 16px;
  }

  .advice-count-pill {
    min-height: 23px;
    font-size: 8px;
  }

  .advice-summary {
    padding: 12px;
  }

  .advice-tally {
    gap: 6px;
  }

  .advice-item {
    padding: 11px 0;
  }

  .advice-text {
    margin-left: 0;
    padding-left: 37px;
    font-size: 10px;
  }

  .advice-choice-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .advice-choice {
    min-height: 50px;
  }

  .advice-text-field textarea {
    font-size: 16px;
  }

  .advice-compose-foot .button {
    min-height: 42px;
    padding: 0 16px;
  }

  .community-detail-note {
    font-size: 8px;
  }

  .community-status .status-panel-head {
    flex-direction: column;
  }

  .bottom-nav {
    padding-right: 5px;
    padding-left: 5px;
  }

  .bottom-nav-link {
    gap: 1px;
    font-size: 8.5px;
  }

  .bottom-nav-link .icon {
    width: 20px;
    height: 20px;
  }

  .bottom-nav-link .nav-badge {
    left: 10px;
  }

  .social-empty {
    min-height: 255px;
    padding: 28px 17px;
    border-radius: 19px;
  }
}

@media (max-width: 420px) {
  .community-card-head {
    gap: 7px;
  }

  .community-author-copy strong {
    max-width: 130px;
  }

  .group-detail-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .group-detail-actions .button {
    width: 100%;
  }

  .group-member .avatar {
    width: 23px;
    height: 23px;
  }

  .advice-author-copy {
    gap: 4px;
  }

  .advice-author-copy > span {
    display: none;
  }

  .advice-stance {
    font-size: 7px;
  }
}


