/* ==========================================================================
   Your Pet Hamster — tools.css
   Quiz, calculator, habitat planner, bedding viz, enrichment, tracker, species.
   ========================================================================== */

/* =========== QUIZ =========== */
.yph-quiz { background: var(--yph-bg-alt); }
.yph-quiz__card {
	max-width: 760px; margin: 0 auto;
	background: #fff;
	border-radius: var(--yph-radius-lg);
	padding: 38px;
	box-shadow: 0 30px 60px -34px rgba(76,46,28,.4);
}
.yph-quiz__progress {
	height: 8px; border-radius: 999px;
	background: var(--yph-bg-alt);
	overflow: hidden; margin-bottom: 26px;
}
.yph-quiz__progress-bar {
	height: 100%;
	background: linear-gradient(90deg, var(--yph-accent), var(--yph-primary));
	border-radius: 999px;
	transition: width .35s ease;
}
.yph-quiz__step { animation: yph-fade 0.3s ease-out; }
@keyframes yph-fade {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}
.yph-quiz__step--loading { text-align: center; padding: 30px 0; color: var(--yph-muted); }
.yph-quiz__question {
	font-family: var(--yph-font-heading); font-weight: 800;
	font-size: 1.4rem; margin: 0 0 22px;
}
.yph-quiz__choices {
	display: grid; gap: 12px;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.yph-quiz__choice {
	display: flex; align-items: center; gap: 12px;
	padding: 16px 18px;
	background: var(--yph-bg-alt);
	border: 1.5px solid transparent;
	border-radius: var(--yph-radius);
	cursor: pointer;
	text-align: left;
	font: inherit;
	transition: transform .15s, border-color .15s, background .15s;
}
.yph-quiz__choice:hover {
	transform: translateY(-2px);
	border-color: var(--yph-accent);
	background: #fff;
}
.yph-quiz__choice.is-selected {
	border-color: var(--yph-primary);
	background: color-mix(in srgb, var(--yph-secondary) 18%, #fff);
}
.yph-quiz__choice-emoji { font-size: 1.5rem; }
.yph-quiz__choice-label { font-weight: 600; }
.yph-quiz__nav {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	margin-top: 26px;
}
.yph-quiz__counter { color: var(--yph-muted); font-size: .85rem; font-family: var(--yph-font-ui); }

.yph-quiz__result {
	display: grid; gap: 18px;
	animation: yph-fade .4s ease-out;
}
.yph-quiz__result-hero {
	display: flex; gap: 16px; align-items: center; padding: 18px;
	background: linear-gradient(135deg, var(--yph-primary), var(--yph-accent));
	color: #fff; border-radius: var(--yph-radius);
}
.yph-quiz__result-hero .yph-quiz__result-emoji { font-size: 2.5rem; }
.yph-quiz__result-stats {
	display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.yph-quiz__result-stat {
	background: var(--yph-bg-alt);
	border-radius: var(--yph-radius-sm);
	padding: 12px 14px;
}
.yph-quiz__result-stat span { color: var(--yph-muted); font-size: .78rem; display: block; }
.yph-quiz__result-stat strong { font-size: 1.05rem; }
.yph-quiz__result-pros { display: grid; gap: 6px; padding-left: 18px; color: var(--yph-text); }

/* =========== CAGE CALCULATOR =========== */
.yph-calc { background: var(--yph-bg); }
.yph-calc__grid {
	display: grid; gap: 28px;
	grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) { .yph-calc__grid { grid-template-columns: 1.1fr 1fr; } }
.yph-calc__form {
	background: #fff; padding: 28px; border-radius: var(--yph-radius);
	display: flex; flex-direction: column; gap: 20px;
	box-shadow: 0 10px 30px -22px rgba(76,46,28,.35);
}
.yph-calc__result {
	background: linear-gradient(160deg, var(--yph-primary), var(--yph-accent));
	color: #fff;
	padding: 28px;
	border-radius: var(--yph-radius);
	display: flex; flex-direction: column; gap: 16px;
	box-shadow: 0 20px 50px -30px var(--yph-primary);
}
.yph-calc__result-eyebrow {
	font-family: var(--yph-font-ui); font-weight: 700; font-size: .75rem;
	text-transform: uppercase; letter-spacing: .08em;
	color: rgba(255,255,255,.8);
}
.yph-calc__result h3 { color: #fff; margin: 0; font-size: 1.4rem; }
.yph-calc__stat {
	background: rgba(255,255,255,.12);
	border-radius: var(--yph-radius-sm);
	padding: 12px 16px;
	backdrop-filter: blur(4px);
}
.yph-calc__stat-label { display: block; font-size: .8rem; color: rgba(255,255,255,.8); margin-bottom: 4px; }
.yph-calc__stat strong { font-size: 1.4rem; display: block; font-weight: 800; }
.yph-calc__stat small { color: rgba(255,255,255,.75); font-size: .78rem; }
.yph-calc__stat .yph-meter { background: rgba(255,255,255,.25); margin-top: 6px; }
.yph-calc__stat .yph-meter__bar { background: #fff; }
.yph-calc__cta { margin-top: 4px; }
.yph-calc__cta .yph-btn--accent { background: #fff; color: var(--yph-primary); }

/* =========== HABITAT PLANNER =========== */
.yph-planner { background: var(--yph-bg-alt); }
.yph-planner__layout {
	display: grid; gap: 24px;
	grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) {
	.yph-planner__layout { grid-template-columns: 280px minmax(0, 1fr); }
}
.yph-planner__palette {
	background: #fff;
	border-radius: var(--yph-radius);
	padding: 22px;
	box-shadow: 0 8px 22px -16px rgba(76,46,28,.3);
}
.yph-planner__palette-title { font-size: 1rem; margin: 0 0 14px; }
.yph-planner__items {
	display: grid; gap: 8px;
	grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
}
.yph-planner__item {
	display: flex; flex-direction: column; gap: 4px; align-items: center;
	padding: 10px;
	background: var(--yph-bg-alt);
	border: 1.5px solid transparent;
	border-radius: var(--yph-radius-sm);
	cursor: grab; user-select: none;
	font: inherit;
	transition: transform .15s, border-color .15s;
}
.yph-planner__item:hover { border-color: var(--yph-accent); transform: translateY(-2px); }
.yph-planner__item.is-active { border-color: var(--yph-primary); background: #fff; }
.yph-planner__item-emoji { font-size: 1.4rem; }
.yph-planner__item-label { font-size: .72rem; color: var(--yph-text); }
.yph-planner__hint { color: var(--yph-muted); font-size: .8rem; margin: 14px 0 0; }

.yph-planner__stage-wrap { display: flex; flex-direction: column; gap: 16px; }
.yph-planner__stage {
	position: relative; aspect-ratio: 5 / 3;
	border-radius: var(--yph-radius);
	overflow: hidden;
	box-shadow: inset 0 4px 18px rgba(0,0,0,.18);
	background: var(--yph-bg-alt);
}
.yph-planner__stage-bg { position: absolute; inset: 0; }
.yph-planner__stage-bg svg { width: 100%; height: 100%; }
.yph-planner__placed {
	position: absolute;
	font-size: 1.8rem;
	cursor: move;
	user-select: none;
	transition: transform .2s ease;
	filter: drop-shadow(0 4px 6px rgba(0,0,0,.25));
	z-index: 2;
}
.yph-planner__placed:hover { transform: scale(1.1); z-index: 5; }
.yph-planner__placed.is-dragging { opacity: .8; }

.yph-planner__scores {
	display: grid; gap: 14px;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	background: #fff;
	padding: 18px;
	border-radius: var(--yph-radius);
}
.yph-planner__score { display: flex; flex-direction: column; gap: 6px; }
.yph-planner__score span {
	font-family: var(--yph-font-ui); font-weight: 700; font-size: .8rem;
	color: var(--yph-muted); text-transform: uppercase; letter-spacing: .04em;
}
.yph-planner__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* =========== BEDDING DEPTH =========== */
.yph-bedding { background: var(--yph-bg); }
.yph-bedding__grid {
	display: grid; gap: 30px;
	grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) { .yph-bedding__grid { grid-template-columns: 1fr 1.1fr; } }

.yph-bedding__viz {
	background: #fff;
	border-radius: var(--yph-radius);
	padding: 24px;
	box-shadow: 0 10px 30px -22px rgba(76,46,28,.35);
}
.yph-bedding__tank {
	position: relative; aspect-ratio: 4 / 5;
	border: 4px solid var(--yph-text);
	border-radius: 14px;
	overflow: hidden;
	background: linear-gradient(180deg, #b9e3f9, #fff8e3);
}
.yph-bedding__air {
	position: absolute; inset: 0;
	background:
		radial-gradient(50% 30% at 50% 0%, rgba(255,255,255,.4), transparent),
		linear-gradient(180deg, #c2e6ff 0%, #fff8e3 100%);
}
.yph-bedding__substrate {
	position: absolute; left: 0; right: 0; bottom: 0;
	background:
		repeating-linear-gradient(45deg, color-mix(in srgb, var(--yph-wood) 80%, #fff) 0, color-mix(in srgb, var(--yph-wood) 80%, #fff) 4px, color-mix(in srgb, var(--yph-wood) 60%, #fff) 4px, color-mix(in srgb, var(--yph-wood) 60%, #fff) 8px);
	transition: height .35s ease;
}
.yph-bedding__hamster {
	position: absolute; left: 50%; transform: translateX(-50%);
	font-size: 2.4rem; line-height: 1;
	transition: bottom .35s ease;
	filter: drop-shadow(0 2px 4px rgba(0,0,0,.2));
}
.yph-bedding__burrow {
	position: absolute;
	background: radial-gradient(circle, rgba(0,0,0,.4), transparent 70%);
	border-radius: 50%;
}
.yph-bedding__ruler {
	position: absolute; right: 6px; top: 6px; bottom: 6px;
	display: flex; flex-direction: column-reverse; justify-content: space-between;
	font-size: .65rem; color: var(--yph-text); opacity: .65; font-weight: 700;
}
.yph-bedding__viz-caption { text-align: center; color: var(--yph-muted); font-size: .85rem; margin: 12px 0 0; }

.yph-bedding__controls {
	background: #fff;
	border-radius: var(--yph-radius);
	padding: 28px;
	display: flex; flex-direction: column; gap: 18px;
	box-shadow: 0 10px 30px -22px rgba(76,46,28,.35);
}
.yph-bedding__report { background: var(--yph-bg-alt); padding: 18px; border-radius: var(--yph-radius-sm); display: flex; flex-direction: column; gap: 14px; }
.yph-bedding__pairs { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .95rem; }
.yph-bedding__score-wrap { display: flex; align-items: center; gap: 14px; }
.yph-bedding__score-wrap span { white-space: nowrap; font-weight: 600; font-size: .9rem; }
.yph-bedding__score-wrap .yph-meter { flex: 1; }

/* =========== ENRICHMENT =========== */
.yph-enrich { background: var(--yph-bg-alt); }
.yph-enrich__form {
	background: #fff;
	border-radius: var(--yph-radius);
	padding: 22px;
	margin-bottom: 26px;
	box-shadow: 0 10px 30px -22px rgba(76,46,28,.35);
}
.yph-enrich__row {
	display: grid; gap: 16px;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	align-items: end;
}
.yph-field--cta { justify-content: end; }

.yph-enrich__plan { display: flex; flex-direction: column; gap: 18px; }
.yph-enrich__day {
	background: #fff;
	border-radius: var(--yph-radius);
	padding: 18px 22px;
	box-shadow: 0 6px 18px -14px rgba(76,46,28,.3);
	animation: yph-fade .3s ease-out;
}
.yph-enrich__day-title { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; margin: 0 0 10px; }
.yph-enrich__day-title .yph-tracker__pill {
	background: var(--yph-accent); color: #fff;
	padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700;
}
.yph-enrich__day-items {
	display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none;
}
.yph-enrich__day-items li {
	background: var(--yph-bg-alt);
	padding: 6px 12px; border-radius: 999px;
	font-size: .85rem;
}
.yph-enrich__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; justify-content: center; }

/* =========== SPECIES =========== */
.yph-species { background: var(--yph-bg); }
.yph-species__filter { margin-bottom: 24px; max-width: 460px; margin-left: auto; margin-right: auto; }
.yph-species__search {
	width: 100%; padding: 14px 18px;
	background: #fff;
	border: 1.5px solid color-mix(in srgb, var(--yph-wood) 30%, transparent);
	border-radius: 999px;
	font: inherit;
}
.yph-species__search:focus { outline: 0; border-color: var(--yph-accent); }

.yph-species__grid {
	display: grid; gap: 22px;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.yph-species-card {
	background: #fff;
	border-radius: var(--yph-radius);
	padding: 24px;
	box-shadow: 0 10px 26px -18px rgba(76,46,28,.35);
	display: flex; flex-direction: column; gap: 14px;
	transition: transform .2s, box-shadow .2s;
}
.yph-species-card:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -20px rgba(76,46,28,.45); }
.yph-species-card.is-hidden { display: none; }
.yph-species-card__head { display: flex; gap: 14px; align-items: center; }
.yph-species-card__emoji { font-size: 2.5rem; line-height: 1; }
.yph-species-card__title { font-size: 1.05rem; margin: 0; }
.yph-species-card__short { color: var(--yph-muted); font-size: .85rem; margin: 4px 0 0; }
.yph-species-card__stats {
	display: grid; gap: 6px; grid-template-columns: repeat(2, 1fr);
	background: var(--yph-bg-alt); padding: 14px; border-radius: var(--yph-radius-sm);
	margin: 0;
}
.yph-species-card__stats > div dt { color: var(--yph-muted); font-size: .72rem; }
.yph-species-card__stats > div dd { margin: 0; font-weight: 700; font-size: .95rem; }
.yph-species-card__chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: .8rem; color: var(--yph-muted); }
.yph-species-card__chips li {
	background: color-mix(in srgb, var(--yph-wood) 25%, transparent);
	padding: 4px 10px; border-radius: 999px;
}
.yph-species-card__enrich { font-size: .85rem; color: var(--yph-text); margin: 0; }
.yph-species-card__foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

/* =========== CARE TRACKER =========== */
.yph-tracker { background: var(--yph-bg-alt); }
.yph-tracker__card {
	background: #fff;
	border-radius: var(--yph-radius);
	padding: 28px;
	box-shadow: 0 14px 36px -24px rgba(76,46,28,.4);
}
.yph-tracker__head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.yph-tracker__name {
	flex: 1; min-width: 200px;
	padding: 12px 18px;
	border: 1.5px solid color-mix(in srgb, var(--yph-wood) 30%, transparent);
	border-radius: 999px;
	font: inherit; font-weight: 700; font-size: 1rem;
}
.yph-tracker__table {
	width: 100%; border-collapse: collapse;
	overflow-x: auto;
}
.yph-tracker__table thead {
	background: var(--yph-bg-alt);
}
.yph-tracker__table th, .yph-tracker__table td {
	padding: 12px 14px; text-align: left;
	border-bottom: 1px solid color-mix(in srgb, var(--yph-wood) 18%, transparent);
	vertical-align: top; font-size: .92rem;
}
.yph-tracker__table th {
	font-family: var(--yph-font-ui); font-weight: 700; font-size: .78rem;
	text-transform: uppercase; letter-spacing: .05em;
	color: var(--yph-muted);
}
.yph-tracker__action-col { text-align: right; }
.yph-tracker__action-col + td, .yph-tracker__table td:last-child { text-align: right; }
.yph-tracker__pill {
	display: inline-block; padding: 3px 10px; border-radius: 999px;
	font-size: .72rem; font-weight: 700; font-family: var(--yph-font-ui);
}
.yph-tracker__pill--due { background: color-mix(in srgb, #e57373 25%, var(--yph-bg-alt)); color: #b03a3a; }
.yph-tracker__pill--ok  { background: color-mix(in srgb, var(--yph-secondary) 35%, #fff); color: #4a7c3a; }
.yph-tracker__pill--soon{ background: color-mix(in srgb, var(--yph-accent) 25%, var(--yph-bg-alt)); color: #b85a1a; }
.yph-tracker__emoji { margin-right: 4px; }

.yph-tracker__weight {
	margin-top: 26px;
	background: var(--yph-bg-alt);
	padding: 20px;
	border-radius: var(--yph-radius-sm);
}
.yph-tracker__weight h3 { font-size: 1rem; margin: 0 0 12px; }
.yph-tracker__weight-form { display: flex; gap: 8px; margin-bottom: 14px; }
.yph-tracker__weight-form input {
	flex: 1; padding: 10px 14px;
	border: 1.5px solid color-mix(in srgb, var(--yph-wood) 30%, transparent);
	border-radius: 999px;
	font: inherit;
}
.yph-tracker__chart {
	width: 100%; height: 120px;
	background: #fff;
	border-radius: var(--yph-radius-sm);
	padding: 10px;
}
.yph-tracker__weight-hint { color: var(--yph-muted); font-size: .82rem; margin: 8px 0 0; }

@media (max-width: 700px) {
	.yph-tracker__table { display: block; overflow-x: auto; }
}
