/* The Jar — dinner for two */
:root {
  --ink: #140c0a;
  --ink-2: #2a1814;
  --cream: #f6efe2;
  --cream-dim: rgba(246, 239, 226, 0.72);
  --cream-faint: rgba(246, 239, 226, 0.14);
  --ink-on-paper: #3b271c;
  --amber: #e7a04a;
  --amber-deep: #c47a32;
  --berry: #c4544a;
  --sage: #6d8f6a;
  --sage-deep: #4f6d4d;
  --font-display: "Fraunces", Georgia, serif;
  --font-hand: "Caveat", "Segoe Script", cursive;
  --font-body: "Outfit", system-ui, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sheet-0: #f6efe2;
  --sheet-1: #f3e0c4;
  --sheet-2: #efe6cf;
  --sheet-3: #f8e4dc;
  --sheet-4: #e5f0e2;
  --sheet-5: #f8eec4;
  --sheet-6: #f0e4f2;
  --sheet-7: #e4eef6;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body.is-locked {
  overflow: hidden;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  touch-action: manipulation;
  transition: transform 0.12s var(--ease), background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.dock-btn:active,
.btn:active,
.segment:active,
.chip:active,
.mode-btn:active,
.tag:active,
.icon-btn:active,
.heart:active {
  transform: scale(0.96);
}

button:disabled {
  cursor: default;
  opacity: 0.55;
}

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

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(80% 50% at 50% -10%, rgba(231, 160, 74, 0.2), transparent 55%),
    radial-gradient(40% 32% at 100% 90%, rgba(196, 84, 74, 0.16), transparent 60%),
    linear-gradient(180deg, #1c100c 0%, #140c0a 40%, #0e0908 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}

.orb-a {
  width: 46vw;
  height: 46vw;
  top: -8%;
  left: 22%;
  background: #e7a04a;
  opacity: 0.22;
  animation: flicker 3.6s ease-in-out infinite;
}

.orb-b {
  width: 40vw;
  height: 40vw;
  bottom: 6%;
  left: -12%;
  background: #8c3d32;
  opacity: 0.28;
}

.orb-c {
  width: 28vw;
  height: 28vw;
  top: 42%;
  right: -8%;
  background: #c47a32;
  opacity: 0.16;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.55'/></svg>");
  mix-blend-mode: overlay;
}

@keyframes flicker {
  0%,
  100% { opacity: 0.16; transform: scale(1); }
  50% { opacity: 0.28; transform: scale(1.05); }
}

.app {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 0 18px calc(24px + var(--safe-bottom));
}

.boot {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 8px;
  color: var(--cream-dim);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: calc(14px + var(--safe-top)) 0 10px;
  background: linear-gradient(180deg, rgba(20, 12, 10, 0.94) 0%, rgba(20, 12, 10, 0.78) 72%, transparent 100%);
  backdrop-filter: blur(10px);
}

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

.brand-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 2.35rem;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.tagline {
  margin: 4px 0 0;
  color: var(--cream-dim);
  font-size: 0.95rem;
}

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

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--cream-faint);
  color: var(--cream);
}

.icon-btn[aria-pressed="true"] {
  background: rgba(231, 160, 74, 0.22);
  color: var(--amber);
}

.icon-btn-fill {
  background: var(--cream);
  color: var(--ink-on-paper);
}

.segment,
.chip,
.mode-btn {
  min-height: 40px;
  border-radius: 999px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--cream-faint);
  color: var(--cream-dim);
}

.segment.is-on,
.chip.is-on,
.mode-btn.is-on {
  background: var(--cream);
  color: var(--ink-on-paper);
  border-color: transparent;
  font-weight: 650;
}

