:root {
  color-scheme: light;
  --paper: #f6f6ef;
  --card: #fffef8;
  --ink: #1f302a;
  --muted: #5d6c61;
  --line: #dce1d4;
  --forest: #234b3d;
  --lime: #d3e8a0;
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans CJK KR", "Malgun Gothic", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--ink); background: var(--paper); word-break: keep-all; -webkit-font-smoothing: antialiased; }
h1,h2,h3,p { margin: 0; }
h1,h2,h3 { line-height: 1.3; }
h1 { font-size: clamp(30px, 3vw, 42px); font-weight: 750; letter-spacing: -.07em; }
h2 { font-size: 20px; font-weight: 720; letter-spacing: -.055em; }
button,input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, input:focus-visible, a:focus-visible, .date-field:focus-within { outline: 3px solid #967221; outline-offset: 3px; }
button { -webkit-tap-highlight-color: transparent; }
.skip { position: fixed; z-index: 8; top: -80px; left: 12px; background: white; color: var(--forest); padding: 12px; }
.skip:focus { top: 8px; }
.topbar { border-bottom: 1px solid var(--line); background: #fcfcf6; }
.bar-inner,.page { width: min(100% - 64px, 1120px); margin-inline: auto; }
.bar-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.wordmark { font: 750 24px/1 -apple-system,BlinkMacSystemFont,Arial,sans-serif; letter-spacing: -.075em; }
.brand-mark { width: 32px; height: 32px; background: var(--forest); color: #e0edae; border-radius: 50%; display: inline-flex; justify-content: center; align-items: center; gap: 2px; transform: rotate(-14deg); }
.brand-mark i { width: 3px; height: 11px; background: currentColor; border-radius: 3px; }
.brand-mark i:nth-child(2) { height: 18px; }
.brand-mark i:last-child { height: 14px; }
.brand-sub { margin-left: 4px; padding-left: 14px; border-left: 1px solid #c7cdbf; color: var(--muted); font-size: 13px; font-weight: 600; }
.logout,.quiet-link { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 620; }
.logout:hover,.quiet-link:hover { color: var(--forest); text-decoration: underline; }
.logout svg,.icon-button svg,.date-field svg,.lock-mark svg,.meal-icon svg,.empty-icon svg { height: 18px; width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.page { padding-block: 44px 68px; }
.day-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 25px; }
.eyebrow { color: var(--muted); font-size: 14px; display: block; font-weight: 580; margin-bottom: 5px; }
.date-controls,.date-group { display: flex; align-items: center; }
.date-controls { gap: 8px; }
.today-btn,.date-group { border: 1px solid #cfd5c7; background: var(--card); border-radius: 11px; height: 43px; }
.today-btn { padding: 0 14px; font-weight: 650; font-size: 13px; }
.today-btn:disabled { background: transparent; color: #526455; }
.today-btn:hover:not(:disabled),.icon-button:hover,.date-field:hover { background: #f0f2e8; }
.icon-button { border: 0; background: transparent; display: grid; place-items: center; width: 38px; height: 100%; padding: 0; border-radius: 10px; }
.icon-button svg { height: 16px; width: 16px; }
.date-field { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; height: 100%; min-width: 106px; font-size: 13px; font-weight: 650; }
.date-field svg { height: 14px; width: 14px; }
.date-field input { all: unset; position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.date-field input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.notice { border: 1px solid var(--line); background: var(--card); padding: 22px; border-radius: 16px; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.notice.error { color: #893d2d; border-color: #d9bcb2; }
.summary-grid,.detail-grid { display: grid; gap: 18px; align-items: stretch; }
.summary-grid { grid-template-columns: 1.33fr 1fr; }
.detail-grid { grid-template-columns: minmax(0,1.54fr) minmax(0,1fr); margin-top: 19px; align-items: start; }
.panel,.energy-card { border-radius: 22px; }
.panel { background: var(--card); border: 1px solid var(--line); padding: 25px 26px; min-width: 0; }
.energy-card { padding: 31px 32px; min-height: 214px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--forest); color: #fffdf0; position: relative; overflow: hidden; isolation: isolate; }
.energy-card::before { content: ""; position: absolute; z-index: -1; pointer-events: none; width: 310px; height: 310px; border-radius: 50%; border: 1px solid #ffffff0c; box-shadow: 0 0 0 19px #ffffff04,0 0 0 38px #ffffff03,0 0 0 57px #ffffff02; right: -126px; top: -162px; }
.energy-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.energy-estimate { border: 1px solid #77917b; color: #e3ecce; font-size: 10px; padding: 1px 6px; border-radius: 5px; line-height: 1.55; }
.energy-card h2 { font-size: 16px; color: #e6eedf; font-weight: 580; letter-spacing: -.04em; }
.energy-number { display: flex; align-items: baseline; gap: 7px; margin: 6px 0 9px; font: 600 19px/1.2 -apple-system,BlinkMacSystemFont,Arial,sans-serif; }
.energy-number strong { font-size: clamp(43px,4.9vw,70px); font-weight: 620; letter-spacing: -.064em; }
.energy-number span { color: #d8e6c9; font-weight: 500; }
.energy-caption { color: #dae5d6; font-size: 13px; line-height: 1.6; }
.ring { flex: 0 0 clamp(102px,10.3vw,138px); aspect-ratio: 1; position: relative; }
.ring svg,.ring-text { width: 100%; height: 100%; }
.ring-track,.ring-level { fill: none; stroke-width: 8; }
.ring-track { stroke: #527061; }
.ring-level { stroke: var(--lime); }
.ring-level.over { stroke: #ffbf97; }
.ring-text { display: flex; align-items: center; justify-content: center; flex-direction: column; position: absolute; inset: 0; gap: 2px; }
.ring-text b { font: 650 clamp(20px,2.1vw,29px)/1.1 -apple-system,BlinkMacSystemFont,Arial,sans-serif; letter-spacing: -.05em; }
.ring-text small { font-size: 10px; color: #d6e1d4; }
.macros { display: flex; flex-direction: column; justify-content: center; }
.macro-list { display: grid; gap: 12px; margin-top: 17px; }
.macro-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 5px; font-size: 12px; }
.macro-label { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.macro-delta { color: #48624b; font-size: 11px; font-weight: 600; white-space: nowrap; }
.macro-delta.excess { color: #97502e; }
.macro-line > span { flex-shrink: 0; }
.macro-line strong { font-size: 13px; }
.macro-line span { color: var(--muted); }
.macro-line b { color: var(--ink); font-variant-numeric: tabular-nums; }
.macro-row svg { width: 100%; height: 5px; display: block; overflow: visible; border-radius: 3px; }
.fill-carb { fill: #b9954b; } .fill-protein { fill: #73977b; } .fill-fat { fill: #b77a64; }
.macro-row .track { fill: #e9ebdf; }
.macro-row.no-goal .track { fill: #f0f0e7; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.count-tag { font-size: 12px; color: #46604d; background: #edf2e6; padding: 3px 9px; border-radius: 20px; font-weight: 650; }
.diary .section-head { padding-bottom: 13px; }
.meal { padding-block: 17px; border-top: 1px solid var(--line); }
.meal:first-child { border: 0; }
.meal:last-child { padding-bottom: 0; }
.meal-head { display: flex; align-items: center; gap: 11px; }
.meal-icon,.empty-icon,.lock-mark { display: grid; place-items: center; flex: 0 0 auto; color: #486a50; background: #edf1e5; }
.meal-icon { border-radius: 13px; width: 38px; height: 38px; }
.meal-icon.breakfast { color: #846020; background: #f7efd8; }
.meal-icon.dinner { color: #53617e; background: #eaf0f3; }
.meal-icon.snack { color: #835d46; background: #f7eee3; }
.meal-head h3 { font-size: 16px; font-weight: 685; letter-spacing: -.045em; }
.meal-time { font-size: 12px; margin-top: 1px; color: var(--muted); }
.meal-energy { font-size: 16px; font-weight: 700; margin-left: auto; white-space: nowrap; }
.meal-energy small { font-size: 12px; font-weight: 500; color: var(--muted); }
.food-list { display: grid; gap: 5px; margin: 10px 0 0 49px; list-style: none; padding: 0; }
.food-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 10px; align-items: baseline; font-size: 13px; }
.food-name { word-break: break-word; overflow-wrap: anywhere; }
.food-grams { color: var(--muted); white-space: nowrap; }
.estimate { font-size: 10px; font-weight: 620; padding: 1px 5px; border-radius: 4px; color: #775723; background: #f5ecd3; margin-left: 5px; white-space: nowrap; }
.calendar-state { margin: 9px 0 0 49px; color: var(--muted); font-size: 11px; display: flex; align-items: center; gap: 5px; }
.calendar-state::before { content: ""; width: 5px; height: 5px; border-radius: 100%; background: #969f91; }
.calendar-state.synced::before { background: #618067; }
.calendar-state.failed::before,.calendar-state.pending::before { background: #a87938; }
.empty { text-align: center; color: var(--muted); padding: 27px 5px 22px; line-height: 1.6; font-size: 13px; }
.empty-icon,.lock-mark { width: 44px; height: 44px; border-radius: 15px; }
.empty-icon { margin: 0 auto 9px; }
.empty strong { display: block; color: var(--ink); font-size: 15px; font-weight: 650; margin-bottom: 3px; }
.unit,.week-range { color: var(--muted); font-size: 12px; }
.week-range { margin-top: 5px; }
.week-chart { display: flex; gap: 3px; align-items: stretch; margin-top: 21px; }
.chart-day { min-width: 0; display: flex; flex: 1; align-items: center; flex-direction: column; gap: 3px; background: transparent; border: 0; border-radius: 6px; padding: 4px 0; color: var(--muted); }
.chart-day:hover,.chart-day:focus-visible { background: #eff1e7; }
.chart-day svg { display: block; width: 100%; height: 61px; }
.chart-day .bar { fill: #a8bf9e; }
.chart-day.active .bar { fill: var(--forest); }
.chart-day .no-data { fill: #d7dbce; }
.bar-value { font: 550 10px/1.15 -apple-system,BlinkMacSystemFont,Arial,sans-serif; }
.bar-day { font-size: 11px; font-weight: 550; }
.chart-day.active .bar-day { background: var(--forest); color: white; border-radius: 12px; padding: 2px 7px; }
.chart-day:not(.active) .bar-day { padding: 2px 0; }
.week-stats { border-top: 1px solid var(--line); padding-top: 15px; margin-top: 15px; display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.week-stats b { color: var(--ink); }
.login-body { display: grid; place-items: center; min-height: 100svh; padding: 30px; }
.login-shell { width: min(100%,900px); min-height: 492px; display: grid; grid-template-columns: 1.05fr 1fr; border: 1px solid var(--line); border-radius: 26px; overflow: hidden; background: var(--card); }
.login-art { background: #244a3a; color: #f7fae9; padding: 32px; position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; }
.brand-light .brand-mark { background: #dcebb2; color: #294832; }
.art-caption { font-size: 27px; font-weight: 650; letter-spacing: -.07em; }
.plate-scene { position: absolute; z-index: -1; left: 50%; top: 50%; width: 75%; aspect-ratio: 1.48; transform: translate(-50%,-45%) rotate(-14deg); color: #bdd29d; }
.plate { position: absolute; inset: 1% 14%; border: 1px solid #bad09d; height: 96%; aspect-ratio: 1; border-radius: 50%; background: repeating-radial-gradient(circle at 50% 50%, transparent 0 6px, #9eb99244 7px 7.5px, transparent 8px 9px); }
.plate i { position: absolute; inset: 11%; border-radius: 50%; border: 1px solid #bdcf99; background: #2a4e3c; box-shadow: inset 0 0 0 12px #294c3b; }
.plate i::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; border: 1px solid #9eb99255; }
.fork,.spoon { position: absolute; width: 8%; top: 15%; height: 73%; }
.fork { left: 0; } .spoon { right: 1%; }
.fork::after,.spoon::after { content: ""; position: absolute; width: 4px; top: 27%; bottom: 0; left: 49%; border: 1px solid currentColor; border-radius: 2px 2px 6px 6px; }
.fork i { position: absolute; height: 29%; width: 68%; border-radius: 0 0 40% 40%; border: 1px solid currentColor; border-top: 0; left: 24%; background: repeating-linear-gradient(90deg, transparent 0 24%, #b4c89b 26% 31%, transparent 34% 40%); }
.spoon i { position: absolute; height: 32%; width: 91%; border: 1px solid currentColor; border-radius: 55% 55% 45% 45%; left: 8%; background: #2a4d3c; z-index: 1; }
.login-form-panel { display: grid; place-items: center; padding: 42px; }
.login-fields { width: 100%; max-width: 310px; }
.lock-mark { margin-bottom: 18px; }
.login-fields h1 { font-size: 31px; }
.login-intro { color: var(--muted); font-size: 14px; margin: 7px 0 29px; }
#login-form { display: grid; gap: 7px; }
#login-form label { font-size: 13px; font-weight: 650; }
#password { width: 100%; font-size: 16px; border: 1px solid #c5cdbd; background: #fcfcf6; border-radius: 9px; min-height: 45px; padding: 8px 12px; }
#login-submit { display: flex; justify-content: center; gap: 8px; padding: 10px; font-size: 14px; font-weight: 650; margin-top: 9px; min-height: 45px; border: 1px solid var(--forest); background: var(--forest); color: white; border-radius: 9px; }
#login-submit:hover { background: #163b2f; }
#login-submit:disabled { opacity: .7; }
#login-error { font-size: 12px; color: #893d2d; }
@media(max-width:850px) {
  .page,.bar-inner { width: calc(100% - 40px); }
  .energy-card,.panel { padding: 22px; }
  .summary-grid { grid-template-columns: 1.1fr 1fr; }
  .detail-grid { grid-template-columns: minmax(0,1.36fr) minmax(0,1fr); }
  .ring { flex-basis: 94px; }
}
@media(max-width:680px) {
  .bar-inner,.page { width: calc(100% - 36px); }
  .bar-inner { min-height: 59px; }
  .wordmark {font-size: 21px;}
  .brand-mark {width: 29px; height: 29px;}
  .brand-sub { margin-left: 1px; padding-left: 9px; font-size: 11px; }
  .logout {font-size: 12px;}
  .page { padding-block: 24px 40px; }
  .day-heading { flex-wrap: wrap; gap: 13px; margin-bottom: 15px; align-items: center; }
  .eyebrow { font-size: 12px; margin-bottom: 4px; }
  .date-controls { margin-left: auto; }
  .summary-grid,.detail-grid { grid-template-columns: minmax(0,1fr); gap: 13px; }
  .detail-grid { margin-top: 13px; }
  .energy-card,.panel { border-radius: 18px; padding: 19px 20px; }
  .energy-card { min-height: 163px; }
  .energy-number strong { font-size: 53px; }
  .ring {flex-basis: 104px;}
  .macro-list {gap: 10px; margin-top: 13px;}
  .macro-line {margin-bottom: 4px;}
  .week {grid-row: auto;}
  .login-body {padding: 18px;}
  .login-shell {max-width: 430px; min-height: 0; grid-template-columns: 1fr;}
  .login-art {height: 142px; padding: 20px 24px;}
  .art-caption {font-size: 21px;}
  .plate-scene {width: 190px; left: auto; right: -12px; top: 58%; transform: translateY(-50%) rotate(-15deg);}
  .login-form-panel {padding: 29px 26px 34px;}
  .login-intro {margin-bottom: 20px;}
  .lock-mark {display: none;}
}
@media(max-width:440px) {
  .date-controls { margin-left: 0; }
  .day-heading { display: grid; grid-template-columns: 1fr; }
  .date-controls { justify-content: space-between; }
  .today-btn,.date-group {height: 39px;}
  .date-field {min-width: 113px;}
}
@media(max-width:335px) {
  .brand-sub {display: none;}
  .ring {flex-basis: 75px;}
  .energy-number strong {font-size: 42px;}
  .energy-card,.panel {padding: 17px;}
}
