/*
 * Dose Tracker app (/tracker/, includes/tracker/class-tracker-app.php).
 * Standalone page — no theme CSS loads here, so the site palette
 * (theme.json) is repeated as tokens below.
 */

:root {
	--ypt-bg: #FAF9F6;
	--ypt-card: #FFFFFF;
	--ypt-line: #E7E5E1;
	--ypt-soft: #F1F0EC;
	--ypt-ink: #141414;
	--ypt-charcoal: #3A3A3C;
	--ypt-mute: #6B6A67;
	--ypt-cyan: #00AEEF;
	--ypt-cyan-deep: #0078A4;
	--ypt-magenta: #EC008C;
	--ypt-magenta-deep: #C2007A;
	--ypt-ok: #1F9D55;
	--ypt-ok-soft: #E8F6EE;
	--ypt-warn: #B26B00;
	--ypt-warn-soft: #FFF4DC;
	--ypt-danger: #C62828;
	--ypt-yellow: #FFD400;
	--ypt-key: #141414;
	--ypt-bar: rgba(250, 249, 246, 0.94);
	--ypt-radius: 16px;
	--ypt-heading: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--ypt-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--ypt-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
	--ypt-safe-top: env(safe-area-inset-top, 0px);
	--ypt-safe-bottom: env(safe-area-inset-bottom, 0px);
	--ypt-solid: #141414;
	--ypt-on-solid: #FFFFFF;
	--ypt-on-solid-mute: #CFCFCF;
	--ypt-info-soft: #F4FBFE;
	--ypt-info-line: #BFE9FA;
	--ypt-pink-soft: #FDE0EF;
	--ypt-pink-line: #F6C3E0;
	--ypt-warn-line: #F2C879;
	--ypt-danger-soft: #FDECEC;
	--ypt-violet-soft: #EFE9FF;
	--ypt-line-strong: #B8B6B0;
	--ypt-figure: #ECEAE5;
	--ypt-banner-bg: linear-gradient(135deg, #FFF0F8, #EEF9FE);
	--ypt-backdrop: rgba(20, 20, 20, 0.35);
	color-scheme: light;
}


/*
 * Dark mode: follows the phone unless Me > Appearance picks Light or
 * Dark (tracker.js sets data-theme on <html>). Only tokens change here.
 */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--ypt-bg: #121211;
		--ypt-card: #1D1C1B;
		--ypt-line: #2F2E2C;
		--ypt-soft: #272624;
		--ypt-ink: #F2F1EE;
		--ypt-charcoal: #D6D4CF;
		--ypt-mute: #A09E99;
		--ypt-cyan-deep: #5CCFF7;
		--ypt-magenta-deep: #FF6FC0;
		--ypt-ok: #45C981;
		--ypt-ok-soft: #14301F;
		--ypt-warn: #F2B544;
		--ypt-warn-soft: #33270F;
		--ypt-danger: #FF7070;
		--ypt-key: #F2F1EE;
		--ypt-bar: rgba(18, 18, 17, 0.92);
		--ypt-solid: #F2F1EE;
		--ypt-on-solid: #141414;
		--ypt-on-solid-mute: #55534F;
		--ypt-info-soft: #0E2631;
		--ypt-info-line: #1F4C60;
		--ypt-pink-soft: #45173A;
		--ypt-pink-line: #61224A;
		--ypt-warn-line: #5C4516;
		--ypt-danger-soft: #3A1717;
		--ypt-violet-soft: #2A2145;
		--ypt-line-strong: #55534F;
		--ypt-figure: #34332F;
		--ypt-banner-bg: linear-gradient(135deg, #2A1224, #0E2631);
		--ypt-backdrop: rgba(0, 0, 0, 0.6);
		color-scheme: dark;
	}
}

:root[data-theme="dark"] {
	--ypt-bg: #121211;
	--ypt-card: #1D1C1B;
	--ypt-line: #2F2E2C;
	--ypt-soft: #272624;
	--ypt-ink: #F2F1EE;
	--ypt-charcoal: #D6D4CF;
	--ypt-mute: #A09E99;
	--ypt-cyan-deep: #5CCFF7;
	--ypt-magenta-deep: #FF6FC0;
	--ypt-ok: #45C981;
	--ypt-ok-soft: #14301F;
	--ypt-warn: #F2B544;
	--ypt-warn-soft: #33270F;
	--ypt-danger: #FF7070;
	--ypt-key: #F2F1EE;
	--ypt-bar: rgba(18, 18, 17, 0.92);
	--ypt-solid: #F2F1EE;
	--ypt-on-solid: #141414;
	--ypt-on-solid-mute: #55534F;
	--ypt-info-soft: #0E2631;
	--ypt-info-line: #1F4C60;
	--ypt-pink-soft: #45173A;
	--ypt-pink-line: #61224A;
	--ypt-warn-line: #5C4516;
	--ypt-danger-soft: #3A1717;
	--ypt-violet-soft: #2A2145;
	--ypt-line-strong: #55534F;
	--ypt-figure: #34332F;
	--ypt-banner-bg: linear-gradient(135deg, #2A1224, #0E2631);
	--ypt-backdrop: rgba(0, 0, 0, 0.6);
	color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
	margin: 0;
	overflow-x: clip;
	background: var(--ypt-bg);
	color: var(--ypt-ink);
	font-family: var(--ypt-body);
	font-size: 16px;
	line-height: 1.4;
	-webkit-text-size-adjust: 100%;
	-webkit-tap-highlight-color: transparent;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--ypt-cyan-deep); }

.ypt {
	max-width: 560px;
	margin: 0 auto;
	min-height: 100vh;
	min-height: 100dvh;
	padding: calc(var(--ypt-safe-top) + 12px) 16px calc(96px + var(--ypt-safe-bottom));
}

.ypt-boot {
	padding: 40vh 0 0;
	text-align: center;
	color: var(--ypt-mute);
}

/* ---------- Type ---------- */

.ypt-eyebrow {
	font-family: var(--ypt-mono);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ypt-mute);
}

.ypt h1 {
	font-family: var(--ypt-heading);
	font-size: 30px;
	line-height: 1.1;
	letter-spacing: -0.02em;
	margin: 4px 0 0;
}

.ypt h2 {
	font-family: var(--ypt-heading);
	font-size: 17px;
	letter-spacing: -0.01em;
	margin: 0;
}

.ypt p { margin: 0; }

.ypt-muted { color: var(--ypt-mute); font-size: 14px; }
.ypt-small { font-size: 13px; }

/* ---------- YeffoHealth app bar ---------- */

/* Full-bleed: the negative margins undo .ypt's top padding and stretch it past the 560px column. */
.ypt-appbar {
	position: sticky;
	top: 0;
	z-index: 18;
	margin: calc(-12px - var(--ypt-safe-top)) calc(50% - 50vw) 10px;
	padding-top: var(--ypt-safe-top);
	background: var(--ypt-bar);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.ypt-appbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	max-width: 560px;
	margin: 0 auto;
	padding: 8px 16px;
}

.ypt-appbar__brand {
	display: flex;
	align-items: center;
	gap: 8px;
	border: 0;
	background: none;
	padding: 0;
	font: 700 18px var(--ypt-heading);
	letter-spacing: -0.02em;
	color: var(--ypt-ink);
}

.ypt-appbar__brand img {
	width: 32px;
	height: 32px;
	border-radius: 9px;
	background: #ffffff;
	border: 1px solid var(--ypt-line);
	padding: 1px;
}

.ypt-appbar__h { color: var(--ypt-cyan-deep); }

.ypt-appbar__actions { display: flex; gap: 8px; align-items: center; }

.ypt-appbar__icon {
	width: 38px;
	height: 38px;
	border-radius: 12px;
	border: 1px solid var(--ypt-line);
	background: var(--ypt-card);
	color: var(--ypt-ink);
	display: grid;
	place-items: center;
}

.ypt-appbar__icon svg { width: 19px; height: 19px; }
.ypt-appbar__icon.is-off { color: var(--ypt-mute); }

.ypt-appbar__me {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 0;
	background: var(--ypt-cyan);
	color: #fff;
	display: grid;
	place-items: center;
	font: 700 16px var(--ypt-heading);
}

.ypt-appbar__me svg { width: 20px; height: 20px; }
.ypt-appbar__me { overflow: hidden; padding: 0; }
.ypt-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }

/* Me's header: profile picture (class-profile-photo.php) beside the name. */
.ypt-top.ypt-me-top { justify-content: flex-start; align-items: center; gap: 16px; }
.ypt-me-top__name { min-width: 0; }
.ypt-me-photo { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.ypt-me-photo__pic {
	position: relative;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	border: 0;
	padding: 0;
	background: var(--ypt-cyan);
	color: #fff;
	display: grid;
	place-items: center;
	font: 700 30px var(--ypt-heading);
}
.ypt-me-photo__pic > svg { width: 32px; height: 32px; }
.ypt-me-photo__cam {
	position: absolute;
	right: -2px;
	bottom: -2px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--ypt-card);
	color: var(--ypt-ink);
	border: 2px solid var(--ypt-bg);
	display: grid;
	place-items: center;
}
.ypt-me-photo__cam svg { width: 14px; height: 14px; }
.ypt-me-photo__remove {
	border: 0;
	background: none;
	padding: 2px 6px;
	font-size: 12px;
	font-weight: 600;
	color: var(--ypt-mute);
}
.ypt-appbar__me[aria-current="page"] { box-shadow: 0 0 0 2px var(--ypt-bg), 0 0 0 4px var(--ypt-cyan); }

.ypt-appbar__nav { display: none; }

.ypt-appbar__tab {
	border: 0;
	background: none;
	padding: 8px 14px;
	border-radius: 10px;
	font-weight: 600;
	font-size: 14px;
	color: var(--ypt-mute);
}