.segments {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.segment {
  position: relative;
  font-size: 0.92rem;
}

.segment b {
  font-weight: 650;
}

.segment small {
  display: block;
  font-size: 0.72rem;
  opacity: 0.75;
}

.jar-scene {
  display: block;
  width: 250px;
  margin: 6px auto 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.home {
  min-height: 100dvh;
  margin: 0 -18px calc(-24px - var(--safe-bottom));
  padding: 0 18px;
  display: flex;
  flex-direction: column;
}

.home-top {
  display: flex;
  justify-content: flex-end;
  padding-top: calc(12px + var(--safe-top));
}

.home-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: calc(96px + var(--safe-bottom));
}

.home-stage .jar-scene {
  width: 250px;
  margin: 0;
  transform: scale(1.05);
}

.jar-scene:active .jar-rig {
  transform: scale(0.96) rotate(-2deg);
}

@media (max-height: 700px) {
  .home-stage .jar-scene {
    transform: scale(0.84);
  }
}

@media (min-height: 820px) {
  .home-stage .jar-scene {
    transform: scale(1.12);
  }
}

.arrive {
  animation: arrive 0.28s var(--ease);
}

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

.home-mood {
  margin: 18px 0 0;
  color: var(--cream-dim);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.dock {
  position: fixed;
  z-index: 6;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(560px, 100%);
  padding: 18px 18px calc(14px + var(--safe-bottom));
  background: linear-gradient(180deg, transparent, rgba(14, 9, 8, 0.96) 36%);
}

.dock .mode {
  margin-top: 0;
}

.list-top {
  display: flex;
  align-items: center;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 5;
  overflow: visible;
  padding: calc(22px + var(--safe-top)) 0 16px;
  background: linear-gradient(180deg, rgba(20, 12, 10, 1) 0%, rgba(20, 12, 10, 0.98) 78%, rgba(20, 12, 10, 0.82) 100%);
}

.list-top .segments {
  flex: 1;
  margin-top: 0;
  min-width: 0;
  padding: 2px 0;
}

.list-top .segment {
  min-height: 44px;
}

.jar-rig {
  position: relative;
  height: 318px;
  transform-origin: 50% 82%;
}

.jar-scene.is-shaking .jar-rig {
  animation: jar-wobble 0.22s linear infinite;
}

.jar-scene.is-open .lid,
.stage-shake .lid {
  transform: translate(42px, 10px) rotate(18deg);
}

.jar-scene.is-shaking .lid {
  transform: translateY(-10px) rotate(-8deg);
}

.lid {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 58px;
  width: 134px;
  transition: transform 0.45s var(--ease);
}

.lid-top {
  height: 22px;
  border-radius: 9px 9px 5px 5px;
  background: linear-gradient(180deg, #f6d7a4, #d4924a 55%, #a86a32);
  box-shadow: 0 7px 0 #8d5528, 0 12px 18px rgba(0, 0, 0, 0.28);
}

.lid-lip {
  width: 100px;
  height: 14px;
  margin: 7px auto 0;
  border-radius: 4px;
  background: linear-gradient(180deg, #efc07a, #8d5528);
}

.neck {
  position: absolute;
  z-index: 3;
  top: 42px;
  left: 82px;
  width: 86px;
  height: 28px;
  background: linear-gradient(90deg, rgba(255, 236, 214, 0.18), rgba(255, 228, 190, 0.5), rgba(255, 236, 214, 0.14));
  border-left: 2px solid rgba(255, 236, 214, 0.35);
  border-right: 2px solid rgba(255, 236, 214, 0.28);
}

.peek {
  position: absolute;
  z-index: 5;
  top: 46px;
  left: 78px;
  width: 108px;
  padding: 16px 8px 8px;
  background: var(--sheet-1);
  color: var(--ink-on-paper);
  font-family: var(--font-hand);
  font-size: 1.25rem;
  line-height: 1;
  text-align: center;
  border-radius: 3px;
  transform: rotate(-7deg);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.glass {
  position: absolute;
  z-index: 2;
  top: 62px;
  left: 22px;
  width: 206px;
  height: 236px;
  overflow: hidden;
  border: 2px solid rgba(255, 236, 214, 0.4);
  border-radius: 34px 34px 80px 80px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.5), transparent 24%),
    linear-gradient(180deg, rgba(255, 236, 210, 0.42), rgba(255, 206, 150, 0.16) 38%, rgba(92, 48, 24, 0.28));
  box-shadow:
    inset 16px 0 22px rgba(255, 255, 255, 0.16),
    inset -12px 0 18px rgba(70, 32, 16, 0.16),
    inset 0 -28px 36px rgba(70, 30, 14, 0.22),
    0 26px 40px rgba(0, 0, 0, 0.35);
}

.shine {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 16px;
  height: 58%;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0));
  transform: rotate(8deg);
}

.float-slip {
  position: absolute;
  width: 72px;
  height: 40px;
}

.float-slip i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  background-color: var(--sheet);
  background-image: linear-gradient(
    180deg,
    transparent 40%,
    rgba(80, 48, 24, 0.18) 40%,
    rgba(80, 48, 24, 0.18) 46%,
    transparent 46%
  );
  box-shadow: 0 5px 0 rgba(70, 36, 16, 0.18);
  transform: rotate(var(--r));
}

