:root {
  --ink: #302923;
  --muted: #746a60;
  --soft: #f7f1e8;
  --bg: #f4efe7;
  --cream: #fffdf7;
  --paper: #fff8df;
  --paper-deep: #ead8b8;
  --line: rgba(126, 105, 86, 0.22);
  --glass: rgba(219, 239, 240, 0.34);
  --glass-edge: rgba(116, 158, 161, 0.54);
  --glass-deep: rgba(94, 137, 142, 0.18);
  --wood: #c58a4a;
  --wood-dark: #815932;
  --wood-light: #e7ba75;
  --sage: #607b63;
  --sage-dark: #47604a;
  --rust: #9f4f3c;
  --shadow: 0 22px 60px rgba(71, 53, 38, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0%, rgba(232, 188, 125, 0.26), transparent 21rem),
    linear-gradient(160deg, #fffaf0 0%, var(--bg) 58%, #eef4ef 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

h1 {
  font-size: 1.26rem;
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.35rem, 7vw, 2.25rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  font-size: 1rem;
  line-height: 1.2;
}

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

.app-shell {
  width: min(100% - 20px, 1180px);
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 0 34px;
}

.topbar {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  filter: drop-shadow(0 10px 18px rgba(71, 53, 38, 0.18));
}

.brand p,
.section-copy,
.status-line,
.shelf-limit,
.shelf-jar-status,
.side-meta,
.empty-copy,
.reader-copy,
.private-copy,
.read-note-meta,
.disposal-meta {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.42;
}

.section-copy {
  margin-top: 7px;
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--wood-dark);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.top-actions {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.top-actions .button {
  width: auto;
}

#shelfButton {
  margin-left: auto;
}

@media (max-width: 239px) {
  .top-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .top-actions .button {
    width: 100%;
  }

  #shelfButton {
    margin-left: 0;
  }
}

.button,
.icon-button,
.icon-text-button,
.quiet-button,
.tiny-button {
  display: inline-flex;
  min-width: 0;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 850;
  line-height: 1;
  text-align: center;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
}

.button {
  width: 100%;
  padding: 0 15px;
  white-space: normal;
}

.button:disabled,
.icon-button:disabled,
.quiet-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.button:not(:disabled):hover,
.icon-button:not(:disabled):hover,
.icon-text-button:not(:disabled):hover,
.quiet-button:not(:disabled):hover,
.tiny-button:not(:disabled):hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #fffdf7;
  background: var(--sage);
  box-shadow: 0 14px 28px rgba(73, 98, 73, 0.2);
}

.button-primary:not(:disabled):hover {
  background: var(--sage-dark);
}

.button-secondary,
.icon-text-button,
.quiet-button,
.tiny-button {
  color: var(--ink);
  border-color: rgba(126, 105, 86, 0.26);
  background: rgba(255, 255, 255, 0.68);
}

.button-secondary:not(:disabled):hover,
.icon-text-button:not(:disabled):hover,
.quiet-button:not(:disabled):hover,
.tiny-button:not(:disabled):hover {
  background: var(--cream);
  border-color: rgba(96, 123, 99, 0.38);
}

.button-danger {
  color: #fffdf7;
  background: var(--rust);
  box-shadow: 0 14px 28px rgba(159, 79, 60, 0.2);
}

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

.icon-button {
  width: 46px;
  padding: 0 0 3px;
  color: var(--ink);
  border-color: rgba(126, 105, 86, 0.26);
  background: rgba(255, 255, 255, 0.7);
  font-size: 1.45rem;
}

.icon-text-button,
.tiny-button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.86rem;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(126, 105, 86, 0.24);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus,
textarea:focus {
  border-color: rgba(96, 123, 99, 0.72);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 4px rgba(96, 123, 99, 0.13);
}

input {
  min-height: 46px;
  padding: 10px 12px;
}

textarea {
  min-height: min(48svh, 380px);
  resize: vertical;
  padding: 18px 16px 22px;
  line-height: 1.55;
  background:
    linear-gradient(rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.46)),
    repeating-linear-gradient(to bottom, var(--paper) 0 31px, rgba(95, 119, 132, 0.15) 32px 33px);
  font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  font-size: 1.04rem;
}

.shelf-view,
.app-view {
  display: grid;
  gap: 14px;
}

.shelf-head,
.jar-focus,
.quiet-panel,
.add-jar-card {
  border: 1px solid rgba(126, 105, 86, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 252, 244, 0.72);
  box-shadow: var(--shadow);
}

.shelf-head,
.add-jar-card,
.quiet-panel {
  padding: 16px;
}

.shelf-head {
  display: grid;
  gap: 10px;
}

.shelf-limit {
  display: none;
}

.wood-shelf {
  position: relative;
  padding: 20px 12px 72px;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 36%),
    linear-gradient(90deg, rgba(129, 89, 50, 0.08), transparent 18%, rgba(129, 89, 50, 0.08)),
    #ead7bb;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -14px 26px rgba(129, 89, 50, 0.12),
    0 20px 40px rgba(71, 53, 38, 0.1);
}

