/* ------------------------------------------------------------------ */
/* Wishwright — letterpress ledger                                     */
/* ------------------------------------------------------------------ */

:root {
  --paper: #f4ecdd;
  --paper-2: #ebdfc9;
  --card: #fcf8ee;
  --card-bright: #fffdf7;
  --ink: #1e2b24;
  --ink-soft: #4e5b52;
  --ink-faint: #7f897f;
  --line: rgba(30, 43, 36, 0.15);
  --line-strong: rgba(30, 43, 36, 0.34);
  --clay: #b9482b;
  --clay-deep: #8f3420;
  --clay-soft: #f3ddd2;
  --gold: #c99a43;
  --forest: #1e332a;
  --forest-2: #284237;
  --cream: #f6efdf;
  --sage: #a3b09b;
  --shadow-card: 3px 4px 0 rgba(30, 43, 36, 0.07), 0 18px 30px -26px rgba(30, 43, 36, 0.6);
  --shadow-lift: 5px 7px 0 rgba(30, 43, 36, 0.1), 0 26px 42px -26px rgba(30, 43, 36, 0.62);
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Karla", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --max: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --r: 4px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Warm light on the paper stays with the viewport while the page scrolls.
   A fixed layer instead of background-attachment: fixed, which iOS Safari
   handles poorly and which paints unevenly in stitched screenshots. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1100px 700px at 88% -8%, rgba(255, 251, 240, 0.92), transparent 60%),
    radial-gradient(900px 620px at -12% 108%, rgba(235, 223, 201, 0.9), transparent 55%);
}

/* Paper grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.34;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.3'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

#app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#app > main.page {
  flex: 1 0 auto;
}

img {
  max-width: 100%;
  display: block;
}

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

a {
  color: var(--clay);
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

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

.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;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  display: inline-block;
  vertical-align: -0.18em;
}

.seal {
  display: block;
  flex: none;
}

.muted {
  color: var(--ink-soft);
}

.small {
  font-size: 13px;
}

/* ------------------------------------------------------------------ */
/* Boot                                                                */
/* ------------------------------------------------------------------ */

.boot-splash {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.boot-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--clay);
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

.page-loader {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--ink-faint);
  font-size: 13.5px;
  letter-spacing: 0.06em;
}

.page-loader .seal {
  width: 44px;
  height: 44px;
  color: var(--clay);
  animation: breathe 1.9s ease-in-out infinite;
}

.page-loader p {
  margin: 0;
}

/* ------------------------------------------------------------------ */
/* Header + footer                                                     */
/* ------------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px var(--gutter);
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--line);
  background: rgba(244, 236, 221, 0.9);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px) saturate(1.1);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex: none;
}

.brand .seal {
  width: 30px;
  height: 30px;
  color: var(--clay);
}

.brand-word {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.nav-link {
  position: relative;
  padding: 4px 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink-soft);
  white-space: nowrap;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1.5px;
  background: var(--clay);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.nav-link.is-active {
  color: var(--ink);
}

.nav-divider {
  width: 1px;
  height: 20px;
  background: var(--line-strong);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.user-initial {
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--forest);
  color: var(--cream);
  font-size: 12px;
  font-weight: 700;
}

.user-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.link-btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  color: var(--clay);
  font: inherit;
  font-weight: 600;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.link-btn:hover {
  color: var(--clay-deep);
}

.signout {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-faint);
  text-decoration: none;
  white-space: nowrap;
}

.signout:hover {
  color: var(--clay);
  text-decoration: underline;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px var(--gutter);
  padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 13px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink-soft);
}

.footer-brand .seal {
  width: 20px;
  height: 20px;
  color: var(--clay);
}

html,
body {
  min-height: 100%;
}

/* ------------------------------------------------------------------ */
/* Page + typography                                                   */
/* ------------------------------------------------------------------ */

.page {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(26px, 4vw, 52px) var(--gutter) clamp(48px, 7vw, 84px);
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clay);
}

