/* The private box. One picture and one word per idea; color means the same thing everywhere:
   green is fine, amber is waiting, rose is yours to act on. */
:root {
  --muted: #6b6158;
  --card: #fffaf2;
  --ok: #4f6b43;
  --ok-soft: #e4eadc;
  --wait: #8a6418;
  --wait-badge: #d9a441;
  --wait-soft: #f6ead2;
  --off: #9b8f84;
  --off-soft: #ece6df;
  --alert: #8f3f37;
  --alert-soft: #f8e2dd;
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fffaf4' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.tone-rose { --tint: #f3e1dc; --tint-ink: #713f3d; }
.tone-sage { --tint: #e3e8dd; --tint-ink: #3f5235; }
.tone-lavender { --tint: #e9e3ef; --tint-ink: #56486a; }
.tone-sand { --tint: #efe6d3; --tint-ink: #6b5440; }
.tone-blue { --tint: #e3eaee; --tint-ink: #3d5566; }
.tone-wheat { --tint: #eee5d6; --tint-ink: #6b5440; }
.tone-ok { --tint: var(--ok-soft); --tint-ink: #3f5235; }
.tone-wait { --tint: var(--wait-soft); --tint-ink: var(--wait); }
.tone-alert { --tint: var(--card); --tint-ink: var(--alert); }
.tone-none,
.tone-off { --tint: var(--off-soft); --tint-ink: var(--muted); }

/* Buttons and fields inside the box are a little larger and calmer than on the landing page. */
.button {
  gap: 10px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
}
.button .icon {
  width: 20px;
  height: 20px;
}
.button.small {
  min-height: 44px;
  padding: 0 16px;
  font-size: 14px;
}
.button.big {
  min-height: 60px;
  padding: 0 30px;
  border-radius: 18px;
  font-size: 18px;
  box-shadow: 0 10px 22px rgba(132, 72, 64, 0.2);
}
.button.big .icon {
  width: 24px;
  height: 24px;
}
.text-link .icon {
  width: 18px;
  height: 18px;
}
.field {
  font-size: 14px;
}
.notice {
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 14px;
}
.notice > .icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
}
.notice > p,
.notice > span {
  flex: 1;
}
.notice .button {
  flex: none;
}
.release-notice {
  border-color: #d9a59b;
  background: var(--alert-soft);
}
.release-notice > .icon {
  color: var(--alert);
}

/* Header, sidebar and the bottom bar on phones. */
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 72px;
  padding: 0 clamp(20px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 239, 231, 0.9);
  backdrop-filter: blur(16px);
}
.app-header .brand {
  font-size: 27px;
}
.app-header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.sample-link {
  font-size: 14px;
  text-decoration: none;
}
.sample-link .icon {
  width: 20px;
  height: 20px;
}
.app-header-actions .avatar {
  width: 42px;
  height: 42px;
  border-color: rgba(164, 95, 88, 0.35);
  background: var(--card);
  color: var(--accent);
  font-size: 18px;
}
.app-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: calc(100dvh - 72px);
}
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 28px 18px 22px;
  border-right: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.24);
}
.sidebar-create {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--accent);
  color: #fffaf4;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(132, 72, 64, 0.18);
  transition: background 0.2s;
}
.sidebar-create:hover,
.sidebar-create.active {
  background: var(--accent-dark);
}
.sidebar-create .icon {
  width: 20px;
  height: 20px;
}
.sidebar nav {
  display: grid;
  gap: 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  color: #5e554d;
  font-size: 15px;
  transition: background 0.2s;
}
.nav-item > span {
  flex: 1;
}
.nav-item .icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
}
.nav-item small {
  font-size: 12px;
  color: var(--muted);
}
.nav-item:hover {
  background: rgba(164, 95, 88, 0.07);
}
.nav-item.active {
  background: rgba(164, 95, 88, 0.12);
  color: var(--accent-dark);
  font-weight: 600;
}
.nav-state.ok {
  color: var(--ok);
  font-weight: 600;
}
.nav-state.wait {
  color: var(--wait);
  font-weight: 600;
}
.nav-state.alert {
  color: var(--alert);
  font-weight: 700;
}
.sidebar-note {
  margin-top: auto;
  padding: 22px 14px 0;
  border-top: 1px solid var(--line);
  color: #89907a;
}
.sidebar-note > span {
  display: block;
  color: var(--accent);
  font-family: var(--script);
  font-size: 31px;
}
.sidebar-note p {
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
  line-height: 1.3;
}
.workspace-main {
  min-width: 0;
  padding: 40px clamp(24px, 4vw, 56px) 64px;
  outline: none !important;
  background: radial-gradient(circle at 100% 0%, rgba(225, 183, 165, 0.12), transparent 28rem);
}
.mobile-nav {
  display: none;
}