.wood-shelf::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  height: 16px;
  border-radius: 3px;
  background:
    repeating-linear-gradient(90deg, rgba(129, 89, 50, 0.12) 0 12px, rgba(255, 255, 255, 0.08) 12px 25px),
    linear-gradient(180deg, #d3ab76, #9f7141);
  box-shadow: 0 12px 24px rgba(71, 53, 38, 0.16);
}

.shelf-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 280px;
  margin: 0 auto;
  gap: 12px;
}

.shelf-jar-card {
  position: relative;
  display: grid;
  min-width: 0;
}

.shelf-jar-open {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 255px;
  width: 100%;
  place-items: center;
  padding: 20px 10px 14px;
  border: 0;
  border-radius: 14px;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 50% 62%, rgba(255, 255, 255, 0.6), transparent 54%),
    linear-gradient(180deg, rgba(255, 253, 247, 0.36), rgba(255, 253, 247, 0.1));
  box-shadow: none;
}

.shelf-jar-open:hover {
  transform: translateY(-2px);
}

.shelf-jar-name {
  position: static;
  display: block;
  width: min(100%, 210px);
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(126, 105, 86, 0.16);
  border-radius: 6px;
  overflow-wrap: anywhere;
  background: rgba(255, 253, 247, 0.9);
  box-shadow: 0 10px 22px rgba(71, 53, 38, 0.08);
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
  opacity: 1;
  transform: none;
}

.shelf-jar-open:hover .shelf-jar-name,
.shelf-jar-open:focus-visible .shelf-jar-name {
  opacity: 1;
  transform: none;
}

.mini-jar-photo {
  position: relative;
  width: min(68vw, 210px);
  aspect-ratio: 0.78;
  margin: 0 auto 8px;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255, 253, 247, 0.5);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.5),
    0 18px 34px rgba(71, 53, 38, 0.12);
}

.mini-jar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.04);
}

.shelf-add-form {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 22px;
}

.shelf-add-button {
  display: grid;
  width: 46px;
  height: 46px;
  min-height: 46px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(96, 123, 99, 0.38);
  border-radius: 50%;
  color: var(--sage-dark);
  background: rgba(255, 253, 247, 0.92);
  box-shadow: 0 10px 20px rgba(71, 53, 38, 0.14);
  font-size: 1.6rem;
  line-height: 1;
}

.shelf-add-button:hover {
  transform: translateY(-2px);
}

.shelf-status {
  min-height: 20px;
  margin: -4px 0 0;
  text-align: center;
}

.add-jar-card {
  display: grid;
  gap: 12px;
}

.add-jar-compact {
  justify-items: center;
  padding: 0 0 4px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.add-jar-button {
  width: auto;
  min-height: 52px;
  gap: 10px;
  padding: 0 18px;
  border-style: dashed;
  background: rgba(255, 253, 247, 0.56);
}

.add-jar-plus {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: var(--sage-dark);
  background: rgba(96, 123, 99, 0.12);
  font-size: 1.35rem;
  line-height: 1;
}

.add-jar-compact .status-line {
  min-height: 20px;
  text-align: center;
}

.jar-focus {
  display: grid;
  gap: 12px;
  min-height: calc(100svh - 118px);
  padding: 10px 2px 14px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  text-align: center;
}

.jar-focus-head,
.panel-head,
.paper-editor-head {
  display: grid;
  gap: 10px;
}

.jar-focus-head .icon-text-button {
  min-height: 36px;
  justify-self: center;
}

.jar-heading-copy {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.jar-title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.jar-title-line h2 {
  overflow-wrap: anywhere;
}

.jar-title-button {
  max-width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  font: inherit;
  line-height: inherit;
  overflow-wrap: anywhere;
  text-align: center;
}

.jar-title-button:hover {
  text-decoration: underline;
  text-decoration-color: rgba(96, 123, 99, 0.5);
  text-underline-offset: 4px;
}

.jar-title-button:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 4px;
}

.inline-name-editor {
  display: grid;
  width: min(100%, 520px);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.inline-name-editor input {
  min-width: 0;
  min-height: 48px;
  font-size: 1.35rem;
  font-weight: 800;
  text-align: center;
}

.inline-name-editor .button {
  min-height: 46px;
}

.manage-jar-button {
  width: auto;
  min-width: 118px;
  min-height: 44px;
  justify-self: center;
  white-space: nowrap;
}

.title-status {
  min-height: 20px;
  text-align: center;
}

.jar-stage {
  position: relative;
  display: grid;
  min-height: min(55svh, 480px);
  place-items: center;
  perspective: 900px;
}

.jar-photo-object {
  position: relative;
  width: min(92vw, 410px);
  aspect-ratio: 0.74;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.52);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.58),
    0 24px 60px rgba(71, 53, 38, 0.15);
  isolation: isolate;
}