.page-head {
  padding: clamp(6px, 2vw, 22px) 0 clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(26px, 4vw, 44px);
}

.page-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0 0 18px;
}

.page-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--clay);
}

.page-sub {
  max-width: 64ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 15.5px;
}

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-line: var(--ink);
  --btn-shadow: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1.5px solid var(--btn-line);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--btn-shadow);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--btn-shadow);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--btn-shadow);
}

.btn[disabled] {
  opacity: 0.62;
  cursor: progress;
  transform: none;
  box-shadow: 3px 3px 0 var(--btn-shadow);
}

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

.btn-primary {
  --btn-bg: var(--clay);
  --btn-fg: #fff8ec;
  --btn-line: var(--clay-deep);
  --btn-shadow: var(--clay-deep);
}

.btn-primary:hover {
  --btn-bg: #c14d2f;
}

.btn-danger {
  --btn-bg: var(--clay-deep);
  --btn-fg: #fff6ea;
  --btn-line: #6f2515;
  --btn-shadow: #6f2515;
}

.btn-danger-ghost {
  color: var(--clay-deep);
  border-color: rgba(143, 52, 32, 0.5);
}

.btn-ghost {
  border-color: transparent;
  box-shadow: none;
  padding-inline: 12px;
  color: var(--ink-soft);
}

.btn-ghost:hover {
  box-shadow: none;
  transform: none;
  background: rgba(30, 43, 36, 0.05);
  color: var(--ink);
}

.btn-ghost.danger-text {
  color: var(--clay-deep);
}

.btn-ghost.danger-text:hover {
  background: var(--clay-soft);
}

.btn-small {
  padding: 9px 14px;
  font-size: 13px;
  box-shadow: 2px 2px 0 var(--btn-shadow);
}

.btn-small:hover {
  box-shadow: 3px 3px 0 var(--btn-shadow);
}

.btn-full {
  width: 100%;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

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

.icon-btn:hover {
  background: rgba(30, 43, 36, 0.07);
  color: var(--ink);
}

.icon-btn.danger:hover {
  color: var(--clay-deep);
  background: var(--clay-soft);
}

/* ------------------------------------------------------------------ */
/* Fields                                                              */
/* ------------------------------------------------------------------ */

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

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

.field-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--card-bright);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font-size: 15px;
  color: var(--ink);
  box-shadow: inset 0 1px 2px rgba(30, 43, 36, 0.05);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

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

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

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(185, 72, 43, 0.13);
}

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

.field-wide {
  grid-column: 1 / -1;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--clay);
  flex: none;
}

.form-error {
  margin: 0;
  padding: 8px 10px;
  border-left: 3px solid var(--clay);
  background: var(--clay-soft);
  color: var(--clay-deep);
  font-size: 13.5px;
  font-weight: 600;
}

.fineprint {
  margin: 0;
  color: var(--ink-faint);
  font-size: 12.5px;
  line-height: 1.5;
}

.fineprint code,
.empty-small code {
  font-family: var(--mono);
  font-size: 11.5px;
  background: var(--paper-2);
  padding: 1px 4px;
  border-radius: 2px;
}

.spinner {
  width: 14px;
  height: 14px;
  display: inline-block;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: spin 0.7s linear infinite;
}

/* ------------------------------------------------------------------ */
/* Auth                                                                */
/* ------------------------------------------------------------------ */

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: 100vh;
  flex: 1 0 auto;
}

.auth-poster {
  position: relative;
  display: flex;
  overflow: hidden;
  background: var(--forest);
  color: var(--cream);
}

.auth-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 82% 12%, rgba(201, 154, 67, 0.18), transparent 42%),
    radial-gradient(circle at 12% 88%, rgba(163, 176, 155, 0.13), transparent 40%);
}

.auth-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    115deg,
    transparent 0 38px,
    rgba(246, 239, 223, 0.035) 38px 39px
  );
}

