:root {
  --bg: #fff8f2;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-solid: #ffffff;
  --text: #3e3432;
  --muted: #8b7c78;
  --primary: #e98a86;
  --primary-deep: #c96969;
  --primary-soft: #fde3df;
  --apricot: #f5bd83;
  --apricot-soft: #fff0dc;
  --mint: #a9d7c4;
  --mint-soft: #e6f6ef;
  --lavender: #c4b6dd;
  --lavender-soft: #f0ebf8;
  --warning: #d98345;
  --warning-soft: #fff0df;
  --danger: #c65f62;
  --line: #eee1da;
  --shadow: 0 12px 34px rgba(100, 70, 57, 0.12);
  --shadow-soft: 0 7px 22px rgba(100, 70, 57, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-height: 100%; background: radial-gradient(circle at top left, #fffdf9 0, #fff7f0 44%, #fff5ef 100%); color: var(--text); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, select, label.upload-button { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.ambient { position: fixed; border-radius: 999px; filter: blur(5px); opacity: 0.45; pointer-events: none; z-index: 0; }
.ambient-one { width: 240px; height: 240px; background: #fbd9d5; left: -100px; top: -70px; }
.ambient-two { width: 280px; height: 280px; background: #e6def4; right: -130px; bottom: 60px; }

.app-shell { position: relative; z-index: 1; width: min(100%, 560px); min-height: 100vh; margin: 0 auto; background: rgba(255, 249, 244, 0.76); box-shadow: 0 0 0 1px rgba(255,255,255,0.5), 0 0 70px rgba(97,69,55,0.08); padding-bottom: calc(104px + var(--safe-bottom)); }

.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 10px; background: rgba(255, 248, 242, 0.89); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(238,225,218,0.7); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 15px; background: linear-gradient(145deg, var(--primary-soft), #fff); box-shadow: var(--shadow-soft); font-size: 21px; transform: rotate(-5deg); }
.brand strong { display: block; font-size: 17px; letter-spacing: .02em; }
.brand small { display: block; color: var(--muted); margin-top: 2px; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .avatar-button, .close-button { border: 0; cursor: pointer; }
.icon-button { width: 38px; height: 38px; border-radius: 13px; background: #fff; box-shadow: var(--shadow-soft); }
.avatar-button { width: 42px; height: 42px; padding: 2px; border-radius: 50%; background: linear-gradient(145deg, var(--primary), var(--apricot)); box-shadow: 0 6px 16px rgba(201,105,105,.24); }
.avatar-button img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 2px solid #fff; }

.cat-switcher-row { display: flex; align-items: center; gap: 8px; padding: 10px 18px 4px; }
.cat-switcher-label { color: var(--muted); font-size: 11px; white-space: nowrap; }
.cat-switcher { min-width: 0; max-width: 190px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.9); padding: 8px 32px 8px 12px; color: var(--text); font-weight: 700; cursor: pointer; }
.local-badge { margin-left: auto; border-radius: 999px; padding: 5px 9px; background: var(--mint-soft); color: #527c6a; font-size: 10px; font-weight: 700; }

main { padding: 10px 16px 0; }
.view { display: none; animation: view-in .22s ease-out; }
.view.is-active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.section-stack { display: grid; gap: 16px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 2px 10px; }
.section-heading h1, .section-heading h2 { margin: 0; line-height: 1.25; }
.section-heading h1 { font-size: 23px; }
.section-heading h2 { font-size: 17px; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.text-button { border: 0; background: transparent; color: var(--primary-deep); font-weight: 800; cursor: pointer; padding: 6px; }

.card { background: var(--surface); border: 1px solid rgba(238,225,218,.88); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.card-padding { padding: 16px; }

.hero-card { position: relative; min-height: 270px; overflow: hidden; border-radius: var(--radius-xl); box-shadow: var(--shadow); background: #eadfd8; isolation: isolate; }
.hero-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(36,24,22,.02) 20%, rgba(35,23,20,.76) 100%); z-index: 1; }
.hero-image { width: 100%; height: 100%; min-height: 270px; position: absolute; inset: 0; object-fit: cover; }
.hero-content { position: relative; z-index: 2; min-height: 270px; display: flex; flex-direction: column; justify-content: space-between; padding: 17px; color: #fff; }
.hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.hero-date { padding: 8px 11px; border-radius: 14px; background: rgba(43,30,27,.38); backdrop-filter: blur(10px); font-size: 11px; font-weight: 700; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 8px 11px; background: rgba(255,255,255,.9); color: var(--text); font-size: 11px; font-weight: 800; white-space: nowrap; }
.hero-copy h1 { margin: 0; font-size: 28px; letter-spacing: .01em; text-shadow: 0 2px 10px rgba(0,0,0,.18); }
.hero-copy p { margin: 5px 0 0; color: rgba(255,255,255,.92); font-size: 12px; }
.hero-edit { margin-top: 12px; border: 1px solid rgba(255,255,255,.48); border-radius: 999px; background: rgba(255,255,255,.17); backdrop-filter: blur(8px); color: #fff; padding: 8px 12px; font-weight: 800; cursor: pointer; }

.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.summary-card { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 10px; align-items: center; padding: 13px; border-radius: 19px; background: var(--surface); border: 1px solid rgba(238,225,218,.84); box-shadow: var(--shadow-soft); }
.summary-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 15px; font-size: 20px; }
.summary-icon.food { background: var(--apricot-soft); }
.summary-icon.medicine { background: var(--lavender-soft); }
.summary-icon.toilet { background: var(--mint-soft); }
.summary-icon.mood { background: var(--primary-soft); }
.summary-card small { display: block; color: var(--muted); font-size: 10.5px; }
.summary-card strong { display: block; margin-top: 2px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.quick-card { padding: 15px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.quick-item { min-width: 0; border: 0; border-radius: 18px; padding: 11px 4px 9px; background: #fffaf6; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.quick-item:active { transform: scale(.96); }
.quick-item span { display: grid; place-items: center; width: 38px; height: 38px; margin: 0 auto 6px; border-radius: 14px; background: var(--primary-soft); font-size: 19px; }
.quick-item:nth-child(2n) span { background: var(--mint-soft); }
.quick-item:nth-child(3n) span { background: var(--lavender-soft); }
.quick-item:nth-child(4n) span { background: var(--apricot-soft); }
.quick-item small { display: block; font-size: 10.5px; font-weight: 800; white-space: nowrap; }

.anomaly-card { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px; background: linear-gradient(135deg, var(--warning-soft), #fffaf4); border-color: #f3d6b6; }
.anomaly-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 18px; background: #fff; font-size: 22px; box-shadow: var(--shadow-soft); }
.anomaly-card strong { display: block; font-size: 14px; }
.anomaly-card p { margin: 4px 0 0; color: #8d684b; font-size: 11px; line-height: 1.5; }
.anomaly-button { border: 0; border-radius: 14px; background: var(--warning); color: white; padding: 10px 11px; font-size: 11px; font-weight: 800; cursor: pointer; }

.reminder-list, .timeline-list { display: grid; gap: 10px; }
.reminder-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px; border-radius: 17px; background: #fff; border: 1px solid var(--line); }
.reminder-time { display: grid; place-items: center; min-height: 42px; border-radius: 14px; background: var(--lavender-soft); color: #725f92; font-size: 11px; font-weight: 900; }
.reminder-item strong { display: block; font-size: 13px; }
.reminder-item p { margin: 3px 0 0; color: var(--muted); font-size: 10.5px; }
.mini-button { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 8px 10px; color: var(--primary-deep); font-size: 10.5px; font-weight: 800; cursor: pointer; }
.mini-button.done { color: #527c6a; background: var(--mint-soft); border-color: transparent; }

.timeline-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 11px; align-items: start; position: relative; }
.timeline-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 16px; background: var(--primary-soft); font-size: 19px; }
.timeline-item:nth-child(3n+2) .timeline-icon { background: var(--mint-soft); }
.timeline-item:nth-child(3n) .timeline-icon { background: var(--lavender-soft); }
.timeline-copy { min-width: 0; padding-top: 2px; }
.timeline-copy strong { display: block; font-size: 13px; }
.timeline-copy p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.timeline-copy .record-note { color: #675854; }
.timeline-time { color: var(--muted); font-size: 10px; white-space: nowrap; padding-top: 4px; }
.timeline-photo { width: 100%; max-height: 240px; object-fit: cover; border-radius: 17px; margin-top: 9px; }
.timeline-delete { border: 0; background: transparent; color: #bcaeaa; padding: 2px 0 0 4px; cursor: pointer; font-size: 14px; }
.empty-state { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty-state span { display: block; font-size: 36px; margin-bottom: 8px; }
.empty-state strong { display: block; color: var(--text); }
.empty-state p { margin: 7px auto 0; max-width: 270px; font-size: 12px; line-height: 1.6; }

.filter-row { display: flex; gap: 7px; overflow-x: auto; padding: 2px 1px 8px; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 8px 11px; font-size: 11px; font-weight: 800; cursor: pointer; }
.filter-chip.is-active { background: var(--text); color: #fff; border-color: var(--text); }
.date-group { margin-top: 15px; }
.date-group-title { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 800; margin: 0 4px 9px; }
.date-group-title::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.timeline-card { padding: 14px; }

.calendar-card { padding: 14px; }
.calendar-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.calendar-toolbar h2 { margin: 0; font-size: 17px; }
.calendar-nav { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 13px; background: #fff; cursor: pointer; }
.week-row, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.week-row { margin-bottom: 5px; }
.week-row span { text-align: center; color: var(--muted); font-size: 9px; font-weight: 800; }
.calendar-day { position: relative; min-height: 50px; border: 0; border-radius: 14px; background: transparent; cursor: pointer; padding: 7px 3px 13px; font-size: 11px; }
.calendar-day.is-other { color: #c4b8b4; }
.calendar-day.is-today { box-shadow: inset 0 0 0 2px var(--primary); font-weight: 900; }
.calendar-day.is-selected { background: var(--text); color: #fff; }
.calendar-dots { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; }
.calendar-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--primary); }
.calendar-dot:nth-child(2) { background: var(--mint); }
.calendar-dot:nth-child(3) { background: var(--lavender); }
.calendar-day.is-selected .calendar-dot { background: #fff; opacity: .85; }
.selected-date-card { padding: 14px; }

.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.metric-card { padding: 14px; }
.metric-label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10.5px; }
.metric-card strong { display: block; font-size: 22px; margin-top: 7px; }
.metric-card p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.trend-up { color: var(--warning); }
.trend-ok { color: #5a8d77; }
.chart-card { padding: 14px; overflow: hidden; }
.chart-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.chart-header h2 { margin: 0; font-size: 16px; }
.chart-header p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.chart-svg { width: 100%; height: auto; margin-top: 12px; overflow: visible; }
.chart-grid-line { stroke: #eadfd8; stroke-width: 1; }
.chart-line { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: url(#areaGradient); opacity: .58; }
.chart-point { fill: #fff; stroke: var(--primary); stroke-width: 2.4; }
.chart-label { fill: var(--muted); font-size: 8px; }
.insight-list { display: grid; gap: 9px; }
.insight-item { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 10px; align-items: center; padding: 11px; border-radius: 16px; background: #fffaf7; }
.insight-item span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; background: var(--primary-soft); }
.insight-item strong { display: block; font-size: 12px; }
.insight-item p { margin: 3px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.disclaimer { margin: 10px 2px 0; color: var(--muted); font-size: 9.5px; line-height: 1.55; }

.profile-card { overflow: hidden; }
.profile-cover { position: relative; height: 190px; background: #e8dbd3; }
.profile-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 42%, rgba(45,31,28,.6)); }
.profile-cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-edit-on-cover { position: absolute; z-index: 2; right: 12px; top: 12px; border: 0; border-radius: 999px; background: rgba(255,255,255,.9); padding: 8px 11px; font-size: 10.5px; font-weight: 800; cursor: pointer; }
.profile-info { position: relative; padding: 16px; }
.profile-avatar-large { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; position: absolute; top: -46px; left: 16px; box-shadow: var(--shadow-soft); background: #fff; }
.profile-name-row { padding-left: 88px; min-height: 34px; }
.profile-name-row h1 { margin: 0; font-size: 23px; }
.profile-name-row p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.profile-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.profile-fact { padding: 10px 7px; border-radius: 15px; background: #fff9f5; text-align: center; }
.profile-fact small { display: block; color: var(--muted); font-size: 9px; }
.profile-fact strong { display: block; margin-top: 4px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-list { display: grid; gap: 10px; }
.detail-row { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 10px; font-size: 11px; line-height: 1.5; }
.detail-row dt { color: var(--muted); }
.detail-row dd { margin: 0; font-weight: 700; }
.care-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.care-item { border: 1px solid var(--line); border-radius: 17px; background: #fff; padding: 12px; text-align: left; cursor: pointer; }
.care-item span { font-size: 19px; }
.care-item strong { display: block; margin-top: 7px; font-size: 12px; }
.care-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 9.5px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.gallery-item { aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: #efe5de; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.action-list { display: grid; gap: 8px; }
.action-row { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 12px; cursor: pointer; text-align: left; }
.action-row span:first-child { font-size: 12px; font-weight: 800; }
.action-row small { color: var(--muted); }
.action-row.danger { color: var(--danger); }

.bottom-nav { position: fixed; z-index: 40; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 560px); display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px 7px calc(7px + var(--safe-bottom)); background: rgba(255,255,255,.94); backdrop-filter: blur(18px); border-top: 1px solid rgba(238,225,218,.9); box-shadow: 0 -8px 24px rgba(80,58,48,.06); }
.nav-item { position: relative; display: grid; justify-items: center; gap: 2px; border: 0; background: transparent; padding: 7px 2px; color: #a29591; cursor: pointer; }
.nav-item span { font-size: 20px; line-height: 1; filter: grayscale(.65); }
.nav-item small { font-size: 9.5px; font-weight: 800; }
.nav-item.is-active { color: var(--primary-deep); }
.nav-item.is-active span { filter: none; transform: translateY(-1px); }
.nav-item.is-active::after { content: ""; position: absolute; bottom: 1px; width: 20px; height: 3px; border-radius: 999px; background: var(--primary); }
.floating-add { position: fixed; z-index: 45; left: calc(50% + 220px); bottom: calc(76px + var(--safe-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; background: linear-gradient(135deg, var(--primary), var(--primary-deep)); color: #fff; padding: 13px 16px; box-shadow: 0 10px 26px rgba(201,105,105,.36); cursor: pointer; }
.floating-add span { font-size: 17px; }
.floating-add strong { font-size: 12px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(50,37,33,.43); backdrop-filter: blur(3px); }
.sheet { position: fixed; z-index: 80; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 560px); max-height: min(92vh, 900px); overflow-y: auto; padding: 8px 17px calc(20px + var(--safe-bottom)); border-radius: 30px 30px 0 0; background: #fffaf7; box-shadow: 0 -20px 50px rgba(54,40,35,.22); animation: sheet-up .22s ease-out; }
@keyframes sheet-up { from { transform: translate(-50%, 28px); opacity: .5; } to { transform: translate(-50%, 0); opacity: 1; } }
.sheet-handle { width: 42px; height: 5px; border-radius: 999px; background: #ded0ca; margin: 0 auto 10px; }
.sheet-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sheet-header h2 { margin: 0; font-size: 20px; }
.eyebrow { margin: 0 0 3px; color: var(--primary-deep); font-size: 9.5px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.close-button { width: 38px; height: 38px; border-radius: 50%; background: #f3e9e4; font-size: 23px; line-height: 1; cursor: pointer; }
.category-picker { display: flex; gap: 7px; overflow-x: auto; padding: 2px 1px 10px; scrollbar-width: none; }
.category-picker::-webkit-scrollbar { display: none; }
.category-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 8px 10px; font-size: 10.5px; font-weight: 800; cursor: pointer; }
.category-tab.is-active { background: var(--text); border-color: var(--text); color: #fff; }
.record-form { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; }
.field > span { color: #5e4f4b; font-size: 11px; font-weight: 800; }
.field > span small { color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #e7dad4; border-radius: 15px; background: #fff; padding: 12px 13px; color: var(--text); outline: none; transition: box-shadow .15s, border-color .15s; }
.field textarea { resize: vertical; min-height: 76px; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.two-column-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.choice-grid.two { grid-template-columns: repeat(2,1fr); }
.choice-option { position: relative; }
.choice-option input { position: absolute; opacity: 0; pointer-events: none; }
.choice-option span { display: grid; place-items: center; min-height: 45px; padding: 7px; border: 1px solid var(--line); border-radius: 14px; background: #fff; font-size: 10.5px; font-weight: 800; text-align: center; cursor: pointer; }
.choice-option input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-deep); box-shadow: inset 0 0 0 1px var(--primary); }
.tag-checks { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-option { position: relative; }
.tag-option input { position: absolute; opacity: 0; pointer-events: none; }
.tag-option span { display: inline-block; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 8px 10px; font-size: 10.5px; font-weight: 700; cursor: pointer; }
.tag-option input:checked + span { background: var(--lavender-soft); border-color: var(--lavender); color: #695481; }
.upload-drop { display: grid; place-items: center; min-height: 126px; border: 1.5px dashed #d9c6bd; border-radius: 18px; background: #fff; text-align: center; cursor: pointer; overflow: hidden; }
.upload-drop span { font-size: 26px; }
.upload-drop strong { display: block; margin-top: 5px; font-size: 12px; }
.upload-drop small { display: block; margin-top: 4px; color: var(--muted); font-size: 9.5px; }
.upload-drop img { width: 100%; max-height: 230px; object-fit: cover; }
.form-actions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 9px; margin-top: 5px; }
.primary-button, .secondary-button, .upload-button { display: inline-flex; align-items: center; justify-content: center; border-radius: 15px; padding: 12px 14px; font-weight: 900; cursor: pointer; text-align: center; }
.primary-button { border: 0; background: linear-gradient(135deg, var(--primary), var(--primary-deep)); color: #fff; box-shadow: 0 7px 16px rgba(201,105,105,.2); }
.secondary-button { border: 1px solid var(--line); background: #fff; color: var(--text); }
.upload-button { border: 1px dashed #d7bcb2; background: #fff; color: var(--primary-deep); font-size: 10.5px; }

.profile-photo-editor { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 11px; align-items: end; }
.profile-preview-wrap { display: grid; gap: 5px; justify-items: center; }
.profile-preview-wrap img { width: 82px; height: 82px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: var(--shadow-soft); background: #f0e6df; }
.profile-preview-wrap span { color: var(--muted); font-size: 9px; }
.hero-preview-wrap img { width: 100%; height: 110px; border-radius: 18px; }

.report-content { display: grid; gap: 15px; }
.report-heading { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.report-heading img { width: 62px; height: 62px; border-radius: 50%; object-fit: cover; }
.report-heading h2 { margin: 0; }
.report-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.report-block { padding: 13px; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.report-block h3 { margin: 0 0 8px; font-size: 13px; }
.report-block p, .report-block li { color: #5c4d49; font-size: 10.5px; line-height: 1.65; }
.report-block ul { margin: 0; padding-left: 18px; }
.report-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.report-table th, .report-table td { border-bottom: 1px solid var(--line); text-align: left; padding: 7px 4px; vertical-align: top; }
.report-table th { color: var(--muted); width: 28%; }

.toast { position: fixed; z-index: 120; left: 50%; bottom: calc(92px + var(--safe-bottom)); transform: translate(-50%, 20px); max-width: calc(100% - 32px); border-radius: 999px; background: rgba(55,43,39,.94); color: #fff; padding: 11px 15px; font-size: 11px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: var(--shadow); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 380px) {
  .brand small { display: none; }
  .quick-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .quick-item small { font-size: 9px; }
  .floating-add { left: calc(100% - 55px); }
  .profile-facts { gap: 5px; }
  .choice-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 561px) {
  body { padding: 22px 0 0; }
  .app-shell { min-height: calc(100vh - 22px); border-radius: 28px 28px 0 0; overflow: hidden; }
  .topbar { border-radius: 28px 28px 0 0; }
  .floating-add { left: calc(50% + 222px); }
}

@media print {
  body { background: #fff; }
  body > .ambient, .app-shell, .modal-backdrop, .no-print, .toast { display: none !important; }
  #reportModal { display: block !important; position: static; transform: none; width: 100%; max-height: none; overflow: visible; border-radius: 0; box-shadow: none; padding: 0; background: #fff; }
  .report-content { display: block; }
  .report-block { break-inside: avoid; margin-bottom: 12px; }
}