.ypt-appbar__tab[aria-current="page"] { background: var(--ypt-soft); color: var(--ypt-ink); }
.ypt-appbar__tab.ypt-appbar__add { background: var(--ypt-magenta); color: #fff; margin-left: 6px; }

/* Cyan, magenta, yellow, black: the vial in the icon. */
.ypt-stripe {
	height: 4px;
	background: linear-gradient(90deg, var(--ypt-cyan) 0 25%, var(--ypt-magenta) 25% 50%, var(--ypt-yellow) 50% 75%, var(--ypt-key) 75% 100%);
}

#ypt-reminders { scroll-margin-top: calc(var(--ypt-safe-top) + 72px); }

/* Desktop: the tabs live in the bar, so the bottom bar goes. */
@media (min-width: 900px) {
	.ypt-appbar { background: var(--ypt-card); border-bottom: 0; }
	.ypt-appbar__inner { max-width: 1200px; padding: 12px 32px; }
	.ypt-appbar__nav { display: flex; gap: 6px; align-items: center; }
	.ypt-tabs { display: none; }
	.ypt { padding-bottom: calc(40px + var(--ypt-safe-bottom)); }
	.ypt-appbar { margin-bottom: 22px; }
}

/* ---------- Top bar ---------- */

.ypt-top {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 4px 14px;
}

.ypt-top__actions { display: flex; gap: 8px; align-items: center; }

.ypt-daynav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	margin-top: 2px;
}

.ypt-daynav h1 { white-space: nowrap; margin-right: 2px; }

.ypt-daynav button {
	border: 0;
	background: var(--ypt-soft);
	border-radius: 999px;
	width: 30px;
	height: 30px;
	font-size: 16px;
	line-height: 1;
}


/* ---------- Today's week strip ---------- */

.ypt-week { display: flex; gap: 5px; margin: 0 0 14px; }
.ypt-week__d {
	flex: 1;
	min-width: 0;
	border: 1px solid var(--ypt-line);
	background: var(--ypt-card);
	border-radius: 12px;
	padding: 7px 0 6px;
	font-size: 11px;
	font-weight: 600;
	color: var(--ypt-mute);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
}
.ypt-week__d b { font-size: 16px; color: var(--ypt-ink); }
.ypt-week__d i { width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.ypt-week__d--full i { background: var(--ypt-cyan); }
.ypt-week__d--part i { background: #7FD3F5; }
.ypt-week__d--miss i { background: var(--ypt-magenta); }
.ypt-week__d.is-today b { color: var(--ypt-cyan-deep); }
.ypt-week__d.is-on { background: var(--ypt-solid); border-color: var(--ypt-solid); color: var(--ypt-on-solid-mute); }
.ypt-week__d.is-on b { color: var(--ypt-on-solid); }
.ypt-week__d:disabled { opacity: 0.4; }
.ypt-week__cal {
	flex: none;
	width: 42px;
	border: 0;
	background: var(--ypt-soft);
	border-radius: 12px;
	color: var(--ypt-ink);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	font-size: 11px;
	font-weight: 600;
}
.ypt-week__cal svg { width: 18px; height: 18px; }

.ypt-back { border: 0; background: none; padding: 4px 0; margin: 0 0 4px; font-weight: 600; font-size: 15px; color: var(--ypt-cyan-deep); }

/* ---------- Progress ring ---------- */

.ypt-ring {
	--p: 0;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: conic-gradient(var(--ypt-cyan) calc(var(--p) * 1%), var(--ypt-line) 0);
	display: grid;
	place-items: center;
	flex: none;
}

.ypt-ring span {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: var(--ypt-bg);
	display: grid;
	place-items: center;
	font-weight: 700;
	font-size: 15px;
}

.ypt-ring--done { background: var(--ypt-ok); }

/* ---------- Cards ---------- */

.ypt-card {
	background: var(--ypt-card);
	border: 1px solid var(--ypt-line);
	border-radius: var(--ypt-radius);
	padding: 14px;
	margin-bottom: 10px;
}

.ypt-card--dashed {
	background: transparent;
	border-style: dashed;
	text-align: center;
	color: var(--ypt-mute);
	width: 100%;
	font-size: 15px;
}

.ypt-section-label { margin: 18px 4px 8px; }
.ypt-section-label:first-child { margin-top: 4px; }

.ypt-dose {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ypt-dot {
	width: 10px;
	align-self: stretch;
	min-height: 36px;
	border-radius: 5px;
	flex: none;
}

.ypt-dose__main { flex: 1; min-width: 0; }
.ypt-dose__name { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.ypt-dose__sub { font-size: 13px; color: var(--ypt-mute); margin-top: 2px; }
.ypt-dose__actions { display: flex; gap: 4px; align-items: center; flex: none; }

.ypt-draw {
	margin-top: 10px;
	background: var(--ypt-info-soft);
	border: 1px dashed var(--ypt-info-line);
	border-radius: 10px;
	padding: 8px 10px;
	font-size: 13px;
	color: var(--ypt-cyan-deep);
}

.ypt-draw--warn {
	background: var(--ypt-warn-soft);
	border-color: var(--ypt-warn-line);
	color: var(--ypt-warn);
}

/* ---------- Buttons ---------- */

.ypt-btn {
	border: 0;
	border-radius: 12px;
	padding: 10px 14px;
	font-weight: 600;
	font-size: 14px;
	background: var(--ypt-soft);
	color: var(--ypt-ink);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 40px;
}

.ypt-btn--primary { background: var(--ypt-solid); color: var(--ypt-on-solid); }
.ypt-btn--accent { background: var(--ypt-magenta); color: #fff; }
.ypt-btn--ghost { background: transparent; color: var(--ypt-mute); padding: 10px 8px; }
.ypt-btn--done { background: var(--ypt-ok-soft); color: var(--ypt-ok); }
.ypt-btn--skipped { background: var(--ypt-soft); color: var(--ypt-mute); }
.ypt-btn--danger { background: var(--ypt-danger-soft); color: var(--ypt-danger); }
.ypt-btn--block { width: 100%; padding: 15px; font-size: 16px; border-radius: 14px; }
.ypt-btn:disabled { opacity: 0.5; cursor: default; }

.ypt-pill {
	font-family: var(--ypt-mono);
	font-size: 11px;
	font-weight: 600;
	padding: 6px 10px;
	border-radius: 999px;
	background: var(--ypt-soft);
	border: 0;
	color: var(--ypt-charcoal);
	white-space: nowrap;
}

.ypt-link {
	background: none;
	border: 0;
	padding: 0;
	color: var(--ypt-cyan-deep);
	font-size: 14px;
	text-decoration: underline;
}

/* ---------- Tab bar ---------- */

.ypt-tabs {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 20;
	background: var(--ypt-bar);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-top: 1px solid var(--ypt-line);
	padding: 8px 8px calc(8px + var(--ypt-safe-bottom));
}

.ypt-tabs__inner {
	max-width: 560px;
	margin: 0 auto;
	display: flex;
	justify-content: space-around;
}

.ypt-tab {
	border: 0;
	background: none;
	font-size: 11px;
	color: var(--ypt-mute);
	width: 64px;
	padding: 2px 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
}

.ypt-tab svg { width: 24px; height: 24px; }
.ypt-tab[aria-current="page"] { color: var(--ypt-ink); font-weight: 600; }

.ypt-tab--add span.ypt-tab__plus {
	width: 40px;
	height: 40px;
	margin-top: -4px;
	border-radius: 50%;
	background: var(--ypt-magenta);
	color: #fff;
	display: grid;
	place-items: center;
	box-shadow: 0 4px 12px rgba(236, 0, 140, 0.3);
}

.ypt-tab--add span.ypt-tab__plus svg { width: 22px; height: 22px; }

/* ---------- Banners ---------- */

.ypt-banner {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	border-radius: 14px;
	padding: 12px;
	font-size: 13px;
	margin-bottom: 12px;
	background: var(--ypt-banner-bg);
	border: 1px solid var(--ypt-pink-line);
}

.ypt-banner--info { background: var(--ypt-info-soft); border-color: var(--ypt-info-line); }
.ypt-banner--warn { background: var(--ypt-warn-soft); border-color: var(--ypt-warn-line); }
.ypt-play-badge { display: block; width: max-content; margin: 6px 0 -4px -8px; line-height: 0; }
.ypt-play-badge img { height: 62px; width: auto; }
.ypt-banner > div { flex: 1; }
.ypt-banner b { color: var(--ypt-magenta-deep); }
.ypt-banner--info b { color: var(--ypt-cyan-deep); }
.ypt-banner--warn b { color: var(--ypt-warn); }
.ypt-banner__close { border: 0; background: none; font-size: 18px; line-height: 1; color: var(--ypt-mute); padding: 0 2px; }

.ypt-lock {
	display: flex;
	gap: 6px;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	color: var(--ypt-mute);
	padding: 14px 0 4px;
}

.ypt-lock svg { width: 13px; height: 13px; }

.ypt-offline {
	position: sticky;
	top: calc(var(--ypt-safe-top) + 6px);
	z-index: 15;
	margin: 0 auto 8px;
	width: fit-content;
	background: var(--ypt-solid);
	color: var(--ypt-on-solid);
	font-size: 12px;
	padding: 6px 12px;
	border-radius: 999px;
}

/* ---------- Empty ---------- */

.ypt-empty {
	text-align: center;
	padding: 36px 20px;
}

.ypt-empty h2 { margin-bottom: 6px; }
.ypt-empty p { color: var(--ypt-mute); font-size: 14px; margin-bottom: 16px; }

/* ---------- Forms (sheets) ---------- */

.ypt-sheet-backdrop {
	position: fixed;
	inset: 0;
	z-index: 40;
	background: var(--ypt-backdrop);
	display: flex;
	align-items: flex-end;
	justify-content: center;
	animation: ypt-fade 0.15s ease-out;
}

.ypt-sheet {
	background: var(--ypt-bg);
	width: 100%;
	max-width: 560px;
	max-height: 94vh;
	max-height: 94dvh;
	border-radius: 22px 22px 0 0;
	display: flex;
	flex-direction: column;
	animation: ypt-rise 0.2s ease-out;
}

.ypt-sheet__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	padding: 16px 20px 8px;
}

.ypt-sheet__body {
	overflow-y: auto;
	padding: 0 20px 16px;
	-webkit-overflow-scrolling: touch;
}

.ypt-sheet__foot {
	padding: 10px 20px calc(14px + var(--ypt-safe-bottom));
	border-top: 1px solid var(--ypt-line);
	display: flex;
	gap: 8px;
}

.ypt-sheet__foot .ypt-btn--block { flex: 1; }

@keyframes ypt-fade { from { opacity: 0; } }
@keyframes ypt-rise { from { transform: translateY(40px); opacity: 0.6; } }

.ypt-field { margin-top: 14px; }
.ypt-field > label, .ypt-label {
	display: block;
	font-family: var(--ypt-mono);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ypt-mute);
	margin: 0 0 6px;
}

.ypt-hint { font-size: 12px; color: var(--ypt-mute); margin-top: 6px; }

.ypt-input, .ypt-select, .ypt-textarea {
	width: 100%;
	background: var(--ypt-card);
	border: 1px solid var(--ypt-line);
	border-radius: 12px;
	padding: 12px;
	font-size: 16px; /* 16px stops iOS zooming on focus. */
	min-height: 46px;
}

.ypt-input:focus, .ypt-select:focus, .ypt-textarea:focus {
	outline: 2px solid var(--ypt-cyan);
	outline-offset: -1px;
	border-color: transparent;
}

.ypt-textarea { min-height: 70px; resize: vertical; }

.ypt-row { display: flex; gap: 8px; align-items: stretch; }
.ypt-row > * { flex: 1; min-width: 0; }
.ypt-row > .ypt-shrink { flex: none; }

.ypt-seg {
	display: flex;
	background: var(--ypt-soft);
	border-radius: 12px;
	padding: 3px;
	gap: 2px;
}

.ypt-seg button {
	flex: 1;
	border: 0;
	background: none;
	padding: 9px 4px;
	font-size: 14px;
	border-radius: 9px;
	color: var(--ypt-mute);
	white-space: nowrap;
}

.ypt-seg button[aria-pressed="true"] {
	background: var(--ypt-card);
	color: var(--ypt-ink);
	font-weight: 600;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.ypt-seg--wrap { flex-wrap: wrap; }
.ypt-seg--wrap button { flex: 1 1 22%; }

.ypt-chips { display: flex; gap: 6px; flex-wrap: wrap; }

.ypt-chip {
	border: 1px solid var(--ypt-line);
	background: var(--ypt-card);
	border-radius: 10px;
	padding: 8px 0;
	font-size: 13px;
	flex: 1;
	min-width: 38px;
	text-align: center;
}

.ypt-chip[aria-pressed="true"] { background: var(--ypt-solid); color: var(--ypt-on-solid); border-color: var(--ypt-solid); }

.ypt-chip--sm { flex: none; padding: 6px 10px; }

.ypt-swatches { display: flex; gap: 10px; flex-wrap: wrap; }

.ypt-swatch {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 3px solid var(--ypt-card);
	box-shadow: 0 0 0 1px var(--ypt-line);
}

.ypt-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ypt-ink); }

.ypt-times { display: flex; flex-direction: column; gap: 8px; }
.ypt-times .ypt-row { align-items: center; }

.ypt-suggest {
	border: 1px solid var(--ypt-line);
	border-top: 0;
	border-radius: 0 0 12px 12px;
	margin-top: -8px;
	padding-top: 8px;
	background: var(--ypt-card);
	max-height: 200px;
	overflow-y: auto;
}

.ypt-suggest button {
	display: block;
	width: 100%;
	text-align: left;
	border: 0;
	border-top: 1px solid var(--ypt-soft);
	background: none;
	padding: 10px 12px;
	font-size: 15px;
}

.ypt-suggest button:first-child { border-top: 0; }

.ypt-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 0;
}

.ypt-switch {
	position: relative;
	width: 50px;
	height: 30px;
	flex: none;
	border: 0;
	border-radius: 999px;
	background: var(--ypt-line);
	transition: background 0.15s;
}

.ypt-switch::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--ypt-card);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
	transition: transform 0.15s;
}