.poster-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  width: 100%;
  padding: clamp(26px, 4.4vw, 56px);
}

.poster-inner::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(246, 239, 223, 0.22);
  pointer-events: none;
}

.poster-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.poster-brand .seal {
  width: 28px;
  height: 28px;
  color: var(--gold);
}

.poster-kicker {
  margin: 18px 0 0;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(246, 239, 223, 0.55);
}

.poster-body h1 {
  margin: 0 0 22px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(42px, 5.4vw, 78px);
  line-height: 0.93;
  letter-spacing: -0.035em;
  color: var(--cream);
}

.poster-body h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--gold);
}

.poster-note {
  max-width: 36ch;
  color: rgba(246, 239, 223, 0.78);
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.65;
}

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

.poster-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14.5px;
  color: rgba(246, 239, 223, 0.9);
}

.poster-list .icon {
  width: 18px;
  height: 18px;
  color: var(--gold);
  flex: none;
}

.poster-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.poster-stamp {
  flex: none;
  transform: rotate(-7deg);
  border: 1.5px solid var(--gold);
  border-radius: 3px;
  padding: 10px 14px;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.35;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  color: var(--gold);
  box-shadow: inset 0 0 0 3px rgba(201, 154, 67, 0.16);
}

.poster-small {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: rgba(246, 239, 223, 0.55);
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 5vw, 64px) var(--gutter);
}

.auth-card {
  width: min(420px, 100%);
}

.auth-card h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.auth-card > .muted {
  margin: 0 0 26px;
  font-size: 15px;
}

.auth-switch {
  margin: 20px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.auth-fineprint {
  margin: 26px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-faint);
}

/* ------------------------------------------------------------------ */
/* Dashboard                                                           */
/* ------------------------------------------------------------------ */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: end;
  padding: clamp(8px, 2vw, 26px) 0 clamp(36px, 5vw, 60px);
  border-bottom: 1px solid var(--line);
}

.hero-title {
  margin: 0 0 22px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 9vw, 104px);
  line-height: 0.88;
  letter-spacing: -0.04em;
}

.hero-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--clay);
}

.hero-sub {
  max-width: 46ch;
  margin: 0 0 26px;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.3vw, 17px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 8px;
}

.stat {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line-strong);
}

.stat-num {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
  min-width: 1.4ch;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.hero-stamp {
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transform: rotate(6deg);
  border: 1.5px solid var(--clay);
  border-radius: 3px;
  padding: 8px 12px;
  background: rgba(252, 248, 238, 0.6);
  color: var(--clay);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
}

.section {
  padding-top: clamp(30px, 4vw, 48px);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2.4vw, 32px);
  letter-spacing: -0.02em;
}

.section-head .muted {
  margin: 0;
  font-size: 13px;
}

.empty-line {
  margin: 22px 0 0;
  color: var(--ink-faint);
  font-size: 14px;
}

.list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: clamp(18px, 2.4vw, 28px);
}

.list-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 214px;
  padding: 22px 22px 18px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  box-shadow:
    3px 4px 0 rgba(30, 43, 36, 0.07),
    0 18px 30px -26px rgba(30, 43, 36, 0.6);
  transform: rotate(var(--tilt, 0deg));
  transition:
    transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.3s ease;
}

.list-card:hover {
  transform: translateY(-4px) rotate(0deg);
  box-shadow: var(--shadow-lift);
}

.list-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.catalog-no {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.list-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.list-main h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 25px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.list-meta {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
}

.list-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
  font-size: 12.5px;
  color: var(--ink-faint);
}

.list-claimed {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--clay);
  font-weight: 600;
}

.list-claimed .icon {
  width: 13px;
  height: 13px;
}

.list-card-new {
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 1.5px dashed var(--line-strong);
  box-shadow: none;
  color: var(--ink-soft);
  text-align: center;
  cursor: pointer;
  font-family: var(--sans);
}

