:root {
  --paper: #f7efe4;
  --paper-deep: #edd9bd;
  --paper-line: rgba(182, 141, 102, 0.08);
  --ink: #493225;
  --muted-ink: #8f715d;
  --accent: #b78356;
  --accent-dark: #956341;
  --shell: #d6baa1;
  --shell-dark: #c49d79;
  --surface: rgba(255, 252, 247, 0.9);
  --line: rgba(171, 134, 95, 0.18);
  --success: #2f6b3c;
  --warning: #8a5a1f;
  --danger: #8b332e;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.32), transparent 24%),
    linear-gradient(180deg, #e7d3bf 0%, #cfaa84 100%);
  color: var(--ink);
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  overflow: hidden;
}

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

button {
  -webkit-appearance: none;
  appearance: none;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid rgba(111, 79, 53, 0.18);
  border-radius: 18px;
  padding: 14px 15px;
  background: rgba(255, 252, 247, 0.94);
  color: var(--ink);
}

.auth-shell {
  position: fixed;
  inset: 0;
  z-index: 20;
  height: 100dvh;
  width: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-6%);
  transition: opacity 260ms ease, transform 320ms ease;
}

.auth-shell.auth-shell-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.auth-card {
  width: 90%;
  height: 90%;
  display: grid;
  gap: 24px;
  padding: 28px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), transparent 16%),
    repeating-linear-gradient(
      180deg,
      transparent 0,
      transparent 6px,
      var(--paper-line) 6px,
      var(--paper-line) 10px
    ),
    linear-gradient(180deg, #f8edd4 0%, var(--paper) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(107, 67, 39, 0.12),
    0 20px 42px rgba(29, 17, 10, 0.28);
}

.auth-intro {
  display: grid;
  gap: 10px;
}

.auth-intro h1 {
  margin: 0;
  font-family: "Segoe Print", "Bradley Hand", cursive;
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  line-height: 1;
}

.auth-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.auth-panel {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.password-field .password-toggle {
  min-height: 48px;
  white-space: nowrap;
}

.auth-switch-button {
  display: none;
}

.phone-app {
  position: relative;
  z-index: 10;
  min-height: 100dvh;
  width: 100%;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: hidden;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 260ms ease, transform 320ms ease;
}

.phone-app.app-shell-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(8%);
}

.phone-frame {
  width: min(100%, 430px);
  max-width: 100%;
  height: min(100dvh - 36px, 920px);
  overflow: hidden;
  border-radius: 34px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.3), transparent 22%),
    linear-gradient(180deg, #f0deca 0%, #d9b898 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    0 24px 50px rgba(90, 58, 34, 0.22);
}

.phone-frame *,
.phone-frame *::before,
.phone-frame *::after {
  min-width: 0;
  max-width: 100%;
}

.phone-frame h1,
.phone-frame h2,
.phone-frame h3,
.phone-frame p,
.phone-frame a,
.phone-frame button,
.phone-frame label,
.phone-frame span,
.phone-frame div {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.page-track {
  display: flex;
  width: 100%;
  max-width: 100%;
  height: 100%;
  transition: transform 240ms ease;
}

.phone-page {
  flex: 0 0 100%;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
}

.page-paper {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 100%;
  overflow: auto;
  overflow-x: hidden;
  padding: 20px 18px 24px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 14% 8%, rgba(255, 255, 255, 0.85), transparent 14%),
    radial-gradient(circle at 88% 10%, rgba(255, 255, 255, 0.62), transparent 12%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), transparent 16%),
    repeating-linear-gradient(
      180deg,
      transparent 0,
      transparent 6px,
      var(--paper-line) 19.5px,
      var(--paper-line) 20px
    ),
    linear-gradient(180deg, #fbf6ef 0%, var(--paper) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(151, 109, 72, 0.1),
    0 10px 24px rgba(116, 81, 50, 0.1);
}

.page-header {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  min-width: 0;
}

.page-account-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.page-header-home {
  gap: 16px;
  margin-bottom: 20px;
}

.welcome-block {
  display: grid;
  gap: 6px;
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}


.page-header > *,
.panel-header > *,
.entry-list-item > *,
.entry-list-item > * > *,
.editor-card > *,
.camera-shell > * {
  min-width: 0;
  max-width: 100%;
}

