:root {
  --bg: #f4f3ef;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink2: #52514e;
  --muted: #898781;
  --line: #e1e0d9;
  --accent: #eb6834;
  --accent-dark: #c9501f;
  --blue: #2a78d6;
  --good: #0ca30c;
  --good-text: #006300;
  --warn: #fab219;
  --bad: #d03b3b;
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; }
h2 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
h3 { font-size: 15px; margin-bottom: 8px; }
h3 small { color: var(--muted); font-weight: 400; margin-left: 6px; font-size: 12px; }
.hint { color: var(--ink2); margin: 6px 0 14px; font-size: 13px; }
.empty { color: var(--muted); font-style: italic; margin: 6px 0; }

/* header */
.top {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
  padding: 18px 28px; background: #1d1c1a; color: #f0efec;
}
.brand { display: flex; gap: 14px; align-items: center; }
.logo { font-size: 36px; }
.top h1 { font-size: 22px; }
.top p { margin: 2px 0 0; color: #c3c2b7; font-size: 13px; }
.presets { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.presets span { color: #c3c2b7; font-size: 13px; }
.presets button {
  border: 1px solid #3a3936; background: #2c2b28; color: #f0efec; padding: 7px 12px; border-radius: 999px; font-size: 13px;
}
.presets button:hover { background: #3a3936; }
.presets .ghost { background: transparent; }

/* layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; padding: 20px 28px; max-width: 1400px; margin: 0 auto; }
.card { background: var(--surface); border-radius: var(--radius); padding: 18px 20px; box-shadow: 0 1px 0 rgba(11,11,11,0.06), 0 0 0 1px rgba(11,11,11,0.06); }
.inputs { display: flex; flex-direction: column; gap: 16px; }
.step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: white; font-size: 14px; }

/* profile */
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 14px; }
.field label { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink2); margin-bottom: 4px; font-weight: 600; }
.unit-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: white; overflow: hidden; }
.unit-input input { border: 0; padding: 8px 10px; width: 100%; outline: none; font-size: 15px; }
.unit-input span { padding: 0 10px; color: var(--muted); font-size: 12px; }
.unit-input:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(42,120,214,0.15); }
.link { background: none; border: 0; color: var(--blue); padding: 0; font-size: 12px; text-decoration: underline; font-weight: 400; }
.seg-toggle { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: white; }
.seg-toggle button { flex: 1; border: 0; background: transparent; padding: 8px 6px; }
.seg-toggle button.on { background: var(--ink); color: white; }
.skin-pick { display: flex; gap: 8px; padding-top: 4px; }
.skin-pick button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid white; box-shadow: 0 0 0 1px var(--line); }
.skin-pick button.on { box-shadow: 0 0 0 2px var(--ink); }
.profile-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 16px; }
.profile-stats div, .tl-stats div { background: var(--bg); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; }
.profile-stats span, .tl-stats span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.profile-stats b, .tl-stats b { font-size: 17px; font-weight: 600; }
.profile-stats em, .tl-stats em { font-style: normal; font-size: 12px; color: var(--ink2); }

