/* =========================================================
   ARCHIVE // shared memory journal
   Breakpoints (mobile-first):
     base   < 640px   phones (iOS / Android), full-bleed single column
     sm   >= 640px    large phones landscape / small tablets
     md   >= 900px    tablets landscape, laptops — 2-column archive
     lg   >= 1600px   large desktop monitors — 3-column archive
   ========================================================= */
:root {
  --paper: #F7F3F0;
  --card: #FCF9F8;
  --hair: #E6DADA;
  --ink: #231F20;
  --muted: #73686A;
  --rose: #C96B84;
  --rose-strong: #B4566F;
  --blush: #F2DCE2;

  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --gutter: 16px;
  --max: 600px;
  --pad-x: max(var(--gutter), env(safe-area-inset-left), env(safe-area-inset-right), calc((100% - var(--max)) / 2));
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --note-size: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

@media (min-width: 640px) {
  :root {
    --gutter: 24px;
    --max: 640px;
  }
}

@media (min-width: 900px) {
  :root {
    --gutter: 32px;
    --max: 1080px;
    --note-size: 14.5px;
  }
}

@media (min-width: 1600px) {
  :root {
    --max: 1440px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--paper);
  scroll-padding-top: 130px;
}

html.is-locked,
html.is-locked body {
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

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

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

button,
label,
a {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

.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: 1em;
  height: 1em;
  flex-shrink: 0;
}


img.icon {
  object-fit: contain;
}

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

.screen[hidden] {
  display: none;
}

/* =========================================================
   Prototype switcher (demo only — remove in production)
   ========================================================= */
.proto-nav {
  position: fixed;
  left: 50%;
  bottom: calc(12px + var(--safe-bottom));
  z-index: 30;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(252, 249, 248, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--hair);
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 24px -12px rgba(35, 31, 32, .3);
}

.proto-nav button {
  border: 0;
  background: transparent;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
}

.proto-nav button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--card);
}

@media (min-width: 900px) {
  .proto-nav {
    left: auto;
    right: max(20px, env(safe-area-inset-right));
    transform: none;
  }
}

/* =========================================================
   Form primitives
   ========================================================= */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.input,
.textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--radius-md);
  font-size: 16px;
  /* >= 16px prevents iOS Safari zoom-on-focus */
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.input::placeholder,
.textarea::placeholder {
  color: #A99FA1;
  opacity: 1;
}

.input:focus,
.textarea:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px var(--blush);
}

/* iOS renders date inputs centered and collapses their height when appearance is reset */
.input[type="date"] {
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 22px;
  text-align: left;
}

.input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
  margin: 0;
}

.input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: .55;
  cursor: pointer;
}

.input-wrap {
  position: relative;
}

.input-wrap .input {
  padding-right: 48px;
}

.input-action {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius-sm);
  font-size: 18px;
}

.track-cover-sticker {
  width: 100%;
  height: 40px;
  padding: 3px;
  object-fit: contain;
}

.input-action[aria-pressed="true"] {
  color: var(--rose-strong);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  transition: background .2s var(--ease), transform .1s var(--ease);
}

.btn:active {
  transform: scale(.98);
}

.btn-primary {
  background: var(--rose-strong);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--hair);
  color: var(--ink);
}

@media (hover: hover) {
  .btn-primary:hover {
    background: #A84E67;
  }

  .btn-ghost:hover {
    background: var(--paper);
  }

  .pill:hover {
    border-color: #DCC8CC;
  }
}

/* =========================================================
   1. Login gate
   ========================================================= */
.gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding:
    calc(56px + var(--safe-top)) max(28px, env(safe-area-inset-right)) calc(88px + var(--safe-bottom)) max(28px, env(safe-area-inset-left));
  max-width: 480px;
  margin: 0 auto;
}

.gate-mark {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 28px;
}