.panel-header {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.compact-header {
  margin-bottom: 14px;
}

.header-row,
.page-actions,
.section-title-row {
  display: flex;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-mark,
.page-header h1,
.page-header h2,
.panel-header h1,
.panel-header h2,
.section-title-row h3 {
  margin: 0;
  font-family: "Segoe Print", "Bradley Hand", cursive;
}

.brand-mark {
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a46d43;
  text-shadow: none;
}

.page-header h1,
.page-header h2,
.panel-header h1,
.panel-header h2 {
  font-size: clamp(2.15rem, 7vw, 3.1rem);
  line-height: 1.08;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.section-title-row h3 {
  font-size: 1.8rem;
}

.page-note,
.small-note,
label,
.eyebrow {
  color: var(--muted-ink);
}

.page-note,
.small-note {
  margin: 0;
  line-height: 1.45;
  width: 100%;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, transform 150ms ease;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: center;
}

.page-actions > *,
.header-row > *,
.section-title-row > * {
  flex: 1 1 0;
  min-width: 0;
}

.primary-button:hover,
.ghost-button:hover,
.primary-button:focus-visible,
.ghost-button:focus-visible {
  transform: translateY(-1px);
}

.primary-button {
  background: var(--accent);
  color: #fff8ee;
  box-shadow: 0 10px 20px rgba(183, 131, 86, 0.22);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--accent-dark);
}

.ghost-button {
  background: rgba(183, 131, 86, 0.12);
  color: var(--accent-dark);
}

.top-action-button {
  min-height: 42px;
  padding-inline: 14px;
  background: rgba(255, 250, 242, 0.86);
  box-shadow: 0 8px 18px rgba(163, 119, 82, 0.12);
}

.entry-list {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.card-section,
.entry-list-item,
.entry-list-empty,
.entry-photo-card,
.editor-card,
.camera-shell,
.logs-toolbar,
.log-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 12px 26px rgba(140, 103, 69, 0.08);
}

.entry-list-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 18px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-fill-color: currentColor;
}

.card-section {
  padding: 16px;
}

.entry-list-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

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

.entry-list-item h2,
.log-card h2 {
  margin: 0;
  font-size: 1.95rem;
  width: 100%;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.entry-list-meta {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted-ink);
}

.entry-list-snippet,
.log-excerpt {
  margin: 6px 0 0;
  line-height: 1.5;
  width: 100%;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.entry-list-empty {
  padding: 20px;
  text-align: center;
  color: var(--muted-ink);
}

.entry-list-photo {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 18px;
  background: rgba(255, 252, 246, 0.7);
}

.entry-list-photo-empty {
  display: grid;
  place-items: center;
  color: var(--muted-ink);
  font-size: 0.72rem;
  text-align: center;
  padding: 8px;
}

.entry-list-bookmark {
  color: #c29972;
  font-size: 1rem;
}



.entries-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 10px;
}

.entries-header-row h2 {
  margin: 0;
  font-size: 1.55rem;
}

.entries-status-chip {
  width: auto;
  padding: 9px 14px;
  border: 1px solid rgba(195, 154, 112, 0.22);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.page-actions-secondary {
  justify-content: flex-end;
  margin-bottom: 14px;
}

.page-actions-secondary > * {
  flex: 0 0 auto;
}

.quick-actions {
  padding: 14px;
}

.quick-actions-grid {
  gap: 10px;
}

.quick-action-card {
  display: grid;
  gap: 8px;
  align-content: start;
  justify-items: center;
  min-height: 118px;
  padding: 16px 10px 14px;
  border: 1px solid rgba(196, 154, 113, 0.16);
  border-radius: 20px;
  background: rgba(255, 250, 244, 0.92);
  color: var(--ink);
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 10px 20px rgba(140, 103, 69, 0.06);
}

.quick-action-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-size: 1.3rem;
}

.quick-action-icon-entry {
  background: rgba(195, 136, 80, 0.16);
  color: #9a633d;
}

.quick-action-icon-clips {
  background: rgba(180, 187, 127, 0.18);
  color: #7e8450;
}

.quick-action-icon-more {
  background: rgba(211, 194, 166, 0.22);
  color: #9b7a58;
}

.quick-action-label {
  font-weight: 700;
  text-align: center;
}

.quick-action-note {
  font-size: 0.78rem;
  text-align: center;
  color: var(--muted-ink);
}

.entry-photo-card {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin-bottom: 14px;
  border: none;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
}

.entry-photo-card img,
.camera-stage video,
.camera-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.entry-photo-card img,
.camera-stage img {
  object-fit: cover;
  background: transparent;
}

.entry-photo-placeholder,
.camera-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
  color: var(--muted-ink);
  z-index: 0;
}

.entry-photo-placeholder {
  background: rgba(255, 252, 246, 0.42);
  border-radius: 18px;
}

.editor-card,
.camera-shell,
.logs-toolbar,
.log-card {
  padding: 16px;
}

.live-transcript {
  margin: 8px 0 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(139, 93, 57, 0.09);
  color: var(--ink);
  white-space: pre-wrap;
  line-height: 1.55;
}

.recordings-panel {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
}

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