.jar-photo-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  filter: saturate(0.98) contrast(0.98);
  transform: scale(1.035);
  transition: opacity 220ms ease, filter 220ms ease, transform 220ms ease;
}

.jar-motion-video {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.jar-photo-object.is-motion-playing .jar-motion-video {
  opacity: 1;
}

.jar-photo-object.is-motion-playing .jar-photo-image {
  opacity: 0;
}

.jar-stage.is-pulling .jar-photo-image {
  filter: saturate(0.95) contrast(0.96) brightness(1.03);
  transform: scale(1.05);
}

.jar-object {
  position: relative;
  width: min(86vw, 350px);
  height: min(54svh, 460px);
  min-height: 392px;
  transform-style: preserve-3d;
}

.jar-floor-shadow {
  position: absolute;
  right: 8%;
  bottom: 0;
  left: 8%;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(71, 53, 38, 0.22), transparent 68%);
  filter: blur(3px);
}

.jar-lid {
  position: absolute;
  top: 20px;
  left: 50%;
  z-index: 8;
  width: min(78%, 286px);
  height: 58px;
  border: 1px solid rgba(104, 70, 39, 0.34);
  border-radius: 50% / 42%;
  background:
    radial-gradient(ellipse at 48% 14%, rgba(255, 236, 183, 0.86) 0 18%, rgba(213, 154, 83, 0.52) 54%, rgba(126, 81, 39, 0.22) 76%),
    repeating-linear-gradient(96deg, rgba(255, 255, 255, 0.14) 0 9px, rgba(86, 58, 34, 0.12) 9px 18px),
    linear-gradient(180deg, #e6b36f 0%, #c98e4e 56%, #7f542e 100%);
  box-shadow:
    inset 0 5px 8px rgba(255, 255, 255, 0.2),
    inset 0 -13px 16px rgba(86, 58, 34, 0.26),
    0 12px 18px rgba(71, 53, 38, 0.18);
  transform: translateX(-50%) rotateX(4deg);
  transform-origin: 50% 70%;
  transition: transform 360ms cubic-bezier(0.22, 0.72, 0.24, 1);
}

.jar-lid::before,
.jar-lid::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.jar-lid::before {
  inset: 5px 14px 22px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 36% 45%, rgba(102, 63, 29, 0.18), transparent 13%),
    radial-gradient(ellipse at 68% 52%, rgba(102, 63, 29, 0.12), transparent 11%),
    repeating-radial-gradient(ellipse at 50% 58%, rgba(105, 67, 33, 0.18) 0 1px, transparent 1px 8px);
  opacity: 0.52;
}

.jar-lid::after {
  right: 5px;
  bottom: 7px;
  left: 5px;
  height: 24px;
  border-radius: 0 0 50% 50% / 0 0 86% 86%;
  background: linear-gradient(180deg, rgba(142, 89, 43, 0.05), rgba(83, 49, 23, 0.3));
}

.jar-lid span {
  position: absolute;
  inset: 11px 22px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  border-bottom: 1px solid rgba(86, 58, 34, 0.18);
  border-radius: 999px;
  opacity: 0.65;
}

.jar-stage.is-open .jar-lid,
.jar-stage.is-pulling .jar-lid {
  transform: translateX(-50%) translateY(-62px) rotateX(64deg) scale(0.94);
}

.jar-mouth {
  position: absolute;
  top: 68px;
  left: 50%;
  z-index: 5;
  width: min(68%, 244px);
  height: 38px;
  border: 4px solid rgba(116, 158, 161, 0.45);
  border-bottom-color: rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 55%, rgba(255, 255, 255, 0.7), rgba(202, 229, 231, 0.22) 52%, rgba(94, 137, 142, 0.12) 70%, transparent 72%);
  transform: translateX(-50%) rotateX(60deg);
  box-shadow:
    inset 0 0 18px rgba(94, 137, 142, 0.18),
    0 4px 8px rgba(71, 53, 38, 0.08);
}

.jar-glass {
  position: absolute;
  top: 75px;
  left: 50%;
  width: min(74%, 284px);
  height: calc(100% - 94px);
  min-height: 300px;
  overflow: hidden;
  border: 4px solid rgba(122, 160, 164, 0.48);
  border-radius: 28px 28px 44px 44px / 18px 18px 38px 38px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.62) 0 2%, rgba(188, 221, 224, 0.1) 4% 12%, transparent 24% 74%, rgba(83, 129, 134, 0.12) 88%, rgba(255, 255, 255, 0.42) 98%),
    linear-gradient(104deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.18) 14%, transparent 33%),
    radial-gradient(ellipse at 50% 82%, rgba(255, 255, 255, 0.34), transparent 44%),
    linear-gradient(180deg, rgba(219, 239, 240, 0.22), rgba(219, 239, 240, 0.07));
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.42),
    inset 15px 0 26px rgba(255, 255, 255, 0.22),
    inset -15px 0 24px rgba(94, 137, 142, 0.14),
    inset 0 -31px 42px rgba(94, 137, 142, 0.2),
    0 24px 54px rgba(71, 53, 38, 0.14);
  transform: translateX(-50%) rotateX(1deg);
}