.gate-eyebrow {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.gate-title {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(22px, 6vw, 44px);
  letter-spacing: .04em;
  line-height: 1.25;
}

.gate-title span {
  color: var(--rose);
}

.gate-lede {
  margin: 14px 0 36px;
  font-size: 14px;
  color: var(--muted);
  max-width: 32ch;
}

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

.gate-form .btn {
  margin-top: 8px;
  width: 100%;
}

.gate-note {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.gate-foot {
  margin-top: auto;
  padding: 48px 0 0 !important;
}

/* Laptop / desktop: split editorial layout */
@media (min-width: 900px) {
  .gate {
    max-width: 1080px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    grid-template-rows: auto auto auto auto 1fr;
    column-gap: clamp(48px, 8vw, 120px);
    align-content: center;
    padding: 80px var(--gutter);
  }

  .gate>* {
    grid-column: 1;
  }

  .gate-mark {
    width: 96px;
    height: 96px;
  }

  .gate-lede {
    font-size: 16px;
    margin-bottom: 0;
  }

  .gate-form {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: center;
    padding: 36px;
    background: var(--card);
    border: 1px solid var(--hair);
    border-radius: 20px;
    box-shadow: 0 24px 48px -32px rgba(35, 31, 32, .25);
  }

  .gate-foot {
    align-items: flex-start !important;
    max-width: 360px;
  }

  .gate-foot .signature-row::before {
    display: none;
  }
}

/* =========================================================
   2. Timeline — sticky chrome (header + filters)
   ========================================================= */
.chrome {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 243, 240, .9);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--hair);
}

/* Short landscape phones: don't let the header eat the screen */
@media (orientation: landscape) and (max-height: 500px) {
  .chrome {
    position: relative;
  }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(12px + var(--safe-top)) var(--pad-x) 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  white-space: nowrap;
}

.brand .icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.counter {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.15;
}

.counter-value {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.counter-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.counter-label::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rose);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: .3;
  }
}

.btn-log {
  position: fixed;
  right: max(var(--gutter), env(safe-area-inset-right));
  bottom: calc(16px + var(--safe-bottom));
  z-index: 30;
  min-height: 52px;
  padding: 0 20px;
  font-size: 14px;
  border-radius: var(--radius-pill);
  gap: 8px;
  box-shadow: 0 8px 24px -8px rgba(35, 31, 32, .35);
}

@media (min-width: 900px) {
  .topbar {
    padding-top: calc(18px + var(--safe-top));
    padding-bottom: 14px;
  }

  .brand {
    font-size: 13px;
  }

  .brand .icon {
    width: 26px;
    height: 26px;
  }

  .counter-value {
    font-size: 14px;
  }
}

/* Filter bar */
.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px var(--pad-x) 10px;
}

.pill-track {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-width: 0;
  padding-right: 16px;
  scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
  mask-image: linear-gradient(to right, #000 85%, transparent);
}

.pill-track::-webkit-scrollbar {
  display: none;
}

@media (min-width: 900px) {
  .filters {
    padding-bottom: 14px;
  }

  .pill-track {
    flex-wrap: wrap;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
    padding-right: 0;
  }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--hair);
  border-radius: var(--radius-pill);
  background: var(--card);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  scroll-snap-align: start;
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}

.pill .icon {
  font-size: 14px;
  color: var(--muted);
}

.pill .icon-gym {
  width: 2em;
  height: 2em;
  object-fit: contain;
}

.trophy-tab-icon {
  font-size: 15px;
  line-height: 1;
}

.trophy-count {
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--blush);
  color: var(--rose-strong);
  font-family: var(--font-mono);
  font-size: 10px;
}

.pill[aria-pressed="true"],
.pill:has(input:checked) {
  background: var(--blush);
  border-color: #E4BDC8;
}

.pill[aria-pressed="true"] .icon,
.pill:has(input:checked) .icon {
  color: var(--rose-strong);
}

.icon-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hair);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--ink);
  font-size: 17px;
  position: relative;
}