.recording-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 250, 244, 0.78);
  min-width: 0;
  overflow: visible;
}

.recording-card audio {
  display: block;
  width: 100%;
  min-height: 44px;
  max-width: 100%;
}

textarea,
input[type="number"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

#entry-date-input {
  width: 100%;
  max-width: 220px;
  background: rgba(255, 252, 247, 0.94);
  color: var(--ink);
}

textarea {
  min-height: 320px;
  resize: none;
  line-height: 1.55;
  overflow: hidden;
}

.camera-shell {
  display: grid;
  gap: 14px;
}

.camera-stage {
  --guide-line-x: 47.2%;
  --guide-line-y: 60.3%;
  --guide-box-left: 37.45%;
  --guide-box-top: 31.97%;
  --guide-box-width: 20.56%;
  --guide-box-height: 46.48%;
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 20px;
  border: 2px dashed rgba(96, 66, 44, 0.35);
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.76), rgba(232, 214, 188, 0.62)),
    rgba(255, 252, 246, 0.72);
  isolation: isolate;
}

.camera-stage video {
  object-fit: cover;
  transform: scaleX(-1);
  background: rgba(61, 42, 31, 0.18);
  z-index: 1;
  -webkit-transform: scaleX(-1) translateZ(0);
  backface-visibility: hidden;
}

.camera-guides {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  width: 100%;
  height: 100%;
  display: block;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

.guide-line,
.guide-box,
.guide-countdown {
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
}

.guide-line {
  stroke: rgba(30, 23, 16, 0.92);
  stroke-width: 1.4;
}

.guide-box {
  fill: none;
  stroke: rgba(30, 23, 16, 0.92);
  stroke-width: 1.4;
}

.guide-countdown {
  fill: #fffaf2;
  font-size: 22px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
  paint-order: stroke;
  stroke: rgba(36, 24, 14, 0.6);
  stroke-width: 1.2;
}

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

.password-panel {
  margin-bottom: 18px;
}

#password-status {
  min-height: 1.4em;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.timer-control {
  display: grid;
  gap: 6px;
  align-content: center;
  text-align: left;
}

#camera-timer {
  border: none;
  background: transparent;
  color: var(--accent-dark);
  padding: 0;
}

#photo-input {
  display: none;
}

#face-feedback[data-state="good"] {
  color: var(--success);
}

#face-feedback[data-state="warn"] {
  color: var(--warning);
}

#face-feedback[data-state="error"] {
  color: var(--danger);
}

.clips-panel {
  display: grid;
  gap: 18px;
}

.clips-controls {
  display: grid;
  gap: 16px;
}

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

.year-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.year-chip {
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(139, 93, 57, 0.12);
  color: var(--accent-dark);
  cursor: pointer;
}

.year-chip.is-active {
  background: var(--accent);
  color: #fff8ee;
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 10px;
}

.photo-strip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
}

#clip-preview {
  width: 100%;
  border-radius: 20px;
  background: #000;
}

.app-shell {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(320px, 960px);
  justify-content: center;
  padding: 24px;
  width: 100%;
  max-width: 100%;
}

.single-page-shell {
  grid-template-columns: minmax(320px, 960px);
}

.paper-panel {
  position: relative;
  border-radius: 28px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 18%),
    repeating-linear-gradient(
      180deg,
      rgba(94, 65, 43, 0.03) 0,
      rgba(94, 65, 43, 0.03) 2px,
      transparent 2px,
      transparent 6px
    ),
    var(--paper);
  box-shadow:
    inset 0 0 0 1px rgba(90, 61, 39, 0.15),
    0 18px 36px rgba(29, 17, 10, 0.3);
}

.logs-panel,
.logs-grid,
.log-content {
  display: grid;
  gap: 18px;
}

.logs-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.logs-toolbar label {
  display: grid;
  gap: 6px;
}

.log-card {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 18px;
  align-items: start;
}

.log-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.72);
}

.log-photo-empty {
  display: grid;
  place-items: center;
  color: var(--muted-ink);
}

.log-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.log-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(143, 95, 55, 0.12);
  color: var(--accent-dark);
}

.empty-state {
  text-align: center;
  color: var(--muted-ink);
}