.jar-glass::before {
  content: "";
  position: absolute;
  inset: 12px 13px 24px;
  border-right: 2px solid rgba(255, 255, 255, 0.3);
  border-left: 2px solid rgba(255, 255, 255, 0.38);
  border-radius: 22px 22px 38px 38px / 16px 16px 34px 34px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0 3px, transparent 4px 44%, rgba(255, 255, 255, 0.14) 46% 48%, transparent 50% 100%);
  opacity: 0.82;
}

.jar-glass::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: 17px;
  left: 8%;
  height: 38px;
  border: 2px solid rgba(116, 158, 161, 0.2);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(94, 137, 142, 0.13), rgba(255, 255, 255, 0.13) 44%, transparent 72%);
}

.glass-back {
  position: absolute;
  inset: 18px 15px 23px;
  border-radius: 22px 22px 38px 38px / 14px 14px 34px 34px;
  background:
    radial-gradient(ellipse at 50% 84%, rgba(255, 255, 255, 0.46), transparent 46%),
    linear-gradient(90deg, rgba(94, 137, 142, 0.07), transparent 28%, transparent 72%, rgba(94, 137, 142, 0.1));
}

.glass-rim {
  position: absolute;
  right: 9%;
  bottom: 23px;
  left: 9%;
  height: 32px;
  border: 3px solid rgba(116, 158, 161, 0.2);
  border-radius: 50%;
  box-shadow:
    inset 0 2px 6px rgba(94, 137, 142, 0.08),
    0 2px 7px rgba(255, 255, 255, 0.38);
}

.glass-shine {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  filter: blur(1px);
  pointer-events: none;
}

.glass-shine-left {
  top: 56px;
  left: 13%;
  width: 22px;
  height: 218px;
  opacity: 0.74;
  transform: rotate(3deg);
}

.glass-shine-right {
  top: 44px;
  right: 10%;
  width: 9px;
  height: 146px;
  opacity: 0.5;
  transform: rotate(-2deg);
}

.paper-pile {
  position: absolute;
  inset: 92px 22px 34px;
  z-index: 2;
}

.paper-slip {
  position: absolute;
  width: 70px;
  height: 42px;
  border: 1px solid rgba(126, 105, 86, 0.16);
  border-radius: 5px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.68), transparent 56%),
    linear-gradient(180deg, var(--slip-color, #fff8df), #ead8b8);
  box-shadow: 0 9px 18px rgba(71, 53, 38, 0.14);
  transform-origin: 50% 50%;
}

.paper-slip::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 5px;
  background:
    linear-gradient(140deg, transparent 0 47%, rgba(126, 105, 86, 0.14) 48% 51%, transparent 52%),
    linear-gradient(40deg, transparent 0 48%, rgba(255, 255, 255, 0.26) 49%, transparent 55%);
}

.paper-slip::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 28%;
  border-left: 1px solid rgba(126, 105, 86, 0.14);
  border-radius: 0 5px 5px 0;
  background: linear-gradient(90deg, rgba(126, 105, 86, 0.05), rgba(255, 255, 255, 0.24));
}

.pulling-paper {
  position: absolute;
  top: 58%;
  left: 50%;
  z-index: 6;
  width: 82px;
  height: 50px;
  border: 1px solid rgba(126, 105, 86, 0.16);
  border-radius: 5px;
  opacity: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.68), transparent 58%),
    #fff8df;
  box-shadow: 0 14px 24px rgba(71, 53, 38, 0.18);
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-7deg) scale(0.62);
}

.pulling-paper::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 5px;
  background: linear-gradient(140deg, transparent 0 48%, rgba(126, 105, 86, 0.16) 49% 51%, transparent 52%);
}

.jar-stage.is-pulling .pulling-paper {
  animation: pullPaper 780ms cubic-bezier(0.22, 0.75, 0.2, 1) forwards;
}

.primary-actions,
.quiet-actions,
.notebook-actions,
.side-actions {
  display: grid;
  gap: 8px;
}

.primary-actions {
  grid-template-columns: 1fr 1fr;
}

.add-paper-button {
  min-height: 52px;
  gap: 8px;
}

.add-paper-button span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1.35rem;
}

.quiet-actions {
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 430px);
  margin: 0 auto;
}

.ritual-footer {
  display: grid;
  gap: 10px;
}

.quiet-button {
  min-height: 48px;
  padding: 9px 14px;
  gap: 6px;
  border-color: rgba(126, 105, 86, 0.18);
  color: var(--muted);
  background: rgba(255, 253, 247, 0.42);
  box-shadow: none;
  font-size: 0.84rem;
  line-height: 1.3;
}

.quiet-button span {
  display: none;
}

.private-copy {
  max-width: 460px;
  margin: 0 auto;
  padding: 2px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.82rem;
}