.list-card-new:hover {
  background: rgba(252, 248, 238, 0.65);
  border-color: var(--clay);
  color: var(--ink);
  transform: translateY(-3px) rotate(0deg);
  box-shadow: none;
}

.plus-big {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  color: var(--clay);
}

.plus-big .icon {
  width: 20px;
  height: 20px;
}

.new-label {
  font-family: var(--serif);
  font-size: 20px;
}

.new-sub {
  font-size: 12.5px;
  color: var(--ink-faint);
}

/* ------------------------------------------------------------------ */
/* Chips                                                               */
/* ------------------------------------------------------------------ */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.5);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.chip-live {
  color: #2f6b4f;
  border-color: rgba(47, 107, 79, 0.4);
  background: rgba(163, 176, 155, 0.22);
}

.chip-quiet {
  color: var(--ink-faint);
}

.chip-clay {
  color: var(--clay-deep);
  border-color: rgba(185, 72, 43, 0.35);
  background: var(--clay-soft);
}

.chip-off {
  color: var(--ink-faint);
  background: transparent;
  cursor: pointer;
}

button.chip {
  cursor: pointer;
}

/* ------------------------------------------------------------------ */
/* Wishlist detail                                                     */
/* ------------------------------------------------------------------ */

.breadcrumb {
  margin-bottom: 22px;
}

.breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--clay);
}

.breadcrumb .icon {
  width: 15px;
  height: 15px;
}

.list-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.list-hero-main {
  flex: 1 1 420px;
  min-width: 0;
}

.list-title {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.list-desc {
  max-width: 62ch;
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 15.5px;
  white-space: pre-wrap;
}

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

.list-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 4px;
}

.surprise-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 22px;
  padding: 14px 16px;
  background: rgba(201, 154, 67, 0.12);
  border: 1px solid rgba(201, 154, 67, 0.35);
  border-left: 4px solid var(--gold);
  border-radius: 3px;
}

.surprise-note .icon {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
  color: #8a6420;
}

.surprise-note p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.surprise-note strong {
  color: var(--ink);
}

.surprise-note-soft {
  background: rgba(163, 176, 155, 0.14);
  border-color: rgba(163, 176, 155, 0.4);
  border-left-color: var(--sage);
}

.surprise-note-soft .icon {
  color: #4f6b57;
}

/* Add a wish */

.add-section {
  margin-top: clamp(24px, 3.5vw, 36px);
}

.add-card {
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  box-shadow: var(--shadow-card);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.add-card:focus-within {
  border-color: var(--clay);
  box-shadow:
    0 0 0 3px rgba(185, 72, 43, 0.12),
    var(--shadow-card);
}

.add-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.add-glyph {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--clay);
}

.add-glyph .icon {
  width: 17px;
  height: 17px;
}

.add-row input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 4px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  font-size: 16px;
  color: var(--ink);
  transition: border-color 0.2s ease;
}

.add-row input:focus {
  outline: none;
  border-bottom-color: var(--clay);
}

.add-row .btn {
  flex: none;
}

.referral-hint {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 10px 4px 2px 48px;
  font-size: 12.5px;
  color: #2f6b4f;
}

.referral-hint .icon {
  width: 13px;
  height: 13px;
  flex: none;
}

.referral-hint code {
  font-family: var(--mono);
  font-size: 11.5px;
  background: rgba(47, 107, 79, 0.1);
  padding: 1px 5px;
  border-radius: 2px;
}

.referral-hint .was {
  color: var(--ink-faint);
  text-decoration: line-through;
}

.add-extra {
  margin-top: 6px;
  padding: 10px 4px 2px;
  border-top: 1px dashed var(--line);
}

.add-extra summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-faint);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.add-extra summary::-webkit-details-marker {
  display: none;
}

.add-extra summary:hover {
  color: var(--clay);
}

.add-extra summary .icon {
  width: 13px;
  height: 13px;
}