.randomizer-btn {
  font-size: 19px;
}

.date-jump-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  font-size: 16px;
}

/* iOS / Android only open the native date picker from a real tap on the input */
@media (pointer: coarse) {
  .date-jump-input {
    pointer-events: auto;
  }
}

/* =========================================================
   Feed + entry cards
   ========================================================= */
.feed {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px var(--pad-x) 8px;
}

.memory-view {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.memory-view[hidden] {
  display: none !important;
}

.trophy-view[hidden] {
  display: none !important;
}

.trophy-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.trophy-intro {
  margin: -4px 0 2px;
  color: var(--muted);
  font-size: 0.9rem;
}

.trophy-warning {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(201, 107, 132, .35);
  border-radius: var(--radius-md);
  background: var(--blush);
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1.5;
}

.trophy-warning[hidden] {
  display: none !important;
}

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

.trophy-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: start;
  gap: 5px 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--hair);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.trophy-card-icon {
  grid-row: span 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--blush);
  font-size: 25px;
}

.trophy-card.is-locked .trophy-card-icon {
  filter: grayscale(1);
  opacity: .48;
}

.trophy-card.is-secret-unlocked {
  border-color: rgba(201, 107, 132, .72);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(255, 244, 210, .92)),
    var(--card);
  box-shadow: 0 8px 28px rgba(201, 107, 132, .22), 0 0 18px rgba(255, 215, 90, .28);
  animation: gold-shimmer 1.8s ease-in-out infinite alternate;
}