.is-shaking .float-slip i {
  animation: slip-jiggle 0.18s linear infinite;
}

@keyframes jar-wobble {
  0% { transform: rotate(-6deg) translateY(0); }
  25% { transform: rotate(5deg) translateY(-7px); }
  50% { transform: rotate(-4deg) translateY(0); }
  75% { transform: rotate(6deg) translateY(-5px); }
  100% { transform: rotate(-5deg) translateY(0); }
}

@keyframes slip-jiggle {
  0% { transform: rotate(var(--r)) translateY(0); }
  50% { transform: rotate(calc(var(--r) + 12deg)) translateY(-12px); }
  100% { transform: rotate(var(--r)) translateY(0); }
}

.jar-shadow {
  width: 150px;
  height: 18px;
  margin: -4px auto 0;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.45), transparent 70%);
}

.count-line {
  margin: 8px 0 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
}

.mood {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.list-body .slip-list,
.list-body .empty {
  margin-top: 8px;
}

.mood::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
}

.mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.mode-help,
.stats,
.hint,
.ask {
  margin: 8px 0 0;
  color: var(--cream-dim);
  line-height: 1.45;
  font-size: 0.95rem;
}

.stats {
  text-align: center;
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 650;
  text-decoration: none;
  text-align: center;
}

.btn.block {
  width: 100%;
}