.ypt-switch[aria-checked="true"] { background: var(--ypt-ok); }
.ypt-switch[aria-checked="true"]::after { transform: translateX(20px); }

.ypt-error {
	color: var(--ypt-danger);
	font-size: 13px;
	margin-top: 8px;
}

/* ---------- First-run steps ---------- */

.ypt-steps {
	list-style: none;
	counter-reset: ypt-step;
	text-align: left;
	margin: 0 0 18px;
	padding: 0;
	display: grid;
	gap: 8px;
}

.ypt-steps li {
	counter-increment: ypt-step;
	display: grid;
	grid-template-columns: 30px 1fr;
	column-gap: 10px;
	align-items: center;
	background: var(--ypt-soft);
	border-radius: 12px;
	padding: 10px 12px;
	font-size: 14px;
}

.ypt-steps li::before {
	content: counter(ypt-step);
	grid-row: span 2;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--ypt-solid);
	color: var(--ypt-on-solid);
	display: grid;
	place-items: center;
	font-weight: 700;
	font-size: 13px;
}

.ypt-steps li.is-done::before { content: "✓"; background: var(--ypt-ok); }
.ypt-steps li span { color: var(--ypt-mute); font-size: 13px; }

/* Vial row in Add a peptide. */
.ypt-vialpick {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	background: var(--ypt-info-soft);
	border: 1px solid var(--ypt-info-line);
	border-radius: 12px;
	padding: 10px 12px;
}

.ypt-vialpick b { display: block; font-size: 15px; }
.ypt-vialpick span { font-size: 13px; color: var(--ypt-mute); }

/* ---------- Calculator (Mix a vial) ---------- */

.ypt-calc-result {
	background: var(--ypt-card);
	border: 1px solid var(--ypt-line);
	border-radius: var(--ypt-radius);
	padding: 14px;
	margin-top: 16px;
}

.ypt-calc-big {
	font-family: var(--ypt-heading);
	font-size: 34px;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1;
}

.ypt-calc-big small { font-size: 15px; font-weight: 600; color: var(--ypt-mute); margin-left: 4px; }

.ypt-stats { display: flex; gap: 8px; margin-top: 12px; }

.ypt-stat {
	flex: 1;
	background: var(--ypt-soft);
	border-radius: 10px;
	padding: 8px 10px;
}

.ypt-stat b { display: block; font-size: 16px; }
.ypt-stat span { font-size: 11px; color: var(--ypt-mute); }