.trophy-card.is-secret-unlocked .trophy-card-icon {
  background:
    radial-gradient(circle at 35% 28%, #fff 0 8%, transparent 9%),
    linear-gradient(135deg, #fff6b5, #ffd84d 38%, #fff 52%, #e8b900 72%, #fff3a1);
  border: 1px solid rgba(232, 185, 0, .65);
  box-shadow: 0 0 12px rgba(255, 215, 90, .95), 0 0 24px rgba(201, 107, 132, .38);
  text-shadow: 0 0 8px #fff, 0 0 14px #ffd84d;
  font-size: 22px;
}

@keyframes gold-shimmer {
  from {
    box-shadow: 0 8px 28px rgba(201, 107, 132, .20), 0 0 12px rgba(255, 215, 90, .20);
  }

  to {
    box-shadow: 0 10px 32px rgba(201, 107, 132, .34), 0 0 30px rgba(255, 215, 90, .62);
  }
}

.trophy-card h3 {
  margin: 0;
  font-size: 0.95rem;
}

.trophy-card-status {
  color: var(--rose-strong);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.trophy-card.is-locked .trophy-card-status {
  color: var(--muted);
}

.trophy-card-description,
.trophy-card-progress {
  grid-column: 2;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

@media (min-width: 640px) {
  .trophy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

@media (min-width: 900px) {
  .feed {
    padding-top: 28px;
    gap: 22px;
  }

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

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

.roll-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.roll-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hair);
}

.entry {
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  animation: rise .5s var(--ease) both;
}

.entry[hidden] {
  display: none;
}

.entry.is-random-pick {
  outline: 3px solid var(--rose);
  outline-offset: 3px;
  animation: random-pick-pulse 0.8s ease-in-out 2;
}

@keyframes random-pick-pulse {
  50% {
    box-shadow: 0 0 0 7px rgba(201, 107, 132, .16);
  }
}

@media (prefers-reduced-motion: reduce) {
  .entry.is-random-pick {
    animation: none;
  }
}

.entries.is-songs-view .entry {
  gap: 0;
}

.entries.is-songs-view .entry-head,
.entries.is-songs-view .frame,
.entries.is-songs-view .notes {
  display: none;
}

@media (min-width: 640px) {
  .entry {
    padding: 18px;
    gap: 16px;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

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

.entry-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.entry-when {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  height: 24px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  background: var(--blush);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
}

.tag .icon {
  font-size: 13px;
  color: var(--rose-strong);
}

/* Photo frame: single or split */
.frame {
  margin: 0;
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--blush);
  display: grid;
  gap: 3px;
}

.frame--split {
  grid-template-columns: 1fr 1fr;
  background: var(--card);
}

.frame-cell {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: zoom-in;
}

.frame-cell:first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.frame-cell:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.frame:not(.frame--split) .frame-cell {
  border-radius: var(--radius-md);
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frame-label {
  position: absolute;
  left: 8px;
  bottom: 7px;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  color: #FCF9F8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}

/* Full-screen memory photo viewer */
.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding:
    max(12px, var(--safe-top)) max(12px, env(safe-area-inset-right)) max(12px, var(--safe-bottom)) max(12px, env(safe-area-inset-left));
}

.photo-viewer[hidden] {
  display: none;
}

.photo-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 16, 17, .94);
}

.photo-viewer-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 1100px);
  height: min(92vh, 900px);
  height: min(92dvh, 900px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  color: var(--card);
  outline: none;
}

.photo-viewer-head {
  display: flex;
  justify-content: flex-end;
}

.photo-viewer-stage {
  min-height: 0;
  display: grid;
  place-items: center;
}

.photo-viewer-image-wrap {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  overscroll-behavior: contain;
}

.photo-viewer-image {
  display: block;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center;
  transition: transform .18s ease;
}

.photo-viewer-controls,
.photo-viewer-navigation,
.photo-viewer-zoom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.photo-viewer-controls {
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 4px 0;
}

.photo-viewer-controls button {
  min-width: 40px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(252, 249, 248, .35);
  border-radius: var(--radius-pill);
  background: rgba(252, 249, 248, .12);
  color: var(--card);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
}

.photo-viewer-controls button[hidden] {
  display: none;
}

.photo-viewer-controls button:disabled {
  opacity: .45;
  cursor: default;
}

.photo-viewer-close {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(252, 249, 248, .35);
  border-radius: 50%;
  background: rgba(252, 249, 248, .12);
  color: var(--card);
  font-size: 20px;
  cursor: pointer;
}

.photo-viewer-count {
  min-width: 48px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

/* Dual perspective notes */
.notes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.note {
  margin: 0;
  padding: 2px 0 2px 12px;
  border-left: 2px solid var(--ink);
}

.note--her {
  border-left-color: var(--rose);
}

.note-author {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .12em;
  font-style: normal;
}

.note--her .note-author {
  color: var(--rose-strong);
}

.note p {
  margin: 0;
  font-size: var(--note-size);
  line-height: 1.55;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

.note.is-note-placeholder p {
  color: var(--muted);
  font-style: italic;
}

.note-add {
  height: auto;
  min-height: 0;
  margin: 0 0 0 5px;
  padding: 1px 5px;
  font-size: 0.75rem;
  line-height: 1.3;
  vertical-align: baseline;
}

.note-reply {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.note-reply .textarea {
  min-height: 72px;
  padding: 8px;
}

/* Track of the moment
   .track-facade is a lightweight placeholder; tapping play swaps in the
   real Spotify / YouTube iframe so embeds don't load until needed. */
.track {
  position: relative;
}

.track-embed {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: var(--paper);
  animation: rise .4s var(--ease) both;
}

.track-embed--spotify {
  height: 80px;
}

.track-embed--youtube {
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: var(--radius-md);
}

.track.is-embedded .track-facade {
  display: none;
}

.track-collapse {
  display: none;
  margin-top: 6px;
  padding: 4px 0;
  border: 0;
  background: none;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.track.is-embedded .track-collapse {
  display: inline-flex;
}

.track-facade {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 8px;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: var(--radius-md);
}

.track-cover {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--card);
  font-size: 18px;
}

.track-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.track-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.track-artist {
  font-weight: 400;
  color: var(--muted);
}

.track-source {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.track-open {
  margin-left: auto;
  padding: 4px 0;
  color: var(--rose-strong);
  text-decoration: none;
  letter-spacing: .08em;
}

@media (hover: hover) {
  .track-open:hover {
    text-decoration: underline;
  }
}

.track-play {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--card);
  font-size: 13px;
}

/* Empty state */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 40px 24px;
  border: 1px dashed var(--hair);
  border-radius: var(--radius-lg);
  color: var(--muted);
}

.empty[hidden] {
  display: none;
}

.empty .stamp {
  width: 64px;
  height: 40px;
  object-fit: contain;
}

.empty h3 {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--ink);
}

.empty p {
  margin: 0;
  font-size: 13px;
}

/* Signature footer */
.signature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px var(--pad-x) calc(88px + var(--safe-bottom));
  color: var(--muted);
}

.signature-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  width: 100%;
}

.signature-row::before,
.signature-row::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hair);
  margin-bottom: 3px;
}