/* Page parts shared by every view. */
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 26px;
}
.page-heading .eyebrow {
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 0.16em;
}
.page-heading h1 {
  font-size: clamp(44px, 5vw, 64px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}
.page-intro {
  margin: -10px 0 24px;
  color: var(--muted);
  font-size: 15px;
}
.section-title {
  margin: 0 0 12px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}
.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}
.card-title .icon {
  width: 22px;
  height: 22px;
  color: var(--accent-dark);
}
.tile {
  display: grid;
  flex: none;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--tint, #f3e1dc);
  color: var(--tint-ink, #713f3d);
}
.tile .icon {
  width: 28px;
  height: 28px;
}
.tile.small {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}
.tile.small .icon {
  width: 20px;
  height: 20px;
}
.tile.big {
  width: 76px;
  height: 76px;
  border-radius: 50%;
}
.tile.big .icon {
  width: 40px;
  height: 40px;
}
.face {
  position: relative;
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f1ddd7;
  color: var(--accent-dark);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1;
}
.face.small {
  width: 30px;
  height: 30px;
  font-size: 13px;
}
.face.large {
  width: 58px;
  height: 58px;
  font-size: 22px;
}
.face.huge {
  width: 84px;
  height: 84px;
  font-size: 32px;
}
.tint-0 { background: #f1ddd7; }
.tint-1 { background: #e3e7da; }
.tint-2 { background: #efe6d3; }
.tint-3 { background: #e3eaee; }
.tint-4 { background: #e9e3ef; }
.tint-5 { background: #f0e4d8; }
.face.more {
  background: var(--off-soft);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
}
.face.dashed {
  border: 2px dashed rgba(164, 95, 88, 0.4);
  background: transparent;
}
.face.dashed .icon {
  width: 24px;
  height: 24px;
}
.face-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid var(--card);
  border-radius: 50%;
  background: #b9ada2;
  color: #fffaf4;
}
.face-badge .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.4;
}
.face-badge.ok { background: var(--ok); }
.face-badge.wait { background: var(--wait-badge); }
.face-badge.off { background: #a07f78; }
.role-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 16px;
  background: #f3e1dc;
  color: var(--accent-dark);
  font-size: 13px;
}
.role-chip.verifier {
  background: var(--ok-soft);
  color: #3f5235;
}
.role-chip .icon {
  width: 17px;
  height: 17px;
}
.chip-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  background: #f0e7dc;
  color: #6b5440;
  font-size: 14px;
}
.chip-button .icon {
  width: 18px;
  height: 18px;
}
.quiet-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 14px;
}
.quiet-note .icon {
  width: 20px;
  height: 20px;
  color: var(--ok);
}
.collection-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 20px;
  border: 1px dashed rgba(164, 95, 88, 0.3);
  border-radius: 22px;
  background: rgba(255, 250, 242, 0.4);
  text-align: center;
}
.collection-empty > .icon {
  width: 44px;
  height: 44px;
  color: var(--accent);
}
.collection-empty > .paper-art {
  margin: 10px 0 22px;
}
.collection-empty h2 {
  font-size: 32px;
}
.collection-empty p {
  color: var(--muted);
  font-size: 15px;
}

/* Your box: what needs you, what to make, and what is already made. */
.glance-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 34px;
}
.glance {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(69, 55, 49, 0.1);
  border-radius: 18px;
  background: var(--card);
  transition: border-color 0.2s, transform 0.2s;
}
a.glance:hover {
  border-color: rgba(164, 95, 88, 0.35);
  transform: translateY(-2px);
}
.glance.tone-alert {
  border-color: #d9a59b;
  background: var(--alert-soft);
}
.glance-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--tint-ink);
}
.glance-icon .icon {
  width: 24px;
  height: 24px;
}
.glance strong {
  display: block;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.05;
}
.glance small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.make-section {
  margin-bottom: 34px;
}
.make-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}
.make-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 124px;
  padding: 14px 8px;
  border: 1px solid rgba(69, 55, 49, 0.08);
  border-radius: 18px;
  background: var(--tint);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.make-tile .icon {
  width: 40px;
  height: 40px;
  color: var(--accent-dark);
}
.make-tile span {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.1;
}
.make-tile:hover {
  box-shadow: 0 12px 24px rgba(94, 71, 59, 0.1);
  transform: translateY(-3px);
}
.collection-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-chip {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(69, 55, 49, 0.16);
  border-radius: 22px;
  background: var(--card);
  color: var(--accent-dark);
  font-size: 14px;
}
.filter-chip .icon {
  width: 20px;
  height: 20px;
}
.filter-chip.active,
.search-toggle.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fffaf4;
}
.face-filter {
  padding: 3px;
  border: 2px solid transparent;
  border-radius: 50%;
  background: none;
}
.face-filter .face {
  width: 34px;
  height: 34px;
}
.face-filter.active {
  border-color: var(--accent);
}
.search-input {
  width: min(260px, 100%);
  height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(69, 55, 49, 0.18);
  border-radius: 22px;
  background: var(--card);
  font-size: 15px;
}
.keepsake-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.keepsake {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 176px;
  padding: 20px;
  border: 1px solid rgba(69, 55, 49, 0.12);
  border-radius: 20px;
  background: var(--card);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.keepsake:hover {
  border-color: rgba(164, 95, 88, 0.35);
  box-shadow: 0 14px 28px rgba(94, 71, 59, 0.08);
  transform: translateY(-2px);
}
.keepsake:has(h3 a:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.keepsake-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 15px;
  font-size: 13px;
}
.state .icon {
  width: 16px;
  height: 16px;
}
.state.sealed {
  background: var(--ok-soft);
  color: #3f5235;
}
.state.draft {
  background: #f0e7dc;
  color: #6b5440;
}
.keepsake h3 {
  display: -webkit-box;
  overflow: hidden;
  font-size: 25px;
  font-weight: 500;
  line-height: 1.15;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.keepsake h3 a::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  content: "";
}
.keepsake h3 a:focus-visible {
  outline: none;
}
.keepsake-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}
.faces {
  display: flex;
  flex: 1;
  min-width: 0;
}
.faces .face {
  margin-right: -8px;
  border: 2px solid var(--card);
}
.when {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.when .icon {
  width: 18px;
  height: 18px;
}
.keepsake-more {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  border-color: transparent;
}
.keepsake-more:hover {
  background: rgba(164, 95, 88, 0.08);
}
.no-match {
  grid-column: 1 / -1;
  padding: 20px 0;
  color: var(--muted);
}
.menu-list {
  display: grid;
  gap: 6px;
  margin: 18px 0 14px;
}
.menu-list > a,
.menu-list > button,
.sheet-more button {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  background: #f7f1e8;
  font-size: 15px;
  text-align: left;
}
.menu-list .icon,
.sheet-more .icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
}
.menu-list > :hover,
.sheet-more button:hover {
  background: #f0e7dc;
}
.menu-list .danger,
.sheet-more .danger,
.danger .icon {
  color: var(--alert);
}
.new-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.new-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px 20px 26px;
  border: 1px solid rgba(69, 55, 49, 0.1);
  border-radius: 22px;
  background: var(--card);
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.new-card:hover {
  border-color: rgba(164, 95, 88, 0.35);
  transform: translateY(-3px);
}
.new-card strong {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
}
.new-card > span:last-child {
  color: var(--muted);
  font-size: 14px;
}