@media (min-width: 900px) {
  body {
    overflow: auto;
  }

  .auth-shell {
    padding: 24px;
  }

  .auth-card {
    width: 100%;
    padding: 32px 36px;
    gap: 24px;
  }

  .auth-intro h1 {
    font-size: clamp(2.8rem, 4vw, 4.2rem);
  }

  .auth-panels {
    gap: 18px;
  }

  .auth-panel {
    padding: 22px;
    border-radius: 22px;
  }

  .auth-form {
    gap: 12px;
  }

  .auth-form input {
    padding: 14px 16px;
    font-size: 0.96rem;
  }

  .auth-form .primary-button,
  .auth-form .ghost-button {
    min-height: 48px;
    font-size: 0.96rem;
  }

  .phone-app {
    padding: 0;
    align-items: stretch;
    justify-items: stretch;
  }

  .phone-frame {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    border-radius: 0;
    background:
      radial-gradient(circle at top left, rgba(255, 255, 255, 0.12), transparent 28%),
      linear-gradient(180deg, #9b7655 0%, #755339 100%);
    box-shadow: none;
  }

  .page-paper {
    width: min(100%, 100vw);
    height: 100%;
    padding: 22px 26px 28px;
    border-radius: 0;
  }

  .page-header {
    margin-bottom: 18px;
  }

  .page-header h1,
  .page-header h2 {
    font-size: clamp(2.3rem, 3vw, 3.4rem);
  }

  .brand-mark {
    font-size: 0.95rem;
  }

  .page-note,
  .small-note {
    font-size: 0.94rem;
  }

  .page-actions,
  .header-row {
    justify-content: flex-start;
  }

  .page-actions > *,
  .header-row > * {
    flex: 0 0 auto;
    width: auto;
    min-width: 150px;
  }

  .page-account-row {
    align-items: start;
  }

  .entry-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .entry-list-item {
    grid-template-columns: 120px minmax(0, 1fr) auto;
    gap: 16px;
    min-height: 150px;
    padding: 16px;
  }

  .entry-list-photo {
    width: 96px;
    height: 120px;
    border-radius: 16px;
  }

  .entry-list-item h2 {
    font-size: 1.45rem;
  }

  .entry-list-snippet {
    font-size: 0.94rem;
  }

  .entry-photo-card {
    aspect-ratio: 18 / 7;
    margin-bottom: 16px;
  }

  .editor-card {
    padding: 18px;
  }

  .editor-card textarea {
    min-height: 320px;
  }

  .section-title-row {
    align-items: center;
  }

  .section-title-row > * {
    flex: 0 0 auto;
    width: auto;
  }

  .section-title-row h3 {
    flex: 1 1 auto;
  }

  .camera-shell {
    gap: 14px;
  }

  .camera-stage {
    aspect-ratio: 16 / 9;
  }

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

  .clips-controls {
    grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr);
    align-items: start;
  }

  .clip-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  #clip-status {
    grid-column: 1 / -1;
  }

  .photo-strip {
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  }

  .app-shell {
    padding: 24px;
  }

  .paper-panel {
    padding: 24px;
  }

  .panel-header h1 {
    font-size: clamp(2.3rem, 3vw, 3.3rem);
  }

  .logs-grid {
    gap: 18px;
  }
}

@media (max-width: 720px) {
  .auth-shell {
    padding: 16px;
  }

  .auth-card {
    padding: 20px 18px;
    border-radius: 24px;
  }

  .auth-panels {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    display: none;
  }

  .auth-switch-button {
    display: inline-flex;
    justify-content: center;
  }

  .auth-panels[data-auth-mode="login"] .auth-panel-login,
  .auth-panels[data-auth-mode="register"] .auth-panel-register {
    display: grid;
  }

  .phone-app {
    padding: 0;
  }

  .phone-frame {
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    border-radius: 0;
  }

  .phone-page {
    padding: 0;
  }

  .page-paper {
    padding: 18px 16px 22px;
    border-radius: 0;
  }

  .brand-mark {
    font-size: 1rem;
  }

  .page-actions,
  .page-account-row,
  .header-row,
  .section-title-row,
  .logs-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

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

  .page-header-home .page-account-row,
  .quick-actions-grid,
  .entries-header-row,
  .page-actions-secondary {
    flex-direction: row;
    align-items: center;
  }

  .quick-actions-grid {
    gap: 8px;
  }

  .welcome-block {
    gap: 4px;
  }

  .page-header-home h1 {
    font-size: 2.1rem;
  }

  .page-actions > *,
  .header-row > *,
  .section-title-row > * {
    width: 100%;
    max-width: 100%;
    flex: 0 1 auto;
  }

  .quick-actions-grid > * {
    flex: 1 1 0;
    width: auto;
  }

  .page-actions-secondary > * {
    width: auto;
  }

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

  .clip-actions {
    flex-direction: column;
  }

  .entry-list-item {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 12px;
  }

  .entry-list-photo {
    width: 64px;
    height: 64px;
  }

  .entry-list-item h2 {
    font-size: 1.7rem;
  }

  .app-shell {
    padding: 14px;
  }

  .paper-panel {
    padding: 18px;
    border-radius: 22px;
  }

  .log-card {
    grid-template-columns: 1fr;
  }
}