/* diet */
/* the day as a vertical timeline */
.slots { position: relative; display: flex; flex-direction: column; }
.slots::before { content: ""; position: absolute; left: 19px; top: 20px; bottom: 30px; width: 2px; background: var(--line); }
.block { display: grid; grid-template-columns: 40px 1fr; gap: 12px; position: relative; }
.block-dot { width: 40px; height: 40px; border-radius: 50%; background: white; border: 2px solid var(--line); display: grid; place-items: center; font-size: 19px; z-index: 1; }
.block.meal .block-dot { border-color: var(--accent); }
.block-body { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: white; }
.block.snack .block-body { background: #fbfaf6; border-style: dashed; }
.block.snack .block-dot { width: 32px; height: 32px; margin: 4px; font-size: 15px; }
.slot-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; margin-bottom: 8px; gap: 10px; }
.slot-head small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.slot-head em { font-style: normal; color: var(--muted); font-weight: 400; font-size: 12px; }
.head-right { display: flex; gap: 10px; align-items: baseline; white-space: nowrap; }
.del-block { border: 0; background: none; color: var(--muted); font-size: 12px; text-decoration: underline; padding: 0; }
.del-block:hover { color: var(--bad); }
.block-cols { display: grid; grid-template-columns: 3fr 2fr; gap: 12px; }
.col { display: flex; flex-direction: column; min-width: 0; }
.col-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 6px; }
.col ul { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.col select.portion, .col select.freq { max-width: 110px; }
.insert { padding: 6px 0 10px 52px; }
.add-snack { border: 1px dashed var(--muted); background: transparent; border-radius: 999px; padding: 4px 12px; font-size: 12px; color: var(--ink2); }
.add-snack:hover { background: white; border-color: var(--accent); color: var(--accent-dark); }
.col li { display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px; align-items: center; padding: 6px 8px; background: var(--bg); border-radius: 8px; }
.food-name { font-size: 13px; line-height: 1.25; min-width: 0; }
.food-name small { display: block; color: var(--muted); font-size: 11px; }
.tag { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.tag.whole { background: var(--good); }
.tag.mixed { background: var(--warn); }
.tag.ultra { background: var(--bad); }
.col select, .act select { border: 1px solid var(--line); border-radius: 7px; padding: 4px 4px; background: white; font-size: 12px; max-width: 120px; }
.col select.add { max-width: none; width: 100%; padding: 7px 8px; font-size: 13px; color: var(--ink2); border-style: dashed; }
.del { border: 0; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; padding: 0 4px; }
.del:hover { color: var(--bad); }

/* jobs */
.jobs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.job { text-align: left; border: 2px solid var(--line); background: white; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.job.on { border-color: var(--accent); background: #fff6f1; }
.job-icon { font-size: 26px; }
.job small { color: var(--ink2); font-size: 12px; }
.job em { font-style: normal; color: var(--muted); font-size: 12px; margin-top: 4px; }

/* activities */
.act { display: grid; grid-template-columns: minmax(170px, 1.4fr) 90px auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; background: var(--bg); border-radius: 10px; margin-bottom: 8px; }
.act select { max-width: none; padding: 6px; font-size: 13px; }
.days { display: flex; gap: 4px; }
.days button { width: 34px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: white; font-size: 12px; }
.days button.on { background: var(--blue); color: white; border-color: var(--blue); }
.act-kcal { color: var(--ink2); font-size: 12px; text-align: right; }
.act-total { color: var(--ink2); font-size: 13px; margin: 4px 2px 10px; }
.add-act { border: 1px dashed var(--muted); background: transparent; border-radius: 10px; padding: 8px 14px; color: var(--ink2); }
.add-act:hover { background: white; }

.simulate {
  background: var(--accent); color: white; border: 0; border-radius: 14px; padding: 16px; font-size: 18px; font-weight: 700;
  box-shadow: 0 6px 20px rgba(235,104,52,0.35); transition: transform 0.1s;
}
.simulate:hover { background: var(--accent-dark); }
.simulate:active { transform: scale(0.99); }
.simulate.stale::after { content: "  · plan changed, run again"; font-weight: 400; font-size: 14px; opacity: 0.9; }

/* live panel */
.sticky { position: sticky; top: 16px; }
.live-char { display: flex; flex-direction: column; align-items: center; }
.live-tag { text-align: center; }
.live-tag { font-size: 13px; color: var(--ink2); margin-top: -4px; }
.energy { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.en-row { display: flex; justify-content: space-between; padding: 3px 0; }
.en-row b { font-variant-numeric: tabular-nums; }
.en-row.sub { font-size: 12px; color: var(--muted); padding-top: 0; }
.en-row.total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 6px; font-weight: 600; }
.en-row.deficit b { color: var(--blue); }
.en-row.surplus b { color: var(--bad); }
.en-note { font-size: 11px; color: var(--muted); }
.macro { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.macro-title { font-size: 12px; color: var(--ink2); font-weight: 600; margin-bottom: 6px; }
.macro-bar { display: flex; gap: 2px; height: 14px; border-radius: 4px; overflow: hidden; }
.macro-bar span { display: block; height: 100%; }
.macro-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; margin-top: 8px; font-size: 12px; color: var(--ink2); }
.macro-legend i, .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.macro-legend b { color: var(--ink); }
.macro-extra { display: flex; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--ink2); }
.macro-extra b { color: var(--ink); }

/* results */
.results { max-width: 1400px; margin: 0 auto; padding: 8px 28px 30px; display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 10px; }
.results-head h2 { font-size: 22px; margin-bottom: 10px; }
.verdict { display: flex; gap: 16px; align-items: stretch; flex-wrap: wrap; }
.v-main { flex: 1; background: #1d1c1a; color: #f0efec; border-radius: var(--radius); padding: 18px 22px; min-width: 280px; }
.v-head { font-size: 26px; }
.v-head b { color: #ffb48f; }
.v-sub { color: #c3c2b7; margin-top: 4px; font-size: 15px; }
.v-sub b { color: white; }
.v-score { background: var(--surface); border-radius: var(--radius); padding: 14px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 150px; box-shadow: 0 0 0 1px rgba(11,11,11,0.06); }
.v-score span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.v-score b { font-size: 44px; line-height: 1.1; }
.v-score em { font-style: normal; font-size: 13px; font-weight: 600; }
.v-score.good em { color: var(--good-text); }
.v-score.ok em { color: #9a6a00; }
.v-score.bad em { color: var(--bad); }

.snapshots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.snap { margin: 0; display: flex; flex-direction: column; align-items: center; background: linear-gradient(#f7f6f2, #fcfcfb); border-radius: 12px; padding: 10px 6px; }
.snap-fig { width: 100%; }
.snap figcaption { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.snap figcaption b { font-size: 15px; }
.snap figcaption span { color: var(--ink2); font-size: 13px; }
.snap em { font-style: normal; font-weight: 600; margin-left: 4px; }
.snap em.down { color: var(--blue); }
.snap em.up { color: var(--bad); }
.snap em.gain { color: var(--good-text); }
.snap em.loss { color: var(--bad); }

.timeline { display: grid; grid-template-columns: minmax(320px, 460px) 1fr; gap: 24px; align-items: center; }
.tl-row { display: flex; gap: 12px; align-items: center; margin: 8px 0 16px; }
.play { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ink); color: white; font-size: 16px; flex-shrink: 0; }
#tl { flex: 1; accent-color: var(--accent); height: 6px; }
.tl-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.charts .wide { grid-column: 1 / -1; }
.chart { position: relative; }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-svg .tick { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart-svg .dlabel { font-size: 12px; fill: var(--ink); font-weight: 600; }
.chart-svg .inlabel { font-size: 11px; fill: white; font-weight: 600; pointer-events: none; }
.chart-svg .rowlabel { font-size: 13px; fill: var(--ink2); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink2); margin-bottom: 6px; }
.tip {
  position: absolute; display: none; pointer-events: none; background: #1d1c1a; color: #f0efec; font-size: 12px;
  padding: 6px 9px; border-radius: 8px; white-space: nowrap; z-index: 5; box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
.tip .sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.badge { background: #fff1e9; border: 1px solid #f6c9b3; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.badge.muted { background: var(--bg); border-color: var(--line); color: var(--muted); font-weight: 400; }
.tips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tips li { display: flex; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--bg); border-left: 4px solid var(--line); }
.tips li.bad { border-left-color: var(--bad); }
.tips li.warn { border-left-color: var(--warn); }
.tips li.good { border-left-color: var(--good); }
.about summary { cursor: pointer; font-weight: 600; }
.about ul { color: var(--ink2); padding-left: 18px; margin-bottom: 0; }
.about li { margin: 4px 0; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 10px 0 30px; }

@media (max-width: 1200px) {
  .block-cols { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .charts { grid-template-columns: 1fr; }
  .snapshots { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: 1fr; }
  .act { grid-template-columns: 1fr 90px auto; }
  .days { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .jobs { grid-template-columns: 1fr; }
  .slots::before { left: 15px; }
  .block { grid-template-columns: 32px 1fr; gap: 8px; }
  .block-dot { width: 32px; height: 32px; font-size: 15px; }
  .block.snack .block-dot { width: 28px; height: 28px; margin: 2px; }
  .insert { padding-left: 40px; }
  .slot-head { flex-wrap: wrap; }
  .col li { grid-template-columns: 1fr 1fr auto; }
  .col li .food-name { grid-column: 1 / -1; }
  .col select, .col select.portion, .col select.freq { max-width: none; }
  .profile-stats, .tl-stats { grid-template-columns: repeat(2, 1fr); }
  .top, .layout, .results { padding-left: 14px; padding-right: 14px; }
}

/* body measurements */
.table-wrap { overflow-x: auto; }
.measure { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 13px; }
.measure th { text-align: right; font-weight: 600; color: var(--muted); font-size: 12px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.measure th:first-child, .measure td:first-child { text-align: left; }
.measure td { text-align: right; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.measure td.down { color: var(--blue); font-weight: 600; }
.measure td.up { color: var(--bad); font-weight: 600; }
.live-tag small { color: var(--muted); }

/* experience toggle & muscle card */
.wide-field { grid-column: span 2; }
#exp button { font-size: 13px; }
.muscle-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; }
.mrow { display: grid; grid-template-columns: 170px 1fr 80px; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--line); }
.mrow b { text-align: right; font-variant-numeric: tabular-nums; }
.mrow.net { border-bottom: 0; font-weight: 600; }
.mbar { position: relative; height: 14px; }
.mbar::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--muted); }
.mbar span { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.mbar .pos { background: #2a78d6; border-radius: 0 4px 4px 0; }
.mbar .neg { background: #e34948; border-radius: 4px 0 0 4px; }
.regions { display: flex; gap: 18px; margin-top: 10px; font-size: 13px; color: var(--ink2); }
.regions b { color: var(--ink); }
.pot-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ink2); }
.pot-head b { color: var(--ink); font-size: 15px; }
.meter { height: 10px; background: #cde2fb; border-radius: 5px; margin: 8px 0; overflow: hidden; }
.meter span { display: block; height: 100%; background: #2a78d6; border-radius: 5px; }
.meter.small { height: 6px; margin: 5px 0; }
.pot-foot { font-size: 13px; color: var(--ink2); }
.pot-foot b { color: var(--ink); }
.limits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.limit { background: var(--bg); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; font-size: 12px; border-top: 3px solid var(--line); }
.limit span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.limit b { font-size: 14px; }
.limit em { font-style: normal; color: var(--ink2); }
.limit.good { border-top-color: var(--good); }
.limit.ok { border-top-color: var(--warn); }
.limit.bad { border-top-color: var(--bad); }
@media (max-width: 1000px) {
  .muscle-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wide-field { grid-column: 1 / -1; }
  .limits { grid-template-columns: 1fr; }
  .mrow { grid-template-columns: 1fr 1fr 64px; }
}

/* let grid columns shrink below their content width on small screens */
.layout > *, .charts > *, .timeline > *, .muscle-grid > * { min-width: 0; }
@media (max-width: 640px) {
  .days { flex-wrap: wrap; }
  .days button { width: 30px; }
  .act { grid-template-columns: 1fr auto auto; }
  .act .act-type { grid-column: 1 / -1; }
  .act .act-min { order: 1; }
  .act .act-kcal { order: 2; text-align: left; }
  .act .del { order: 3; }
  .act .days { order: 4; grid-column: 1 / -1; }
  .profile-grid { grid-template-columns: 1fr 1fr; }
}

/* 3D body */
.is3d { position: relative; }
.v3d-stage { width: 100%; height: 100%; }
.body3d-canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
.body3d-canvas:active { cursor: grabbing; }
.v3d-ctrl { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); display: flex; gap: 4px; }
.v3d-ctrl button { border: 1px solid var(--line); background: rgba(255,255,255,0.85); border-radius: 999px; font-size: 11px; padding: 3px 9px; color: var(--ink2); }
.v3d-ctrl button:hover { background: #fff; color: var(--ink); }
#live-figure.is3d { height: 360px; }
#timeline-char.is3d { height: 500px; }
.snap3d { display: grid; grid-template-columns: 1fr 1fr; width: 100%; min-height: 200px; }
.snap3d img { width: 100%; height: auto; display: block; }
.snap3d.loading { background: linear-gradient(90deg, #f1efea, #f8f7f3, #f1efea); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; aspect-ratio: 600 / 560; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* body type, belly, muscle groups */
.type-field { grid-column: 1 / -1; }
.type-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.type-pick button { text-align: left; border: 2px solid var(--line); background: white; border-radius: 10px; padding: 8px 10px; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; }
.type-pick button span { font-size: 22px; grid-row: span 2; }
.type-pick button small { color: var(--ink2); font-size: 11px; line-height: 1.25; }
.type-pick button.on { border-color: var(--accent); background: #fff6f1; }
#belly { width: 100%; accent-color: var(--accent); margin-top: 8px; }
.belly-val { font-weight: 400; color: var(--muted); }
.act-kcal small { display: block; color: var(--muted); font-size: 11px; }
.groups-title { margin-top: 14px; font-size: 12px; font-weight: 600; color: var(--ink2); text-transform: uppercase; letter-spacing: 0.04em; }
.groups { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.grow-row { display: grid; grid-template-columns: 120px 1fr 64px 70px; gap: 8px; align-items: center; font-size: 13px; }
.grow-row b { text-align: right; font-variant-numeric: tabular-nums; }
.grow-row em { font-style: normal; color: var(--ink2); font-size: 12px; }
.grow-row.idle { color: var(--muted); }
.gbar { height: 10px; background: #f3e1dc; border-radius: 5px; overflow: hidden; }
.gbar span { display: block; height: 100%; background: #db2a1a; border-radius: 5px; }
.heat-btn.on { background: #db2a1a !important; color: white !important; border-color: #db2a1a !important; }
.measure tr.whtr td.risk { color: #9a6a00; font-weight: 600; }
.measure tr.whtr td.risk-high { color: var(--bad); font-weight: 600; }
.measure tr.whtr small { color: var(--muted); font-weight: 400; margin-left: 4px; }
@media (max-width: 640px) {
  .type-pick { grid-template-columns: 1fr; }
  .grow-row { grid-template-columns: 1fr 1fr 60px; }
  .grow-row em { display: none; }
}

/* cartoon character */
.is3d { background: radial-gradient(ellipse at 50% 38%, #fff8ef 0%, #fdeedd 55%, #f6e3cf 100%); border-radius: 12px; }
.snap3d { background: radial-gradient(ellipse at 50% 40%, #fff8ef 0%, #f9e9d8 100%); border-radius: 10px; }
.snap3d.pop { animation: pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes pop { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.v3d-ctrl button { background: rgba(255,255,255,0.9); }
.no3d { padding: 30px 16px; text-align: center; color: var(--ink2); }
@media (prefers-reduced-motion: reduce) { .snap3d.pop { animation: none; } }

/* appearance pickers */
.look-field { grid-column: 1 / -1; }
.look-hint { font-weight: 400; color: var(--muted); }
.look-grid { display: grid; grid-template-columns: 1.2fr 1.2fr 0.8fr 0.9fr; gap: 12px; }
.look-label { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.look-pick { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: white; }
.look-pick button { flex: 1; border: 0; background: transparent; padding: 6px 4px; font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.look-pick button span { font-size: 18px; line-height: 1.1; }
.look-pick button + button { border-left: 1px solid var(--line); }
.look-pick button.on { background: #fff1e9; box-shadow: inset 0 0 0 2px var(--accent); }
.swatch-pick { display: flex; gap: 8px; padding-top: 6px; }
.swatch-pick button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid white; box-shadow: 0 0 0 1px var(--line); }
.swatch-pick button.on { box-shadow: 0 0 0 2px var(--ink); }
@media (max-width: 900px) { .look-grid { grid-template-columns: 1fr 1fr; } }

/* food & drink icons */
.food-name { display: flex; align-items: center; gap: 8px; }
.food-icon { flex: none; width: 30px; height: 30px; border-radius: 8px; background: white; box-shadow: 0 0 0 1px var(--line); display: grid; place-items: center; font-size: 17px; line-height: 1; }
.food-text { min-width: 0; }
.col select.add { font-size: 14px; }

/* support button */
footer p { margin: 6px 0; }
footer .support { color: var(--ink2); font-size: 13px; margin-bottom: 14px; }
/* "Buy me a coffee": the app's own orange, in the header and the footer */
.coffee { display: inline-block; padding: 10px 18px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; box-shadow: 0 4px 14px rgba(235, 104, 52, 0.35); transition: transform 0.12s, background 0.12s; }
.coffee:hover { background: var(--accent-dark); transform: translateY(-1px); }
.coffee:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
footer .coffee { margin-top: 8px; }
.coffee-top { padding: 7px 14px; font-size: 13px; margin-left: 6px; box-shadow: none; }
@media (max-width: 640px) { .coffee-top { margin-left: 0; } }
