@charset "UTF-8";

:root {
  color-scheme: light;
  --bg: #f7f3ea;
  --surface: #fffefa;
  --ink: #352b25;
  --muted: #746a60;
  --secondary: #74614f;
  --coffee: #6e4934;
  --coffee-dark: #4b3024;
  --line: #eae3d9;
  --tint: #eee4d8;
  --green: #52633f;
  --green-bg: #edf1e8;
  --amber: #80581c;
  --amber-bg: #f9efdb;
  --red: #a44737;
  --radius: 22px;
  --page-gutter: 22px;
  /* Relative sizes follow browser text preferences; small screens reflow. */
  --text-meta: .875rem;
  --text-label: .9375rem;
  --text-body: 1.0625rem;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: var(--text-body); line-height: 1.65; }
button, input, select { font: inherit; touch-action: manipulation; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; color: inherit; }
button:disabled { cursor: wait; opacity: .6; }
a { color: var(--coffee); }
svg { display: block; flex-shrink: 0; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #a88358; outline-offset: 4px; }
input:focus-visible, select:focus-visible { outline: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.4; }
input, select { min-width: 0; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 10px; background: var(--surface); border-radius: 10px; }
.skip-link:focus { top: 16px; }
.loading { padding: 80px 24px; text-align: center; color: var(--muted); }

/* App chrome */
.shell {
  max-width: 540px;
  min-height: 100svh;
  margin: 0 auto;
  padding: 0 max(var(--page-gutter), env(safe-area-inset-right, 0px)) calc(96px + 3rem + env(safe-area-inset-bottom, 0px)) max(var(--page-gutter), env(safe-area-inset-left, 0px));
}
.topbar { display: flex; align-items: center; justify-content: space-between; padding: calc(20px + env(safe-area-inset-top, 0px)) 0 24px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-height: 44px; }
.brand-mark { width: 38px; height: 38px; background: var(--coffee-dark); color: #f9f0e3; display: grid; place-items: center; border-radius: 13px; }
.brand-name { font-size: 1.125rem; font-weight: 650; letter-spacing: .02em; }
.icon-btn { display: flex; align-items: center; justify-content: center; background: var(--surface); width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; flex-shrink: 0; }
.icon-btn:hover { background: var(--tint); }
.page-heading { margin: 0 1px 24px; }
.page-heading h1 { font-size: 1.75rem; letter-spacing: -.025em; font-weight: 650; }
.page-heading p { font-size: var(--text-label); color: var(--muted); margin-top: 8px; }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; margin: 0 2px 12px; gap: 6px 12px; }
.section-title { display: flex; align-items: center; gap: 9px; }
.section-heading h2 { font-size: 1.1875rem; font-weight: 650; }
.section-num { font-size: var(--text-meta); color: var(--secondary); background: #ebe3d7; padding: 2px 6px; border-radius: 6px; font-weight: 600; }
.section-caption { font-size: var(--text-meta); color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }

/* Form: inputs remain at least 16px, including optional fields. */
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); gap: 18px 14px; }
.fields > div { min-width: 0; }
.field-label { font-size: var(--text-label); color: var(--secondary); display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-weight: 550; }
.field-label svg { color: var(--secondary); }
.input-wrap { display: flex; align-items: center; gap: 6px; position: relative; min-height: 64px; background: #f8f5ee; border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s, box-shadow .15s; }
.input-wrap:focus-within { border-color: #a27b54; box-shadow: 0 0 0 3px #a27b5412; }
.input-wrap input { border: 0; background: transparent; width: 100%; padding: 13px 0 13px 14px; font-size: 1.875rem; line-height: 1.25; color: var(--ink); font-weight: 600; letter-spacing: -.02em; }
.input-wrap input::placeholder { color: #766653; font-weight: 450; }
.input-wrap .unit { padding-right: 13px; font-size: var(--text-label); color: var(--secondary); }
.input-wrap .unit:empty { padding-right: 8px; }
.input-wrap .text-input { font-size: 1.125rem; letter-spacing: 0; font-weight: 500; }
.field-error { color: var(--red); font-size: var(--text-meta); margin-top: 6px; }
.input-wrap:has([aria-invalid=true]) { border-color: var(--red); }
.ratio-live { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 11px 13px; background: #ede6da; border-radius: 12px; margin: 18px 0; gap: 6px 12px; color: var(--secondary); font-size: var(--text-meta); }
.ratio-value { color: var(--coffee); font-weight: 650; font-size: 1.0625rem; letter-spacing: .02em; white-space: nowrap; }
.hint { font-size: var(--text-meta); color: var(--muted); line-height: 1.7; margin-top: 16px; display: flex; align-items: flex-start; gap: 7px; }
.hint svg { margin-top: 5px; }
.subtle-line { height: 1px; background: var(--line); margin: 18px 0 0; }
.advanced > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding-top: 8px; font-size: 1rem; color: var(--coffee); cursor: pointer; }
.advanced > summary::-webkit-details-marker { display: none; }
.optional-label { font-size: var(--text-meta); color: var(--muted); }
.advanced[open] > summary svg { transform: rotate(180deg); }
.advanced .fields { padding-top: 16px; }
.small-field label { display: block; font-size: var(--text-label); color: var(--secondary); margin-bottom: 7px; }
.small-field input, .small-field select { width: 100%; min-height: 48px; border-radius: 10px; border: 1px solid var(--line); background: #f8f5ef; padding: 11px 10px; color: var(--ink); font-size: 1rem; appearance: none; -webkit-appearance: none; line-height: 1.5; }
.small-field input::placeholder { color: #766653; opacity: 1; }
.small-field select { padding-right: 26px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%2374614f' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 7px center; background-size: 15px; }
.small-field input:focus, .small-field select:focus { border-color: #a27b54; box-shadow: 0 0 0 3px #a27b5412; }
.small-field.wide { grid-column: 1 / -1; }
.advanced-info { font-size: var(--text-meta); color: var(--muted); padding-top: 16px; }
.text-btn { background: none; color: var(--coffee); padding: 8px 0; font-size: var(--text-label); min-height: 44px; display: inline-flex; gap: 5px; align-items: center; }
.muted-btn { color: var(--secondary); }

/* Taste feedback */
.rating-label, .choice-title { font-size: var(--text-label); color: var(--secondary); }
.rating-label { margin-bottom: 12px; }
.ratings { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 3rem), 1fr)); gap: 6px; }
.rating-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; background: transparent; padding: 10px 2px; border: 1px solid transparent; border-radius: 13px; min-width: 0; min-height: 86px; transition: .15s; }
.rating-btn svg { color: #8b755e; }
.rating-btn span { font-size: var(--text-meta); color: var(--secondary); line-height: 1.5; text-align: center; overflow-wrap: anywhere; }
.rating-btn[aria-pressed=true] { background: #efe5d8; border-color: #d8c2aa; }
.rating-btn[aria-pressed=true] svg, .rating-btn[aria-pressed=true] span { color: var(--coffee); font-weight: 600; }
.choice-group { margin-top: 22px; }
.choice-title { margin-bottom: 10px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: #f8f5ee; border: 1px solid #ede6dc; padding: 9px 13px; min-height: 44px; border-radius: 11px; color: var(--secondary); font-size: var(--text-label); font-weight: 500; transition: .15s; }
.chip[aria-pressed=true] { background: #eae0d2; border-color: #c8ad90; color: #63422f; }
.taste-note { font-size: var(--text-meta); color: var(--muted); margin-top: 20px; }
.primary, .secondary { display: flex; align-items: center; justify-content: center; text-align: center; gap: 10px; width: 100%; text-decoration: none; padding: 13px 16px; overflow-wrap: anywhere; }
.primary { min-height: 56px; background: var(--coffee-dark); color: #fff9f0; font-size: 1.0625rem; font-weight: 600; border-radius: 17px; box-shadow: 0 6px 16px #4b302414; }
.primary:hover { background: #63432f; }
.secondary { min-height: 50px; border: 1px solid #d7c7b3; border-radius: 14px; background: var(--surface); color: var(--coffee); font-size: 1rem; font-weight: 550; }
.save-caption { text-align: center; font-size: var(--text-meta); color: var(--secondary); margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 6px; }
.form-status { background: #fbeee7; color: #93513e; padding: 14px; border-radius: 12px; font-size: var(--text-label); margin-bottom: 16px; }
.next-target { background: var(--green-bg); border: 1px solid #dce4d3; border-radius: 17px; padding: 16px; margin-bottom: 24px; color: #536548; font-size: var(--text-label); }
.next-target strong { font-size: 1rem; display: block; margin-bottom: 4px; }
.next-target .text-btn { padding: 8px 0; }
.offline-banner { display: flex; align-items: center; gap: 8px; background: #eaeedf; color: #54613f; border-radius: 13px; padding: 12px 14px; font-size: var(--text-meta); margin-bottom: 18px; }

/* Solid cards, with glass reserved for navigation. */
.tabbar { position: fixed; z-index: 10; left: 50%; transform: translateX(-50%); bottom: calc(17px + env(safe-area-inset-bottom, 0px)); width: calc(100% - 44px); max-width: 390px; display: flex; align-items: center; gap: 5px; padding: 6px; background: #f5f0e7; border: 1px solid #fffefa; border-radius: 25px; box-shadow: 0 8px 30px #53402c16, 0 1px 3px #fff8f299 inset; }
.tab { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 9px; min-height: 52px; flex: 1; padding: 8px; border-radius: 19px; background: transparent; color: var(--secondary); text-decoration: none; font-size: var(--text-label); transition: .2s; }
.tab[aria-current=page] { background: #fffefa; color: var(--coffee-dark); font-weight: 650; box-shadow: 0 2px 8px #4b30240a; }
.tab-count { min-width: 22px; background: #e8dccb; color: #805c3c; border-radius: 8px; padding: 0 6px; font-size: var(--text-meta); text-align: center; }
.keyboard-open .tabbar { display: none; }
@supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
  .tabbar { background: #f6f0e1b3; backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3); }
}
.reduce-transparency .tabbar { background: #f5f0e7; backdrop-filter: none; -webkit-backdrop-filter: none; }
.reduce-transparency .sheet::backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; }

/* Analysis */
.back-btn { display: flex; align-items: center; gap: 5px; background: none; min-height: 44px; color: var(--secondary); font-size: var(--text-label); padding: 0; margin: 0 0 12px; }
.result-summary { background: #e8edde; border: 1px solid #d8e1cb; border-radius: 24px; padding: 22px; margin-bottom: 20px; }
.summary-icon { width: 38px; height: 38px; border-radius: 12px; background: #dbe4cf; color: #52633f; display: grid; place-items: center; margin-bottom: 14px; }
.result-summary h1 { font-size: 1.5rem; font-weight: 650; letter-spacing: -.02em; line-height: 1.5; }
.saved-mark { display: flex; align-items: flex-start; gap: 6px; font-size: var(--text-meta); color: #5f6d4b; margin-top: 14px; }
.saved-mark svg { margin-top: 5px; }
.score-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: 12px; margin-bottom: 24px; }
.score-card { min-width: 0; border: 1px solid var(--line); border-radius: 22px; padding: 18px; background: var(--surface); }
.score-label { font-size: var(--text-label); color: var(--muted); display: flex; align-items: center; gap: 6px; }
.score-num { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px; font-size: 2.5rem; line-height: 1.2; font-weight: 600; letter-spacing: -.04em; margin-top: 12px; color: var(--coffee-dark); }
.score-num small { font-size: var(--text-label); color: var(--secondary); letter-spacing: 0; font-weight: 400; }
.score-note { font-size: var(--text-meta); color: var(--muted); margin-top: 10px; }
.satisfaction-display { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; font-size: 1.125rem; font-weight: 600; color: var(--coffee); }
.satisfaction-display svg { color: var(--coffee); }
.mini-stars { display: flex; gap: 4px; margin-top: 12px; color: #98734d; }
.mini-stars .empty { color: #e3d8c9; }
.dimensions { padding: 4px 0; }
.dimension { padding: 18px 0; border-bottom: 1px solid var(--line); }
.dimension:first-child { padding-top: 0; }
.dimension:last-child { border-bottom: 0; padding-bottom: 0; }
.dimension-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; font-size: 1rem; }
.dimension-head strong { font-weight: 550; }
.dimension-value { font-size: var(--text-label); color: var(--muted); }
.dimension-bar { height: 6px; background: #eee8df; border-radius: 4px; overflow: hidden; margin: 12px 0 8px; }
.dimension-bar > span { display: block; height: 100%; width: var(--score, 0%); background: #889172; border-radius: 4px; }
.dimension.check .dimension-bar > span { background: #b89564; }
.dimension.unknown .dimension-bar { background: repeating-linear-gradient(90deg, #e9e3d9 0, #e9e3d9 7px, transparent 7px, transparent 11px); }
.dimension-note { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; color: var(--muted); font-size: var(--text-meta); }
.dimension-note > span:first-child { min-width: 0; flex: 1; }
.status-pill { flex-shrink: 0; font-size: var(--text-meta); color: var(--green); background: var(--green-bg); padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.status-pill.check { color: var(--amber); background: var(--amber-bg); }
.status-pill.unknown { color: #77614a; background: #f0eae0; }
.flow-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 12px; padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line); font-size: var(--text-label); }
.flow-row span { color: var(--muted); }
.reference-disclaimer { font-size: var(--text-meta); color: var(--muted); padding-top: 18px; line-height: 1.75; }
.advice-card { border: 1px solid #e4d6c5; background: #f0e7d9; border-radius: 24px; padding: 22px; margin-bottom: 24px; }
.advice-top { display: flex; align-items: center; gap: 7px; color: #6c5b4a; font-size: var(--text-meta); font-weight: 600; margin-bottom: 12px; }
.advice-card h2 { font-size: 1.375rem; font-weight: 650; color: #503723; }
.advice-action { font-size: 1.0625rem; color: #6c5b4a; margin-top: 10px; line-height: 1.8; }
.keep-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.keep-list span { font-size: var(--text-meta); color: #6c5b4a; border: 1px solid #d9c9b3; border-radius: 8px; padding: 5px 9px; background: #f8f3eb66; overflow-wrap: anywhere; }
.why > summary { font-size: var(--text-label); color: #6c5b4a; list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; min-height: 44px; }
.why > summary::-webkit-details-marker { display: none; }
.why p { font-size: var(--text-label); color: #6c5b4a; line-height: 1.8; margin: 4px 0 12px; }
.action-stack { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.recipe-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 5.5rem), 1fr)); gap: 12px; text-align: center; padding: 16px 12px; background: #eee7dc; border-radius: 15px; margin-bottom: 24px; }
.recipe-strip div { min-width: 0; }
.recipe-strip strong { display: block; color: #6f5137; font-size: 1.125rem; overflow-wrap: anywhere; }
.recipe-strip small { font-size: var(--text-meta); color: var(--secondary); }
.learn > summary { list-style: none; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 1rem; cursor: pointer; }
.learn > summary::-webkit-details-marker { display: none; }
.learn-item { padding-top: 20px; }
.learn-item h3 { font-size: 1rem; font-weight: 600; }
.learn-item p { font-size: var(--text-label); color: var(--muted); margin-top: 6px; line-height: 1.8; }
.source-links { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding-top: 16px; font-size: var(--text-meta); }
.source-links a { display: flex; align-items: center; min-height: 44px; padding: 8px 0; }

/* History */
.history-count { color: var(--secondary); font-size: var(--text-meta); margin-bottom: 14px; }
.history-list { display: flex; flex-direction: column; gap: 14px; }
.history-card { background: var(--surface); border: 1px solid var(--line); border-radius: 21px; text-align: left; padding: 20px 18px; width: 100%; display: block; }
.history-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--secondary); font-size: var(--text-meta); margin-bottom: 12px; }
.history-top .dot { width: 5px; height: 5px; background: #d2b99d; border-radius: 50%; flex-shrink: 0; }
.history-bean { font-size: 1rem; font-weight: 500; color: var(--coffee); overflow-wrap: anywhere; }
.history-metrics { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; margin: 8px 0 14px; }
.history-metrics strong { font-size: 1.5rem; font-weight: 550; letter-spacing: -.02em; }
.history-metrics small { font-size: var(--text-meta); color: var(--secondary); }
.history-metrics .metric-sep { color: #a2886d; margin: 0 2px; }
.history-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.history-tags { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.history-tag { color: var(--secondary); font-size: var(--text-meta); padding: 4px 8px; background: #f2eadf; border-radius: 7px; overflow-wrap: anywhere; }
.history-tag.good { background: var(--green-bg); color: var(--green); }
.history-arrow { color: var(--secondary); }
.empty-state { text-align: center; padding: 36px 22px 28px; background: var(--surface); border: 1px dashed #dfd1be; border-radius: 25px; }
.empty-art { width: 88px; height: 88px; margin: 0 auto 20px; background: #f0e7db; border-radius: 50%; display: grid; place-items: center; color: #8b6b49; }
.empty-state h2 { font-size: 1.25rem; font-weight: 600; }
.empty-state p { font-size: var(--text-label); color: var(--muted); line-height: 1.8; margin: 12px 0 24px; }
.history-footer { text-align: center; color: var(--muted); font-size: var(--text-meta); margin-top: 24px; }
.danger-btn { display: flex; align-items: center; justify-content: center; gap: 6px; color: #92503f; font-size: var(--text-label); background: none; min-height: 44px; width: 100%; margin-top: 10px; padding: 10px; }

/* Sheets and status */
.toast { position: fixed; bottom: calc(84px + 3rem + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translate(-50%, 15px); background: #423427eb; color: #fff9f1; padding: 12px 18px; border-radius: 15px; box-shadow: 0 5px 18px #332c2424; max-width: calc(100% - 40px); width: max-content; z-index: 60; font-size: var(--text-label); opacity: 0; visibility: hidden; transition: .2s; display: flex; align-items: center; gap: 12px; }
.toast.visible { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.toast button { background: none; color: #ead2ae; font-weight: 600; padding: 8px; min-height: 44px; min-width: 44px; flex-shrink: 0; }
.sheet { position: fixed; inset: auto 0 0; margin: 0 auto; width: 100%; max-width: 540px; max-height: 90svh; border: 0; border-radius: 28px 28px 0 0; background: var(--bg); color: var(--ink); padding: 0 max(22px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(22px, env(safe-area-inset-left, 0px)); box-shadow: 0 -10px 70px #33281825; overflow-y: auto; overscroll-behavior: contain; }
.sheet::backdrop { background: #33281e60; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet-handle { width: 32px; height: 4px; border-radius: 3px; background: #cbbfaf; margin: 12px auto 18px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.sheet-head h2 { font-size: 1.375rem; font-weight: 650; }
.sheet .icon-btn { background: #ebe4d9; border: 0; }
.settings-group { border: 1px solid var(--line); background: var(--surface); border-radius: 19px; padding: 0 16px; margin-bottom: 16px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; background: none; }
.setting-row > div { min-width: 0; }
.setting-row:last-child { border-bottom: 0; }
.setting-name { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 500; }
.setting-name svg { color: var(--secondary); }
.setting-desc { font-size: var(--text-meta); line-height: 1.7; color: var(--muted); margin: 6px 0 0 29px; }
.toggle { position: relative; display: inline-flex; flex-shrink: 0; width: 49px; height: 44px; align-items: center; justify-content: center; }
.toggle input { position: relative; appearance: none; -webkit-appearance: none; width: 45px; height: 27px; border-radius: 20px; background: #d4cbbb; cursor: pointer; margin: 0; transition: .2s; }
.toggle input:checked { background: #738361; }
.toggle input::after { content: ""; width: 21px; height: 21px; background: #fffefa; position: absolute; top: 3px; left: 3px; border-radius: 50%; box-shadow: 0 1px 4px #30261720; transition: .2s; }
.toggle input:checked::after { transform: translateX(18px); }
.toggle input:focus-visible { outline: 3px solid #a88358; outline-offset: 4px; }
.setting-note { font-size: var(--text-meta); color: var(--secondary); line-height: 1.8; margin: 18px 0; }
.install-steps { counter-reset: steps; display: flex; flex-direction: column; gap: 16px; padding: 0; list-style: none; margin: 16px 0 22px; }
.install-steps li { display: flex; gap: 10px; font-size: 1rem; align-items: flex-start; }
.install-steps li::before { counter-increment: steps; content: counter(steps); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: #e9decf; color: var(--coffee); flex-shrink: 0; font-size: var(--text-meta); }
.settings-footer { text-align: center; font-size: var(--text-meta); color: var(--secondary); margin-top: 22px; }
.sheet .ratings { margin-bottom: 16px; }
.sheet .primary { margin-top: 24px; }
.sheet-error { color: var(--red); font-size: var(--text-label); padding: 12px 0; }
.network-warning { background: #f7eddf; padding: 14px; border-radius: 12px; color: var(--secondary); font-size: var(--text-meta); }
.update-banner { background: var(--surface); border: 1px solid #e1d4c0; border-radius: 15px; padding: 14px; margin-bottom: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; font-size: var(--text-label); color: var(--secondary); }
.update-banner button { min-height: 44px; border-radius: 9px; background: #ede2d1; color: var(--coffee); padding: 8px 12px; }

@media (min-width: 700px) {
  :root { --page-gutter: 28px; }
  body { background: radial-gradient(ellipse at 70% 10%, #eee1cb77, transparent 50%), var(--bg); }
  .topbar { padding-top: 32px; }
  .sheet { inset: auto 0 24px; max-height: 86svh; border-radius: 28px; padding-bottom: 25px; }
  .tabbar { bottom: 24px; }
  .panel { padding: 22px; }
}
@media (max-width: 360px) {
  :root { --page-gutter: 16px; }
  .panel, .advice-card, .result-summary { padding: 16px; }
  .ratings { grid-template-columns: repeat(auto-fit, minmax(min(100%, 4.5rem), 1fr)); }
  .score-card { padding: 16px; }
  .recipe-strip { grid-template-columns: 1fr; text-align: left; }
  .recipe-strip div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .tabbar { background: #f5f0e7; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .sheet::backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (forced-colors: active) {
  .dimension-bar > span { background: Highlight; }
  .chip[aria-pressed=true], .rating-btn[aria-pressed=true] { border: 2px solid Highlight; }
}