.signature svg {
  color: var(--ink);
}

.signature .otter {
  width: 35px;
  height: 42px;
  object-fit: contain;
}

.signature .seal {
  width: 35px;
  height: 42px;
  object-fit: contain;
}

.pill .icon[data-cat],
.tag .icon[data-cat] {
  width: 20px;
  height: 20px;
}

.tag img.tag-image {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.tag img.tag-image[data-gym] {
  width: 22px;
  height: 22px;
}

.signature .cat {
  width: 35px;
  height: 42px;
}

.signature-text {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

/* =========================================================
   3. Log memory — bottom sheet on phones, centered dialog on larger screens
   ========================================================= */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(35, 31, 32, .32);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  max-height: 92vh;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-top: 1px solid var(--hair);
  border-radius: 22px 22px 0 0;
  transform: translateY(102%);
  transition: transform .42s var(--ease), opacity .3s var(--ease), visibility 0s linear .42s;
  visibility: hidden;
  outline: none;
}

.app.is-sheet-open .sheet {
  transform: none;
  visibility: visible;
  transition-delay: 0s;
}

.app.is-sheet-open .sheet-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.sheet-handle {
  width: 36px;
  height: 4px;
  margin: 8px auto 0;
  border-radius: 4px;
  background: var(--hair);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px max(var(--gutter), env(safe-area-inset-right)) 12px max(var(--gutter), env(safe-area-inset-left));
  border-bottom: 1px solid var(--hair);
}

.sheet-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.sheet-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--muted);
  text-transform: uppercase;
}

.sheet-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hair);
  background: var(--paper);
  border-radius: 50%;
  font-size: 15px;
}

.sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 16px max(var(--gutter), env(safe-area-inset-right)) 8px max(var(--gutter), env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.row-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 10px;
}

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

fieldset.field {
  border: 0;
  padding: 0;
  margin: 0;
}

fieldset.field legend {
  padding: 0;
  margin-bottom: 6px;
}

.tag-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tag-options .pill:has(input:focus-visible) {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

.upload {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 112px;
  padding: 16px;
  border: 1px dashed #D8C6C9;
  border-radius: var(--radius-md);
  background: var(--paper);
  text-align: center;
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}

@media (hover: hover) {
  .upload:hover {
    border-color: var(--rose);
  }
}

.upload:has(input:focus-visible) {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

.upload input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.upload .icon {
  font-size: 22px;
  color: var(--rose-strong);
}

.upload strong {
  font-size: 14px;
}

.upload span {
  font-size: 12px;
  color: var(--muted);
}

.upload-touch {
  display: none;
}

@media (pointer: coarse) {
  .upload-touch {
    display: inline;
  }

  .upload-desktop {
    display: none;
  }
}

.previews {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.previews:empty {
  display: none;
}

.previews img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  width: 100%;
}

.textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.5;
}

.author-chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hair);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
}

.author-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
}