/* Making a keepsake: Write, Look, Who & when, then Seal. */
.editor-main {
  display: flex;
  flex-direction: column;
  padding-top: 24px;
  padding-bottom: 0;
}
.editor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 26px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: #5e554d;
  font-size: 15px;
}
.back-link:hover {
  color: var(--accent);
}
.back-link .icon {
  width: 20px;
  height: 20px;
}
.editor-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.editor-steps li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.editor-steps li:not(:last-child)::after {
  width: 18px;
  height: 1px;
  background: rgba(69, 55, 49, 0.25);
  content: "";
}
.editor-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  border-radius: 22px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.editor-step .icon {
  width: 20px;
  height: 20px;
}
button.editor-step:hover {
  background: rgba(164, 95, 88, 0.07);
}
.editor-step.here,
button.editor-step.here:hover {
  background: var(--accent);
  color: #fffaf4;
}
.editor-step.done {
  background: var(--ok-soft);
  color: #3f5235;
}
.save-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 22px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.save-status .icon {
  width: 18px;
  height: 18px;
}
.save-status[data-state="saved"] {
  color: var(--ok);
}
.save-status[data-state="error"] {
  background: var(--alert-soft);
  color: var(--alert);
}
.editor-body {
  flex: 1;
}
.editor-bottom {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding: 16px 0 22px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  align-items: start;
  gap: 36px;
}
.writing-paper {
  position: relative;
  min-height: 560px;
  padding: 48px 48px 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 20px 45px rgba(94, 71, 59, 0.1);
  --letter-size: 22px;
  --letter-font: var(--serif);
}
.writing-paper input,
.writing-paper textarea {
  border: 0;
  border-radius: 0;
  background: transparent;
  outline-offset: 8px;
}
.paper-title {
  width: 100%;
  min-width: 0;
  margin-bottom: 24px;
  padding: 0;
  color: var(--ink);
  font-family: var(--letter-font);
  font-size: 30px;
  line-height: 1.2;
}
.paper-body {
  display: block;
  width: 100%;
  min-height: 330px;
  padding: 0;
  overflow: hidden;
  font-family: var(--letter-font);
  font-size: var(--letter-size);
  line-height: 1.8;
  resize: none;
}
.paper-title::placeholder,
.paper-body::placeholder {
  color: #b9aa9e;
}
.paper-signature {
  width: 100%;
  margin: 25px 0 15px;
  padding: 0;
  font-family: var(--letter-font);
  font-size: 24px;
  font-style: italic;
}
.paper-heart {
  display: block;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 26px;
  text-align: center;
}
.editor-aside {
  padding-top: 8px;
}
.editor-aside h2 {
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.editor-aside > p {
  margin: 14px 0 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}
.aside-fine {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.editor-aside .field {
  margin: 18px 0 0;
}
.control-label {
  display: block;
  margin: 20px 0 10px;
  font-size: 14px;
  font-weight: 500;
}
.swatches {
  display: flex;
  gap: 12px;
}
.swatch {
  position: relative;
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: 1px solid rgba(69, 55, 49, 0.2);
  border-radius: 50%;
  background: #faf5e8;
}
.swatch.rose { background: #e1b3a2; }
.swatch.sage { background: #aeb99c; }
.swatch.blue { background: #bccdd4; }
.swatch.clay { background: #bb8e6f; }
.swatch.ink { background: #4f5c55; }
.swatch[aria-pressed="true"]::after {
  position: absolute;
  inset: -5px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  content: "";
}
.envelope-preview {
  margin-top: 24px;
}
.envelope-art {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: 0 auto;
}
.upload-area {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 220px;
  margin: 12px 0 18px;
  padding: 24px 18px;
  border: 1px dashed rgba(164, 95, 88, 0.38);
  border-radius: 14px;
  background: rgba(236, 215, 204, 0.18);
  text-align: center;
  cursor: pointer;
}
.upload-area input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.upload-area:hover,
.upload-area.dragging {
  background: rgba(236, 215, 204, 0.35);
}
.upload-area:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.upload-symbol {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #eadfd8;
  color: var(--accent);
}
.upload-area strong {
  font-size: 15px;
  font-weight: 600;
}
.upload-area small {
  max-width: 220px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.editor-aside .upload-area {
  min-height: 150px;
  margin-top: 22px;
  padding: 18px 12px;
}
.file-note {
  margin-top: 22px;
}
.file-note textarea {
  padding: 15px;
  border: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.7;
}
.uploaded-file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 15px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow-wrap: anywhere;
}
.uploaded-file > strong {
  flex: 1;
  min-width: 80px;
  font-size: 14px;
  font-weight: 500;
}
.uploaded-icon {
  color: var(--accent);
}
.writing-paper video {
  width: 100%;
  max-height: 400px;
  border-radius: 10px;
  background: #19221b;
}
.writing-paper audio {
  width: 100%;
}
.writing-paper .youtube-frame {
  border-radius: 10px;
}
.video-note {
  margin-top: 10px;
}
/* A file on its way: one row per step, each with its own bar. */
.send-progress {
  display: grid;
  gap: 12px;
  margin: 12px 0 18px;
  padding: 20px;
  border: 1px solid rgba(164, 95, 88, 0.25);
  border-radius: 16px;
  background: var(--card);
}
.send-title {
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.send-steps {
  display: grid;
  gap: 14px;
}
.send-step {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
}
.send-step progress {
  grid-column: 2 / -1;
}
.send-icon {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--off-soft);
  color: var(--muted);
}
.send-icon .icon {
  width: 20px;
  height: 20px;
}
.send-label {
  font-size: 15px;
}
.send-value {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.send-step.active .send-icon {
  background: #f3e1dc;
  color: var(--accent-dark);
}
.send-step.done .send-icon {
  background: var(--ok-soft);
  color: var(--ok);
}
.send-step.waiting {
  opacity: 0.55;
}
.send-step.paused .send-icon {
  background: var(--wait-soft);
  color: var(--wait);
}
.send-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.send-note .icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--ok);
}
.send-progress > .text-link,
.send-progress .button-row {
  justify-self: start;
  margin-top: 0;
}
.video-waiting {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  aspect-ratio: 16 / 9;
  max-height: 400px;
  border-radius: 10px;
  background: var(--off-soft);
  color: var(--muted);
  font-size: 15px;
}
.video-waiting .icon {
  width: 22px;
  height: 22px;
}
.record-button {
  font-size: 14px;
}
.upload-progress {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 99px;
  background: var(--off-soft);
  appearance: none;
}
progress::-webkit-progress-bar {
  background: var(--off-soft);
}
progress::-webkit-progress-value {
  border-radius: 99px;
  background: var(--accent);
}
progress::-moz-progress-bar {
  border-radius: 99px;
  background: var(--accent);
}
.who-when {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 36px;
}
.who-when-main {
  display: flex;
  flex: 999 1 520px;
  flex-direction: column;
  gap: 34px;
  min-width: 0;
}
.who-when h2 {
  margin-bottom: 16px;
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.face-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.face-pick,
.role-pick,
.when-pick {
  position: relative;
  border: 2px solid rgba(69, 55, 49, 0.14);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.face-pick input,
.role-pick input,
.when-pick input,
.chip input,
.switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.face-pick:has(input:checked),
.role-pick:has(input:checked),
.when-pick:has(input:checked) {
  border-color: var(--accent);
  background: var(--card);
}
.face-pick:has(input:focus-visible),
.role-pick:has(input:focus-visible),
.when-pick:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.face-pick:has(input:checked)::after,
.role-pick:has(input:checked)::after {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent) var(--tick) center / 14px no-repeat;
  content: "";
}
.face-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 112px;
  padding: 16px 8px 14px;
  border-radius: 18px;
  background: transparent;
  font-size: 15px;
  text-align: center;
}
.face-pick.add {
  justify-content: center;
  border-style: dashed;
  border-color: rgba(164, 95, 88, 0.35);
  color: var(--accent-dark);
}
.face-pick.add .face.dashed {
  border: 0;
}
.face-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 14px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  list-style: none;
}
.face-legend li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.face-legend .face-badge {
  position: static;
  width: 18px;
  height: 18px;
  border: 0;
}
.face-legend .face-badge .icon {
  width: 11px;
  height: 11px;
}
.when-picks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.when-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 14px 20px;
  border-radius: 20px;
  background: rgba(255, 250, 242, 0.5);
  text-align: center;
}
.when-disc {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #efe8de;
  color: var(--accent-dark);
}
.when-disc .icon {
  width: 40px;
  height: 40px;
}
.when-pick strong {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.1;
}
.when-pick > span:not(.when-disc):not(.when-tick) {
  color: var(--muted);
  font-size: 14px;
}
.when-tick {
  position: absolute;
  top: 12px;
  right: 12px;
  display: none;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fffaf4;
}
.when-tick .icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.4;
}
.when-pick:has(input:checked) .when-disc {
  background: #f3e1dc;
}
.when-pick:has(input:checked) .when-tick {
  display: grid;
}
.when-notes {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.when-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #4f4740;
  font-size: 15px;
  line-height: 1.5;
}
.when-note .icon {
  flex: none;
  width: 22px;
  height: 22px;
}
.when-note.calm .icon {
  color: var(--ok);
}
.when-note.warn {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--wait-soft);
}
.when-note.warn .icon {
  color: var(--wait);
}
.when-note a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.seal-preview {
  display: flex;
  flex: 1 1 300px;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 30px 24px;
  border: 1px solid rgba(69, 55, 49, 0.1);
  border-radius: 22px;
  background: var(--card);
  text-align: center;
}
.seal-preview .eyebrow {
  margin: 0;
}
.seal-title {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 400;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.seal-signature {
  color: #8a6d5c;
  font-family: var(--serif);
  font-size: 22px;
  font-style: italic;
}

/* People: who they are, whether they joined, and the one thing to do next. */
.helper-meter {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding: 14px 18px;
  border-radius: 18px;
  background: var(--wait-soft);
  color: #5f4a1f;
  font-size: 15px;
}
.helper-meter.ok {
  background: var(--ok-soft);
  color: #3f5235;
}
.helper-shields {
  display: flex;
  gap: 6px;
}
.helper-shields > span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px dashed currentColor;
  border-radius: 50%;
  opacity: 0.55;
}
.helper-shields > span.on {
  border: 0;
  background: var(--ok);
  color: #fffaf4;
  opacity: 1;
}
.helper-shields .icon {
  width: 22px;
  height: 22px;
}
.person-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.person-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border: 2px solid rgba(69, 55, 49, 0.1);
  border-radius: 20px;
  background: var(--card);
  transition: border-color 0.2s;
}
.person-card:hover {
  border-color: rgba(164, 95, 88, 0.4);
}
.person-card:has(.person-open:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.person-head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.person-head > div {
  min-width: 0;
}
.person-head h2 {
  font-size: 28px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.person-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}
.person-open {
  padding: 0;
  background: none;
  text-align: left;
}
.person-open::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  content: "";
}
.person-open:focus-visible {
  outline: none;
}
.person-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.person-foot .button,
.person-foot .chip-button {
  position: relative;
  z-index: 1;
}
.role-picks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0 8px;
  padding: 0;
  border: 0;
}
.role-picks legend {
  margin-bottom: 10px;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
}
.role-pick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
}
.role-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f3e1dc;
  color: var(--accent-dark);
}
.role-pick:nth-of-type(2) .role-icon {
  background: var(--ok-soft);
  color: #3f5235;
}
.role-pick strong {
  font-size: 15px;
  font-weight: 600;
}
.role-pick small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.person-sheet {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.person-sheet h2 {
  margin: 6px 0 0;
  font-size: 32px;
  overflow-wrap: anywhere;
}
.person-sheet > p {
  overflow-wrap: anywhere;
}
.sheet-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  width: 100%;
  margin: 12px 0 6px;
}
.sheet-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 84px;
  padding: 10px;
  border-radius: 16px;
  background: #efe8de;
  color: #4f4740;
  font-size: 14px;
}
.sheet-tile .icon {
  width: 26px;
  height: 26px;
}
.sheet-tile:first-child:not(.primary) {
  background: #f3e1dc;
  color: var(--accent-dark);
}
.sheet-tile.primary {
  background: var(--accent);
  color: #fffaf4;
}
.person-sheet > .eyebrow {
  align-self: flex-start;
  margin: 10px 0 0;
}
.sheet-list {
  display: grid;
  gap: 8px;
  width: 100%;
  text-align: left;
}
.sheet-list > a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f7f1e8;
}
.sheet-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.when-icon {
  color: var(--muted);
}
.when-icon .icon {
  width: 18px;
  height: 18px;
}
.sheet-more {
  width: 100%;
  margin-top: 8px;
  text-align: left;
}
.sheet-more summary,
.pause summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
  list-style: none;
  cursor: pointer;
}
.sheet-more summary {
  justify-content: center;
}
.sheet-more summary::-webkit-details-marker,
.pause summary::-webkit-details-marker {
  display: none;
}
.sheet-more summary .icon,
.pause summary .icon {
  width: 20px;
  height: 20px;
}
.sheet-more > div {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

/* Life check: the ring says how it is, the big button keeps it that way. */
.life-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 36px;
  margin-bottom: 30px;
  padding: 30px 34px;
  border: 1px solid rgba(69, 55, 49, 0.1);
  border-radius: 26px;
  background: var(--card);
}
.life-status.tone-alert {
  border-color: #d9a59b;
  background: #fdf3f0;
}
.life-ring {
  position: relative;
  flex: none;
  width: 200px;
  height: 200px;
}
.life-ring svg {
  width: 100%;
  height: 100%;
}
.ring-track {
  fill: none;
  stroke: #e3ddd2;
  stroke-width: 14;
}
.ring-fill {
  fill: none;
  stroke: #6f8f5c;
  stroke-linecap: round;
  stroke-width: 14;
  transition: stroke-dasharray 0.6s ease;
}
.tone-wait .ring-fill { stroke: var(--wait-badge); }
.tone-alert .ring-fill { stroke: var(--accent); }
.tone-none .ring-fill { stroke: transparent; }
.life-ring > span {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0 30px;
  text-align: center;
}
.life-ring .icon {
  width: 30px;
  height: 30px;
  color: #6f8f5c;
}
.tone-wait .life-ring .icon { color: var(--wait); }
.tone-alert .life-ring .icon { color: var(--accent); }
.tone-none .life-ring .icon { color: var(--muted); }
.life-ring strong {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.05;
}
.life-ring small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.life-act {
  display: flex;
  flex: 1 1 300px;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.life-alert {
  color: var(--alert);
  font-size: 16px;
}
.life-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.life-steps li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 12px;
  border-radius: 20px;
  background: var(--tint);
  text-align: center;
}
.step-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--card);
  color: var(--tint-ink);
}
.step-icon .icon {
  width: 32px;
  height: 32px;
}
.life-steps strong {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.1;
}
.life-steps li > span:last-child {
  color: #5e554d;
  font-size: 13px;
}
.life-fine {
  margin: 12px 0 30px;
}
.life-settings {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 18px;
}
.life-card {
  display: flex;
  flex: 1 1 340px;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 22px 24px;
  border: 1px solid rgba(69, 55, 49, 0.1);
  border-radius: 22px;
  background: var(--card);
}
.switch-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  cursor: pointer;
}
.switch {
  position: relative;
  flex: none;
  width: 52px;
  height: 30px;
  border-radius: 15px;
  background: #d9d1c6;
  transition: background 0.2s;
}
.switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fffaf4;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  content: "";
  transition: transform 0.2s;
}
.switch-row input:checked + .switch {
  background: var(--ok);
}
.switch-row input:checked + .switch::after {
  transform: translateX(22px);
}
.switch-row input:focus-visible + .switch {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.switch-row input:disabled + .switch {
  cursor: not-allowed;
  opacity: 0.5;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}
.chips legend {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 0;
  font-size: 15px;
  font-weight: 600;
}
.chips legend .icon {
  width: 22px;
  height: 22px;
  color: var(--accent-dark);
}
.chip {
  position: relative;
  cursor: pointer;
}
.chip span {
  display: inline-grid;
  place-items: center;
  min-width: 76px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(69, 55, 49, 0.2);
  border-radius: 22px;
  background: var(--card);
  color: #4f4740;
  font-size: 15px;
}
.chip input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
  color: #fffaf4;
}
.chip input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.helper-faces {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.helper-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: none;
  font-size: 14px;
}
.pause {
  margin-top: auto;
}
.pause summary {
  color: #4f4740;
}
.pause .field {
  margin: 8px 0 0;
}
.life-save {
  display: flex;
  flex: 1 1 100%;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}