.expiry-notice {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 11px 14px;
  border: 1px solid rgba(159, 108, 54, 0.24);
  border-radius: 8px;
  color: #67472d;
  background: rgba(255, 247, 226, 0.82);
  box-shadow: 0 10px 24px rgba(71, 53, 38, 0.08);
  font-size: 0.86rem;
  line-height: 1.45;
  text-align: center;
}

.quiet-panel {
  display: grid;
  gap: 14px;
}

.field-row {
  display: grid;
  gap: 10px;
}

.side-list {
  display: grid;
  gap: 10px;
}

.paper-card {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid rgba(126, 105, 86, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(159, 79, 60, 0.12) 0 2px, transparent 2px 100%),
    repeating-linear-gradient(to bottom, var(--paper) 0 32px, rgba(95, 119, 132, 0.12) 33px 34px);
  box-shadow: 0 12px 26px rgba(71, 53, 38, 0.09);
}

.paper-card p {
  overflow-wrap: anywhere;
  font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  line-height: 1.45;
}

.status-chip {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(126, 105, 86, 0.24);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 850;
}

.status-chip[data-status="in_jar"],
.status-chip[data-status="discussed"] {
  color: var(--sage-dark);
}

.status-chip[data-status="later"],
.status-chip[data-status="draft"] {
  color: #7a5c2f;
}

.status-chip[data-status="cut"],
.status-chip[data-status="burned"],
.status-chip[data-status="resolved"] {
  color: #755548;
}

.empty-copy {
  padding: 14px;
  border: 1px dashed rgba(126, 105, 86, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.42);
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 14px 10px max(14px, env(safe-area-inset-bottom));
  background: rgba(49, 41, 35, 0.28);
  backdrop-filter: blur(8px);
}

.drafts-dialog {
  width: min(100%, 680px);
  max-height: calc(100svh - 28px);
  margin: 0 auto;
  padding: 18px;
  overflow: auto;
  border: 1px solid rgba(126, 105, 86, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 252, 244, 0.97);
  box-shadow: 0 28px 80px rgba(49, 41, 35, 0.28);
  text-align: left;
}

.manage-jar-menu {
  position: fixed;
  z-index: 85;
  display: grid;
  width: min(220px, calc(100vw - 24px));
  padding: 6px;
  border: 1px solid rgba(126, 105, 86, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.98);
  box-shadow: 0 18px 44px rgba(49, 41, 35, 0.24);
}

.manage-menu-item {
  min-height: 48px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
  font-weight: 800;
  text-align: left;
}

.manage-menu-item:hover,
.manage-menu-item:focus-visible {
  outline: 0;
  background: rgba(96, 123, 99, 0.12);
}

.manage-menu-danger {
  color: #873f31;
}

.manage-menu-danger:hover,
.manage-menu-danger:focus-visible {
  background: rgba(159, 79, 60, 0.12);
}

.confirmation-layer {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
  overflow: auto;
  background: rgba(49, 41, 35, 0.36);
  backdrop-filter: blur(8px);
}

.confirmation-dialog {
  display: grid;
  width: min(100%, 440px);
  max-height: calc(100svh - 36px);
  gap: 14px;
  padding: 20px;
  overflow: auto;
  border: 1px solid rgba(126, 105, 86, 0.24);
  border-radius: var(--radius);
  background: var(--cream);
  box-shadow: 0 28px 80px rgba(49, 41, 35, 0.32);
  text-align: left;
}

.confirmation-dialog h2 {
  font-size: 1.55rem;
}

.confirmation-status {
  min-height: 20px;
  color: #873f31;
}

.confirmation-actions {
  display: grid;
  gap: 10px;
}

.paper-editor,
.reader-card {
  width: min(100%, 680px);
  max-height: calc(100svh - 28px);
  margin: 0 auto;
  overflow: auto;
  border: 1px solid rgba(126, 105, 86, 0.24);
  border-radius: var(--radius);
  box-shadow: 0 28px 80px rgba(49, 41, 35, 0.28);
}

.paper-editor {
  display: grid;
  gap: 16px;
  padding: 18px;
  background:
    linear-gradient(to right, transparent 0 42px, rgba(159, 79, 60, 0.2) 42px 44px, transparent 44px),
    repeating-linear-gradient(to bottom, var(--paper) 0 35px, rgba(95, 119, 132, 0.14) 36px 37px);
}

.paper-editor-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.note-field {
  margin-top: 2px;
}

.reader-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 252, 244, 0.94);
}

.reader-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: center;
  justify-content: stretch;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
  text-align: left;
}

.read-note {
  min-height: 240px;
  padding: 18px;
  border: 1px solid rgba(126, 105, 86, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(159, 79, 60, 0.12) 0 2px, transparent 2px 100%),
    repeating-linear-gradient(to bottom, var(--paper) 0 32px, rgba(95, 119, 132, 0.12) 33px 34px);
  box-shadow: 0 18px 34px rgba(71, 53, 38, 0.12);
  animation: unfoldReadPaper 380ms cubic-bezier(0.22, 0.72, 0.24, 1) both;
}

