/* «Мой прогресс», achievements and «Мои данные» (decision 2026-11-10). */
:root {
  --prg-ok: #2f8a57; --prg-ok-bg: #eaf6ef; --prg-warn: #b06a0c; --prg-warn-bg: #fff3e0;
  --prg-over: #e37478; --prg-good: #62ac81; --prg-low: #9ccbb0; --prg-empty: #e3e6ec; --prg-tile: rgba(15, 23, 42, 0.035);
  --prg-gold: #f2a93b;
}
body.dark-theme {
  --prg-ok: #5fcf8f; --prg-ok-bg: rgba(95, 207, 143, 0.12); --prg-warn: #f2b45a; --prg-warn-bg: rgba(242, 180, 90, 0.12);
  --prg-empty: rgba(255, 255, 255, 0.12); --prg-tile: rgba(255, 255, 255, 0.05);
}

.prg { display: flex; flex-direction: column; gap: 16px; padding-bottom: 32px; }
.prg-card { border: 1px solid var(--border-color); border-radius: 20px; padding: 18px 18px 20px; background: var(--bg-card, var(--bg-panel)); }
.prg-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.prg-card-head h3 { margin: 0; font-size: 16px; font-weight: 650; color: var(--text-primary); }
.prg-muted { color: var(--text-secondary); font-size: 13px; }
.prg-small { font-size: 12px; }
.prg-strong { color: var(--text-primary); }
.prg-ok { color: var(--prg-ok); font-weight: 600; }
.prg-warn { color: var(--prg-warn); font-weight: 600; }
.prg-down { color: var(--prg-ok); }
.prg-up { color: var(--prg-warn); }
.prg p { margin: 12px 0; line-height: 1.45; }
.prg-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.prg-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.prg-tile { background: var(--prg-tile); border-radius: 18px; padding: 16px; min-width: 0; }
.prg-label { color: var(--text-secondary); font-size: 13px; margin-bottom: 6px; }
.prg-value { font-size: 26px; font-weight: 750; line-height: 1.15; color: var(--text-primary); }
.prg-value small, .prg-value-sm small { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.prg-value-sm { font-size: 19px; font-weight: 700; color: var(--text-primary); }
.prg-sub { font-size: 12px; line-height: 1.4; color: var(--text-secondary); margin-top: 6px; }
.prg-row { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 12px; margin-top: 12px; font-size: 14px; line-height: 1.4; flex-wrap: wrap; }
.prg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 9px 14px; border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-panel); color: var(--primary); font: 500 13px/1.2 var(--font-family); cursor: pointer; margin-top: 14px; }
.prg-btn:hover { border-color: var(--primary); }
.prg-btn-dark { background: var(--text-primary); color: var(--bg-main); border-color: var(--text-primary); width: 100%; }
.prg-btn-dark:hover { opacity: .9; }
.prg-btn-wide { width: 100%; }
.prg-link, .prg-link-inline { border: 0; background: none; padding: 0; color: var(--primary); font: 500 13px/1.3 var(--font-family); cursor: pointer; text-align: left; }
.prg-link { display: block; margin-top: 16px; }
/* «Своя дата» faster than food alone (decision 2026-11-11): a calm note with the AI trainer link. */
.prg-training-note { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--primary) 9%, transparent); font-size: 13px; line-height: 1.45; }
.prg-training-note p { margin: 0; }
.prg-training-note .prg-link { margin-top: 8px; }
.prg-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.prg-actions .prg-btn { margin-top: 8px; }
.prg-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 8px; background: var(--prg-ok-bg); color: var(--prg-ok); vertical-align: middle; }
.prg-tag-grey { background: var(--prg-tile); color: var(--text-secondary); }
.prg-note { font-size: 12px; color: var(--prg-warn); background: var(--prg-warn-bg); border-radius: 10px; padding: 8px 10px; }

