/* Real account screens: smartphone layout and native mobile navigation. */
:root { --radius: 20px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { min-width: 320px; background: #f4f6f3; overflow-wrap: anywhere; }
body.has-account { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
button, input, select, textarea { font-size: 16px; }
.top {
  position: sticky; top: 0; z-index: 30;
  min-height: 68px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 20px 10px;
  gap: 12px; background: rgba(247, 248, 245, 0.97);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.top > a { display: flex; align-items: center; min-height: 44px; flex: 0 0 auto; }
.logo { width: 132px; }
.top { flex-wrap: wrap; }
.top-right { gap: 8px; font-size: 14px; flex-wrap: wrap; margin-left: auto; }
.top-right > span { display: none; }
.top-right .button { min-height: 44px; padding: 10px 12px; font-size: 13px; }
.top-right .text-button { min-height: 44px; padding: 10px 4px; font-size: 14px; }
.shell { display: block; min-height: calc(100svh - 170px); }
.account-sidebar { display: none; }
main, .public-shell main { padding: 28px 20px 40px; }
.public-shell { max-width: 520px; margin-inline: auto; }
h1 { font-size: clamp(1.9rem, 8.3vw, 2.4rem); line-height: 1.15; letter-spacing: -0.045em; margin-bottom: 16px; }
h2 { font-size: 1.4rem; line-height: 1.3; }
h3 { font-size: 1.08rem; line-height: 1.4; }
p { line-height: 1.65; }
.eyebrow { line-height: 1.5; letter-spacing: 0.1em; margin-bottom: 14px; }
.lead { font-size: 1rem; line-height: 1.65; margin-bottom: 24px; }
.muted { font-size: 0.9rem; line-height: 1.6; }
.card { padding: 20px; margin-bottom: 16px; border-radius: 20px; background: #fcfdfb; border-color: #e3e9e1; backdrop-filter: none; box-shadow: 0 8px 24px rgba(30, 56, 41, 0.035); }
.grid, .grid.four, .grid.plans { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.grid > *, .row > *, .list-row > *, .check > span { min-width: 0; }
.row { gap: 12px; margin-bottom: 18px; }
.row h1 { margin-bottom: 0; }
.row > .button { width: 100%; }
.button, button[type=submit] { min-height: 50px; padding: 13px 18px; font-size: 15px; text-align: center; }
.card > .button, .auth button[type=submit] { width: 100%; }
.button.small { min-height: 44px; }
.notice { padding: 16px; margin-bottom: 20px; font-size: 15px; }
.notice a { font-weight: 600; }
.field { margin-bottom: 20px; }
.field span { font-size: 14px; margin-bottom: 8px; }
.field small { font-size: 13px; }
input:not([type=checkbox]):not([type=radio]), select, textarea { min-height: 52px; min-width: 0; font-size: 16px; padding: 14px 12px; background: #fff; border-color: #ced8ce; border-radius: 10px; }
input[type=file] { padding: 10px; }
input::file-selector-button { min-height: 40px; border: 0; border-radius: 8px; margin-right: 8px; padding: 8px 10px; background: #e6eee6; color: var(--green); }
textarea { min-height: 150px; line-height: 1.6; }
textarea.large { min-height: 220px; }
.check { min-height: 44px; padding-block: 4px; gap: 12px; font-size: 14px; }
.check input { width: 22px; height: 22px; flex: 0 0 22px; margin-top: 1px; }
.checkbox-list { grid-template-columns: 1fr; }
.checkbox-list .check { padding: 14px; }
.actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-block: 20px; }
.actions > a { display: flex; justify-content: center; align-items: center; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: center; }
.actions > .button { border-radius: 100px; background: var(--green); color: #fff; }
.actions > .button.secondary { background: #fff; color: var(--green); }
.actions > .button.danger { background: #763b3b; }
.auth > .actions { margin-bottom: 0; }
.auth > h1 { font-size: 30px; margin-bottom: 26px; }
.auth .auth-submit button { width: auto; min-width: 170px; }
@media (max-width: 560px) {
  .top-right { width: 100%; justify-content: flex-end; }
  .top-right .button { flex: 1; padding-inline: 8px; font-size: 13px; }
}
.password-toggle { min-height: 44px; top: 4px; bottom: 4px; }
.list { gap: 12px; }
.list-row { align-items: flex-start; flex-direction: column; padding: 16px; gap: 12px; }
.list-row .actions { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.list-row .actions a, .list-row .actions button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 14px; }
.list-row .actions form { margin: 0; }
.badge { max-width: 100%; line-height: 1.4; font-size: 12px; }
.empty { padding: 30px 18px; }
.stat { font-size: 44px; margin: 20px 0; }
.table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.table-scroll table { min-width: 560px; font-size: 14px; }
.table-scroll th, .table-scroll td { padding: 14px 12px; }
.table-scroll a, .table-scroll button { display: inline-flex; align-items: center; min-height: 44px; }
.memorial { margin-block: 20px; }
.memorial h1 { font-size: 2.4rem; line-height: 1.15; }
.prose { line-height: 1.75; }
.secret { padding: 14px; font-size: 14px; }
.divider { margin-block: 22px; }
details:not(.mobile-menu) summary { min-height: 44px; }
footer { gap: 4px 16px; padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px)); font-size: 12px; }
footer a { display: flex; align-items: center; min-height: 44px; font-size: 13px; }
footer > span { width: 100%; padding-block: 8px; }
.mobile-dock {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 0px));
  background: #fbfcfa; border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgba(30, 56, 41, 0.04);
}
.mobile-dock > a, .mobile-menu > summary {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-height: 54px; padding: 6px 4px; border-radius: 12px;
  color: #5a6b60; font-size: 12px; font-weight: 500; line-height: 1.2;
  text-decoration: none; list-style: none; cursor: pointer;
}
.mobile-dock > a[aria-current=page], .mobile-menu[open] > summary { background: #e6eee6; color: var(--green); }
.mobile-dock svg { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mobile-menu { padding: 0; border: 0; min-width: 0; }
.mobile-menu > summary::-webkit-details-marker { display: none; }
.mobile-menu-panel {
  position: fixed; bottom: calc(78px + env(safe-area-inset-bottom, 0px)); left: 16px; right: 16px;
  max-height: calc(100dvh - 164px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto; overscroll-behavior: contain;
  padding: 20px 12px 12px; border: 1px solid var(--line); border-radius: 20px;
  background: #fcfdfb; box-shadow: 0 12px 60px rgba(20, 35, 25, 0.16);
}
.mobile-menu:not([open]) .mobile-menu-panel { display: none; }
.mobile-menu-panel > .eyebrow { margin: 0 12px 12px; }
.mobile-menu-panel nav { display: grid; gap: 3px; }
.mobile-menu-panel nav a { display: flex; align-items: center; min-height: 48px; padding: 12px; border-radius: 10px; font-size: 15px; text-decoration: none; }
.mobile-menu-panel nav a.active { background: #e6eee6; font-weight: 600; }
@media (max-width: 360px) {
  main, .public-shell main { padding-inline: 16px; }
  .top { padding-inline: 16px; }
  .logo { width: 110px; }
  .card { padding: 18px; }
  .top-right .button { padding-inline: 10px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .mobile-dock { display: none; } body.has-account { padding-bottom: 0; } }