.read-note-meta {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.read-note h2 {
  margin-top: 12px;
  font-size: 1.1rem;
}

.read-note p {
  margin-top: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  font-size: 1.03rem;
  line-height: 1.58;
}

.reader-actions {
  display: grid;
  gap: 10px;
}

.reader-actions-simple {
  grid-template-columns: 1fr;
}

.physical-action,
.burn-action {
  min-height: 54px;
}

.physical-action {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 252, 244, 0.58));
}

.burn-action {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 14px 28px rgba(159, 79, 60, 0.22);
}

.action-group {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(126, 105, 86, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.46);
}

.action-group h3 {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.release-group {
  border-color: rgba(159, 79, 60, 0.22);
}

.flying-paper {
  position: fixed;
  z-index: 90;
  width: 96px;
  height: 58px;
  pointer-events: none;
  border: 1px solid rgba(126, 105, 86, 0.16);
  border-radius: 5px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.62), transparent 58%),
    #fff8df;
  box-shadow: 0 18px 30px rgba(71, 53, 38, 0.2);
  animation: foldIntoJar 880ms cubic-bezier(0.28, 0.72, 0.22, 1) forwards;
}

.flying-paper::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 5px;
  background:
    linear-gradient(140deg, transparent 0 48%, rgba(126, 105, 86, 0.16) 49% 51%, transparent 52%),
    linear-gradient(40deg, transparent 0 48%, rgba(255, 255, 255, 0.28) 49%, transparent 55%);
}

.disposal-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
}

.disposal-sheet {
  position: fixed;
  overflow: hidden;
  border: 1px solid rgba(126, 105, 86, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(159, 79, 60, 0.12) 0 2px, transparent 2px 100%),
    repeating-linear-gradient(to bottom, var(--paper) 0 32px, rgba(95, 119, 132, 0.12) 33px 34px);
  box-shadow: 0 22px 46px rgba(71, 53, 38, 0.18);
  transform-origin: 50% 100%;
}

.disposal-content {
  width: 100%;
  height: 100%;
  padding: 18px;
  overflow: hidden;
}

.disposal-content p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  font-size: 1rem;
  line-height: 1.52;
}

.flame-band {
  position: absolute;
  right: 8%;
  bottom: -14px;
  left: 8%;
  z-index: 4;
  display: flex;
  height: 86px;
  align-items: flex-end;
  justify-content: space-around;
  opacity: 0;
  filter: drop-shadow(0 -8px 16px rgba(159, 79, 60, 0.32));
}

.flame-band span {
  width: 20px;
  height: 64px;
  border-radius: 58% 42% 48% 52% / 62% 58% 42% 38%;
  background:
    radial-gradient(circle at 50% 76%, #fff2a6 0 20%, transparent 24%),
    linear-gradient(180deg, rgba(255, 203, 116, 0.78) 0%, #c97b4b 62%, #873f31 100%);
  transform-origin: 50% 100%;
}

.flame-band span:nth-child(2),
.flame-band span:nth-child(4) {
  width: 16px;
  height: 48px;
}

.flame-band span:nth-child(3) {
  width: 26px;
  height: 74px;
}

.smoke-plume {
  position: absolute;
  right: 12%;
  bottom: 34%;
  left: 12%;
  z-index: 5;
  height: 120px;
  opacity: 0;
  pointer-events: none;
}

.smoke-plume span {
  position: absolute;
  bottom: 0;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(83, 76, 68, 0.18), rgba(83, 76, 68, 0.06) 48%, transparent 70%);
  filter: blur(6px);
}

.smoke-plume span:nth-child(1) {
  left: 18%;
  --smoke-x: -18px;
}

.smoke-plume span:nth-child(2) {
  left: 46%;
  width: 66px;
  height: 66px;
  --smoke-x: 8px;
}

.smoke-plume span:nth-child(3) {
  left: 66%;
  width: 46px;
  height: 46px;
  --smoke-x: 22px;
}

.disposal-sheet.is-burning {
  animation: burnSheet 1500ms ease-in forwards;
}

.disposal-sheet.is-burning::before {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -2px;
  left: -2px;
  z-index: 3;
  height: 46%;
  border-radius: 0 0 var(--radius) var(--radius);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 216, 125, 0.48), transparent 12%),
    radial-gradient(circle at 55% 28%, rgba(255, 177, 86, 0.42), transparent 13%),
    linear-gradient(180deg, transparent 0 18%, rgba(65, 47, 36, 0.6) 44%, rgba(36, 30, 27, 0.9) 100%);
  opacity: 0;
  pointer-events: none;
  animation: charCrawl 1500ms ease-in forwards;
}

.disposal-sheet.is-burning::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: 12%;
  left: 8%;
  z-index: 3;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 176, 77, 0.78);
  box-shadow:
    0 0 14px rgba(255, 176, 77, 0.48),
    18px -7px 16px rgba(159, 79, 60, 0.32),
    -22px -6px 18px rgba(159, 79, 60, 0.24);
  opacity: 0;
  animation: emberLine 1450ms ease-in forwards;
}