.add-extra-grid {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 14px;
  padding-top: 14px;
}

.add-extra-grid .field-wide,
.add-extra-grid .check {
  grid-column: 1 / -1;
}

.add-form-error {
  margin-top: 12px;
}

.add-tip {
  margin: 12px 2px 0;
  font-size: 12.5px;
  color: var(--ink-faint);
}

.add-tip a {
  color: var(--clay);
  font-weight: 600;
  text-underline-offset: 2px;
}

/* Items */

.items-section {
  margin-top: clamp(34px, 4.5vw, 54px);
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: clamp(18px, 2.4vw, 26px);
}

.item-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  box-shadow: var(--shadow-card);
  transition:
    transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.28s ease;
}

.item-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.item-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-2);
}

.item-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.item-card:hover .item-media img {
  transform: scale(1.035);
}

.item-mono {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 64px;
  color: rgba(30, 43, 36, 0.28);
  user-select: none;
}

.tint-0 {
  background: linear-gradient(135deg, #e7dfcd, #d9cfb8);
}

.tint-1 {
  background: linear-gradient(135deg, #dfe3d6, #cbd4c2);
}

.tint-2 {
  background: linear-gradient(135deg, #f0ddcf, #e4c8b6);
}

.stamp {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  transform: rotate(-7deg);
  padding: 4px 7px 3px;
  border: 2px solid var(--clay);
  border-radius: 3px;
  background: rgba(252, 248, 238, 0.9);
  color: var(--clay-deep);
  font-family: var(--serif);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.priority-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(201, 154, 67, 0.55);
  background: rgba(252, 248, 238, 0.92);
  color: var(--gold);
}

.priority-badge .icon {
  width: 15px;
  height: 15px;
  fill: currentColor;
  stroke: none;
}

.item-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  padding: 14px 16px 10px;
}

.item-site {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.item-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.item-desc {
  margin: 2px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 13px;
  white-space: pre-wrap;
}

.claim-note {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 4px 0 0;
  color: var(--clay-deep);
  font-size: 12px;
  font-weight: 600;
}

.claim-note .icon {
  width: 12px;
  height: 12px;
}

.item-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
}

.price {
  font-weight: 700;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border: 1px solid rgba(185, 72, 43, 0.3);
  border-radius: 999px;
  color: var(--clay);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.mini-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.mini-link:hover {
  color: var(--clay);
}

.mini-link .icon {
  width: 12px;
  height: 12px;
}

.item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 10px 16px;
  border-top: 1px dashed var(--line);
}

.open-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}

.open-link .icon {
  width: 13px;
  height: 13px;
}

.open-link:hover {
  color: var(--clay);
}

.open-link.is-muted {
  color: var(--ink-faint);
  font-weight: 500;
}

.item-tools {
  display: flex;
  align-items: center;
  gap: 2px;
}

.item-tools .icon-btn {
  width: 30px;
  height: 30px;
  opacity: 0;
  transition:
    opacity 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.item-card:hover .item-tools .icon-btn,
.item-tools .icon-btn:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  .item-tools .icon-btn {
    opacity: 1;
  }
}

/* Empty */

.empty {
  padding: clamp(36px, 6vw, 64px) 20px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 4px;
  background: rgba(252, 248, 238, 0.4);
  text-align: center;
}

.empty-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  background: var(--card);
  color: var(--clay);
}

.empty-icon .icon {
  width: 26px;
  height: 26px;
}

.empty h3 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
}

.empty p {
  max-width: 42ch;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 14px;
}

/* ------------------------------------------------------------------ */
/* Referrals                                                           */
/* ------------------------------------------------------------------ */

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: 24px;
  align-items: start;
}

.panel {
  padding: clamp(18px, 2.4vw, 26px);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  box-shadow: var(--shadow-card);
}

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

.panel-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 23px;
  letter-spacing: -0.015em;
}

.panel .muted.small {
  margin: 0 0 14px;
  font-size: 13px;
}

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