/* Streak */
.prg-streak { text-align: center; }
.prg-flame { font-size: 28px; line-height: 1; }
.prg-streak .prg-value { color: var(--prg-gold); }
.prg-streak-off .prg-flame { filter: grayscale(1); opacity: .45; }
.prg-streak-off .prg-value { color: var(--text-secondary); }
.prg-dots { display: flex; justify-content: space-between; gap: 2px; margin-top: 12px; }
.prg-dot { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--text-secondary); }
.prg-dot b { width: 18px; height: 18px; border-radius: 50%; background: var(--prg-empty); color: #fff; font-size: 10px; line-height: 18px; text-align: center; }
.prg-dot.on b { background: var(--prg-gold); }
.prg-dot.today:not(.on) b { background: transparent; border: 2px dashed var(--prg-gold); line-height: 14px; }

/* Goal card */
.prg-bar { height: 8px; border-radius: 6px; background: var(--prg-empty); overflow: hidden; margin: 16px 0 6px; }
.prg-bar b { display: block; height: 100%; border-radius: 6px; background: var(--prg-good); transition: width .4s ease; }
.prg-bar-warn b { background: var(--prg-gold); }
.prg-bar-grey b { background: #b9bec8; }
.prg-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.prg-pill { padding: 8px 12px; border: 1px solid var(--border-color); border-radius: 999px; background: var(--bg-panel); color: var(--text-primary); font: 500 13px var(--font-family); cursor: pointer; }
.prg-pill:hover { border-color: var(--primary); color: var(--primary); }
.prg-choice { display: block; width: 100%; text-align: left; border: 1px solid var(--border-color); border-radius: 14px; padding: 12px 14px; margin-top: 10px; background: var(--bg-panel); color: var(--text-primary); font: 400 13px/1.35 var(--font-family); cursor: pointer; }
.prg-choice span:last-child { display: block; color: var(--text-secondary); font-size: 12px; margin-top: 2px; }
.prg-choice.on { border-color: var(--prg-good); background: var(--prg-ok-bg); }
.prg-choice:hover { border-color: var(--primary); }
.prg-card-win { background: linear-gradient(180deg, var(--prg-ok-bg), transparent 60%), var(--bg-card, var(--bg-panel)); }
.prg-win { text-align: center; }
.prg-win h3 { margin: 6px 0 0; font-size: 17px; }
/* The way as a picture (user, 2026-11-11): down when losing, up when gaining, vertical marks
   at the start and the finish, the person as a dot at today and the current weight. */
.prg-path { position: relative; height: 172px; margin: 14px 0 4px; }
.prg-path svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.prg-path line { vector-effect: non-scaling-stroke; stroke-linecap: round; }
.prg-path-tick { stroke: var(--text-secondary); stroke-opacity: .45; stroke-width: 1.5; stroke-dasharray: 4 4; }
.prg-path-plan { stroke: var(--text-secondary); stroke-opacity: .25; stroke-width: 1.5; stroke-dasharray: 2 5; }
.prg-path polyline { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.prg-path-real { stroke: var(--prg-good); stroke-width: 4; }
.prg-path-future { stroke: var(--primary); stroke-width: 3; stroke-dasharray: 6 6; opacity: .75; }
.prg-path-dot { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--prg-good); transform: translate(-50%, -50%); opacity: .7; }
.prg-path-kg { position: absolute; font-size: 11px; font-weight: 700; color: var(--text-secondary); white-space: nowrap; }
.prg-path-above { transform: translateY(calc(-100% - 10px)); }
.prg-path-below { transform: translateY(10px); }
.prg-path-rung { position: absolute; left: 8%; right: 8%; height: 0; border-top: 1px dashed var(--border-color); }
.prg-path-rung small { position: absolute; left: 100%; top: 0; transform: translate(6px, -50%); font-size: 10px; color: var(--text-secondary); }
.prg-path-rung.done small { color: var(--prg-good); font-weight: 700; }
.prg-path-finish { position: absolute; width: 14px; height: 14px; transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid var(--text-secondary); background: repeating-conic-gradient(var(--text-primary) 0 25%, var(--bg-panel) 0 50%) 50% / 6px 6px; }
.prg-path-me { position: absolute; z-index: 1; transform: translate(-50%, -50%); }
/* Just the smiley, its centre on the point (user, 2026-11-11). */
.prg-path-me b { display: block; width: 24px; height: 24px; font-size: 22px; line-height: 24px; text-align: center; }
.prg-path-me span { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); margin-bottom: 2px; font-size: 11px; font-weight: 700; color: var(--text-primary); }
.prg-path-day { position: absolute; bottom: 0; font-size: 11px; color: var(--text-secondary); white-space: nowrap; }
.prg-path-day-start { left: 8%; transform: translateX(-12px); }
.prg-path-day-end { right: 8%; transform: translateX(12px); text-align: right; }
.prg-corridor { position: relative; height: 40px; margin: 8px 0; border-radius: 10px; background: var(--prg-tile); }
.prg-corridor-band { position: absolute; left: 25%; right: 25%; top: 6px; bottom: 6px; border-radius: 8px; background: var(--prg-ok-bg); border: 1px dashed var(--prg-good); }
.prg-corridor-me { position: absolute; top: 50%; transform: translate(-50%, -50%); font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 10px; background: var(--prg-good); color: #fff; }
.prg-corridor-me.off { background: var(--prg-gold); }

/* Weight */
.prg-seg { display: inline-flex; background: var(--prg-tile); border-radius: 10px; padding: 2px; }
.prg-seg button { border: 0; background: none; padding: 4px 9px; border-radius: 8px; font: 500 12px var(--font-family); color: var(--text-secondary); cursor: pointer; white-space: nowrap; }
.prg-seg button[aria-pressed="true"] { background: var(--bg-panel); color: var(--text-primary); font-weight: 650; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.prg-chart { width: 100%; height: auto; display: block; }
.prg-chart-trend { fill: none; stroke: var(--prg-good); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.prg-chart-dots circle { fill: #b9bec8; }
.prg-chart-goal { stroke: var(--prg-over); stroke-dasharray: 4 4; stroke-width: 1.2; }
.prg-chart-axis { font-size: 11px; fill: var(--text-secondary); }
.prg-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11px; }
.prg-legend-line { display: inline-block; width: 16px; height: 3px; border-radius: 2px; background: var(--prg-good); }
.prg-legend-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #b9bec8; margin-left: 6px; }
.prg-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 10px; }
.prg-table td { padding: 10px 0; border-bottom: 1px solid var(--border-color); }
.prg-table tr:last-child td { border-bottom: 0; }
.prg-table td:nth-child(2) { text-align: right; font-weight: 600; padding-right: 10px; white-space: nowrap; }
.prg-table td:last-child { text-align: right; white-space: nowrap; }

/* Calories */
.prg-bars { position: relative; display: flex; align-items: flex-end; gap: 8px; height: 130px; margin-top: 18px; }
.prg-bars-wide { gap: 2px; height: 100px; }
.prg-norm { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--text-secondary); opacity: .55; pointer-events: none; z-index: 1; }
.prg-norm span { position: absolute; right: 0; top: -15px; font-size: 10px; color: var(--text-secondary); background: var(--bg-card, var(--bg-panel)); padding: 0 2px; }
.prg-bar-day { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: stretch; border: 0; background: none; padding: 0; cursor: pointer; }
.prg-bar-col { flex: 1; display: flex; align-items: flex-end; }
.prg-bar-col i { display: block; width: 100%; border-radius: 6px 6px 3px 3px; background: var(--prg-empty); position: relative; font-style: normal; }
.prg-bars-wide .prg-bar-col i { border-radius: 3px 3px 1px 1px; }
.prg-bar-col em { position: absolute; top: 3px; left: 0; right: 0; text-align: center; font-style: normal; font-size: 11px; font-weight: 700; color: #fff; }
.prg-ok .prg-bar-col i, .prg-logged .prg-bar-col i { background: var(--prg-good); }
.prg-over .prg-bar-col i { background: var(--prg-over); }
.prg-low .prg-bar-col i { background: var(--prg-low); }
.prg-today .prg-bar-col i, .prg-today_empty .prg-bar-col i { background: repeating-linear-gradient(135deg, var(--prg-good) 0 5px, var(--prg-low) 5px 10px); opacity: .8; }
.prg-bar-label { text-align: center; font-size: 11px; color: var(--text-secondary); margin-top: 4px; }
.prg-bar-day:hover .prg-bar-col i { filter: brightness(1.06); outline: 2px solid var(--primary-glow); }
.prg-bar-day.prg-ok, .prg-bar-day.prg-over, .prg-bar-day.prg-low { font-weight: inherit; color: inherit; }
.prg-balance { margin-top: 16px; padding: 13px 15px; border-radius: 14px; background: var(--prg-tile); font-size: 14px; line-height: 1.45; }
.prg-empty { text-align: center; padding: 6px 0 2px; }
.prg-empty b { display: block; margin-top: 8px; }
.prg-skel-bars { height: 64px; border-radius: 10px; background: repeating-linear-gradient(90deg, var(--prg-empty) 0 16%, transparent 16% 20%); opacity: .6; }
.prg-skeleton { height: 96px; border-radius: 18px; background: var(--prg-tile); animation: prg-pulse 1.2s ease-in-out infinite; }
.prg-skeleton-tall { height: 180px; }
@keyframes prg-pulse { 50% { opacity: .5; } }

/* Macros */
.prg-macro { display: grid; grid-template-columns: 78px 1fr auto; gap: 12px; align-items: center; font-size: 14px; margin: 14px 0; }
.prg-macro > span:last-child { white-space: nowrap; color: var(--text-secondary); }
.prg-macro-track { height: 8px; border-radius: 5px; background: var(--prg-empty); overflow: hidden; }
.prg-macro-track b { display: block; height: 100%; border-radius: 5px; }
.prg-insight { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding: 14px; border-radius: 14px; background: var(--prg-tile); }
.prg-insight p { margin: 0; font-size: 14px; line-height: 1.45; }
.prg-insight-icon { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 9px; display: grid; place-items: center; background: var(--bg-panel); font-size: 15px; }

/* Medals row and devices */
.prg-medals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.prg-medal { min-width: 0; overflow-wrap: anywhere; border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; color: var(--text-secondary); font: 500 11px/1.2 var(--font-family); text-align: center; }
.prg-medal:hover .ach-medal { transform: translateY(-2px) scale(1.03); }
.prg-devices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.prg-device { background: var(--prg-tile); border-radius: 12px; padding: 9px 10px; font-size: 12px; display: flex; flex-direction: column; gap: 2px; opacity: .85; }
.prg-device b { font-size: 13px; color: var(--text-primary); }
.prg-history { border-top: 1px solid var(--border-color); padding-top: 12px; }

/* Medal */
.ach-medal { position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; transition: transform .2s ease; }
.ach-medal-sm { width: 46px; height: 46px; }
.ach-medal-md { width: 64px; height: 64px; }
.ach-medal-lg { width: 96px; height: 96px; }
.ach-medal-xl { width: 168px; height: 168px; }
.ach-medal-img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(10, 60, 140, 0.22)); }
.ach-medal-fallback { display: none; position: absolute; inset: 4%; place-items: center; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); font-size: 40%; }
.ach-medal-sm .ach-medal-fallback { font-size: 20px; }
.ach-medal-md .ach-medal-fallback { font-size: 26px; }
.ach-medal-lg .ach-medal-fallback { font-size: 40px; }
.ach-medal-xl .ach-medal-fallback { font-size: 70px; }
.ach-medal-fallback small { position: absolute; bottom: 14%; font-size: 30%; font-weight: 800; color: #fff; }
.ach-medal-noimg .ach-medal-img { display: none; }
.ach-medal-noimg .ach-medal-fallback { display: grid; }
.ach-tier-bronze { background: linear-gradient(160deg, #f6c48d, #b7702f); }
.ach-tier-silver { background: linear-gradient(160deg, #e9eef5, #8f9cad); }
.ach-tier-gold { background: linear-gradient(160deg, #ffe08a, #e09a1b); }
.ach-locked .ach-medal-img, .ach-locked .ach-medal-fallback { filter: grayscale(1); opacity: .35; }

/* The medal under a chat answer */
.ach-chat { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ach-chat-item { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 420px; padding: 8px 12px 8px 8px; border: 1px solid rgba(242, 169, 59, 0.45); border-radius: 16px; background: linear-gradient(100deg, rgba(255, 224, 138, 0.28), rgba(10, 124, 255, 0.06)); color: var(--text-primary); text-align: left; cursor: pointer; font: inherit; animation: ach-pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.ach-chat-item:hover { border-color: var(--prg-gold); }
.ach-chat-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ach-chat-kicker { font-size: 11px; font-weight: 600; color: #b8760f; text-transform: uppercase; letter-spacing: .03em; }
body.dark-theme .ach-chat-kicker { color: var(--prg-gold); }
.ach-chat-text b { font-size: 14px; }
.ach-chat-desc { font-size: 12px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ach-chat-arrow { font-size: 22px; color: var(--text-secondary); }
@keyframes ach-pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }

/* The medal sheet */
.ach-sheet-backdrop { position: fixed; inset: 0; z-index: 1200; background: rgba(8, 10, 16, 0.62); display: flex; align-items: center; justify-content: center; padding: 16px; animation: ach-fade .2s ease both; }
.ach-sheet { position: relative; width: min(400px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; border-radius: 24px; padding: 26px 20px 18px; background: linear-gradient(180deg, #eaf3ff 0%, var(--bg-panel) 46%); color: var(--text-primary); text-align: center; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25); animation: ach-rise .35s cubic-bezier(.2, 1.2, .4, 1) both; }
/* The tint lies over an opaque panel: a see-through top showed the page behind (2026-11-10). */
body.dark-theme .ach-sheet { background: linear-gradient(180deg, rgba(10, 124, 255, 0.18) 0%, rgba(10, 124, 255, 0) 46%), var(--bg-panel); }
.ach-sheet-close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--prg-tile); color: var(--text-secondary); font-size: 22px; line-height: 1; cursor: pointer; }
.ach-sheet-kicker { font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em; }
.ach-sheet-medal { margin: 14px auto 4px; display: flex; justify-content: center; }
.ach-sheet-medal .ach-medal { animation: ach-spin 1s cubic-bezier(.2, 1, .3, 1) both; }
.ach-sheet-title { margin: 6px 0 4px; font-size: 22px; font-weight: 750; }
.ach-sheet-desc { margin: 0; color: var(--text-secondary); font-size: 14px; }
.ach-sheet-meta { margin: 10px 0 0; font-size: 13px; color: var(--text-secondary); }
.ach-share { display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); gap: 8px; margin-top: 16px; }
.ach-share button { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: none; padding: 0; font: 500 11px var(--font-family); color: var(--text-secondary); cursor: pointer; }
.ach-share button span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--prg-tile); font-size: 19px; }
.ach-share button:hover span { background: var(--primary-glow); }
.ach-sheet-done { display: block; width: 100%; margin-top: 22px; padding: 13px; border: 0; border-radius: 14px; background: var(--primary); color: #fff; font: 600 15px var(--font-family); cursor: pointer; }
.ach-sheet-done:hover { background: var(--primary-hover, var(--primary)); }
.ach-sheet-all { width: min(520px, 100%); text-align: left; }
.ach-sheet-all .ach-sheet-title, .ach-sheet-all .ach-sheet-meta { text-align: center; }
.ach-group { margin: 16px 0 8px; font-size: 13px; color: var(--text-secondary); font-weight: 600; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 12px 6px; }
@keyframes ach-fade { from { opacity: 0; } }
@keyframes ach-rise { from { transform: translateY(24px) scale(.96); opacity: 0; } }
@keyframes ach-spin { from { transform: rotateY(90deg) scale(.7); opacity: 0; } }
@media (max-width: 560px) {
  .ach-sheet-backdrop { align-items: flex-end; padding: 0; }
  .ach-sheet { width: 100%; border-radius: 24px 24px 0 0; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .prg-medals { grid-template-columns: repeat(4, 1fr); }
  .prg-value { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  .ach-chat-item, .ach-sheet, .ach-sheet-medal .ach-medal, .ach-sheet-backdrop, .prg-skeleton { animation: none; }
}

/* «Мои данные» */
.mydata { display: flex; flex-direction: column; gap: 16px; padding-bottom: 32px; }
.mydata-head h2 { margin: 0 0 4px; font-size: 20px; }
.mydata-head p { margin: 0; }
.mydata-block { border: 1px solid var(--border-color); border-radius: 20px; padding: 18px 18px 20px; background: var(--bg-card, var(--bg-panel)); margin-bottom: 12px; }
.mydata-block[hidden] { display: none; }
.mydata [data-mydata="nutrition"] > .mydata-block:last-child, .mydata .nutri-profile-form .mydata-block { margin-bottom: 12px; }
.mydata-title { margin: 0 0 14px; font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.mydata-hint { margin: -4px 0 10px; }
.mydata-soon { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 8px; background: var(--prg-tile); color: var(--text-secondary); }
.mydata-devices { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mydata-devices li { background: var(--prg-tile); border-radius: 12px; padding: 9px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--text-secondary); }
.mydata-devices b { color: var(--text-primary); font-size: 13px; }
.mydata-link { color: var(--primary); text-decoration: none; font-weight: 500; }
.mydata-save { position: sticky; bottom: 0; padding: 10px 0; background: linear-gradient(180deg, transparent, var(--bg-main) 30%); z-index: 2; }
.mydata-quiz { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid rgba(10, 124, 255, 0.25); border-radius: 16px; background: var(--primary-glow); color: var(--text-primary); text-align: left; cursor: pointer; font: inherit; }
.mydata-quiz > span:first-child { font-size: 22px; }
.mydata-quiz > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; }
.mydata-quiz small { color: var(--text-secondary); font-size: 12px; }
.mydata-quiz > span:last-child { font-size: 22px; color: var(--text-secondary); }
@media (max-width: 340px) { .mydata-devices, .prg-devices { grid-template-columns: 1fr; } }

.prg-medals .ach-medal-md { width: 58px; height: 58px; }

/* «Мои данные» spacing (user, 2026-11-11): air between the fields of a block, hints that do
   not stick to their field, the emoji apart from the title, wide enough inputs on desktop,
   and room under the last block for the sticky «Сохранить». */
.mydata .mydata-title { display: flex; align-items: center; gap: 8px; line-height: 1.3; }
.mydata-emoji { flex: none; width: 22px; text-align: center; font-size: 17px; }
.mydata .mydata-block > .nutri-field + .nutri-field,
.mydata .mydata-block > .nutri-field-hint + .nutri-field,
.mydata .mydata-block > .nutri-muted + .nutri-field { margin-top: 16px; }
.mydata .mydata-block > .nutri-field + .nutri-field-hint { margin: 6px 0 0; line-height: 1.4; }
.mydata .mydata-block > p.nutri-muted:not(.nutri-field-hint) { margin: 0 0 4px; line-height: 1.45; }
.mydata .nutri-pills { gap: 8px; }
/* One step between all blocks: the page, the nutrition part and its form. */
.mydata { gap: 12px; }
.mydata .mydata-block { margin-bottom: 0; }
.mydata [data-mydata="nutrition"], .mydata .nutri-profile-form { display: grid; gap: 12px; }
.mydata-head { margin-bottom: 4px; }
.mydata .nutri-profile-form input { width: 160px; max-width: 100%; }
.mydata .nutri-profile-form input[name="kcalOverride"] { width: 200px; }
.mydata .nutri-norm { gap: 6px; padding: 14px 16px; }
.mydata .nutri-note { margin-top: 12px; line-height: 1.45; }
.mydata-save { margin-top: 4px; }
@media (min-width: 769px) {
  .mydata .nutri-field { grid-template-columns: 160px minmax(0, 1fr); }
  .mydata .mydata-block > .nutri-field + .nutri-field-hint { padding-left: 172px; }
}
@media (max-width: 768px) {
  .mydata .nutri-field { gap: 8px; }
  .mydata .nutri-profile-form input, .mydata .nutri-profile-form input[name="kcalOverride"] { width: 100%; max-width: 220px; }
  .mydata-block { padding: 16px 16px 18px; }
}
.mydata-back { align-self: flex-start; border: 0; background: none; padding: 4px 0; color: var(--primary); font: 500 14px var(--font-family); cursor: pointer; }

/* Medals stay on one line: each tile starts at the top, the label wraps by words
   (Russian hyphenation for long words) and never takes more than three lines. */
.prg-medals, .ach-grid { align-items: start; }
.prg-medals { gap: 12px 6px; }
.prg-medal { justify-content: flex-start; overflow-wrap: normal; }
.prg-medal > span:last-child:not(.ach-medal) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; width: 100%; word-break: normal; overflow-wrap: normal; hyphens: auto; -webkit-hyphens: auto; }

/* «Ваш вес» tile: blue «Записать вес»; after today's weigh-in a light blue «Статистика веса». */
.prg-btn-primary, .prg-btn-soft { width: 100%; }
.prg-btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.prg-btn-primary:hover { opacity: .92; border-color: var(--primary); }
.prg-btn-soft { background: color-mix(in srgb, var(--primary) 12%, transparent); border-color: transparent; color: var(--primary); }
.prg-btn-soft:hover { background: color-mix(in srgb, var(--primary) 18%, transparent); border-color: transparent; }
[data-prg-section] { scroll-margin-top: 72px; }

/* «Мой прогресс» lighter (user, 2026-11-11): more room between and inside the cards,
   smaller secondary text; numbers stay the main thing on each card. */
.prg { gap: 22px; padding-bottom: 40px; }
.prg-card { padding: 22px 20px 24px; border-radius: 22px; }
.prg-card-head { margin-bottom: 18px; }
.prg-card-head h3 { font-size: 15px; }
.prg-card-head .prg-muted, .prg-link-inline { font-size: 12px; }
.prg-muted { font-size: 12px; }
.prg p { line-height: 1.5; }
.prg-grid2 { gap: 14px; }
.prg-grid3 { gap: 12px; }
.prg-tile { padding: 18px 16px; }
.prg-label { font-size: 12px; margin-bottom: 8px; }
.prg-sub { font-size: 11px; line-height: 1.45; margin-top: 8px; }
.prg-value-sm { font-size: 18px; line-height: 1.2; }
.prg-value-sm small { display: block; margin-top: 2px; font-size: 11px; }
.prg-row { font-size: 13px; margin-top: 16px; }
.prg-table { font-size: 13px; margin-top: 14px; }
.prg-table td { padding: 12px 0; }
.prg-table td:last-child { font-size: 12px; }
.prg-balance { margin-top: 20px; padding: 14px 16px; font-size: 13px; line-height: 1.5; }
.prg-macro { font-size: 13px; margin: 16px 0; }
.prg-macro > span:last-child { font-size: 12px; }
.prg-insight { margin-top: 22px; padding: 16px; }
.prg-insight p { font-size: 13px; line-height: 1.5; }
.prg-link { margin-top: 20px; font-size: 12px; }
.prg-legend { font-size: 10px; margin-top: 10px; }
.prg-bars { margin-top: 22px; }
.prg-btn { font-size: 13px; }
@media (max-width: 560px) {
  .prg { gap: 18px; }
  .prg-card { padding: 20px 18px 22px; }
  .prg-value { font-size: 22px; }
}

/* Goal card head (user, 2026-11-11): ring with the share of the way, start · now · goal, status line. */
.prg-goal-hero { display: flex; align-items: center; gap: 18px; }
.prg-ring-wrap { position: relative; width: 96px; height: 96px; flex: 0 0 96px; }
.prg-ring { width: 100%; height: 100%; display: block; }
.prg-ring circle { fill: none; stroke-width: 9; }
.prg-ring-bg { stroke: var(--prg-empty); }
.prg-ring-fg { stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.prg-ring-ok .prg-ring-fg { stroke: var(--prg-good); }
.prg-ring-warn .prg-ring-fg { stroke: var(--prg-gold); }
.prg-ring-grey .prg-ring-fg { stroke: #b9bec8; }
.prg-ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.prg-ring-text b { font-size: 20px; font-weight: 750; line-height: 1.1; color: var(--text-primary); }
.prg-ring-text span { font-size: 10px; color: var(--text-secondary); margin-top: 2px; }
.prg-goal-stats { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.prg-goal-stats > div { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; background: var(--prg-tile); }
.prg-goal-stats span { font-size: 11px; color: var(--text-secondary); }
.prg-goal-stats b { font-size: 16px; font-weight: 700; color: var(--text-secondary); }
.prg-goal-stats .prg-goal-now { background: var(--prg-ok-bg); }
.prg-goal-stats .prg-goal-now b { color: var(--text-primary); font-size: 18px; }
.prg-goal-status { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; margin: 18px 0 6px; padding: 10px 14px; border-radius: 12px; font-size: 13px; font-weight: 600; }
.prg-goal-status small { font-size: 12px; font-weight: 400; color: var(--text-secondary); }
.prg-goal-ok { background: var(--prg-ok-bg); color: var(--prg-ok); }
.prg-goal-warn { background: var(--prg-warn-bg); color: var(--prg-warn); }
.prg-goal-grey { background: var(--prg-tile); color: var(--text-secondary); }
.prg-goal-status + .prg-path { margin-top: 18px; }
@media (max-width: 380px) {
  .prg-goal-hero { gap: 12px; }
  .prg-ring-wrap { width: 84px; height: 84px; flex-basis: 84px; }
  .prg-goal-stats b { font-size: 14px; }
  .prg-goal-stats .prg-goal-now b { font-size: 16px; }
}
.prg-goal-hero-warn .prg-goal-stats .prg-goal-now { background: var(--prg-warn-bg); }
.prg-goal-hero-grey .prg-goal-stats .prg-goal-now { background: var(--prg-tile); }

/* «Изменить цель» (user, 2026-11-11, variant «А»): ✎ in the goal card corner and a sheet. */
.prg-head-side { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.prg-edit { display: inline-grid; place-items: center; width: 32px; height: 32px; margin: -6px -8px -6px 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--primary); cursor: pointer; }
.prg-edit:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.prg-edit:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.prg-win-edit { display: flex; justify-content: flex-end; margin: -8px -6px 0 0; }
.prg-goal-sheet { text-align: left; background: var(--bg-panel); }
.prg-goal-sheet-title { margin: 0 0 18px; font-size: 18px; font-weight: 650; }
.prg-goal-field { display: block; margin-bottom: 16px; }
.prg-goal-field[hidden] { display: none; }
.prg-goal-field > span:first-child { display: block; margin-bottom: 8px; font-size: 12px; color: var(--text-secondary); }
.prg-goal-sheet .prg-pill[aria-pressed="true"] { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); }
.prg-goal-input { display: flex; align-items: center; gap: 8px; }
.prg-goal-input input { flex: 1; min-width: 0; height: 44px; box-sizing: border-box; padding: 0 12px; border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-input, var(--bg-main)); color: var(--text-primary); font: 500 16px var(--font-family); }
.prg-goal-input small { font-size: 13px; color: var(--text-secondary); }
.prg-goal-result { min-height: 44px; margin: 4px 0 16px; padding: 12px 14px; border-radius: 14px; background: var(--prg-tile); font-size: 14px; line-height: 1.6; }
.prg-goal-result b { font-weight: 650; }
.prg-goal-sheet .prg-btn-primary { width: 100%; min-height: 46px; margin-top: 0; font-size: 15px; }
.prg-goal-sheet .prg-btn-primary:disabled { opacity: .45; cursor: default; }
.prg-goal-limit { margin-bottom: 6px; font-size: 12px; line-height: 1.45; color: var(--prg-warn); }

/* «Изменить цель» v2 (user, 2026-11-11): flat sheet in both themes (no blue glow), pace or own date. */
.ach-sheet.prg-goal-sheet, body.dark-theme .ach-sheet.prg-goal-sheet { background: var(--bg-panel); box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.28); }
.prg-goal-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; margin-bottom: 12px; border-radius: 12px; background: var(--prg-tile); }
.prg-goal-switch button { min-height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--text-secondary); font: 500 13px var(--font-family); cursor: pointer; }
.prg-goal-switch button[aria-selected="true"] { background: var(--bg-main); color: var(--text-primary); font-weight: 650; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.prg-goal-field [hidden] { display: none !important; }
.prg-goal-input { position: relative; }
.prg-goal-input input { padding-right: 44px; }
.prg-goal-input small { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.prg-goal-input input[type="date"] { padding-right: 12px; -webkit-appearance: none; appearance: none; min-height: 44px; }
.prg-goal-alert { margin-bottom: 8px; padding: 9px 11px; border-radius: 10px; background: var(--prg-warn-bg); color: var(--prg-warn); font-size: 12px; line-height: 1.45; }
.prg-goal-ok { margin-bottom: 6px; color: var(--prg-ok); font-size: 12px; font-weight: 600; }
.prg-goal-note { margin-top: 6px; font-size: 12px; line-height: 1.45; }
.prg-goal-sheet { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
/* «Замеры тела» inside the «Мои данные» form (2026-11-14): same fields as the rest, no own button. */
.mydata-size small { display: block; margin-top: 4px; font-size: 12px; }
.mydata-sizes-more { margin-top: 14px; } .mydata-sizes-more summary { color: var(--text-secondary); font-size: 13px; cursor: pointer; }
.mydata-sizes-more .mydata-size { margin-top: 14px; }
.mydata [data-mydata="sizes"] > .mydata-size + .mydata-size { margin-top: 16px; }
/* Simplified «Мои данные» (2026-11-14): what the norm needs is open; extras are folded rows with a summary. */
.mydata-fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; cursor: pointer; }
.mydata-fold > summary::-webkit-details-marker { display: none; }
.mydata-fold > summary .mydata-title { margin: 0; }
.mydata-fold > summary::after { content: '›'; color: var(--text-secondary); font-size: 22px; line-height: 1; transition: transform .15s; }
.mydata-fold[open] > summary::after { transform: rotate(90deg); }
.mydata-fold[open] > summary { margin-bottom: 14px; }
.mydata-fold-sum { margin-left: auto; color: var(--text-secondary); font-size: 13px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52%; }
.mydata-more { margin-top: 12px; }
.mydata-more > summary { color: var(--text-secondary); font-size: 13px; cursor: pointer; }
.mydata-more[open] > summary { margin-bottom: 12px; }
.mydata-more > .nutri-field + .nutri-field, .mydata-more > .nutri-field + .nutri-field-hint { margin-top: 14px; }
.mydata-missing { margin-top: 10px; }
.mydata-flash { border-radius: 12px; box-shadow: 0 0 0 2px var(--primary); transition: box-shadow .3s; }