.shake-btn {
  width: 100%;
  margin-top: 14px;
  background: linear-gradient(180deg, #f3c98a, #e0973a);
  color: #3a2416;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 12px 28px rgba(224, 151, 58, 0.28);
}

.btn.sage {
  background: linear-gradient(180deg, #8eaf86, #5d8158);
  color: #f6fff4;
}

.btn.berry {
  background: linear-gradient(180deg, #e07a70, #b1433c);
  color: #fff8f6;
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--cream-faint);
  color: var(--cream);
}

.btn.ghost-ink {
  border: 1px solid rgba(59, 39, 28, 0.22);
  color: var(--ink-on-paper);
  background: rgba(255, 255, 255, 0.28);
}

.btn.tiny {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 0.92rem;
}

.btn.text,
.btn.text-danger {
  min-height: 36px;
  background: none;
  color: var(--cream-dim);
  font-weight: 550;
}

.btn.text-danger {
  color: #e7a097;
}

.stack {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.tonight {
  margin-top: 8px;
  padding: 14px 14px 12px;
  border-radius: 18px;
  background: var(--sheet-1);
  color: var(--ink-on-paper);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
}

.tonight p {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
}

.tonight button.name {
  display: block;
  width: 100%;
  margin: 2px 0 10px;
  padding: 0;
  text-align: left;
  font-family: var(--font-hand);
  font-size: 2rem;
  line-height: 1;
  color: var(--ink-on-paper);
}

.tonight .row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quiet-hero {
  padding: 18px 4px 6px;
}

.quiet-hero h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 2rem;
}

.list-title {
  margin: 22px 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.slip-list {
  display: grid;
  gap: 12px;
}

.slip {
  position: relative;
  border-radius: 16px;
  background: var(--sheet);
  color: var(--ink-on-paper);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
  animation: rise 0.36s var(--ease) both;
}

.slip:nth-child(2) { animation-delay: 0.04s; }
.slip:nth-child(3) { animation-delay: 0.08s; }
.slip:nth-child(4) { animation-delay: 0.12s; }
.slip:nth-child(5) { animation-delay: 0.16s; }
.slip:nth-child(6) { animation-delay: 0.2s; }
.slip:nth-child(7) { animation-delay: 0.24s; }
.slip:nth-child(8) { animation-delay: 0.28s; }

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

.slip::after,
.reveal-paper::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  border-style: solid;
  border-width: 0 22px 22px 0;
  border-color: transparent rgba(70, 42, 24, 0.13) transparent transparent;
  pointer-events: none;
}

.slip-open {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 16px 62px 14px 16px;
  text-align: left;
  color: inherit;
}

.slip-name,
.detail-name,
.reveal-name {
  font-family: var(--font-hand);
  font-weight: 700;
  line-height: 0.95;
}

.slip-name {
  font-size: 1.85rem;
}

.slip-meta,
.slip-history,
.slip-by,
.slip-why {
  font-size: 0.92rem;
  opacity: 0.78;
}

.slip-note,
.reveal-note,
.visit-note,
.detail-note {
  font-family: var(--font-hand);
  font-size: 1.35rem;
  line-height: 1.15;
  white-space: pre-wrap;
}

.slip-why {
  font-style: italic;
}

.ribbon {
  margin-top: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(196, 84, 74, 0.16);
  color: #8d342c;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.seal {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e88978, #9d3030 62%, #6e1d1d);
  color: #fff8f2;
  font-family: var(--font-display);
  font-size: 1rem;
  box-shadow: inset 0 0 0 2px rgba(255, 248, 240, 0.28), 0 6px 10px rgba(80, 16, 16, 0.25);
}

.seal.is-new {
  background: transparent;
  color: rgba(59, 39, 28, 0.62);
  border: 1.5px dashed rgba(59, 39, 28, 0.35);
  box-shadow: none;
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.seal.pop {
  animation: pop 0.55s var(--ease);
}

@keyframes pop {
  0% { transform: scale(0.4) rotate(-12deg); }
  60% { transform: scale(1.16) rotate(6deg); }
  100% { transform: none; }
}

.slip-votes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 12px 12px;
}

.empty {
  padding: 18px 8px 8px;
  color: var(--cream-dim);
  line-height: 1.5;
}

.fab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 18px 0 4px;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink-on-paper);
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
}

.fab-plus {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #3b271c;
  color: var(--cream);
  font-size: 1.3rem;
  line-height: 1;
}

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