.hint {
  font-size: 12px;
  color: var(--muted);
  min-height: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hint.is-valid {
  color: var(--rose-strong);
}

.sheet-foot {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 12px max(var(--gutter), env(safe-area-inset-right)) calc(14px + var(--safe-bottom)) max(var(--gutter), env(safe-area-inset-left));
  border-top: 1px solid var(--hair);
  background: var(--card);
}

/* Tablet + desktop: centered dialog */
@media (min-width: 640px) {
  .sheet {
    left: 50%;
    right: auto;
    top: 50%;
    bottom: auto;
    width: min(560px, calc(100% - 48px));
    max-height: min(820px, 88vh);
    max-height: min(820px, 88dvh);
    border: 1px solid var(--hair);
    border-radius: 22px;
    box-shadow: 0 40px 80px -40px rgba(35, 31, 32, .45);
    transform: translate(-50%, -46%) scale(.98);
    opacity: 0;
  }

  .app.is-sheet-open .sheet {
    transform: translate(-50%, -50%);
    opacity: 1;
  }

  .sheet-handle {
    display: none;
  }

  .sheet-head {
    padding: 18px 24px 14px;
  }

  .sheet-body {
    padding: 20px 24px 12px;
  }

  .sheet-foot {
    padding: 14px 24px 18px;
    border-radius: 0 0 22px 22px;
  }

  .sheet-foot .btn-primary {
    justify-self: end;
    min-width: 180px;
  }
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(70px + var(--safe-bottom));
  z-index: 70;
  transform: translate(-50%, 20px);
  opacity: 0;
  max-width: calc(100% - 32px);
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--card);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}

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

.toast.is-achievement {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: min(440px, calc(100% - 32px));
  max-width: 440px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 215, 90, .75);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #33252b, #5a3744);
  box-shadow: 0 10px 36px rgba(35, 31, 32, .32), 0 0 24px rgba(255, 215, 90, .28);
  color: #fff8df;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.45;
  white-space: pre-line;
  overflow: visible;
  text-overflow: clip;
  pointer-events: auto;
}

.toast-message {
  flex: 1;
  min-width: 0;
}