.rule-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.rule-row:last-child {
  border-bottom: 0;
}

.rule-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.rule-domain {
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.rule-param {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
}

.rule-code {
  max-width: 180px;
  overflow: hidden;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule-actions {
  display: flex;
}

.rule-actions .icon-btn {
  width: 30px;
  height: 30px;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}

.preset-chip {
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.preset-chip:hover {
  border-color: var(--clay);
  background: rgba(185, 72, 43, 0.06);
  color: var(--clay-deep);
}

.empty-small {
  padding: 18px 0 6px;
  color: var(--ink-faint);
  font-size: 13.5px;
}

.empty-small p {
  margin: 0;
}

.tester {
  margin-top: 24px;
}

.preview-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.preview-row input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--card-bright);
  font-size: 14.5px;
}

.preview-result {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-label {
  margin: 0;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.url-box {
  display: block;
  padding: 12px 14px;
  border-radius: 3px;
  background: #1e2b24;
  color: #e9e1cf;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  word-break: break-all;
}

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

.applied-chips s {
  margin-left: 4px;
  opacity: 0.6;
}

.preview-result .btn {
  align-self: flex-start;
}

.reapply-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  margin-top: 24px;
}

.reapply-panel h2 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
}

.reapply-panel p {
  max-width: 62ch;
  margin: 0;
  font-size: 13.5px;
}

.reapply-result {
  margin-top: 8px !important;
  min-height: 20px;
  color: #2f6b4f;
  font-weight: 600;
}

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

dialog.sheet {
  width: min(540px, calc(100vw - 32px));
  max-width: 540px;
  max-height: calc(100vh - 48px);
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}

dialog.sheet::backdrop {
  background: rgba(20, 30, 24, 0.55);
  backdrop-filter: blur(3px);
}

dialog.sheet[open] .sheet-card {
  animation: sheet-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sheet-card {
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--card);
  box-shadow:
    7px 8px 0 rgba(30, 43, 36, 0.18),
    0 40px 70px -30px rgba(0, 0, 0, 0.5);
}

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

.dialog-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.dialog-head .eyebrow {
  margin-bottom: 6px;
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.dialog-actions-split {
  justify-content: space-between;
}

.share-reveal {
  margin-top: 14px;
}

.share-meta {
  font-size: 12.5px;
  color: var(--ink-faint);
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.copy-row {
  display: flex;
  gap: 8px;
}

.copy-row input {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 12px;
}

.copy-row .btn {
  flex: none;
}

/* ------------------------------------------------------------------ */
/* Toasts                                                              */
/* ------------------------------------------------------------------ */

.toast-region {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-left: 3px solid var(--sage);
  border-radius: 3px;
  background: var(--forest);
  color: var(--cream);
  font-size: 13.5px;
  line-height: 1.5;
  box-shadow:
    4px 4px 0 rgba(30, 43, 36, 0.25),
    0 20px 34px -18px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  animation: toast-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.toast .icon {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
  color: var(--gold);
}

.toast-error {
  border-left-color: var(--clay);
}

.toast-error .icon {
  color: #f0a58c;
}

.toast.is-out {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

/* ------------------------------------------------------------------ */
/* Shared list                                                         */
/* ------------------------------------------------------------------ */

.shared-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: clamp(26px, 4vw, 44px);
  padding: 14px 18px;
  border-radius: 3px;
  background: var(--forest);
  color: rgba(246, 239, 223, 0.86);
  box-shadow: 4px 4px 0 rgba(30, 43, 36, 0.16);
}

.shared-notice .icon {
  width: 19px;
  height: 19px;
  flex: none;
  margin-top: 2px;
  color: var(--gold);
}

.shared-notice p {
  max-width: 70ch;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
}

.shared-notice strong {
  color: var(--cream);
}

.shared-head {
  margin-bottom: clamp(26px, 4vw, 40px);
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.shared-by {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
}

.public-grid {
  margin-top: 0;
}

.public-actions {
  justify-content: flex-end;
  min-height: 54px;
}

.public-actions .link-btn {
  margin-left: 10px;
  font-size: 12.5px;
}

.reserved {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #2f6b4f;
  font-size: 12.5px;
  font-weight: 700;
}

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

.shared-foot {
  margin: 44px 0 0;
  text-align: center;
  color: var(--ink-faint);
  font-size: 12.5px;
}

.shared-foot a {
  color: var(--clay);
  font-weight: 600;
}

.not-found {
  max-width: 480px;
  margin: clamp(40px, 10vh, 120px) auto;
  text-align: center;
}

.not-found h1 {
  margin: 10px 0 12px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.not-found p {
  max-width: 40ch;
  margin: 0 auto 22px;
  color: var(--ink-soft);
}

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

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

@keyframes breathe {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

.reveal {
  animation: rise 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}

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

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero-stats {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 18px 34px;
    padding-top: 18px;
    border-top: 1px dashed var(--line-strong);
  }

  .stat {
    min-width: 90px;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .hero-stamp {
    display: none;
  }

  .panel-grid {
    grid-template-columns: 1fr;
  }

  .user-name {
    display: none;
  }
}

@media (max-width: 880px) {
  .auth-shell {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }

  .auth-poster {
    min-height: 300px;
  }

  .poster-inner {
    padding: 26px;
    gap: 22px;
  }

  .poster-inner::before {
    inset: 12px;
  }

  .poster-body {
    margin-top: 18px;
  }

  .poster-body h1 {
    margin-bottom: 0;
    font-size: clamp(36px, 9vw, 52px);
  }

  .poster-note,
  .poster-list,
  .poster-small {
    display: none;
  }

  .poster-foot {
    justify-content: flex-end;
  }

  .auth-panel {
    padding-top: 38px;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 11px var(--gutter);
    padding-top: calc(11px + env(safe-area-inset-top, 0px));
  }

  .site-nav {
    gap: 12px;
  }

  .nav-link {
    font-size: 13px;
  }

  .nav-divider,
  .user-chip {
    display: none;
  }

  .signout {
    font-size: 12px;
  }

  .list-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .list-hero-actions {
    width: 100%;
  }

  .list-hero-actions .btn {
    flex: 1 1 auto;
  }

  .add-row .btn {
    padding: 10px 14px;
  }

  .add-row input {
    font-size: 15px;
  }

  .referral-hint {
    padding-left: 4px;
  }

  .add-extra-grid {
    grid-template-columns: 1fr;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 0;
  }

  .hero-title {
    font-size: clamp(48px, 13vw, 72px);
  }

  .item-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .dialog-actions {
    justify-content: stretch;
  }

  .dialog-actions .btn {
    flex: 1 1 auto;
  }

  .dialog-actions-split {
    flex-direction: column;
    align-items: stretch;
  }

  .share-buttons {
    justify-content: flex-end;
  }

  .toast-region {
    left: 16px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    max-width: none;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 560px) {
  .rule-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .rule-main {
    grid-column: 1;
    grid-row: 1;
  }

  .rule-code {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    max-width: 100%;
  }

  .rule-row .chip {
    grid-column: 2;
    grid-row: 1;
  }

  .rule-actions {
    grid-column: 3;
    grid-row: 1;
  }

  .preview-row {
    flex-direction: column;
  }

  .preview-row .btn {
    width: 100%;
  }

  .reapply-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .poster-stamp {
    display: none;
  }
}

@media (max-width: 420px) {
  .nav-link[href="/"] {
    display: none;
  }

  .brand-word {
    font-size: 19px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .list-hero-actions {
    flex-direction: column;
  }

  .add-row {
    flex-wrap: wrap;
  }

  .add-row input {
    flex-basis: calc(100% - 48px);
  }

  .add-row .btn {
    width: 100%;
  }
}