.life-save .form-error {
  flex: 1;
  margin: 0;
}

/* Settings, helping others, gifts for you, and the small lists in dialogs. */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}
.settings-card {
  min-width: 0;
  padding: 26px;
  border: 1px solid rgba(69, 55, 49, 0.1);
  border-radius: 22px;
  background: var(--card);
}
.settings-card > .card-title {
  margin-bottom: 18px;
  font-size: 16px;
}
.storage-meter {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}
.settings-links {
  display: grid;
  margin: 18px 0;
}
.settings-links > button,
.settings-links > a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 4px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-size: 15px;
  text-align: left;
}
.settings-links > * > span {
  flex: 1;
}
.settings-links .icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
}
.settings-links .icon:last-child {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.account-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 26px;
}
.account-actions > .text-link {
  margin-left: auto;
  color: var(--alert);
}
html[data-guest="true"] .settings-links [data-action="password"],
html[data-guest="true"] .account-actions {
  display: none;
}
.trusted-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.trusted-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.trusted-card h2 {
  margin-bottom: 8px;
  font-size: 28px;
}
.trusted-card .notice {
  margin: 0;
}
.trusted-card .button-row {
  margin-top: 0;
}
.received-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.received-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  min-height: 340px;
  padding: 28px 24px 22px;
  border: 1px solid rgba(69, 55, 49, 0.1);
  border-radius: 22px;
  background: var(--card);
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.received-card:hover {
  border-color: rgba(164, 95, 88, 0.35);
  transform: translateY(-3px);
}
.received-card > .paper-art {
  margin: -6px 0 8px;
  transform: scale(0.85);
}
.received-card h2 {
  margin: 10px 0 8px;
  font-size: 30px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.received-card > p {
  color: var(--muted);
  font-size: 14px;
}
.received-card > .text-link {
  margin-top: auto;
}
.activity-list {
  display: grid;
  gap: 14px;
  max-height: 50dvh;
  margin-top: 22px;
  overflow: auto;
}
.activity-list > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.activity-list small {
  color: var(--muted);
  font-size: 12px;
}
.activity-list .outbox-message {
  display: grid;
  gap: 6px;
}
.outbox-message strong {
  font-weight: 600;
}
.outbox-message p {
  font-size: 13px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.file-list {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}
.file-list > div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.file-list > div > div {
  flex: 1;
  min-width: 0;
}
.file-list strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.file-list small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}
#record-preview {
  width: 100%;
  max-height: 350px;
  margin: 20px 0;
  border-radius: 12px;
  background: #202a20;
}