.toast-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.toast-view-rewards {
  padding: 8px 11px;
  border: 1px solid rgba(255, 215, 90, .75);
  border-radius: var(--radius-pill);
  background: #ffd75a;
  color: #33252b;
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.toast-view-rewards[hidden] {
  display: none;
}

.toast-close {
  display: flex;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: -5px -7px 0 0;
  padding: 0;
  border: 1px solid rgba(255, 248, 223, .42);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-family: Arial, sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.toast-close[hidden] {
  display: none;
}

.toast-close:focus-visible {
  outline: 2px solid #ffd75a;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Prevent iOS Safari native image callout during press-and-hold flip */
.frame-cell,
.frame-cell img {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ===== 1. LARGER CUSTOM CAT & SIGNATURE ICONS ===== */
.pill .icon[data-cat],
.tag .icon[data-cat] {
  width: 20px;
  height: 20px;
}

.signature .cat {
  width: 28px;
  height: 32px;
  object-fit: contain;
}

.signature[aria-label="End of archive"] .cat {
  width: 42px;
  height: 48px;
}

.signature .otter,
.signature .seal {
  width: 40px;
  height: 26px;
}

/* ===== 2. 3D POLAROID FLIP & HOLD GUARD ===== */
.frame-cell {
  perspective: 1000px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.polaroid-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  transform-style: preserve-3d;
}

.frame-cell.is-pressing .polaroid-inner {
  transform: scale(0.97);
}

.frame-cell.is-flipped .polaroid-inner {
  transform: rotateY(180deg);
}

.frame-cell.is-flipped.is-pressing .polaroid-inner {
  transform: rotateY(180deg) scale(0.97);
}

.polaroid-front,
.polaroid-back {
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: inherit;
}

.polaroid-front {
  position: relative;
}

.polaroid-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  background: #FAF6F3;
  border: 1px solid rgba(201, 107, 132, 0.32);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #231F20;
  box-shadow: inset 0 0 24px rgba(242, 220, 226, 0.45);
  overflow: hidden;
}

.polaroid-back-decorations {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.frame .polaroid-back-sticker {
  position: absolute;
  width: 13%;
  height: auto;
  object-fit: contain;
  opacity: .88;
  filter: drop-shadow(0 2px 2px rgba(70, 48, 52, .16));
}

.polaroid-back-sticker--1 {
  top: 20%;
  left: 4%;
  transform: rotate(-14deg);
}

.polaroid-back-sticker--2 {
  top: 20%;
  right: 4%;
  width: 15%;
  transform: rotate(12deg);
}

.polaroid-back-sticker--3 {
  top: 5%;
  left: 18%;
  width: 10%;
  transform: rotate(8deg);
}

.polaroid-back-sticker--4 {
  top: 5%;
  right: 18%;
  width: 11%;
  transform: rotate(-9deg);
}

.polaroid-back-sticker--5 {
  bottom: 20%;
  left: 4%;
  width: 15%;
  transform: rotate(10deg);
}

.polaroid-back-sticker--6 {
  right: 4%;
  bottom: 20%;
  transform: rotate(-12deg);
}

.polaroid-back-sticker--7 {
  bottom: 4%;
  left: 28%;
  width: 10%;
  transform: rotate(-8deg);
}

.polaroid-back-sticker--8 {
  right: 28%;
  bottom: 4%;
  width: 12%;
  transform: rotate(14deg);
}

.polaroid-back-stamp {
  position: relative;
  z-index: 2;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C96B84;
  display: flex;
  justify-content: space-between;
}

.polaroid-back-text {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 76%;
  min-height: 66px;
  max-height: 104px;
  align-self: center;
  overflow: auto;
  padding: 8px 10px;
  border: 1px solid rgba(201, 107, 132, .2);
  border-radius: 8px;
  background: rgba(255, 252, 250, .92);
  font-family: "Caveat", cursive;
  font-size: 1.15rem;
  line-height: 1.4;
  color: #231F20;
  margin: auto 0;
  text-align: center;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  transform: rotate(-1deg);
}

.polaroid-back.is-editing .polaroid-back-text,
.polaroid-back.is-editing .polaroid-back-edit {
  display: none;
}

.polaroid-back-editor {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: min(100%, 220px);
  min-width: 0;
  margin: auto 0;
  align-self: center;
}

.polaroid-back-editor[hidden] {
  display: none;
}

.polaroid-back-input {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  max-height: 80px;
  padding: 6px 8px;
  border: 1px solid rgba(201, 107, 132, .35);
  border-radius: 7px;
  background: rgba(255, 252, 250, .96);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.3;
  resize: vertical;
  overflow-wrap: anywhere;
}

.polaroid-back-save,
.polaroid-back-edit {
  position: relative;
  z-index: 2;
  max-width: 100%;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(201, 107, 132, .4);
  border-radius: var(--radius-pill);
  background: rgba(255, 252, 250, .94);
  color: var(--rose-strong);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  line-height: 1.2;
  white-space: nowrap;
}

.polaroid-back-save {
  align-self: center;
}

.frame--split .polaroid-back {
  padding: 8px;
}

.frame--split .polaroid-back-text {
  width: 88%;
  min-height: 56px;
  max-height: 96px;
  padding: 6px;
  font-size: 1rem;
}

.frame--split .polaroid-back-edit,
.frame--split .polaroid-back-save {
  padding: 3px 6px;
  font-size: 0.55rem;
}

.frame--split .polaroid-back-sticker {
  width: 9%;
  opacity: .7;
}

.frame--split .polaroid-back-sticker--1,
.frame--split .polaroid-back-sticker--2 {
  top: 14%;
}

.frame--split .polaroid-back-sticker--5 {
  bottom: 22%;
  left: 3%;
}

.frame--split .polaroid-back-sticker--6 {
  right: 3%;
  bottom: 22%;
}

.frame--split .polaroid-back-sticker--7 {
  bottom: 7%;
  left: 3%;
}

.frame--split .polaroid-back-sticker--8 {
  right: 3%;
  bottom: 7%;
}

@media (max-width: 360px) {
  .frame--split .polaroid-back-stamp {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    font-size: 0.5rem;
    letter-spacing: .03em;
    line-height: 1.15;
  }

  .frame--split .polaroid-back-hint {
    font-size: 0.48rem;
    white-space: nowrap;
  }
}

.polaroid-back-hint {
  position: relative;
  z-index: 2;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  color: #73686A;
  text-align: right;
}

/* ===== 3. POCKET CAT GUIDE ===== */
.cat-guide {
  position: fixed;
  left: max(16px, calc(50vw - 196px + 16px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 28;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  width: min(330px, calc(100vw - 125px));
  pointer-events: none;
}

@media (max-width: 440px) {
  .cat-guide {
    left: 14px;
  }
}

.cat-avatar {
  pointer-events: auto;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #FAF6F3;
  border: 1.5px solid #C96B84;
  color: #231F20;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(35, 31, 32, 0.14);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.cat-avatar:active {
  transform: scale(0.92);
}

.cat-avatar img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.cat-avatar.is-meowing {
  animation: cat-hop 0.45s ease;
}

@keyframes cat-hop {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  35% {
    transform: translateY(-7px) rotate(-6deg);
  }

  70% {
    transform: translateY(-2px) rotate(4deg);
  }
}

.cat-bubble {
  flex: 1 1 0;
  min-width: 0;
  pointer-events: auto;
  background: #FAF6F3;
  border: 1px solid rgba(201, 107, 132, 0.45);
  border-radius: 14px 14px 14px 4px;
  padding: 10px 12px;
  box-shadow: 0 10px 24px rgba(35, 31, 32, 0.14);
  font-size: 0.8rem;
  line-height: 1.4;
  color: #231F20;
}

.cat-bubble[hidden] {
  display: none !important;
}

.cat-trophy-reward[hidden] {
  display: none !important;
}

.cat-trophy-reward {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid rgba(201, 107, 132, .35);
  border-radius: 10px;
  background: #fff;
}

.cat-reward-icon {
  flex-shrink: 0;
  font-size: 1.45rem;
}

.cat-reward-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cat-reward-copy strong {
  overflow-wrap: anywhere;
}

.cat-reward-copy small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.cat-picker {
  display: flex;
  gap: 8px;
  min-width: 0;
}

.cat-picker[hidden] {
  display: none;
}

.cat-choice {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(201, 107, 132, 0.35);
  border-radius: 10px;
  background: #fff;
  color: #231F20;
  text-align: left;
  cursor: pointer;
}

.cat-choice img {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  object-fit: contain;
}

.cat-choice span {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 600;
}

.cat-choice small {
  color: #73686A;
  font-size: 0.72rem;
  font-weight: 400;
  overflow-wrap: anywhere;
}

@media (max-width: 440px) {
  .cat-picker {
    flex-direction: column;
    gap: 6px;
  }

  .cat-choice {
    width: 100%;
    min-height: 44px;
    padding: 6px 8px;
    gap: 7px;
  }

  .cat-choice img {
    width: 28px;
    height: 28px;
  }

  .cat-bubble-head>span {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

.cat-bubble-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #C96B84;
  text-transform: uppercase;
}

.cat-close {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.cat-bubble-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 7px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
}

.cat-bubble-actions button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #C96B84;
  font-weight: 600;
}

.cat-bubble-actions button[hidden] {
  display: none;
}

.cat-bubble-actions button.is-muted {
  color: #73686A;
  font-weight: 400;
}