.disposal-sheet.is-burning .flame-band {
  animation: flameRise 1280ms ease-out forwards;
}

.disposal-sheet.is-burning .flame-band span {
  animation: flameDance 260ms ease-in-out infinite alternate;
}

.disposal-sheet.is-burning .smoke-plume {
  animation: smokeRise 1500ms ease-out forwards;
}

.disposal-sheet.is-burning .smoke-plume span {
  animation: smokeDrift 1500ms ease-out forwards;
}

.cut-half {
  clip-path: polygon(0 0, 51% 0, 47% 100%, 0 100%);
}

.cut-right {
  clip-path: polygon(53% 0, 100% 0, 100% 100%, 49% 100%);
}

.cut-left.is-cutting {
  animation: cutLeft 1050ms cubic-bezier(0.2, 0.72, 0.24, 1) forwards;
}

.cut-right.is-cutting {
  animation: cutRight 1050ms cubic-bezier(0.2, 0.72, 0.24, 1) forwards;
}

.cut-line {
  position: fixed;
  width: 2px;
  border-left: 2px dashed rgba(159, 79, 60, 0.72);
  opacity: 0;
  transform: translateX(-1px);
}

.cut-line.is-cutting {
  animation: cutLine 620ms ease-out forwards;
}

.returning-sheet.is-returning {
  animation: returnToJar 850ms cubic-bezier(0.24, 0.7, 0.22, 1) forwards;
}

.side-saving-sheet.is-side-saving {
  animation: saveToSide 800ms cubic-bezier(0.24, 0.7, 0.22, 1) forwards;
}

.mini-jar {
  position: relative;
  width: 142px;
  height: 168px;
  margin: 0 auto 8px;
}

.mini-lid {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 3;
  width: 108px;
  height: 30px;
  border: 1px solid rgba(104, 70, 39, 0.25);
  border-radius: 50% / 42%;
  background:
    radial-gradient(ellipse at 48% 18%, rgba(255, 238, 192, 0.82), transparent 58%),
    repeating-linear-gradient(94deg, rgba(255, 255, 255, 0.16) 0 5px, rgba(86, 58, 34, 0.09) 5px 10px),
    linear-gradient(180deg, var(--wood-light), var(--wood) 62%, var(--wood-dark));
  box-shadow:
    inset 0 -7px 9px rgba(86, 58, 34, 0.18),
    0 8px 14px rgba(71, 53, 38, 0.16);
  transform: translateX(-50%);
}

.mini-mouth {
  position: absolute;
  top: 24px;
  left: 50%;
  width: 86px;
  height: 18px;
  border: 3px solid rgba(116, 158, 161, 0.38);
  border-radius: 50%;
  transform: translateX(-50%) rotateX(60deg);
}

.mini-glass {
  position: absolute;
  top: 29px;
  left: 50%;
  width: 104px;
  height: 126px;
  overflow: hidden;
  border: 3px solid rgba(116, 158, 161, 0.46);
  border-radius: 17px 17px 26px 26px / 12px 12px 24px 24px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.58) 0 4%, transparent 18% 76%, rgba(83, 129, 134, 0.12) 92%),
    linear-gradient(112deg, rgba(255, 255, 255, 0.76), transparent 36%),
    linear-gradient(180deg, rgba(219, 239, 240, 0.32), rgba(219, 239, 240, 0.1));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.45),
    inset 0 -14px 24px rgba(94, 137, 142, 0.12),
    0 14px 24px rgba(71, 53, 38, 0.1);
  transform: translateX(-50%);
}

.mini-paper-pile {
  position: absolute;
  inset: 50px 7px 12px;
}

.mini-shine {
  position: absolute;
  top: 28px;
  left: 15px;
  width: 9px;
  height: 72px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  filter: blur(1px);
}

.mini-jar .paper-slip {
  width: 44px;
  height: 27px;
  box-shadow: 0 5px 10px rgba(71, 53, 38, 0.12);
}

.mini-jar .paper-slip::after {
  top: 8px;
  right: 7px;
  left: 7px;
  box-shadow: 0 6px 0 rgba(49, 41, 35, 0.1);
}

@keyframes pullPaper {
  0% {
    opacity: 0;
    transform: translate(-50%, -10%) rotate(-11deg) scale(0.44);
  }
  32% {
    opacity: 1;
    transform: translate(-50%, -140%) rotate(-6deg) scale(0.68);
  }
  72% {
    opacity: 1;
    transform: translate(-50%, -230%) rotate(1deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -250%) rotate(0deg) scale(1.12);
  }
}

@keyframes foldIntoJar {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-5deg) scale(1);
  }
  45% {
    transform: translate(calc(var(--move-x) * 0.34 - 50%), calc(var(--move-y) * 0.36 - 50%)) rotate(7deg) scale(0.76) skewY(-8deg);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--move-x) - 50%), calc(var(--move-y) - 50%)) rotate(18deg) scale(0.34);
  }
}