.ypt-syringe { width: 100%; height: auto; margin-top: 12px; display: block; }
.ypt-syringe .s-barrel { fill: var(--ypt-card); stroke: var(--ypt-ink); stroke-width: 2; }
.ypt-syringe .s-metal { fill: #9A9A9E; }
.ypt-syringe .s-tick { stroke: var(--ypt-ink); stroke-width: 1; }
.ypt-syringe .s-num { font: 600 11px var(--ypt-mono); fill: var(--ypt-charcoal); text-anchor: middle; }
.ypt-syringe .s-mark { stroke: var(--ypt-magenta); stroke-width: 2.5; }
.ypt-syringe .s-flag { fill: var(--ypt-magenta); }
.ypt-syringe .s-flag-text { font: 700 12px var(--ypt-body); fill: #fff; text-anchor: middle; }

/* ---------- History ---------- */

.ypt-cal {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 6px;
	text-align: center;
}

.ypt-cal__h { font-family: var(--ypt-mono); font-size: 10px; color: var(--ypt-mute); padding-bottom: 2px; }

.ypt-cal__d {
	aspect-ratio: 1;
	border-radius: 9px;
	display: grid;
	place-items: center;
	font-weight: 600;
	font-size: 13px;
	border: 0;
	background: transparent;
	color: var(--ypt-ink);
}

.ypt-cal__d--full { background: var(--ypt-cyan); color: #fff; }
.ypt-cal__d--part { background: var(--ypt-info-line); color: var(--ypt-cyan-deep); }
.ypt-cal__d--miss { background: var(--ypt-pink-soft); color: var(--ypt-magenta-deep); }
.ypt-cal__d--none { background: transparent; color: #9B9994; }
.ypt-cal__d--future { background: transparent; color: #B3B1AC; }
.ypt-cal__d--sel { outline: 2px solid var(--ypt-ink); outline-offset: 1px; }

.ypt-cal-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }

.ypt-legend { display: flex; gap: 12px; justify-content: center; font-size: 11px; color: var(--ypt-mute); margin-top: 10px; flex-wrap: wrap; }
.ypt-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

.ypt-summary { display: flex; }
.ypt-summary > div { flex: 1; text-align: center; }
.ypt-summary b { display: block; font-size: 22px; font-family: var(--ypt-heading); }
.ypt-summary span { font-size: 12px; color: var(--ypt-mute); }

.ypt-log {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 14px;
	padding: 10px 0;
	border-top: 1px solid var(--ypt-soft);
	align-items: center;
}

.ypt-log:first-child { border-top: 0; padding-top: 0; }
.ypt-log:last-child { padding-bottom: 0; }
.ypt-log__right { color: var(--ypt-mute); white-space: nowrap; font-size: 13px; }
.ypt-log__note { font-size: 13px; color: var(--ypt-mute); margin-top: 2px; font-style: italic; }

/* ---------- Vials ---------- */

.ypt-vial { display: flex; gap: 14px; }

.ypt-vial__img {
	width: 44px;
	height: 64px;
	flex: none;
	border-radius: 8px 8px 10px 10px;
	border: 2px solid var(--ypt-ink);
	position: relative;
	background: var(--ypt-card);
	margin-top: 10px;
}

.ypt-vial__img::before {
	content: "";
	position: absolute;
	left: 8px;
	right: 8px;
	top: -10px;
	height: 9px;
	background: var(--ypt-solid);
	border-radius: 3px 3px 0 0;
}

.ypt-vial__img i {
	position: absolute;
	left: 4px;
	right: 4px;
	bottom: 4px;
	border-radius: 4px;
}

/* Pens: a slim injection pen, needle on top and dose dial below. */
.ypt-vial__img--pen {
	width: 20px;
	height: 62px;
	margin: 14px 12px 0;
	border-radius: 6px 6px 4px 4px;
	background: linear-gradient(var(--ypt-solid), var(--ypt-solid)) bottom / 100% 10px no-repeat, var(--ypt-card);
}

.ypt-vial__img--pen::before {
	left: 5px;
	right: 5px;
	top: -8px;
	height: 6px;
	border-radius: 2px 2px 0 0;
}

.ypt-vial__img--pen::after {
	content: "";
	position: absolute;
	left: 50%;
	top: -13px;
	width: 2px;
	height: 6px;
	margin-left: -1px;
	background: var(--ypt-ink);
	border-radius: 1px;
}

.ypt-vial__img--pen i { left: 3px; right: 3px; bottom: 14px; border-radius: 3px; max-height: calc(100% - 20px); }

.ypt-bar { height: 8px; border-radius: 4px; background: var(--ypt-line); overflow: hidden; margin: 10px 0 6px; }
.ypt-bar i { display: block; height: 100%; border-radius: 4px; }

.ypt-vial__actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

/* ---------- Me ---------- */

.ypt-list { padding: 4px 14px; }
.ypt-list > * + * { border-top: 1px solid var(--ypt-soft); }

.ypt-list-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 13px 0;
	width: 100%;
	background: none;
	border-left: 0;
	border-right: 0;
	border-bottom: 0;
	text-align: left;
	font-size: 15px;
	color: inherit;
	text-decoration: none;
}

.ypt-list-row:first-child { border-top: 0; }
.ypt-list-row span:last-child { color: var(--ypt-mute); font-size: 14px; }

/* ---------- Signed out ---------- */

.ypt-hero { padding: 24px 4px 8px; }
.ypt-hero h1 { font-size: 36px; }
.ypt-hero p { margin-top: 10px; color: var(--ypt-charcoal); font-size: 16px; }

.ypt-brand {
	display: flex;
	gap: 10px;
	align-items: center;
	font-family: var(--ypt-heading);
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	color: var(--ypt-ink);
}

.ypt-brand img { width: 34px; height: 34px; border-radius: 9px; }

.ypt-features { list-style: none; margin: 20px 0; padding: 0; display: grid; gap: 10px; }

.ypt-features li {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	background: var(--ypt-card);
	border: 1px solid var(--ypt-line);
	border-radius: 14px;
	padding: 12px 14px;
	font-size: 14px;
}

.ypt-features li b { display: block; font-size: 15px; margin-bottom: 1px; }

.ypt-features svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }

.ypt-toast {
	position: fixed;
	left: 50%;
	bottom: calc(92px + var(--ypt-safe-bottom));
	transform: translateX(-50%);
	z-index: 60;
	background: var(--ypt-solid);
	color: var(--ypt-on-solid);
	padding: 10px 16px;
	border-radius: 12px;
	font-size: 14px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
	display: flex;
	gap: 12px;
	align-items: center;
	max-width: calc(100% - 32px);
}

.ypt-toast button { background: none; border: 0; color: var(--ypt-cyan); font-weight: 600; padding: 0; }

.ypt-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

@media (min-width: 600px) {
	.ypt-sheet-backdrop { align-items: center; }
	.ypt-sheet { border-radius: 22px; max-height: 88vh; }
}

@media (prefers-reduced-motion: reduce) {
	.ypt-sheet, .ypt-sheet-backdrop { animation: none; }
}

/* While a sheet is open, toasts go to the top so they don't cover the form. */
body:has(.ypt-sheet-backdrop) .ypt-toast {
	top: calc(var(--ypt-safe-top) + 12px);
	bottom: auto;
}

/* ---------- Order labels (Vials tab) ---------- */

.ypt-lo-promo {
	position: relative;
	overflow: hidden;
	border-radius: 18px;
	padding: 16px;
	margin-bottom: 12px;
	color: #fff;
	background: linear-gradient(120deg, #141414 0%, #2A1330 55%, #0A3A52 100%);
}

.ypt-lo-promo .ypt-eyebrow { color: #F7A8D6; }
.ypt-lo-promo h2 { font-family: var(--ypt-heading); font-size: 20px; line-height: 1.15; margin: 4px 0 6px; }
.ypt-lo-promo p { font-size: 13px; opacity: 0.85; margin: 0 0 12px; }

.ypt-lo-foot { display: flex; gap: 8px; width: 100%; }
.ypt-lo-lead { margin: 0 0 12px; }

.ypt-lo-progress { display: flex; gap: 6px; margin: 2px 0 14px; }
.ypt-lo-progress i { flex: 1; height: 4px; border-radius: 4px; background: var(--ypt-line); }
.ypt-lo-progress i.is-on { background: var(--ypt-magenta); }

.ypt-lo-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; opacity: 0.65; }
.ypt-lo-row.is-on { opacity: 1; }
.ypt-lo-row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ypt-lo-row__main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ypt-lo-check {
	width: 26px;
	height: 26px;
	flex: none;
	border-radius: 8px;
	border: 2px solid var(--ypt-line-strong);
	background: var(--ypt-card);
	color: transparent;
	display: grid;
	place-items: center;
	padding: 0;
}
.ypt-lo-check svg { width: 16px; height: 16px; stroke-width: 3; }
.ypt-lo-check[aria-checked="true"] { background: var(--ypt-magenta); border-color: var(--ypt-magenta); color: #fff; }

.ypt-lo-qty { display: flex; align-items: center; border: 1px solid var(--ypt-line); border-radius: 10px; background: var(--ypt-card); overflow: hidden; flex: none; }
.ypt-lo-qty button { border: 0; background: none; width: 32px; height: 38px; font-size: 18px; color: var(--ypt-mute); }
.ypt-lo-qty__n { width: 44px; border: 0; text-align: center; font-family: var(--ypt-mono); font-size: 16px; padding: 0; -moz-appearance: textfield; }
.ypt-lo-qty__n::-webkit-inner-spin-button, .ypt-lo-qty__n::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.ypt-lo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ypt-lo-tpl {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	text-align: left;
	border: 2px solid var(--ypt-line);
	border-radius: 14px;
	background: var(--ypt-card);
	padding: 8px;
	font-size: 14px;
}
.ypt-lo-tpl[aria-pressed="true"] { border-color: var(--ypt-magenta); box-shadow: 0 0 0 3px rgba(236, 0, 140, 0.15); }
.ypt-lo-tpl__img { width: 100%; aspect-ratio: 15 / 7; border-radius: 8px; background: var(--ypt-soft); overflow: hidden; margin-bottom: 4px; }
.ypt-lo-tpl__img img { width: 100%; height: 100%; object-fit: contain; display: block; }

.ypt-lo-choice { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.ypt-lo-choice small { font-size: 11px; opacity: 0.75; }
.ypt-lo-color { padding: 4px; height: 46px; }

.ypt-lo-label__head { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.ypt-lo-label .ypt-field { margin-top: 10px; }
.ypt-lo-more { margin-top: 10px; font-size: 13px; text-align: left; }

.ypt-lo-preview {
	position: relative;
	width: 100%;
	aspect-ratio: 15 / 7;
	border-radius: 8px;
	overflow: hidden;
	background: var(--ypt-soft);
	border: 1px solid var(--ypt-line);
}
.ypt-lo-preview img, .ypt-lo-preview__fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.ypt-lo-preview__f { position: absolute; white-space: nowrap; line-height: 1.15; }
.ypt-lo-preview__f.is-multi { white-space: pre-wrap; }
.ypt-lo-preview.is-round::after {
	content: "";
	position: absolute;
	top: 4%;
	bottom: 4%;
	left: 50%;
	aspect-ratio: 1;
	transform: translateX(-50%);
	border-radius: 50%;
	border: 1.5px dashed rgba(0, 0, 0, 0.35);
	box-shadow: 0 0 0 100vmax rgba(240, 238, 234, 0.9);
	pointer-events: none;
}

.ypt-lo-total { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 2px 10px; }
.ypt-lo-total b { font-family: var(--ypt-heading); font-size: 22px; }

.ypt-lo-confirm { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; background: var(--ypt-soft); border-radius: 12px; padding: 12px; }
.ypt-lo-confirm input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--ypt-magenta); }

/* What's new */
.ypt-news { padding: 12px 0; }
.ypt-news b { display: block; margin-top: 2px; }
.ypt-news p { margin: 4px 0 0; color: var(--ypt-mute); }

/* ---------- Blends (Mix sheet rows, per-dose contents) ---------- */

.ypt-blend { display: flex; flex-direction: column; gap: 8px; }
.ypt-blend__row { display: flex; gap: 8px; align-items: flex-start; }
.ypt-blend__name { flex: 1 1 auto; min-width: 0; }
.ypt-blend__amt { flex: 0 0 96px; position: relative; }
.ypt-blend__amt .ypt-input { padding-right: 34px; }
.ypt-blend__amt span {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 13px;
	color: var(--ypt-mute);
	pointer-events: none;
}
.ypt-draw__blend { display: block; margin-top: 3px; color: var(--ypt-ink); }

/* ---------- Supply tab (Mixed / On hand / Plan) ---------- */

.ypt-btn--white { background: var(--ypt-card); min-height: 34px; padding: 6px 12px; }

.ypt-views {
	display: flex;
	background: var(--ypt-soft);
	border-radius: 12px;
	padding: 3px;
	margin: 2px 0 12px;
}

.ypt-views button {
	flex: 1;
	border: 0;
	background: none;
	padding: 9px 4px;
	border-radius: 9px;
	font-weight: 600;
	font-size: 14px;
	color: var(--ypt-mute);
	white-space: nowrap;
}

.ypt-views button[aria-selected="true"] {
	background: var(--ypt-card);
	color: var(--ypt-ink);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.ypt-tag {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 999px;
	background: var(--ypt-soft);
	color: var(--ypt-mute);
}

.ypt-tag--ok { background: var(--ypt-ok-soft); color: var(--ypt-ok); }
.ypt-tag--warn { background: var(--ypt-warn-soft); color: var(--ypt-warn); }
.ypt-tag--bad { background: var(--ypt-pink-soft); color: var(--ypt-magenta-deep); }

.ypt-stepper {
	display: inline-flex;
	align-items: center;
	background: var(--ypt-soft);
	border-radius: 12px;
	flex: none;
}

.ypt-stepper button {
	border: 0;
	background: none;
	width: 36px;
	height: 38px;
	font-size: 18px;
	font-weight: 600;
	color: var(--ypt-charcoal);
}

.ypt-stepper button:disabled { opacity: 0.35; }
.ypt-stepper b { min-width: 22px; text-align: center; font-size: 16px; }

.ypt-stock { padding-top: 0; padding-bottom: 0; }

.ypt-stock__row {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 12px 0;
}

.ypt-stock__main {
	flex: 1;
	min-width: 0;
	border: 0;
	background: none;
	padding: 0;
	text-align: left;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ypt-stock__main b { font-size: 16px; overflow-wrap: anywhere; }
.ypt-stock__main > span { font-size: 13px; color: var(--ypt-mute); }
.ypt-stock__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.ypt-stock__count { text-align: right; flex: none; }
.ypt-stock__count b { display: block; font-family: var(--ypt-heading); font-size: 24px; line-height: 1; }
.ypt-stock__count span { font-size: 12px; color: var(--ypt-mute); }

/* Little vial / pen / bottle glyphs beside each stock item. */
.ypt-mini {
	flex: none;
	width: 22px;
	height: 30px;
	margin-top: 7px;
	border: 2px solid var(--ypt-ink);
	border-radius: 4px 4px 6px 6px;
	background: var(--ypt-card);
	position: relative;
}

.ypt-mini::before {
	content: "";
	position: absolute;
	left: 3px;
	right: 3px;
	top: -6px;
	height: 5px;
	background: var(--ypt-solid);
	border-radius: 2px 2px 0 0;
}

.ypt-mini::after {
	content: "";
	position: absolute;
	left: 3px;
	right: 3px;
	bottom: 3px;
	height: 6px;
	border-radius: 2px;
	background: repeating-linear-gradient(90deg, #D9D6CF 0 2px, #EFECE6 2px 4px);
}

.ypt-mini--pen { width: 16px; margin-left: 3px; margin-right: 3px; }
.ypt-mini--bottle { width: 24px; border-radius: 6px; }
.ypt-mini--bottle::before { left: 2px; right: 2px; top: -7px; height: 6px; background: var(--ypt-card); border: 2px solid var(--ypt-ink); border-bottom: 0; border-radius: 3px 3px 0 0; }
.ypt-mini--bottle::after { display: none; }

.ypt-note {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-size: 13px;
	color: var(--ypt-mute);
}

.ypt-note svg { width: 18px; height: 18px; flex: none; color: var(--ypt-cyan-deep); }

.ypt-plan__head {
	font-family: var(--ypt-heading);
	font-size: 21px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
	margin-top: 6px;
}

.ypt-hl { color: var(--ypt-magenta-deep); }

.ypt-plan__preview { margin-top: 14px; background: var(--ypt-ok-soft); border-radius: 12px; padding: 12px; font-size: 14px; }

/* Plan timeline: one dot per vial. */
.ypt-tl { position: relative; padding-left: 26px; }
.ypt-tl::before { content: ""; position: absolute; left: 8px; top: 10px; bottom: 10px; width: 2px; background: var(--ypt-line); }
.ypt-tl__item { position: relative; padding: 8px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.ypt-tl__item::before { content: ""; position: absolute; left: -23px; top: 12px; width: 12px; height: 12px; border-radius: 50%; background: var(--ypt-card); border: 2px solid var(--ypt-cyan); }
.ypt-tl__item b { font-size: 15px; }
.ypt-tl__item span { font-size: 13px; color: var(--ypt-mute); }
.ypt-tl__item--use::before { background: var(--ypt-cyan); }
.ypt-tl__item--buy::before { border-color: var(--ypt-magenta); background: var(--ypt-pink-soft); }
.ypt-tl__item--buy b { color: var(--ypt-magenta-deep); }
.ypt-tl__item--end::before { border-color: var(--ypt-solid); background: var(--ypt-solid); border-radius: 3px; }

/* Today: time to mix a new vial. */
.ypt-mixday {
	margin-top: 10px;
	background: var(--ypt-pink-soft);
	border: 1.5px dashed var(--ypt-pink-line);
	border-radius: 12px;
	padding: 10px 12px;
	font-size: 14px;
	color: var(--ypt-magenta-deep);
}

.ypt-mixday__actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.ypt-mixday__actions .ypt-btn { min-height: 34px; padding: 6px 12px; }

/* ---------- Travel mode ---------- */

.ypt-travel { border-color: var(--ypt-info-line); background: var(--ypt-info-soft); }
.ypt-travel__head { display: flex; gap: 10px; align-items: center; }
.ypt-travel__head > span { font-size: 22px; }
.ypt-travel__head b { display: block; color: var(--ypt-cyan-deep); font-size: 16px; }
.ypt-travel__head div span { font-size: 13px; color: var(--ypt-mute); }
.ypt-travel .ypt-stat { background: var(--ypt-card); border: 1px solid var(--ypt-line); }

.ypt-opt {
	display: flex;
	gap: 12px;
	width: 100%;
	text-align: left;
	padding: 12px;
	border: 1.5px solid var(--ypt-line);
	border-radius: 14px;
	background: var(--ypt-card);
	margin-top: 8px;
	align-items: flex-start;
}

.ypt-opt i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ypt-line-strong); flex: none; margin-top: 1px; }
.ypt-opt b { display: block; font-size: 15px; }
.ypt-opt span { font-size: 13px; color: var(--ypt-mute); }
.ypt-opt[aria-pressed="true"] { border-color: var(--ypt-solid); box-shadow: 0 0 0 1px var(--ypt-ink); }
.ypt-opt[aria-pressed="true"] i { border: 6px solid var(--ypt-ink); }

.ypt-travel-note { margin: -4px 4px 10px; font-size: 13px; color: var(--ypt-cyan-deep); }

/* ---------- Shared protocols ---------- */

.ypt-proto {
	background: linear-gradient(135deg, #1A1420, #2A1330 55%, #0F2D45);
	color: #fff;
	border-radius: 18px;
	padding: 18px;
}

.ypt-proto .ypt-eyebrow { color: #F7A8D6; }
.ypt-proto h2 { color: #fff; font-family: var(--ypt-heading); font-size: 24px; margin: 4px 0 2px; overflow-wrap: anywhere; }
.ypt-proto dl { display: grid; grid-template-columns: 84px 1fr; gap: 8px 10px; font-size: 14px; margin: 14px 0 0; }
.ypt-proto dt { color: #B9B4C4; }
.ypt-proto dd { margin: 0; overflow-wrap: anywhere; }

.ypt-check {
	display: flex;
	gap: 10px;
	align-items: center;
	width: 100%;
	border: 0;
	background: none;
	padding: 12px 0;
	text-align: left;
	font-size: 15px;
}

.ypt-check i { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--ypt-line-strong); flex: none; display: grid; place-items: center; font-style: normal; font-size: 13px; color: var(--ypt-on-solid); }
.ypt-check[aria-checked="true"] i { background: var(--ypt-solid); border-color: var(--ypt-solid); }
.ypt-check[aria-checked="true"] i::after { content: "✓"; }
.ypt-check small { color: var(--ypt-mute); font-size: 13px; }

.ypt-share-privacy { display: flex; gap: 6px; align-items: flex-start; }
.ypt-share-privacy svg { width: 13px; height: 13px; flex: none; margin-top: 1px; }

.ypt-linkbox {
	margin-top: 14px;
	font-family: var(--ypt-mono);
	font-size: 13px;
	background: var(--ypt-card);
	border: 1px solid var(--ypt-line);
	border-radius: 12px;
	padding: 12px;
	color: var(--ypt-charcoal);
	overflow-wrap: anywhere;
	user-select: all;
}

.ypt-hero--share h1 { font-size: 30px; }
.ypt-hero--share { padding-bottom: 14px; }

/* Bac water line on the Plan view */
.ypt-note--btn { width: 100%; text-align: left; font: inherit; font-size: 13px; cursor: pointer; }
.ypt-note__title { color: var(--ypt-ink); font-weight: 600; margin-bottom: 2px; }
.ypt-note__title .ypt-tag { margin-left: 4px; vertical-align: 1px; }

/* ---------- Help & feedback (Me tab, openFeedbackSheet) ---------- */

.ypt-help { padding: 2px 14px; }
.ypt-help__row {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 12px 0;
	border: 0;
	background: none;
	text-align: left;
	color: inherit;
	font: inherit;
	cursor: pointer;
}
.ypt-help__ic {
	width: 38px;
	height: 38px;
	border-radius: 12px;
	display: grid;
	place-items: center;
	flex: none;
}
.ypt-help__ic svg { width: 20px; height: 20px; }
.ypt-help__ic--help { background: var(--ypt-info-soft); color: var(--ypt-cyan-deep); }
.ypt-help__ic--problem { background: var(--ypt-pink-soft); color: var(--ypt-magenta-deep); }
.ypt-help__ic--idea { background: var(--ypt-warn-soft); color: var(--ypt-warn); }
.ypt-help__ic--syringe { background: var(--ypt-info-soft); color: var(--ypt-cyan-deep); }
.ypt-help__ic--pill { background: var(--ypt-pink-soft); color: var(--ypt-magenta-deep); }
.ypt-help__ic--vials { background: var(--ypt-warn-soft); color: var(--ypt-warn); }
.ypt-help__ic--scale { background: var(--ypt-ok-soft); color: var(--ypt-ok); }
.ypt-help__ic--flask { background: var(--ypt-info-soft); color: var(--ypt-cyan-deep); }
.ypt-help__ic--camera { background: var(--ypt-violet-soft); color: #6A3DE8; }
.ypt-help__ic--food { background: var(--ypt-info-soft); color: var(--ypt-cyan-deep); }
.ypt-help__ic--feel { background: var(--ypt-soft); color: var(--ypt-charcoal); }
.ypt-help__text { flex: 1; min-width: 0; }
.ypt-help__text b { display: block; font-size: 15px; }
.ypt-help__text span { font-size: 13px; color: var(--ypt-mute); }
.ypt-help__chev { color: var(--ypt-mute); font-size: 18px; }

.ypt-shots { display: flex; gap: 10px; flex-wrap: wrap; }
.ypt-shot {
	position: relative;
	width: 56px;
	height: 96px;
	border-radius: 10px;
	border: 1px solid var(--ypt-line);
	background: var(--ypt-card);
	overflow: hidden;
	padding: 0;
}
.ypt-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ypt-shot--add {
	border: 1.5px dashed var(--ypt-line-strong);
	background: none;
	color: var(--ypt-mute);
	font-size: 26px;
	cursor: pointer;
}
.ypt-shot__x {
	position: absolute;
	right: 3px;
	top: 3px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 0;
	background: rgba(20, 20, 20, 0.7);
	color: #fff;
	font-size: 15px;
	line-height: 1;
	display: grid;
	place-items: center;
	padding: 0;
	cursor: pointer;
}

.ypt-fb-privacy {
	display: flex;
	gap: 10px;
	background: var(--ypt-soft);
	border-radius: 12px;
	padding: 10px 12px;
	font-size: 13px;
	color: var(--ypt-charcoal);
	margin: 2px 0 0;
}
.ypt-fb-privacy svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }

.ypt-fb-incl {
	background: var(--ypt-card);
	border: 1px solid var(--ypt-line);
	border-radius: 12px;
	padding: 8px 12px;
	font-size: 13px;
	margin-top: 6px;
}
.ypt-fb-incl > div { display: flex; gap: 8px; padding: 3px 0; }
.ypt-fb-incl__y, .ypt-fb-incl__n { width: 14px; flex: none; font-weight: 700; }
.ypt-fb-incl__y { color: var(--ypt-ok); }
.ypt-fb-incl__n { color: var(--ypt-danger); }
.ypt-fb-incl__sep { border-top: 1px solid var(--ypt-soft); margin-top: 4px; padding-top: 7px !important; }

.ypt-fb-sent { text-align: center; padding: 8px 0 6px; }
.ypt-fb-sent__check {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--ypt-ok-soft);
	color: var(--ypt-ok);
	display: grid;
	place-items: center;
	margin: 10px auto 12px;
}
.ypt-fb-sent__check svg { width: 32px; height: 32px; }

/* ---------- Injection sites (body map) ---------- */

.ypt-site {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	margin-top: 8px;
	padding: 8px 10px;
	background: var(--ypt-card);
	border: 1px solid var(--ypt-line);
	border-radius: 10px;
	font-size: 13px;
	text-align: left;
	color: var(--ypt-charcoal);
}
.ypt-site__pin {
	flex: 0 0 auto;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	border: 3px solid var(--ypt-cyan);
	background: var(--ypt-card);
}
.ypt-site__text { flex: 1 1 auto; min-width: 0; }
.ypt-site__go { flex: 0 0 auto; color: var(--ypt-cyan-deep); font-weight: 600; }

.ypt-body { display: block; width: 100%; max-width: 360px; height: auto; margin: 4px auto 0; -webkit-user-select: none; user-select: none; }
.ypt-body .b-figure > * { fill: var(--ypt-figure); }
.ypt-body .b-figure .b-limb { fill: none; stroke: var(--ypt-figure); stroke-width: 15; stroke-linecap: round; stroke-linejoin: round; }
.ypt-body .b-figure .b-leg { stroke-width: 24; }
.ypt-body .b-figure .b-navel { fill: #CFCBC4; }
.ypt-body .b-caption { font: 600 12px var(--ypt-body); fill: var(--ypt-mute); text-anchor: middle; }
.ypt-body .b-side { font: 600 10px var(--ypt-body); fill: #A9A6A0; text-anchor: middle; }
.ypt-body .b-site { cursor: pointer; outline: none; }
.ypt-body .b-hit { fill: transparent; }
.ypt-body .b-dot { fill: var(--ypt-card); stroke: #A9A6A0; stroke-width: 2; transition: fill .15s; }
.ypt-body .b-site--week .b-dot { fill: #F9C6E3; stroke: #EC8CC4; }
.ypt-body .b-site--recent .b-dot { fill: var(--ypt-magenta); stroke: var(--ypt-magenta-deep); }
.ypt-body .b-site.is-on .b-hit { fill: rgba(0, 174, 239, .14); stroke: var(--ypt-cyan); stroke-width: 2; }
.ypt-body .b-site.is-on .b-dot { fill: var(--ypt-cyan); stroke: var(--ypt-cyan-deep); }
.ypt-body .b-check { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.ypt-body .b-site:focus-visible .b-hit { stroke: var(--ypt-ink); stroke-width: 2; stroke-dasharray: 3 3; }

.ypt-sitepick__line { text-align: center; font-size: 14px; margin: 10px 0 0; }
.ypt-legend--sites i { border-radius: 50%; border: 2px solid #A9A6A0; background: var(--ypt-card); }
.ypt-legend--sites i.is-recent { background: var(--ypt-magenta); border-color: var(--ypt-magenta-deep); }
.ypt-legend--sites i.is-week { background: #F9C6E3; border-color: #EC8CC4; }
.ypt-log__site { font-size: 12px; color: var(--ypt-cyan-deep); margin-top: 2px; }

/* ---------- How you felt (side effects & notes on a dose) ---------- */
.ypt-feel {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 8px;
	width: 100%;
	margin-top: 10px;
	padding: 8px 10px;
	border: 1px dashed var(--ypt-line);
	border-radius: 12px;
	background: none;
	font: inherit;
	font-size: 13px;
	text-align: left;
	color: var(--ypt-ink);
	cursor: pointer;
}
.ypt-feel__add { font-weight: 600; color: var(--ypt-cyan-deep); }
.ypt-feel__hint { color: var(--ypt-mute); font-size: 12px; }
.ypt-feel__tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.ypt-feel__note { color: var(--ypt-mute); font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.ypt-ftag {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.5;
	background: var(--ypt-soft);
	color: var(--ypt-charcoal);
}
.ypt-ftag--bad { background: var(--ypt-danger-soft); color: var(--ypt-danger); }
.ypt-ftag--good { background: var(--ypt-ok-soft); color: var(--ypt-ok); }
.ypt-ftag-btn--bad[aria-pressed="true"] { background: var(--ypt-danger); border-color: var(--ypt-danger); }
.ypt-ftag-btn--good[aria-pressed="true"] { background: var(--ypt-ok); border-color: var(--ypt-ok); }
.ypt-chip--dashed { border-style: dashed; color: var(--ypt-mute); }
.ypt-tagpick__group { margin-top: 8px; }
.ypt-tagpick__group:first-child { margin-top: 0; }
.ypt-tagpick__label { display: block; font-size: 12px; color: var(--ypt-mute); margin-bottom: 4px; }
.ypt-feelrow { padding: 8px 0; border-top: 1px solid var(--ypt-line); }
.ypt-feelrow:nth-child(2) { border-top: 0; }
.ypt-feelrow__head { display: flex; justify-content: space-between; align-items: center; }
.ypt-feelrow__bar { height: 6px; border-radius: 3px; background: var(--ypt-soft); margin: 6px 0 4px; overflow: hidden; }
.ypt-feelrow__bar i { display: block; height: 100%; border-radius: 3px; background: #A9A6A0; }
.ypt-feelrow__bar .ypt-feelrow__fill--bad { background: var(--ypt-danger); }
.ypt-feelrow__bar .ypt-feelrow__fill--good { background: var(--ypt-ok); }
.ypt-report-cta { align-items: flex-start; }

/* ---------- Cycle planner ---------- */
.ypt-cplan__row { align-items: center; margin-top: 8px; }
.ypt-cplan__row > span { flex: none; font-size: 14px; color: var(--ypt-mute); }
.ypt-input--sm { width: 76px; flex: none !important; padding: 10px; text-align: center; }
.ypt-cplan__gen { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--ypt-soft); }
.ypt-cplan__gen .ypt-cplan__row { gap: 6px; font-size: 14px; }
.ypt-cplan__gen .ypt-cplan__row:first-child { margin-top: 0; }
.ypt-cplan__gen .ypt-input--sm { width: 60px; padding: 8px 4px; }
.ypt-cplan__gen .ypt-btn { margin-left: auto; }
.ypt-cplan__steps { margin-top: 10px; }
.ypt-cplan__step { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--ypt-line); font-size: 14px; }
.ypt-cplan__step:first-child { border-top: 0; }
.ypt-cplan__step > b { min-width: 72px; }
.ypt-cplan__preview { margin-top: 12px; }
.ypt-cplan__svg { display: block; width: 100%; height: auto; }
.ypt-cplan__svg .c-off { fill: #CFCBC4; }
.ypt-cplan__svg .c-val { font-size: 9px; fill: var(--ypt-charcoal); font-weight: 600; }
.ypt-cplan__svg .c-wk { font-size: 8px; fill: var(--ypt-mute); }
.ypt-cplan__svg .c-today { stroke: var(--ypt-magenta); stroke-width: 1.5; stroke-dasharray: 3 2; }
.ypt-stepline { margin-top: 8px; padding: 6px 10px; border-radius: 10px; background: var(--ypt-info-soft); color: var(--ypt-cyan-deep); font-size: 13px; }
.ypt-offweek { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--ypt-soft); font-size: 14px; color: var(--ypt-charcoal); }
.ypt-offweek .ypt-dot { flex: none; }

/* ---------- Supply: reorder labels ---------- */
.ypt-reorder {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 12px;
	padding: 10px 12px;
	border-radius: 12px;
	background: var(--ypt-pink-soft);
	font-size: 13px;
}
.ypt-reorder > span { flex: 1; }
.ypt-reorder .ypt-btn { flex: none; }

/* ---------- Progress log ---------- */
.ypt-prog-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.ypt-prog-head__big { font-family: var(--ypt-heading); font-size: 34px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.ypt-prog-head__delta { font-size: 14px; font-weight: 600; color: var(--ypt-mute); }
.ypt-prog-head__delta.is-down { color: var(--ypt-ok); }
.ypt-prog-head__delta.is-up { color: var(--ypt-warn); }
.ypt-prog-ranges { display: flex; gap: 4px; margin-bottom: 8px; }
.ypt-prog-ranges .ypt-chip { flex: 1; padding: 6px 0; text-align: center; }
.ypt-chartwrap { margin-top: 4px; }
.ypt-chart { display: block; width: 100%; height: auto; overflow: visible; }
.ypt-chart .g-grid { stroke: var(--ypt-line); stroke-width: 1; }
.ypt-chart .g-axis { font-size: 9px; fill: var(--ypt-mute); }
.ypt-chart .g-axis--y { text-anchor: end; }
.ypt-chart .g-axis--x { text-anchor: middle; }
.ypt-chart .g-axis--x.is-start { text-anchor: start; }
.ypt-chart .g-axis--x.is-end { text-anchor: end; }
.ypt-chart .g-line { fill: none; stroke: var(--ypt-cyan); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ypt-chart .g-dot { fill: var(--ypt-card); stroke: var(--ypt-cyan); stroke-width: 2; }
.ypt-chart .g-dot.is-last { fill: var(--ypt-cyan); }
.ypt-chart .g-last { font-size: 11px; font-weight: 700; fill: var(--ypt-ink); text-anchor: middle; }
.ypt-chart .g-last.is-end { text-anchor: end; }
.ypt-chart .g-empty { font-size: 12px; fill: var(--ypt-mute); text-anchor: middle; }
.ypt-chart .g-step { stroke-width: 1; stroke-dasharray: 3 3; opacity: 0.7; }
.ypt-chart .g-step-label { font-size: 9px; font-weight: 700; }
.ypt-chart .g-lane { stroke: var(--ypt-line); stroke-width: 1; }
.ypt-chart .g-dose { font-size: 8px; fill: var(--ypt-mute); }
.ypt-chart .g-lane-label { font-size: 9px; font-weight: 600; }
.ypt-chart .g-band { fill: var(--ypt-ok); opacity: 0.1; }

/* ---------- Snooze (Today, a due dose) ---------- */

.ypt-snooze {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	margin-top: 10px;
	padding: 9px 12px;
	border: 1px dashed var(--ypt-line-strong);
	border-radius: 12px;
	background: none;
	color: var(--ypt-cyan-deep);
	font-size: 14px;
	font-weight: 600;
	text-align: left;
}

.ypt-snooze svg { width: 16px; height: 16px; flex: none; }
.ypt-snooze.is-set { border-style: solid; border-color: var(--ypt-line); color: var(--ypt-mute); font-weight: 500; }

/* ---------- Lab results (Progress tab) ---------- */

.ypt-labs-empty { display: flex; gap: 12px; align-items: flex-start; }
.ypt-labs-empty b { display: block; margin-bottom: 2px; }
.ypt-lab-row__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ypt-lab-row__main .ypt-small { color: var(--ypt-mute); font-size: 13px; }
.ypt .ypt-lab-row span.ypt-lab-row__val { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; color: var(--ypt-ink); font-size: 15px; }
.ypt-lab-row .ypt-tag { margin: 0; }
.ypt-lab-row .ypt-tag.ypt-tag--ok { color: var(--ypt-ok); font-size: 12px; }
.ypt-lab-row .ypt-tag.ypt-tag--warn { color: var(--ypt-warn); font-size: 12px; }
.ypt-link-row span:first-child { color: var(--ypt-cyan-deep); font-weight: 600; }
.ypt-row > .ypt-lab-unit { flex: 0 0 104px; }
.ypt-lab-range { align-items: center; }
.ypt-row.ypt-lab-range > span { flex: none; }
.ypt-lab-key { display: inline-block; width: 12px; height: 9px; margin-right: 6px; border-radius: 2px; background: var(--ypt-ok); opacity: 0.25; vertical-align: 0; }
.ypt-thennow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ypt-thennow__item { display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: none; font: inherit; font-size: 12px; color: var(--ypt-charcoal); text-align: left; cursor: pointer; }
.ypt-thennow__item .ypt-photo { aspect-ratio: 3 / 4; }
.ypt-photo { display: block; width: 100%; border-radius: 12px; object-fit: cover; background: var(--ypt-soft); min-height: 60px; }
.ypt-photo.is-loading { animation: ypt-pulse 1.2s ease-in-out infinite; }
.ypt-photo.is-missing { opacity: 0.4; }
@keyframes ypt-pulse { 50% { opacity: 0.55; } }
.ypt-prog-row { align-items: center; gap: 10px; }
.ypt-prog-row > span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ypt-prog-row__sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ypt-prog-row__right { display: flex; align-items: center; gap: 8px; flex: none; }
.ypt-prog-row__cam { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--ypt-mute); }
.ypt-prog-row__cam svg { width: 14px; height: 14px; }
.ypt-prog-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.ypt-prog-grid__f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ypt-mute); }
.ypt-prog-grid__f .ypt-input { width: 100%; }
.ypt-viewer__img .ypt-photo { max-height: 62vh; object-fit: contain; background: #111; }
.ypt-viewer__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; text-align: center; }
.ypt-viewer__bar > div { display: flex; flex-direction: column; }
.ypt-report-parts { padding-top: 0; padding-bottom: 0; }
.ypt-report-parts .ypt-toggle + .ypt-toggle { border-top: 1px solid var(--ypt-line); }

/* ---------- Calculator tab (signed out it's the whole app) ---------- */

.ypt-appbar__signin {
	border: 1.5px solid var(--ypt-ink);
	border-radius: 12px;
	padding: 8px 14px;
	font-weight: 700;
	font-size: 14px;
	color: var(--ypt-ink);
	text-decoration: none;
}

.ypt-appbar__tab.is-locked { display: inline-flex; gap: 5px; align-items: center; }
.ypt-appbar__tab.is-locked svg { width: 13px; height: 13px; }

.ypt-tab { position: relative; }
.ypt-tab.is-locked { color: var(--ypt-line-strong); }
.ypt-tab__lock {
	position: absolute;
	top: -2px;
	left: calc(50% + 6px);
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--ypt-soft);
	color: var(--ypt-mute);
	display: grid;
	place-items: center;
}
.ypt-tab .ypt-tab__lock svg { width: 10px; height: 10px; }

.ypt-calc-modes {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	margin: 0 -16px 12px;
	padding: 2px 16px;
	scrollbar-width: none;
}
.ypt-calc-modes::-webkit-scrollbar { display: none; }

.ypt-calc-mode {
	flex: none;
	border: 1px solid var(--ypt-line);
	background: var(--ypt-card);
	color: var(--ypt-ink);
	border-radius: 12px;
	padding: 9px 14px;
	font-weight: 700;
	font-size: 14px;
}
.ypt-calc-mode[aria-pressed="true"] { background: var(--ypt-solid); border-color: var(--ypt-solid); color: var(--ypt-on-solid); }

.ypt-calc-from {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--ypt-info-soft);
	border: 1px solid var(--ypt-info-line);
	border-radius: 14px;
	padding: 10px 12px;
	margin-bottom: 12px;
	cursor: pointer;
}
.ypt-calc-from__ic {
	width: 34px;
	height: 34px;
	flex: none;
	border-radius: 10px;
	background: var(--ypt-card);
	border: 1px solid var(--ypt-info-line);
	color: var(--ypt-cyan-deep);
	display: grid;
	place-items: center;
}
.ypt-calc-from__ic svg { width: 18px; height: 18px; }
.ypt-calc-from__text { flex: 1; min-width: 0; font-size: 13px; color: var(--ypt-charcoal); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ypt-calc-from__text b { display: block; font-size: 14px; color: var(--ypt-ink); }
.ypt-calc-from__pick { color: var(--ypt-cyan-deep); font-weight: 700; font-size: 14px; }
/* The whole row opens the native picker. */
.ypt-calc-from__select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }

.ypt-calc-form .ypt-field:last-child { margin-bottom: 0; }

.ypt-input-unit { position: relative; }
.ypt-input-unit .ypt-input { padding-right: 40px; }
.ypt-input-unit span {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 13px;
	font-weight: 600;
	color: var(--ypt-mute);
	pointer-events: none;
}

.ypt-calc-result--main { position: relative; overflow: hidden; margin-top: 12px; padding-top: 18px; }
.ypt-calc-result--main > .ypt-stripe { position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.ypt-calc-result--main .ypt-calc-big { font-size: 40px; margin-top: 2px; }
.ypt-calc-result--main .ypt-calc-big small { font-size: 16px; }

.ypt-calc-cta {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-top: 12px;
	padding: 14px;
	border-radius: var(--ypt-radius);
	background: var(--ypt-banner-bg);
	border: 1px solid var(--ypt-pink-line);
}
.ypt-calc-cta > div { flex: 1; font-size: 13px; color: var(--ypt-charcoal); }
.ypt-calc-cta b { display: block; font: 700 16px var(--ypt-heading); color: var(--ypt-ink); margin-bottom: 2px; }
.ypt-calc-cta .ypt-btn { flex: none; padding-left: 20px; padding-right: 20px; }

.ypt-calc-kept {
	display: flex;
	gap: 12px;
	align-items: center;
	background: var(--ypt-soft);
	border-radius: 14px;
	padding: 10px 12px;
	margin-top: 14px;
	font-size: 13px;
	color: var(--ypt-charcoal);
}
.ypt-calc-kept b { display: block; color: var(--ypt-ink); font-size: 14px; }
.ypt-calc-kept__n { font: 700 20px var(--ypt-heading); color: var(--ypt-ink); white-space: nowrap; }


/* Compound library and estimated levels (Progress tab) */
.ypt-lib-row { display: flex; flex-direction: column; gap: 2px; text-align: left; min-width: 0; }
.ypt-lib-row b { font-weight: 600; }
.ypt-lib-hl { margin-top: 4px; }
.ypt-lib-hl__big { font: 700 26px var(--ypt-heading); color: var(--ypt-ink); margin-top: 2px; }
.ypt-chip__dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.ypt-chart .g-level { fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.ypt-chart .g-level--ahead { stroke-dasharray: 4 4; opacity: 0.55; }
.ypt-chart .g-level-dot { stroke: var(--ypt-card); stroke-width: 1.5; }
.ypt-chart .g-now { stroke: var(--ypt-line-strong); stroke-width: 1; stroke-dasharray: 2 3; }
.ypt-chart .g-now-label { font-size: 9px; font-weight: 700; fill: var(--ypt-mute); text-anchor: middle; }

/* Food & water (Today card, Progress chart) */
.ypt-food__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.ypt-food__head b { font: 700 16px var(--ypt-heading); color: var(--ypt-ink); }
.ypt-food__row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.ypt-food__row + .ypt-food__row { border-top: 1px solid var(--ypt-line); }
.ypt-food__main { flex: 1; min-width: 0; }
.ypt-food__label { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ypt-ink); }
.ypt-food__bar { height: 6px; border-radius: 999px; background: var(--ypt-soft); margin-top: 6px; overflow: hidden; }
.ypt-food__bar i { display: block; height: 100%; border-radius: inherit; background: var(--ypt-magenta); }
.ypt-food__bar--water i { background: var(--ypt-cyan); }
.ypt-food__bar--kcal i { background: var(--ypt-warn); }
.ypt-food__bar.is-done i { background: var(--ypt-ok); }
.ypt-food__add { flex: none; min-width: 64px; padding: 8px 10px; cursor: pointer; }
.ypt-chart .g-bar { fill: var(--ypt-magenta); opacity: 0.8; }
.ypt-chart .g-bar--water { fill: var(--ypt-cyan); }
.ypt-chart .g-bar--kcal { fill: var(--ypt-warn); }
.ypt-chart .g-bar.is-met { fill: var(--ypt-ok); opacity: 1; }
.ypt-chart .g-goal { stroke: var(--ypt-ink); stroke-width: 1; stroke-dasharray: 4 3; opacity: 0.6; }
.ypt-chart .g-goal-label { font-size: 9px; font-weight: 700; fill: var(--ypt-mute); text-anchor: end; }

/* ---------- Food search & barcode scan ---------- */
.ypt-fmacros { display: flex; gap: 6px; padding-top: 10px; border-top: 1px solid var(--ypt-line); }
.ypt-fmacro { flex: 1; min-width: 0; background: var(--ypt-soft); border-radius: 10px; padding: 8px 4px; text-align: center; }
.ypt-fmacro b { display: block; font: 700 16px var(--ypt-heading); color: var(--ypt-ink); }
.ypt-fmacro span { font-size: 12px; color: var(--ypt-mute); }
.ypt-fmacro--kcal { background: var(--ypt-warn-soft); }
.ypt-fmacro--pro { background: var(--ypt-pink-soft); }
.ypt-factions { display: flex; gap: 8px; margin-top: 10px; }
.ypt-factions .ypt-btn { flex: 1; min-height: 44px; }
.ypt-factions svg, .ypt-fsearch svg { width: 18px; height: 18px; flex: none; }
.ypt-featen { margin-top: 12px; padding-top: 6px; border-top: 1px solid var(--ypt-line); }
.ypt-featen__h { font: 600 12px var(--ypt-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ypt-mute); padding: 6px 0 2px; }
.ypt-fitem { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.ypt-fitem + .ypt-fitem { border-top: 1px solid var(--ypt-line); }
.ypt-fitem__main { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; border: 0; background: none; padding: 2px 0; color: inherit; cursor: pointer; }
.ypt-fitem__name { font-weight: 600; font-size: 15px; color: var(--ypt-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ypt-fitem__sub { font-size: 13px; color: var(--ypt-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ypt-fitem__right { flex: none; text-align: right; font-size: 14px; font-weight: 600; color: var(--ypt-ink); white-space: nowrap; }
.ypt-fitem__right small { display: block; font-weight: 400; font-size: 12px; color: var(--ypt-mute); }
.ypt-fitem__x { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--ypt-mute); font-size: 20px; line-height: 1; cursor: pointer; }
.ypt-fplus { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--ypt-solid); color: var(--ypt-on-solid); font-size: 22px; line-height: 1; cursor: pointer; }
.ypt-fsearch { display: flex; gap: 8px; align-items: center; }
.ypt-fsearch__box { flex: 1; position: relative; }
.ypt-fsearch__box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ypt-mute); pointer-events: none; }
.ypt-fsearch__box .ypt-input { padding-left: 40px; }
.ypt-fscanbtn { flex: none; width: 48px; height: 46px; border: 1px solid var(--ypt-line); border-radius: 12px; background: var(--ypt-card); color: var(--ypt-ink); display: grid; place-items: center; cursor: pointer; }
.ypt-flist__card { padding: 2px 14px; }
.ypt-flist__empty { text-align: center; padding: 18px 8px; margin: 0; }
.ypt-fcredit { font-size: 12px; color: var(--ypt-mute); text-align: center; margin: 14px 0 0; }
.ypt-fbig { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0 14px; }
.ypt-fbig .ypt-fmacro b { font-size: 19px; }
.ypt-fstepper { flex: none !important; display: flex; align-items: center; border: 1px solid var(--ypt-line); border-radius: 12px; background: var(--ypt-card); overflow: hidden; }
.ypt-fstepper button { width: 46px; height: 46px; border: 0; background: none; font-size: 22px; color: var(--ypt-ink); cursor: pointer; }
.ypt-fstepper span { min-width: 44px; text-align: center; font-weight: 700; font-size: 17px; }
.ypt-fnotice { background: var(--ypt-warn-soft); border: 1px solid var(--ypt-warn-line); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; color: var(--ypt-ink); }
.ypt-fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.ypt-cf-amt { flex: 0 0 84px !important; }
.ypt-cf-unit { flex: 0 0 72px !important; }

.ypt-scan { position: fixed; inset: 0; z-index: 70; background: #000; color: #fff; overflow: hidden; }
.ypt-scan__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ypt-scan__frame { position: absolute; left: 50%; top: 42%; width: min(82vw, 340px); height: min(46vw, 190px); transform: translate(-50%, -50%); border-radius: 18px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5); }
.ypt-scan__frame b { position: absolute; width: 34px; height: 34px; border: 4px solid #fff; }
.ypt-scan__frame b:nth-child(1) { left: -2px; top: -2px; border-right: 0; border-bottom: 0; border-radius: 18px 0 0 0; }
.ypt-scan__frame b:nth-child(2) { right: -2px; top: -2px; border-left: 0; border-bottom: 0; border-radius: 0 18px 0 0; }
.ypt-scan__frame b:nth-child(3) { left: -2px; bottom: -2px; border-right: 0; border-top: 0; border-radius: 0 0 0 18px; }
.ypt-scan__frame b:nth-child(4) { right: -2px; bottom: -2px; border-left: 0; border-top: 0; border-radius: 0 0 18px 0; }
.ypt-scan__frame i { position: absolute; left: 14px; right: 14px; top: 50%; height: 2px; background: var(--ypt-magenta); box-shadow: 0 0 12px var(--ypt-magenta); animation: ypt-scanline 1.6s ease-in-out infinite alternate; }
@keyframes ypt-scanline { from { transform: translateY(-40px); } to { transform: translateY(40px); } }
.ypt-scan__top { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: center; padding: calc(16px + var(--ypt-safe-top)) 16px 16px; }
.ypt-scan__btn { background: rgba(0, 0, 0, 0.55); color: #fff; border: 0; border-radius: 999px; padding: 10px 16px; font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; cursor: pointer; }
.ypt-scan__btn svg { width: 20px; height: 20px; }
.ypt-scan__btn[aria-pressed="true"] { background: #fff; color: #000; }
.ypt-scan__msg { position: absolute; left: 16px; right: 16px; top: calc(42% + min(23vw, 95px) + 22px); text-align: center; font-size: 17px; font-weight: 600; }
.ypt-scan__msg small { display: block; font-weight: 400; font-size: 14px; opacity: 0.8; margin-top: 4px; }
.ypt-scan__foot { position: absolute; left: 16px; right: 16px; bottom: calc(24px + var(--ypt-safe-bottom)); display: flex; gap: 10px; }
.ypt-scan__foot button { flex: 1; background: rgba(255, 255, 255, 0.14); color: #fff; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 14px; padding: 14px 8px; font-size: 15px; font-weight: 600; cursor: pointer; }
@media (prefers-reduced-motion: reduce) {
	.ypt-scan__frame i { animation: none; }
}
