/* 츄츄로그 — 공용 스타일 (밝은 크림 바탕 한 가지 테마) */
:root {
  --cream: #f7f0e2;
  --paper: #ffffff;
  --ink: #2e2a3a;
  --muted: #6b6b7d;
  --faint: #a3a3b2;
  --line: #e7dcc8;
  --pink: #ee8e93;
  --butter: #f3c24f;
  --mint: #86c9b4;
  --tang: #f08a3e;
  --grape: #5b5ba6;
  --grape-dark: #4a4a90;
  --danger: #c2433a;
  --font-display: "Jua", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-body: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: #efe7d8; }
body {
  margin: 0 auto; min-height: 100vh; min-height: 100dvh; max-width: 480px;
  background: var(--cream); color: var(--ink);
  font-family: var(--font-body); font-size: 14px; line-height: 1.6;
  padding: max(20px, env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) max(28px, env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
  display: flex; flex-direction: column; gap: 14px;
}
body.wide { max-width: 1080px; }
@media (min-width: 520px) { body:not(.wide) { box-shadow: 0 0 0 1px var(--line); } }
main { display: flex; flex-direction: column; gap: 14px; flex: 1; }
h1, h2, h3, .j { font-family: var(--font-display); font-weight: 400; margin: 0; text-wrap: balance; word-break: keep-all; }
h1 { font-size: 25px; line-height: 1.25; }
h2 { font-size: 20px; line-height: 1.3; }
h3 { font-size: 16px; }
p { margin: 0; }
a { color: inherit; }
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 12px; }
.center { text-align: center; }

/* 상단 줄 */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { font-family: var(--font-display); font-size: 17px; text-decoration: none; }
.toplink { font-size: 13px; color: var(--muted); text-decoration: none; background: none; border: 0; padding: 6px 0; cursor: pointer; font-family: inherit; }
.back { position: relative; font-size: 20px; text-decoration: none; line-height: 1; padding: 4px 8px 4px 0; background: none; border: 0; cursor: pointer; color: var(--ink); }
.back::after { content: ""; position: absolute; inset: -10px -8px -10px -10px; }

/* 입력 */
label.field, div.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
label.field .hint, div.field .hint { color: var(--faint); }
input[type="text"], input[type="password"], input[type="date"], input[type="time"], input[type="search"], textarea {
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1.5px solid transparent; border-radius: 14px; padding: 12px 14px; width: 100%;
  -webkit-appearance: none; appearance: none; min-height: 48px;
}
textarea { resize: vertical; min-height: 52px; }
input:focus, textarea:focus { outline: none; border-color: var(--grape); }
::placeholder { color: var(--faint); opacity: 1; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--grape); outline-offset: 2px; }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg2 button { font: inherit; border: 0; background: var(--paper); color: var(--ink); border-radius: 14px; padding: 12px; cursor: pointer; }
.seg2 button[aria-pressed="true"] { background: var(--grape); color: #fff; }

/* 버튼 */
.btn {
  font: inherit; font-size: 15px; font-weight: 500; border: 0; cursor: pointer; text-align: center; text-decoration: none;
  border-radius: 999px; padding: 14px 18px; display: block; width: 100%;
  background: var(--grape); color: #fff;
}
.btn:hover { background: var(--grape-dark); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.light { background: var(--paper); color: var(--ink); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.ghost { background: transparent; color: var(--muted); font-size: 14px; padding: 10px; }
.btn.small { width: auto; display: inline-block; font-size: 13px; padding: 7px 14px; white-space: nowrap; flex: none; }

/* 카드 */
.card { background: var(--paper); border-radius: 20px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.card .hd { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.card .hd small { font-weight: 400; color: var(--muted); font-size: 12px; }
.alert { padding: 12px 14px; border-radius: 14px; background: #faecd0; color: #5b4614; font-size: 14px; }
.error { color: var(--danger); font-size: 14px; }

/* 선택 알약 */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills button {
  font: inherit; font-size: 14px; border: 0; background: var(--cream); color: var(--ink);
  border-radius: 999px; padding: 7px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.pills button[aria-pressed="true"] { background: var(--grape); color: #fff; }
.subrow { display: flex; flex-direction: column; gap: 6px; }
.subrow + .subrow { border-top: 1px dashed var(--line); padding-top: 10px; }
.sublabel { font-size: 12px; color: var(--muted); }
.savebar { position: sticky; bottom: 0; z-index: 5; margin: 0 -18px; padding: 14px 18px max(14px, env(safe-area-inset-bottom, 0px)); background: linear-gradient(to bottom, rgba(247,240,226,0), var(--cream) 30%); }
.sw { width: 12px; height: 12px; border-radius: 50%; flex: none; display: inline-block; }
.sw.other { background: repeating-linear-gradient(45deg, #cfc3ad 0 2px, transparent 2px 4px); border: 1px solid #cfc3ad; }

/* 아이 프로필 */
.profile { display: flex; align-items: center; gap: 12px; min-width: 0; }
.profile > div { min-width: 0; }
.profile h2 { overflow-wrap: anywhere; }
.avatar { width: 58px; height: 58px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; flex: none; overflow: hidden; }
.avatar.sm { width: 44px; height: 44px; }

/* 챌린지 카드 */
.challenge { background: var(--mint); border-radius: 24px; padding: 18px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.challenge .char { position: absolute; right: 12px; top: 10px; }
.challenge .line { font-size: 14px; line-height: 1.5; }
.challenge .line b { font-family: var(--font-display); font-weight: 400; font-size: 16px; }
.grains { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 6px 4px; justify-items: center; }
.grains i { width: 10px; height: 15px; border-radius: 50%; background: rgba(255,255,255,.45); transform: rotate(18deg); }
.grains i.f { background: #fff; }

/* 30일 띠 */
.ribbon { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
.ribbon button {
  font: inherit; font-size: 12px; font-weight: 700; border: 0; border-radius: 10px; padding: 6px 0; cursor: pointer;
  background: var(--paper); color: var(--muted); font-variant-numeric: tabular-nums;
}
.ribbon button.f { background: #d7eee6; color: var(--ink); }
.ribbon button[aria-current="true"] { background: var(--grape); color: #fff; }

/* 식사 사진 칸 */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; min-width: 0; }
.tile .box { width: 100%; aspect-ratio: 1; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: var(--cream); position: relative; }
.tile .box.empty { border: 2px dashed #d8ccb5; background: var(--paper); }
.tile .box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .box .ph { position: absolute; inset: 14%; opacity: .45; }
.tile .txt { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .done { color: var(--ink); font-weight: 500; }

/* 아래에서 올라오는 창 */
.dim { position: fixed; inset: 0; background: rgba(46, 42, 58, .45); z-index: 20; }
.sheet {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 21;
  background: var(--paper); border-radius: 26px 26px 0 0; padding: 18px 18px max(22px, env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 10px; max-height: 92dvh; overflow-y: auto;
}
.sheet .opt { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 14px; background: var(--cream); font: inherit; font-size: 14px; font-weight: 500; border: 0; cursor: pointer; width: 100%; color: var(--ink); text-align: left; }
.sheet textarea, .sheet input { background: var(--cream); }
.card input[type="text"], .card textarea { background: var(--cream); }
.sheet .preview { border-radius: 18px; overflow: hidden; background: var(--cream); position: relative; }
.sheet .preview img { width: 100%; max-height: 46dvh; object-fit: cover; display: block; }

/* 30일 표 */
.grid-scroll { --gbg: var(--paper); overflow-x: auto; background: var(--gbg); border-radius: 18px; padding: 12px 12px 12px 0; }
table.grid { border-collapse: separate; border-spacing: 3px; font-variant-numeric: tabular-nums; }
.grid th { font-weight: 500; font-size: 12px; color: var(--muted); text-align: left; white-space: nowrap; padding-right: 6px; position: sticky; left: 0; background: var(--gbg); }
.grid tbody th, .grid thead th:first-child { box-shadow: 6px 0 0 var(--gbg); z-index: 1; padding-left: 12px; }
.grid thead th { text-align: center; font-size: 10px; padding: 0; position: static; }
.grid thead th:first-child { position: sticky; left: 0; }
.grid thead th.cur { color: #fff; background: var(--grape); border-radius: 9px; font-weight: 700; }
.grid td { width: 18px; min-width: 18px; height: 18px; padding: 0; }
.cell { display: block; width: 18px; height: 18px; border-radius: 9px; border: 1.5px dashed #e2d6bf; padding: 0; cursor: pointer; background: transparent; font: 700 9px/18px var(--font-body); color: var(--ink); text-align: center; }
.cell.v0, .cell.v1, .cell.v2, .cell.n, .cell.c { border: 0; }
.cell.v0 { background: #e9dfcc; }
.cell.v1 { background: var(--butter); }
.cell.v2 { background: var(--tang); color: #fff; }
.cell.n { background: #d7eee6; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); }
.legend i { width: 12px; height: 12px; border-radius: 6px; display: inline-block; vertical-align: -1px; margin-right: 4px; box-sizing: border-box; }
.legend i.empty { border: 1.5px dashed #d8ccb5; }
.daydetail dl { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; font-size: 14px; }
.daydetail dt { color: var(--muted); font-size: 13px; }
.daydetail dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.photos { display: flex; gap: 6px; flex-wrap: wrap; }
.photos img { width: 76px; height: 76px; object-fit: cover; border-radius: 12px; }

/* 알림 토스트 */
.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; border-radius: 999px; padding: 8px 18px 8px 10px; font-size: 14px;
  display: flex; align-items: center; gap: 8px; opacity: 0; pointer-events: none; z-index: 30; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.status { font-size: 12px; color: var(--muted); min-height: 18px; }
.status.bad { color: var(--danger); }
.card .status:empty { display: none; }

/* 관리자 화면 */
.table-scroll { overflow-x: auto; }
table.members { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.members th, table.members td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
table.members th { font-size: 12px; color: var(--muted); font-weight: 500; }
table.members tr.selected td { background: #eef6f2; }
.issued { border: 2px dashed var(--mint); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: #f2faf6; }
.issued dl { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; }
.issued dt { color: var(--muted); font-size: 13px; }
.issued dd { margin: 0; font-weight: 700; word-break: break-all; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.create-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
@media (max-width: 640px) { .create-form { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* 띠 친구들 (등록 화면) */
.friends { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; justify-items: center; }
.friends-box { margin-top: auto; background: var(--paper); border-radius: 20px; padding: 14px 12px 12px; display: flex; flex-direction: column; gap: 8px; text-align: center; }
.friends-box p { font-size: 13px; color: var(--muted); }

/* 등급 표시 */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 9px; background: #ebe3d3; color: var(--muted); vertical-align: 2px; text-decoration: none; }
.chip.plus { background: var(--grape); color: #fff; }

/* 첫 화면 메뉴 두 칸 */
.menu2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.menu2 a { background: var(--paper); border-radius: 20px; padding: 14px; text-decoration: none; display: flex; flex-direction: column; gap: 6px; min-height: 112px; position: relative; overflow: hidden; }
.menu2 a b { font-weight: 700; font-size: 14px; }
.menu2 a span.muted { font-size: 12px; line-height: 1.4; }
.menu2 .art { position: absolute; right: 8px; bottom: 6px; }

/* 인사이트 */
.insight { background: #fff7e3; border-radius: 20px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.insight .hd { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.insight p { font-size: 14px; line-height: 1.65; }
.insight .ai { background: var(--paper); border-radius: 14px; padding: 12px 14px; }
.locked-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); text-decoration: none; background: var(--paper); border-radius: 14px; padding: 10px 12px; }
.locked-line b { color: var(--grape); font-weight: 700; margin-left: auto; white-space: nowrap; }

/* 칼럼 목록과 본문 */
.col-list { display: flex; flex-direction: column; gap: 8px; }
.col-item { display: flex; align-items: center; gap: 12px; background: var(--paper); border-radius: 18px; padding: 12px 14px; text-decoration: none; }
.col-item .ic { width: 44px; height: 44px; border-radius: 14px; background: var(--cream); display: grid; place-items: center; flex: none; }
.col-item .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.col-item .tx b { font-weight: 700; font-size: 14px; line-height: 1.4; word-break: keep-all; }
.col-item .tx span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-item.locked .tx b { color: var(--muted); }
.section-title { font-family: var(--font-display); font-size: 16px; margin-top: 6px; }
.article { background: var(--paper); border-radius: 22px; padding: 20px 18px; font-size: 15px; line-height: 1.85; word-break: keep-all; overflow-wrap: anywhere; }
.article h3 { font-family: var(--font-display); font-size: 18px; margin: 18px 0 6px; }
.article h4 { font-size: 15px; font-weight: 700; margin: 14px 0 4px; }
.article p { margin: 0 0 12px; }
.article ul { margin: 0 0 12px; padding-left: 20px; }
.article blockquote { margin: 0 0 12px; padding: 10px 14px; background: var(--cream); border-radius: 12px; color: #4a4658; }
.article :first-child { margin-top: 0; }
.lockcard { background: var(--paper); border-radius: 22px; padding: 24px 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }

/* AI 어드바이저 대화 */
.chat { display: flex; flex-direction: column; gap: 10px; flex: 1; padding-bottom: 8px; }
.bubble { max-width: 86%; padding: 11px 14px; border-radius: 18px; font-size: 14px; line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere; }
.bubble p { margin: 0 0 8px; } .bubble p:last-child { margin: 0; }
.bubble.me { align-self: flex-end; background: var(--grape); color: #fff; border-bottom-right-radius: 6px; }
.bubble.ai { align-self: flex-start; background: var(--paper); border-bottom-left-radius: 6px; }
.bubble.ai.wait::after { content: "…"; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.copy-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 18px; background: var(--paper); }
.copy-card b { font-size: 15px; }
.copy-card p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); word-break: keep-all; }
.copy-card textarea { background: var(--cream); font-size: 14px; line-height: 1.6; max-height: 340px; resize: none; }
.copy-card .btn { align-self: flex-start; }
.composer { position: sticky; bottom: 0; margin: 0 -18px; padding: 10px 18px max(14px, env(safe-area-inset-bottom, 0px)); background: var(--cream); display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); }
.composer .row { flex-wrap: nowrap; align-items: flex-end; }
.composer textarea { min-height: 46px; max-height: 140px; resize: none; }
.sendbtn { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--grape); display: grid; place-items: center; cursor: pointer; flex: none; }
.sendbtn:disabled { opacity: .45; cursor: default; }

/* 요금제 */
.compare { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.compare th, .compare td { padding: 10px 8px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); line-height: 1.45; word-break: keep-all; }
.compare thead th { font-size: 13px; }
.compare thead th.plus { color: var(--grape); }
.compare td.plus { color: var(--ink); font-weight: 500; }
.compare tr:last-child td, .compare tr:last-child th { border-bottom: 0; }
.compare tbody th { color: var(--muted); font-weight: 500; white-space: nowrap; }
.planhero { border-radius: 24px; padding: 18px; display: flex; flex-direction: column; gap: 6px; position: relative; min-height: 116px; }
.planhero.free { background: var(--paper); }
.planhero.plus { background: var(--grape); color: var(--cream); }
.planhero .char { position: absolute; right: 12px; bottom: 8px; }
.price { font-family: var(--font-display); font-size: 23px; }
.price small { font-family: var(--font-body); font-size: 13px; color: var(--muted); }

/* 관리자: 칼럼 편집 */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 760px) { .editor { grid-template-columns: minmax(0, 1fr); } }
.editor textarea.body { min-height: 360px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; line-height: 1.6; background: var(--cream); }
.editor .preview-pane { background: var(--cream); border-radius: 18px; padding: 4px; max-height: 640px; overflow: auto; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
select { font: inherit; color: var(--ink); background: var(--cream); border: 1.5px solid transparent; border-radius: 14px; padding: 11px 12px; min-height: 46px; width: 100%; }
.admin-nav { display: flex; gap: 6px; }
.admin-nav a { text-decoration: none; font-size: 14px; padding: 7px 14px; border-radius: 999px; background: var(--paper); color: var(--muted); }
.admin-nav a[aria-current="page"] { background: var(--ink); color: #fff; }

/* 잠정 결론 */
.grid tr.verdict-row th, .grid tr.verdict-row td { padding-top: 8px; }
.grid tr.verdict-row th { color: var(--ink); font-weight: 700; }
.cell.vd { border: 0; color: #fff; }
.legend { flex-direction: column; gap: 6px; }
.legend-row { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.legend-row b { font-weight: 700; color: var(--ink); min-width: 56px; }
.verdict { display: flex; align-items: flex-start; gap: 10px; background: var(--cream); border-radius: 14px; padding: 10px 12px; }
.verdict .sw { width: 14px; height: 14px; margin-top: 4px; }
.verdict b { display: block; font-weight: 700; font-size: 14px; }
.verdict small { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; }

/* 음식 칩 */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { font: inherit; font-size: 14px; border: 0; border-radius: 999px; padding: 6px 12px; cursor: pointer; background: var(--cream); color: var(--ink); }
.chips button.chip-on { background: var(--grape); color: #fff; }
.chips.suggest button { background: var(--paper); border: 1px solid var(--line); color: var(--muted); }
.chips.allergy-pick button[aria-pressed="true"] { background: #d0503f; color: #fff; }
.food-chip { display: inline-block; font-size: 13px; border-radius: 999px; padding: 3px 10px; background: var(--cream); margin: 2px 4px 2px 0; }

/* 대시보드 1단: 지금까지 알게 된 것 */
.summary { background: var(--paper); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.sum-hd { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sum-hd h2 { font-size: 18px; }
.vbar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; background: var(--cream); }
.vbar i { display: block; }
.vlegend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.vlegend i { width: 10px; height: 10px; border-radius: 5px; display: inline-block; margin-right: 4px; vertical-align: -1px; box-sizing: border-box; }
.vlegend i.empty { border: 1.5px dashed #d8ccb5; }
.sum-sec { display: flex; flex-direction: column; gap: 6px; border-top: 1px dashed var(--line); padding-top: 10px; }
.sum-sec > b { font-size: 14px; font-weight: 700; }
.food-line { font-size: 14px; line-height: 1.5; }
.food-line .fname { font-weight: 700; margin-right: 6px; }
.food-line.bad .fname { color: #c2433a; }
.food-chip.good { background: #dcefe6; }
.sum-foot { font-size: 12px; color: var(--faint); }

/* 보기 전환 */
.seg3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: #e9dfcc; border-radius: 14px; padding: 4px; }
.seg3 button { font: inherit; font-size: 14px; border: 0; background: none; border-radius: 10px; padding: 8px; cursor: pointer; color: var(--muted); }
.seg3 button[aria-selected="true"] { background: var(--paper); color: var(--ink); font-weight: 700; }

/* 30일 판 */
.board { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.bday { font: inherit; border: 1.5px dashed #e2d6bf; background: transparent; border-radius: 12px; aspect-ratio: 1 / 1.1; padding: 5px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; position: relative; overflow: hidden; text-align: left; color: var(--ink); }
.bday .n { font-size: 13px; font-weight: 700; line-height: 1; }
.bday .fd { font-size: 9.5px; line-height: 1.25; color: var(--muted); word-break: keep-all; overflow: hidden; max-height: 2.5em; }
.bday .mk { position: absolute; right: 5px; top: 4px; font-weight: 700; font-size: 12px; color: #fff; }
.bday.f { border: 0; background: var(--cream); }
.bday.v-good { background: #cfe9dc; }
.bday.v-ok { background: #efe7d6; }
.bday.v-bad { background: #f3c6c0; }
.bday.v-bad .mk { color: #c2433a; }
.bday.cur { outline: 2.5px solid var(--grape); outline-offset: 1px; }

/* 음식별 */
.foodlist { display: flex; flex-direction: column; gap: 4px; }
.frow { font: inherit; display: grid; grid-template-columns: 92px minmax(0, 1fr) 40px; align-items: center; gap: 8px; border: 0; background: none; padding: 6px 2px; cursor: pointer; text-align: left; color: var(--ink); border-radius: 10px; }
.frow:hover { background: var(--cream); }
.frow .fname { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frow.sus .fname { color: #c2433a; font-weight: 700; }
.frow .fbar { height: 12px; background: #e3dccb; border-radius: 6px; overflow: hidden; display: block; min-width: 12px; }
.frow .fbar i { display: block; height: 100%; background: #e5533d; }
.frow .fnum { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.fdays { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 13px; color: var(--muted); background: var(--cream); border-radius: 12px; padding: 8px 10px; margin: 0 0 6px; }

.dash-admin .summary, .dash-admin .card { background: var(--cream); }
.dash-admin .bday.f:not(.v-good):not(.v-ok):not(.v-bad) { background: #fff; }

/* 아래 고정 메뉴 */
body.has-tabs { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px; z-index: 15; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px max(8px, env(safe-area-inset-bottom, 0px)); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; font-size: 11px; color: var(--faint); padding: 2px 0; }
.tabbar .ti-art { height: 28px; display: grid; place-items: center; filter: grayscale(1); opacity: .55; }
.tabbar a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.tabbar a[aria-current="page"] .ti-art { filter: none; opacity: 1; }
body.has-tabs .savebar { bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
body.has-tabs .composer { bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
body.has-tabs .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
.report-link { display: flex; align-items: center; gap: 12px; background: var(--grape); color: var(--cream); border-radius: 20px; padding: 14px 16px; text-decoration: none; }
.report-link b { font-size: 14px; } .report-link span.muted { color: #dcdcf0; }
.dash-link { font-size: 14px; font-weight: 700; color: var(--grape); text-decoration: none; align-self: flex-end; }
.quickfill { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff7e3; border-radius: 16px; padding: 10px 12px; font-size: 13px; }

/* 요점 카드 */
.points { background: var(--paper); border-radius: 22px; padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.pt-kicker { font-size: 12px; color: var(--muted); }
.pt-head { font-size: 19px; line-height: 1.35; }
.pt-line { font-size: 13px; color: var(--muted); }
.pt-alert { font-size: 13px; color: #c2433a; }
.pt-more { align-self: flex-start; margin-top: 4px; font-size: 14px; font-weight: 700; color: var(--grape); text-decoration: none; }

/* 리포트 (문서 형식) */
.report { background: var(--paper); border-radius: 18px; padding: 22px 18px; display: flex; flex-direction: column; gap: 22px; word-break: keep-all; }
.rp-head { position: relative; border-bottom: 2px solid var(--ink); padding-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.rp-kicker { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.rp-head h1 { font-size: 21px; max-width: 78%; }
.rp-meta { margin: 6px 0 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 12px; font-size: 13px; }
.rp-meta dt { color: var(--muted); } .rp-meta dd { margin: 0; }
.rp-char { position: absolute; right: 0; top: 0; }
.rp-sec { display: flex; flex-direction: column; gap: 10px; }
.rp-sec h2 { font-family: var(--font-body); font-weight: 700; font-size: 15px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.rp-list { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.7; display: flex; flex-direction: column; gap: 2px; }
.rp-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.5; }
.rp-table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 6px 6px; background: var(--cream); }
.rp-table td { padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rp-table td:first-child { font-weight: 700; white-space: nowrap; }
.rp-note { font-size: 12px; color: var(--muted); }
.rp-ai { background: var(--cream); border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.7; }
.rp-ai p { margin: 0 0 8px; }
.rp-foot { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.rp-foot b { color: var(--ink); }
.report .board .bday.f:not(.v-good):not(.v-ok):not(.v-bad) { background: var(--cream); }

/* 결론 + ⓘ */
.iline { display: flex; flex-direction: column; gap: 6px; }
.iline-row { display: flex; align-items: flex-start; gap: 8px; }
.iline-text { flex: 1; font-size: 14px; line-height: 1.5; }
.iline.head .iline-text { font-family: var(--font-display); font-size: 18px; line-height: 1.35; }
.iline.bad .iline-text { color: #b8392f; }
.iline.good .iline-text { color: #2f7a57; }
.ibtn::after { content: ""; position: absolute; inset: -11px; }
.ibtn { position: relative; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--faint); background: var(--paper); color: var(--muted); font: italic 700 12px/1 Georgia, serif; cursor: pointer; display: grid; place-items: center; margin-top: 2px; padding: 0; }
.ibtn.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.evidence { background: var(--cream); border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.6; color: #4a4658; display: flex; flex-direction: column; gap: 4px; }
.concl { display: flex; flex-direction: column; gap: 12px; }

/* AI 인사이트 */
.ai-insight { background: #f1f0fb; border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.ai-kicker { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--grape); }
.ai-head { font-size: 15px; line-height: 1.55; font-weight: 500; }
.ai-rest { font-size: 14px; line-height: 1.7; border-top: 1px dashed #d6d4f0; padding-top: 8px; }
.ai-rest p { margin: 0 0 8px; }
.more-btn { align-self: flex-start; font: inherit; font-size: 13px; font-weight: 700; color: var(--grape); background: none; border: 0; padding: 0; cursor: pointer; }
.ai-insight.locked { background: #f4f2ea; }
.ai-insight.locked .ai-kicker { color: var(--muted); }
.ai-blur { display: flex; flex-direction: column; gap: 6px; filter: blur(1.5px); }
.ai-blur i { display: block; height: 10px; border-radius: 5px; background: #d9d3c4; width: 100%; }
.ai-perk1 { font-size: 13px; color: var(--muted); }
.ai-perks { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; color: #4a4658; }

/* 리포트 접기 */
.rp-more { border-bottom: 1px solid var(--line); }
.rp-more summary { cursor: pointer; padding: 10px 0; font-size: 14px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; }
.rp-more summary::-webkit-details-marker { display: none; }
.rp-more summary::after { content: "더보기"; font-weight: 500; font-size: 12px; color: var(--grape); }
.rp-more[open] summary::after { content: "접기"; }
.rp-more > div { padding: 0 0 12px; }

/* 음식별 묶음 */
.fgroup { display: flex; flex-direction: column; gap: 8px; }
.fgroup + .fgroup { border-top: 1px dashed var(--line); padding-top: 12px; }
.fgroup-t { font-size: 13px; font-weight: 700; }
.fgroup-t.bad { color: #b8392f; } .fgroup-t.good { color: #2f7a57; }
.fgroup .iline .iline-text { font-size: 15px; font-weight: 700; }

/* 식사 추천 */
.seg-meal { grid-template-columns: repeat(4, 1fr); }
.menu-list { display: flex; flex-direction: column; gap: 10px; }
.iline.menu .iline-text { font-size: 15px; font-weight: 700; }
.again-item { background: var(--cream); border-radius: 14px; padding: 8px 10px; }
.menu-card { display: flex; align-items: center; gap: 12px; background: var(--paper); border-radius: 20px; padding: 14px 16px; text-decoration: none; }
.menu-card b { font-size: 14px; } .menu-card .muted { font-size: 13px; }

/* 츄츄지도 */
.foodmap { background: var(--paper); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.fm-head { display: flex; justify-content: space-between; align-items: baseline; }
.fm-head h3 { font-size: 18px; }
.fm-tier { background: var(--tt); border-radius: 16px; padding: 12px 12px 10px; display: flex; flex-direction: column; gap: 8px; }
.fm-label { display: flex; align-items: baseline; gap: 8px; }
.fm-label b { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: #fff; background: var(--tc); border-radius: 999px; padding: 3px 10px; }
.fm-label span { font-size: 13px; font-weight: 700; color: var(--tc); }
.fm-group { display: flex; flex-direction: column; gap: 4px; }
.fm-cat { font-size: 12px; color: var(--muted); }
.fm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fm-chip { background: var(--paper); border-radius: 999px; padding: 5px 12px; font-size: 14px; line-height: 1.45; word-break: keep-all; }
.fm-chip small { font-size: 12px; color: var(--muted); }
.fm-none { font-size: 13px; color: var(--muted); }
.fm-watch { font-size: 12px; color: var(--muted); }
.card .foodmap, .report .foodmap { padding: 0; }

/* 태어난 시간 드롭다운 */
.timepick { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.timepick select { background: var(--paper); }
.card .timepick select { background: var(--cream); }
.timepick.off select:not(:first-child) { opacity: .45; }

/* 먹은 음식 + 양 */
.food-rows { display: flex; flex-direction: column; gap: 6px; }
.food-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) 36px; gap: 6px; align-items: center; background: var(--cream); border-radius: 14px; padding: 4px 4px 4px 12px; }
.food-row .food-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet .food-row input { background: var(--paper); min-height: 38px; padding: 8px 10px; font-size: 14px; }
.food-del { width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; font-size: 16px; color: var(--muted); cursor: pointer; }
.ai-found { font-size: 12px; color: var(--grape); }
.sheet > * { flex-shrink: 0; }

/* 기록: 식사 / 몸 신호 나누기 */
.seg2tab { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #e9dfcc; border-radius: 14px; padding: 4px; }
.seg2tab button { font: inherit; font-size: 14px; border: 0; background: none; border-radius: 10px; padding: 9px 6px; cursor: pointer; color: var(--muted); }
.seg2tab button small { font-size: 11px; }
.seg2tab button[aria-selected="true"] { background: var(--paper); color: var(--ink); font-weight: 700; }
.seg2tab button .ok { color: #2f7a57; margin-left: 4px; }
.taste { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.taste button { font: inherit; font-size: 13px; border: 0; background: var(--cream); border-radius: 14px; padding: 8px 4px 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink); }
.taste button[aria-pressed="true"] { background: var(--grape); color: #fff; }
.tile .face { position: absolute; right: 3px; bottom: 3px; background: var(--paper); border-radius: 50%; width: 26px; height: 26px; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--paper); }
.meal-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.meal-tag { font-size: 12px; color: var(--grape); background: #efeefa; border-radius: 999px; padding: 2px 8px; }

/* 대시보드: 숨 쉴 틈 */
.points { padding: 20px 18px 18px; gap: 16px; }
.pt-kicker { font-size: 13px; }
.ai-insight { padding: 16px; gap: 10px; }
.ai-head { line-height: 1.65; }
.vbar { height: 10px; border-radius: 5px; }
.pt-more { margin-top: 0; }
.dash > .card { padding: 20px 18px; gap: 16px; }
.dash .vlegend { gap: 6px 14px; font-size: 13px; }
.board { gap: 8px; }
.bday { aspect-ratio: 1; padding: 0; align-items: center; justify-content: center; }
.bday .n { font-size: 14px; font-weight: 500; }
.bday:not(.f) { border-width: 1px; }
.bday:not(.f) .n { color: var(--faint); }
.bday.f .n { font-weight: 700; }
.bday .mk { right: 6px; top: 3px; }
.daydetail { gap: 16px; }
.daydetail h3 { font-size: 16px; }
.verdict { padding: 14px; }
.dd-meals { display: flex; flex-direction: column; gap: 16px; }
.dd-meal { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; }
.dd-label { font-size: 13px; color: var(--muted); line-height: 1.6; }
.dd-foods { font-size: 14px; line-height: 1.5; word-break: keep-all; }
.dd-tags { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.daydetail dl { gap: 10px 16px; }
.dd-more dl { margin-top: 12px; }
.dash .grid { border-spacing: 4px; }
.dash .grid th { font-size: 13px; }
.dash .grid thead th { font-size: 11px; }
.dash .grid td { width: 24px; min-width: 24px; height: 24px; }
.dash .cell { width: 24px; height: 24px; border-radius: 12px; font-size: 11px; line-height: 24px; border-width: 1px; }
.dash .foodmap { gap: 14px; }
.dash .fm-tier { padding: 14px; gap: 10px; }

/* 몸 신호 카드: 안내 문장은 제목 아래 한 줄로 */
#paneBody .card .hd { flex-wrap: wrap; row-gap: 2px; }
#paneBody .card .hd > span { white-space: nowrap; }
#paneBody .card .hd small { flex-basis: 100%; line-height: 1.5; }

/* 하루 사진 한 번에 올리기 */
.bulk-cta { display: flex; align-items: center; gap: 12px; background: var(--paper); border-radius: 20px; padding: 16px; cursor: pointer; }
.bulk-cta > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.bulk-cta b { font-size: 15px; font-weight: 700; }
.bulk-cta small { font-size: 13px; color: var(--muted); }
.bulk-list { display: flex; flex-direction: column; gap: 14px; }
.bulk-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
.bulk-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; display: block; }
.bulk-body { display: flex; flex-direction: column; gap: 6px; }
.bulk-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.bulk-time { font-size: 13px; color: var(--muted); }
.bulk-msg { font-size: 13px; line-height: 1.5; color: var(--grape); }
.bulk-msg.bad { color: #c2433a; }

/* 식사 탭 아래 버튼 두 개는 한 묶음으로 */
#toBody { margin-top: 10px; }
#paneMeal:not([hidden]) ~ .savebar { padding-top: 0; }

/* 홈: 아이 캐릭터가 주인공 */
.hero { --pt: max(20px, env(safe-area-inset-top, 0px)); --px: max(18px, env(safe-area-inset-left, 0px));
  background: var(--mint); margin: calc(-1 * var(--pt)) calc(-1 * var(--px)) 0; padding: var(--pt) var(--px) 24px; border-radius: 0 0 32px 32px; display: flex; flex-direction: column; gap: 6px; }
.hero .toplink { color: var(--ink); }
.hero-main { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-bubble { position: relative; background: var(--paper); border-radius: 18px; padding: 10px 18px; font-size: 14px; font-weight: 700; line-height: 1.4; margin-top: 6px; word-break: keep-all; }
.hero-bubble::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; background: var(--paper); transform: translateX(-50%) rotate(45deg); border-radius: 3px; }
.hero-char { border: 0; background: none; padding: 0; margin-top: 8px; cursor: pointer; display: block; line-height: 0; animation: heroFloat 3.2s ease-in-out infinite; }
.hero-char.hop { animation: heroHop .5s ease; }
@keyframes heroFloat { 50% { transform: translateY(-5px); } }
@keyframes heroHop { 30% { transform: translateY(-16px) scale(1.05); } 60% { transform: translateY(0) scale(.97); } }
@media (prefers-reduced-motion: reduce) { .hero-char, .hero-char.hop { animation: none; } }
.hero h1 { font-size: 26px; line-height: 1.2; margin-top: 4px; }
.hero-meta { font-size: 13px; color: #2f5b4e; margin-top: 2px; }
.hero .grains { width: 100%; margin-top: 16px; }
.hero-goal { font-size: 14px; font-weight: 700; margin-top: 10px; }
.hero .btn { width: 100%; margin-top: 14px; box-sizing: border-box; padding: 11px 16px; font-size: 14px; min-height: 0; }
.today-meals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tm { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); text-decoration: none; }
.tm-pic { position: relative; width: 100%; aspect-ratio: 1; border-radius: 14px; overflow: hidden; display: grid; place-items: center; border: 1.5px dashed #e2d6bf; box-sizing: border-box; }
.tm-pic.on { border: 0; background: var(--cream); }
.tm-pic svg { max-width: 60%; max-height: 60%; }
.tm-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
a.hero-goal { color: inherit; text-decoration: none; }

/* 날짜 묶음 넘기기 (30일이 넘은 뒤에 나와요) */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.pager button { font: inherit; font-size: 18px; line-height: 1; width: 36px; height: 36px; border: 0; border-radius: 12px; background: var(--paper); color: var(--ink); cursor: pointer; }
.card .pager button { background: var(--cream); }
.pager button:disabled { opacity: .35; cursor: default; }

/* 요금제 설명 */
.plan-cards { display: flex; flex-direction: column; gap: 12px; }
.plan-card { background: var(--paper); border-radius: 22px; padding: 20px 18px; display: flex; flex-direction: column; gap: 6px; }
.plan-card.plus { box-shadow: inset 0 0 0 2px var(--grape); }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-head h2 { font-size: 19px; }
.plan-card.plus h2 { color: var(--grape); }
.plan-price { font-size: 14px; font-weight: 700; }
.plan-card dl { margin: 8px 0 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; font-size: 14px; }
.plan-card dt { color: var(--muted); }
.plan-card dd { margin: 0; word-break: keep-all; }

/* 홈: 30일 챌린지 */
.hero-char { position: relative; }
.hero-char .crown { position: absolute; left: 50%; transform: translateX(-50%); }
.hero-char { z-index: 0; }
.hero-char::before { content: ""; position: absolute; left: 50%; top: 50%; width: 146px; height: 146px; border-radius: 50%; background: rgba(255,255,255,.42); transform: translate(-50%, -50%); z-index: -1; }
.hero-ch { width: 100%; margin-top: 14px; }
.hero-ch p { font-size: 14px; font-weight: 700; margin-top: 8px; }
.hero-ch .grains { margin-top: 0; }
.hero-start { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hero-start small { font-size: 13px; color: #2f5b4e; }
.hero .hero-start .btn { margin-top: 8px; }
.hero-char { margin-top: 16px; }
.hero h1 { margin-top: 14px; }

/* 홈 덜어내기: 차분한 바탕, 움직임은 누를 때만, 틀 안의 틀 없애기 */
.hero { background: #dcefe6; }
.hero-char { animation: none; }
.hero-char::before { content: none; }
.hero-meta { color: var(--muted); }
.hero-link { font: inherit; font-size: 14px; font-weight: 700; color: var(--grape); background: none; border: 0; padding: 4px 8px; cursor: pointer; }
.hero-start { margin-top: 10px; gap: 2px; }
.hero-start small { color: var(--muted); }
.hero .grains i { background: rgba(91, 91, 166, .16); }
.hero .grains i.f { background: var(--grape); }
#summary.points { background: none; padding: 0; gap: 10px; }
#summary .ai-insight { background: var(--paper); border-radius: 22px; padding: 20px 18px; }
#summary .ai-insight.locked { background: var(--paper); }
#summary .pt-more { padding-left: 18px; }
#summary .iline { padding: 0 18px; }

/* 홈 정돈: 내용 → 큰 버튼 → 글자 링크 순서, 링크 모양 통일 */
.hero h1 { font-size: 23px; margin-top: 10px; }
.hero .btn { margin-top: 16px; }
.hero-ch { margin-top: 12px; }
a.hero-goal, .hero-link { display: block; font-size: 14px; font-weight: 500; color: var(--grape); margin-top: 12px; padding: 0; }
.hero-start { margin-top: 8px; }
.hero-start small { margin-top: 2px; }
.hero-link { margin-top: 0; }

/* 휴대폰에서 입력칸을 누를 때 화면이 확대되지 않게 16px 은 유지해요 */
@media (pointer: coarse) { input[type="text"], input[type="password"], input[type="search"], input[type="date"], input[type="time"], textarea, select { font-size: 16px !important; } }
.hero .btn { padding: 11px 16px; }

/* ====== 새 디자인: 크림 바탕 + 올리브 강조 + 음식 친구들 ====== */
:root { --cream: #fbf7ef; --line: #ece5d8; --grape: #7e9160; --grape-dark: #6c7d52; --muted: #7b7787; --but: #fae6ad; --apr: #f9e3cf; --sage: #d5e6d6; --coral: #f8d3c4; }
.stack { display: flex; flex-direction: column; gap: 11px; }
.j { font-family: var(--font-display); font-weight: 400; }
.lab { font-size: 12px; font-weight: 700; color: var(--muted); }
.chip.plus { background: #e7edda; color: #5d6e43; }
.back { align-self: flex-start; }
.seg2tab, .seg3 { background: #efe8da; border-radius: 12px; padding: 3px; gap: 0; }
.seg2tab button, .seg3 button { font-size: 13px; padding: 7px 4px; border-radius: 9px; }
.card { border-radius: 18px; padding: 15px 16px; }

/* 탭바: 글자만 */
body.has-tabs { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
.tabbar { grid-template-columns: repeat(5, 1fr); padding: 0 4px env(safe-area-inset-bottom, 0px); height: calc(54px + env(safe-area-inset-bottom, 0px)); align-items: center; background: #fff; }
.tabbar a { font-size: 12px; color: var(--muted); padding: 10px 0; }
.tabbar a[aria-current="page"] { color: var(--ink); font-weight: 700; }

/* 홈 */
.today-card { background: var(--but); border-radius: 20px; padding: 15px; display: flex; flex-direction: column; gap: 12px; }
.tc-head { display: flex; justify-content: space-between; align-items: flex-start; height: 46px; }
.tc-head h2 { font-size: 18px; line-height: 1.25; }
.tc-head p { font-size: 12px; font-weight: 700; color: #8a7440; }
.tc-head > span { margin-top: -7px; line-height: 0; }
.today-card .btn, .stack > .btn, .savebar .btn { padding: 10px 14px; font-size: 14px; border-radius: 12px; }
.today-meals { gap: 7px; }
.tm { font-size: 12px; color: #6d6036; }
.tm-pic { border: 0; background: #fff6d9; color: #b7a671; font-size: 15px; border-radius: 13px; }
.tm-pic.on { background: var(--sage); color: #5f8a68; }
.food-banner { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-radius: 18px; padding: 12px 16px; min-height: 76px; text-decoration: none; color: var(--ink); cursor: pointer; overflow: hidden; }
.food-banner > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.food-banner > span:last-child { flex: none; line-height: 0; }
.food-banner small { font-size: 12px; color: #5b6a5e; }
.food-banner b { font-size: 14px; font-weight: 700; }
.food-banner b.j { font-size: 17px; font-weight: 400; }
.food-banner.sage { background: var(--sage); }
.food-banner.coral { background: var(--coral); }
.food-banner.butter { background: var(--but); }
.food-banner.butter small { color: #6d6036; }
.list-card { background: var(--paper); border-radius: 18px; padding: 3px 16px; }
.lrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; font: inherit; font-size: 14px; color: var(--ink); text-decoration: none; width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; text-align: left; }
.lrow:last-child { border-bottom: 0; }
.lrow.boxed { background: var(--paper); border: 0; border-radius: 18px; padding: 14px 16px; }
.lrow.boxed b { display: block; font-weight: 700; }
.lrow.boxed small { font-size: 12.5px; color: var(--muted); }

/* AI 인사이트 */
.ai-insight, #summary .ai-insight, #summary .ai-insight.locked, .ai-insight.locked { background: var(--apr); border-radius: 18px; padding: 16px 17px; position: relative; }
.ai-kicker, .ai-insight.locked .ai-kicker { color: #9a6f4a; }
.ai-rest { border-top-color: #eccdb2; }
.ai-blur i { background: #efd6c0; }
.ai-perk1, .ai-perks { color: #6b5848; }
.ai-insight .chip { background: #f3d3b9; color: #8a5f3e; }
.ai-insight .btn.small { background: var(--grape); }
.ai-insight.with-art { padding-right: 88px; }
.ai-art { position: absolute; right: 12px; top: 16px; line-height: 0; }
.ai-insight.with-art .ai-rest, .ai-insight.with-art .more-btn { margin-right: -70px; }
.ai-insight.with-art .ai-head { font-family: var(--font-display); font-size: 17px; line-height: 1.4; font-weight: 400; }
.more-btn { color: #8a5f3e; }

/* 챌린지 칸 */
.ch-card { flex-direction: row; justify-content: space-between; align-items: center; padding: 16px 17px; }
.ch-card .lab { color: #8a7440; }
.ch-card h2 { font-size: 23px; line-height: 1.25; }
.ch-card p:last-child { font-size: 13px; color: #6d6036; }
.ch-card > span { line-height: 0; }
.stamps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px 4px; justify-items: center; }
.st { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; line-height: 0; }
.st.e { border: 1.5px dashed #ddd3bf; color: #bdb3a0; font-size: 12px; line-height: 1; }
.ch-note { text-align: center; font-size: 13px; color: var(--muted); line-height: 1.7; }
.ch-note b { font-size: 14px; font-weight: 500; color: var(--ink); }

/* 기록 */
.days { display: flex; justify-content: space-between; }
.days .d { font: inherit; width: 40px; height: 50px; border: 0; border-radius: 12px; background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; padding: 0; }
.days .d small { font-size: 10px; color: var(--muted); font-weight: 400; }
.days .d.on { background: var(--grape); color: #fff; }
.days .d.on small { color: #eef2e2; }
.days .d.later { opacity: .45; }
.meal-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.meal-t { font: inherit; position: relative; overflow: hidden; height: 88px; border: 0; border-radius: 15px; background: var(--paper); padding: 11px 13px; text-align: left; cursor: pointer; color: var(--ink); display: flex; justify-content: space-between; gap: 8px; }
.mt-txt { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.mt-txt b { font-size: 14px; font-weight: 700; }
.mt-txt span { font-size: 12px; color: #5b5766; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meal-t img { width: 56px; height: 56px; flex: none; border-radius: 11px; object-fit: cover; align-self: center; }
#paneMeal:not([hidden]) ~ .savebar { padding-top: 0; }

/* 대시보드 */
.concl .iline { padding: 10px 0; border-top: 1px solid var(--line); }
.concl .iline:first-of-type { border-top: 0; }
.concl .iline-text { font-size: 14px; }
.concl .lab { margin-bottom: 4px; }
.folds { padding: 4px 16px; }
.folds .rp-more:last-child { border-bottom: 0; }
.rp-more summary { padding: 12px 0; font-weight: 500; }
.foodmap, .card .foodmap { background: none; padding: 0; gap: 0; }
.fm-tier { background: none; border-radius: 0; padding: 12px 0; gap: 3px; border-bottom: 1px solid var(--line); }
.fm-tier:first-child { padding-top: 0; }
.fm-tier:last-of-type { border-bottom: 0; padding-bottom: 0; }
.fm-label { display: flex; align-items: center; gap: 7px; }
.fm-label i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.fm-label b { background: none; color: var(--ink); font-size: 14px; letter-spacing: 0; padding: 0; }
.fm-label span { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.fm-foods { font-size: 13px; margin-left: 16px; word-break: keep-all; }
.fm-foods small { font-size: 12.5px; color: var(--muted); }
.fm-none { margin-left: 16px; }
.fm-watch { margin-top: 10px; }
.dash .vlegend, .card > .vlegend { font-size: 12px; margin-bottom: 14px; gap: 4px 10px; }
.dd-art { position: absolute; right: 14px; top: 12px; line-height: 0; }
.daydetail .verdict { background: none; padding: 0; }
.daydetail .verdict .sw { display: none; }
.daydetail .verdict b { font-size: 13px; font-weight: 500; color: #55695a; }
#summary .iline { background: var(--paper); border-radius: 18px; padding: 13px 16px; }
#summary .iline.head .iline-text { font-family: var(--font-body); font-size: 14px; font-weight: 700; line-height: 1.5; }
.days .d.on.later { opacity: 1; }
.avatar { background: var(--sage); }
#summary .ai-insight .iline { background: none; padding: 0; }
.ai-insight .iline .iline-text, .ai-insight .iline.head .iline-text, .ai-insight .iline.bad .iline-text { font-family: var(--font-body); font-size: 15px; font-weight: 500; line-height: 1.55; color: var(--ink); }
.ai-upsell { font-size: 13px; font-weight: 500; color: #8a5f3e; text-decoration: none; }
.iline.menu .iline-text { font-family: var(--font-body); font-size: 15px; font-weight: 500; line-height: 1.6; word-break: keep-all; }

/* 약관 */
.legal { font-size: 13.5px; line-height: 1.75; word-break: keep-all; }
.legal h3 { font-size: 15px; margin: 18px 0 4px; }
.legal h3:first-of-type { margin-top: 12px; }
.legal ul { margin: 0 0 12px; padding-left: 18px; }
.legal .rp-table { width: 100%; font-size: 12.5px; margin-bottom: 12px; border-collapse: collapse; }
.legal .rp-table th, .legal .rp-table td { border-bottom: 1px solid var(--line); padding: 6px 6px 6px 0; text-align: left; vertical-align: top; }
.legal mark { background: var(--but); border-radius: 4px; padding: 0 3px; }
.consent { border: 0; padding: 12px 14px; margin: 0; background: var(--paper); border-radius: 14px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--ink); }
.consent label { display: flex; align-items: center; gap: 8px; }
.consent .all { font-weight: 700; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.consent input { width: 18px; height: 18px; accent-color: var(--grape); flex: none; }
.consent a { color: inherit; }
.legal-links { text-align: center; font-size: 12px; color: var(--muted); }
.legal-links a { color: inherit; }
.consent label { display: block; padding-left: 26px; text-indent: -26px; line-height: 1.5; }
.consent input { vertical-align: -4px; margin: 0 8px 0 0; }

/* 아이가 둘 이상일 때 고르는 줄 */
.kidbar { display: flex; flex-wrap: wrap; gap: 6px; }
.kidbar a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; background: #efe8da; color: var(--muted); text-decoration: none; }
.kidbar a[aria-current] { background: #7e9160; color: #fff; }