@keyframes unfoldReadPaper {
  0% {
    opacity: 0;
    transform: translateY(18px) rotateX(62deg) scale(0.84);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0) scale(1);
  }
}

@keyframes burnSheet {
  0% {
    opacity: 1;
    clip-path: inset(0 0 0 0 round 8px);
    filter: none;
    transform: translateY(0) rotate(0deg) scale(1);
  }
  38% {
    filter: sepia(0.45) saturate(1.2) brightness(0.96);
  }
  72% {
    opacity: 0.92;
    clip-path: polygon(0 0, 100% 0, 100% 74%, 88% 78%, 73% 72%, 58% 80%, 42% 73%, 27% 79%, 12% 74%, 0 80%);
    filter: sepia(0.9) saturate(0.7) brightness(0.72);
  }
  100% {
    opacity: 0;
    clip-path: polygon(6% 88%, 95% 86%, 100% 100%, 0 100%);
    filter: sepia(1) saturate(0.35) brightness(0.4);
    transform: translateY(20px) rotate(1.5deg) scale(0.92);
  }
}

@keyframes charCrawl {
  0% {
    opacity: 0;
    transform: translateY(54%);
  }
  28% {
    opacity: 0.72;
  }
  100% {
    opacity: 0.95;
    transform: translateY(-6%);
  }
}

@keyframes emberLine {
  0%,
  18% {
    opacity: 0;
    transform: translateY(20px) scaleX(0.6);
  }
  46%,
  78% {
    opacity: 1;
    transform: translateY(0) scaleX(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-22px) scaleX(0.82);
  }
}

@keyframes flameRise {
  0% {
    opacity: 0;
    transform: translateY(18px) scaleY(0.7);
  }
  24%,
  74% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-54px) scaleY(0.86);
  }
}

@keyframes flameDance {
  from {
    transform: rotate(-7deg) translateY(2px) scaleY(0.88);
  }
  to {
    transform: rotate(7deg) translateY(-3px) scaleY(1.1);
  }
}

@keyframes smokeRise {
  0% {
    opacity: 0;
    transform: translateY(28px) scale(0.74);
  }
  34%,
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-70px) scale(1.28);
  }
}

@keyframes smokeDrift {
  0% {
    transform: translateX(0) scale(0.8);
  }
  100% {
    transform: translateX(var(--smoke-x, 18px)) scale(1.28);
  }
}

@keyframes cutLeft {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(-82px, 52px) rotate(-9deg);
  }
}

@keyframes cutRight {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(82px, 52px) rotate(9deg);
  }
}

@keyframes cutLine {
  0% {
    opacity: 0;
    transform: translate(-1px, -18px) scaleY(0);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-1px, 18px) scaleY(1);
  }
}

@keyframes returnToJar {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--return-x), var(--return-y)) rotate(16deg) scale(0.32);
  }
}

@keyframes saveToSide {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--side-x), var(--side-y)) rotate(-8deg) scale(0.52);
  }
}

@media (min-width: 640px) {
  h1 {
    font-size: 1.5rem;
  }

  .shelf-head,
  .panel-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .jar-title-line {
    justify-content: center;
  }

  .inline-name-editor {
    margin: 0 auto;
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .top-actions {
    justify-content: space-between;
  }

  .button {
    width: auto;
  }

  .shelf-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 220px));
    max-width: 700px;
    justify-content: center;
  }

  .add-jar-card {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.45fr) auto;
    align-items: end;
  }

  .add-jar-compact {
    grid-template-columns: 1fr;
    align-items: center;
  }

  .jar-focus {
    padding: 22px;
  }

  .jar-photo-object {
    width: min(66vw, 440px);
  }

  .mini-jar-photo {
    width: min(28vw, 220px);
  }

  .jar-object {
    width: min(58vw, 390px);
    height: min(58svh, 500px);
  }

  .primary-actions {
    grid-template-columns: minmax(190px, auto) minmax(170px, auto);
    justify-content: center;
  }

  .add-paper-button {
    grid-column: auto;
  }

  .quiet-actions {
    max-width: 520px;
    margin: 0 auto;
  }

  .field-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }

  .notebook-actions,
  .side-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reader-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .modal-layer {
    padding: 24px;
  }

  .confirmation-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .app-shell {
    width: min(1180px, calc(100% - 32px));
    padding-top: 24px;
  }

  .app-view {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    max-width: 920px;
    margin: 0 auto;
    gap: 18px;
  }

  .jar-focus {
    grid-row: auto;
  }

  .quiet-panel {
    width: min(100%, 760px);
    margin: 0 auto;
    align-self: start;
  }

  .jar-stage {
    min-height: 520px;
  }

  .jar-photo-object {
    width: min(48vw, 480px);
  }

  .jar-object {
    width: min(46vw, 430px);
    height: 520px;
  }

  .paper-editor,
  .reader-card {
    max-width: 760px;
  }
}