/* Tablets and phones: one column, the bottom bar replaces the sidebar. */
@media (max-width: 1100px) {
  .app-layout {
    grid-template-columns: 216px minmax(0, 1fr);
  }
  .make-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .editor-layout {
    grid-template-columns: minmax(0, 1fr) 200px;
    gap: 24px;
  }
  .writing-paper {
    padding: 34px 28px;
  }
  .life-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .editor-step:not(.here) span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .editor-step:not(.here) {
    width: 44px;
    padding: 0;
    justify-content: center;
  }
}
@media (max-width: 800px) {
  .app-header {
    height: 64px;
    padding: 0 18px;
  }
  .sample-link span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .app-layout {
    display: block;
    min-height: calc(100dvh - 64px);
  }
  .sidebar {
    display: none;
  }
  .workspace-main {
    padding: 24px 18px 120px;
  }
  .page-heading {
    margin-bottom: 20px;
  }
  .page-heading h1 {
    font-size: 44px;
  }
  .glance-row {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 24px;
  }
  .glance {
    gap: 12px;
    padding: 10px 14px;
    border-radius: 16px;
  }
  .glance-icon {
    width: 38px;
    height: 38px;
  }
  .glance-icon .icon {
    width: 20px;
    height: 20px;
  }
  .glance strong {
    font-size: 20px;
  }
  .glance small {
    margin-top: 1px;
  }
  .make-section.has-items {
    display: none;
  }
  .make-grid {
    gap: 10px;
  }
  .make-tile {
    min-height: 96px;
  }
  .make-tile .icon {
    width: 32px;
    height: 32px;
  }
  .make-tile span {
    font-size: 19px;
  }
  .keepsake-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .keepsake {
    display: grid;
    grid-template-areas: "tile title state" "tile meta more";
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 2px 12px;
    min-height: 0;
    padding: 12px;
    border-radius: 16px;
  }
  .keepsake-top,
  .keepsake-bottom {
    display: contents;
  }
  .keepsake .tile {
    grid-area: tile;
    width: 46px;
    height: 46px;
    border-radius: 13px;
  }
  .keepsake .tile .icon {
    width: 24px;
    height: 24px;
  }
  .keepsake .state {
    grid-area: state;
    width: 32px;
    height: 32px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
  .keepsake .state span,
  .keepsake .faces {
    display: none;
  }
  .keepsake h3 {
    grid-area: title;
    font-size: 19px;
    -webkit-line-clamp: 1;
  }
  .keepsake .when {
    grid-area: meta;
    font-size: 12px;
  }
  .keepsake-more {
    grid-area: more;
    width: 32px;
    height: 32px;
  }
  .editor-main {
    padding-top: 16px;
  }
  .editor-top {
    margin-bottom: 18px;
  }
  .editor-steps {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }
  .editor-steps li:not(:last-child)::after {
    width: 8px;
  }
  .editor-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .writing-paper {
    min-height: 480px;
    padding: 28px 22px;
  }
  .paper-title {
    font-size: 27px;
  }
  .editor-aside h2 {
    font-size: 28px;
  }
  .editor-bottom {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  #workspace[data-view="editor"] .workspace-main {
    padding-bottom: 0;
  }
  #workspace[data-view="editor"] .mobile-nav {
    display: none;
  }
  .who-when h2 {
    font-size: 32px;
  }
  .face-pick {
    width: calc(33.33% - 8px);
    min-width: 92px;
  }
  .when-picks {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .when-pick {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-areas: "disc title" "disc sub";
    column-gap: 14px;
    row-gap: 0;
    padding: 14px 16px;
    text-align: left;
  }
  .when-disc {
    grid-area: disc;
    width: 56px;
    height: 56px;
  }
  .when-disc .icon {
    width: 28px;
    height: 28px;
  }
  .when-pick strong {
    grid-area: title;
    align-self: end;
    font-size: 22px;
  }
  .when-pick > span:not(.when-disc):not(.when-tick) {
    grid-area: sub;
  }
  .when-tick {
    top: 50%;
    transform: translateY(-50%);
  }
  .person-grid,
  .trusted-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .role-picks {
    grid-template-columns: 1fr;
  }
  .life-status {
    justify-content: center;
    gap: 22px;
    padding: 22px;
  }
  .life-act {
    align-items: center;
    text-align: center;
  }
  .life-steps strong {
    font-size: 19px;
  }
  .life-save {
    flex-direction: column;
    align-items: stretch;
  }
  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 8px 6px max(12px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(244, 239, 231, 0.96);
    backdrop-filter: blur(16px);
  }
  .mobile-nav > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 60px;
    min-height: 48px;
    color: var(--muted);
    font-size: 11px;
  }
  .mobile-nav > a .icon {
    width: 22px;
    height: 22px;
  }
  .mobile-nav > a.active {
    color: var(--accent-dark);
    font-weight: 600;
  }
  .mobile-nav .mobile-add {
    color: var(--accent-dark);
  }
  .mobile-nav .mobile-add .icon {
    width: 46px;
    height: 46px;
    padding: 11px;
    border-radius: 50%;
    background: var(--accent);
    color: #fffaf4;
    box-shadow: 0 8px 18px rgba(132, 72, 64, 0.2);
  }
}
@media (max-width: 380px) {
  .workspace-main {
    padding-right: 14px;
    padding-left: 14px;
  }
  .page-heading h1 {
    font-size: 38px;
  }
  .make-tile span {
    font-size: 17px;
  }
  .writing-paper {
    padding: 24px 18px;
  }
  .mobile-nav > a {
    min-width: 52px;
  }
}

/* From tablets up, the header and sidebar stay put and only the center column scrolls.
   Phones keep the page scroll with the bottom navigation. */
@media (min-width: 801px) {
  body {
    overflow: hidden;
  }
  #workspace {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
  }
  .app-header {
    flex: none;
  }
  .app-layout {
    flex: 1;
    grid-template-rows: minmax(0, 1fr);
    min-height: 0;
  }
  /* Sized to fit; it only scrolls on screens too short for any layout. */
  .sidebar {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }
  .sidebar::-webkit-scrollbar {
    display: none;
  }
  .workspace-main {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
@media (min-width: 801px) and (max-height: 760px) {
  .sidebar {
    padding-top: 20px;
    padding-bottom: 16px;
  }
  .sidebar-note {
    display: none;
  }
}
@media (min-width: 801px) and (max-height: 600px) {
  .sidebar-create {
    min-height: 44px;
    margin-bottom: 8px;
  }
  .nav-item {
    min-height: 40px;
  }
}