.detail-paper {
  position: relative;
  margin-top: 12px;
  padding: 22px 68px 18px 20px;
  border-radius: 18px;
  background: var(--sheet);
  color: var(--ink-on-paper);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.detail-kicker,
.reveal-kicker {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.62;
}

.detail-name {
  margin: 4px 0;
  font-size: 3rem;
}

.detail-paper .slip-meta,
.detail-paper .slip-by,
.detail-paper .year-note {
  margin: 0;
}

.year-note {
  margin-top: 8px !important;
  font-family: var(--font-hand);
  font-size: 1.35rem;
}

.visit-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.visit {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(246, 239, 226, 0.08);
}

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

.visit-top button {
  color: var(--cream-dim);
  font-size: 0.85rem;
}

.visit-ordered,
.visit-scores,
.visit-note {
  margin: 6px 0 0;
}

.visit-note {
  color: var(--cream);
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: calc(18px + var(--safe-top)) 20px calc(20px + var(--safe-bottom));
  background:
    radial-gradient(60% 40% at 50% 28%, rgba(231, 160, 74, 0.2), transparent 60%),
    rgba(10, 6, 4, 0.92);
  animation: fade-in 0.18s ease;
  perspective: 900px;
}

.stage-later {
  width: min(420px, 100%);
  margin: 0;
  padding: 0 4px;
  text-align: right;
  color: var(--cream-dim);
  min-height: 36px;
}

.stage-kicker,
.stage-wait {
  margin: 0;
  text-align: center;
}

.stage-kicker {
  font-family: var(--font-display);
  font-size: 1.6rem;
}

.reveal-paper {
  position: relative;
  width: min(420px, 100%);
  padding: 28px 24px 22px;
  border-radius: 4px 18px 16px 16px;
  background: var(--sheet);
  color: var(--ink-on-paper);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
  animation: unfold 0.7s var(--ease) both;
}

.reveal-name {
  margin: 6px 0 8px;
  font-size: clamp(3.1rem, 12vw, 4.6rem);
}

.reveal-meta,
.reveal-by,
.reveal-history,
.reveal-tease,
.reveal-note {
  margin: 4px 0 0;
}

.reveal-tease {
  font-family: var(--font-hand);
  font-size: 1.4rem;
}

.stage-actions {
  width: min(420px, 100%);
  display: grid;
  gap: 8px;
}

@keyframes unfold {
  from { transform: rotateX(58deg) translateY(24px) scale(0.92); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.sheet-back {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(8, 5, 4, 0.62);
  animation: fade-in 0.18s ease;
}

.sheet {
  position: fixed;
  z-index: 41;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(92dvh, 820px);
  overflow: auto;
  padding: 10px 18px calc(18px + var(--safe-bottom));
  border-radius: 28px 28px 0 0;
  background: #2a1814;
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.4);
  animation: sheet-up 0.32s var(--ease);
}

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

@keyframes sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes sheet-up-center {
  from { transform: translate(-50%, 28%); }
  to { transform: translate(-50%, 0); }
}

.sheet-handle {
  width: 46px;
  height: 5px;
  margin: 4px auto 12px;
  border-radius: 999px;
  background: rgba(246, 239, 226, 0.28);
}

.sheet h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.8rem;
}

.field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.field span,
.score-row span {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

input[type="text"],
input[type="date"],
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(246, 239, 226, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream);
}

textarea {
  resize: vertical;
  min-height: 84px;
}

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

.choice {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(246, 239, 226, 0.16);
}

.choice input {
  accent-color: var(--amber);
}

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

.tag {
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(246, 239, 226, 0.18);
  color: var(--cream-dim);
}

.tag.is-on {
  background: var(--cream);
  color: var(--ink-on-paper);
  border-color: transparent;
}

.tag-add {
  display: flex;
  gap: 8px;
}

.tag-add input {
  flex: 1;
}

.score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.hearts {
  display: flex;
  gap: 2px;
}

.heart {
  width: 36px;
  height: 36px;
  font-size: 1.35rem;
  color: rgba(246, 239, 226, 0.35);
}

.heart.is-on {
  color: #e07a70;
}

.paper-0 { --sheet: var(--sheet-0); }
.paper-1 { --sheet: var(--sheet-1); }
.paper-2 { --sheet: var(--sheet-2); }
.paper-3 { --sheet: var(--sheet-3); }
.paper-4 { --sheet: var(--sheet-4); }
.paper-5 { --sheet: var(--sheet-5); }
.paper-6 { --sheet: var(--sheet-6); }
.paper-7 { --sheet: var(--sheet-7); }

.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: calc(96px + var(--safe-bottom));
  transform: translateX(-50%);
  width: max-content;
  max-width: min(440px, calc(100% - 28px));
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink-on-paper);
  text-align: center;
  font-weight: 650;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.toast[hidden] {
  display: none;
}

.toast:not([hidden]) {
  animation: toast-in 0.24s var(--ease);
}

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

@media (min-width: 720px) {
  .sheet {
    left: 50%;
    right: auto;
    width: min(520px, calc(100% - 32px));
    transform: translateX(-50%);
    bottom: 24px;
    border-radius: 28px;
    animation-name: sheet-up-center;
  }
}

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