/* 窑变 · 版式：实验台三栏、窑、出窑、图谱、响应式 */
.yo {
	display: grid; height: 100vh; height: 100dvh; min-height: 560px;
	grid-template-columns: minmax(268px, 300px) minmax(0, 1fr) minmax(300px, 368px);
	grid-template-rows: auto minmax(0, 1fr) auto auto;
	grid-template-areas: "head head head" "recipe kiln result" "fire kiln result" "gal gal gal";
	gap: 10px 16px;
	padding: calc(10px + var(--sat)) calc(var(--side) + var(--sar)) calc(10px + var(--sab)) calc(var(--side) + var(--sal));
}
.yo-head { grid-area: head; }
.yo-recipe { grid-area: recipe; overflow: auto; padding-right: 6px; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.yo-fire { grid-area: fire; }
.yo-kiln { grid-area: kiln; }
.yo-result { grid-area: result; }
.yo-gal { grid-area: gal; min-width: 0; }
.yo-embed .yo-head { padding: 0 88px; }

/* 窑 */
.yo-kiln { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(20, 17, 13, .9), rgba(11, 10, 8, .6)); padding: 10px 12px; }
.yo-hud { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; }
.yo-hud .yo-h { margin: 0; }
.yo-read { display: flex; align-items: baseline; gap: 6px; font-size: 12px; color: var(--txt2); }
.yo-read b { font-size: 22px; font-weight: 500; color: var(--gold-l); min-width: 3.2ch; text-align: right; }
.yo-read i { font-style: normal; color: var(--gold); margin-right: 6px; }
.yo-atm { padding: 1px 7px; border: 1px solid var(--line2); border-radius: 2px; font-size: 11.5px; }
.yo-atm.red { border-color: rgba(226, 70, 43, .7); color: #f3a08c; background: rgba(226, 70, 43, .1); }
.yo-atm.ox { border-color: rgba(217, 179, 108, .6); color: var(--gold-l); }
.yo-atm:empty { display: none; }
.yo-kv { position: relative; flex: 1 1 auto; min-height: 150px; margin-top: 6px; }
.yo-kv canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.yo-cv2 { position: relative; flex: 0 0 auto; height: clamp(110px, 22vh, 170px); margin-top: 4px; border-top: 1px solid var(--line); }
.yo-cv2 canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.yo-kdesc { margin: 6px 0 0; font-size: 12px; line-height: 1.6; color: var(--txt3); max-height: 5.2em; overflow: auto; scrollbar-width: thin; }
.yo-kdesc b { color: var(--txt2); font-weight: 600; margin-right: 4px; }

/* 出窑 */
.yo-result { display: flex; flex-direction: column; min-height: 0; }
.yo-stage {
	position: relative; flex: 0 0 auto; height: clamp(220px, 42vh, 360px);
	border: 1px solid var(--line); background: radial-gradient(ellipse 80% 70% at 50% 62%, rgba(255, 170, 110, .08), transparent 70%), linear-gradient(180deg, #120f0c, #0b0a08);
}
.yo-stage::before, .yo-stage::after { content: ""; position: absolute; width: 12px; height: 12px; border: 0 solid var(--gold); opacity: .7; pointer-events: none; }
.yo-stage::before { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; }
.yo-stage::after { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }
.yo-stage > canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.yo-tile { position: absolute; left: 8px; bottom: 8px; margin: 0; width: 46px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.yo-tile canvas { width: 46px; height: 72px; }
.yo-tile figcaption { font-size: 9.5px; color: var(--txt3); }
.yo-tile.off { visibility: hidden; }
.yo-shape { position: absolute; right: 6px; top: 6px; display: flex; gap: 2px; }
.yo-shape button { min-width: 32px; height: 28px; padding: 0 6px; font-size: 12px; background: rgba(11, 10, 8, .6); border: 1px solid var(--line2); border-radius: 2px; color: var(--txt3); }
.yo-shape button[aria-checked="true"] { color: var(--paper); border-color: var(--gold); }
.yo-stage-t { position: absolute; left: 10px; top: 8px; margin: 0; font-size: 11px; color: var(--gold); letter-spacing: .08em; }
.yo-res { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 10px 4px 4px 2px; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.yo-tag { margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 10.5px; }
.yo-tag span:first-child { padding: 2px 6px; border: 1px solid var(--gold); color: var(--gold); letter-spacing: .14em; }
.yo-tag.exp span:first-child { border-color: var(--verm); color: #f3a08c; }
.yo-tag #resCode { color: var(--txt3); }
.yo-name { margin: 6px 0 2px; font: 600 24px/1.25 var(--serif); letter-spacing: .1em; }
.yo-name small { margin-left: 8px; font: 400 14px/1 var(--sans); letter-spacing: .06em; color: var(--gold-l); }
.yo-era { margin: 0 0 8px; font-size: 12.5px; color: var(--txt2); }
.yo-why { margin: 0 0 10px; padding: 0; list-style: none; }
.yo-why li { position: relative; margin: 0 0 6px; padding-left: 16px; font-size: 13.5px; line-height: 1.65; color: var(--txt); }
.yo-why li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border: 1px solid var(--verm); transform: rotate(45deg); }
.yo-why li.x { color: #f3c1b2; }
.yo-note { margin: 0 0 8px; padding: 8px 10px; font-size: 13px; line-height: 1.75; color: var(--txt2); border-left: 2px solid var(--gold); background: rgba(217, 179, 108, .05); }
.yo-note:empty { display: none; }
.yo-more { margin: 0 0 8px; }
.yo-more summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 12px; letter-spacing: .1em; color: var(--gold); }
.yo-more summary::-webkit-details-marker { display: none; }
.yo-more summary::before { content: ""; width: 0; height: 0; border-left: 5px solid var(--gold); border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .2s; }
.yo-more[open] summary::before { transform: rotate(90deg); }
.yo-src { margin: 0; font-size: 11px; line-height: 1.5; color: var(--txt3); }

/* 名釉图谱 */
.yo-gal .yo-h { margin-bottom: 6px; }
.yo-glist { display: flex; gap: 6px; margin: 0; padding: 0 0 6px; list-style: none; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.yo-glist li { flex: none; scroll-snap-align: start; }
html:not(.yo-embed) .yo-glist::after { content: ""; flex: none; width: 170px; }
.yo-glist button {
	display: grid; grid-template-columns: 30px auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center;
	min-width: 118px; height: 52px; padding: 6px 12px 6px 8px; text-align: left;
	background: rgba(242, 235, 222, .03); border: 1px solid var(--line); border-radius: 2px;
}
.yo-glist button:hover, .yo-glist button[aria-current="true"] { border-color: var(--gold); background: rgba(217, 179, 108, .07); }
.yo-glist i { grid-row: 1 / 3; width: 30px; height: 30px; border-radius: 50%; box-shadow: inset -4px -5px 8px rgba(0, 0, 0, .35), inset 3px 3px 6px rgba(255, 255, 255, .25), 0 0 0 1px rgba(0, 0, 0, .4); }
.yo-glist b { font: 600 13.5px/1.2 var(--serif); letter-spacing: .06em; color: var(--paper); white-space: nowrap; }
.yo-glist span { font-size: 10.5px; color: var(--txt3); white-space: nowrap; }

/* 平板：两栏、整页滚动 */
@media (max-width: 1099px) {
	.yo {
		height: auto; min-height: 100vh;
		grid-template-columns: minmax(250px, 290px) minmax(0, 1fr);
		grid-template-rows: auto auto auto auto auto;
		grid-template-areas: "head head" "recipe kiln" "recipe result" "fire result" "gal gal";
	}
	.yo-recipe { overflow: visible; }
	.yo-kv { flex: none; height: clamp(190px, 34vw, 300px); }
	.yo-res { overflow: visible; }
	.yo { padding-bottom: calc(76px + var(--sab)); }
	.yo-fire { position: fixed; z-index: 6; left: calc(var(--side) + var(--sal)); bottom: calc(10px + var(--sab)); width: min(290px, calc(100vw - 2 * var(--side) - 180px)); padding: 6px; margin: -6px; background: rgba(11, 10, 8, .82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
}
/* 手机：单栏 */
@media (max-width: 719px) {
	.yo { display: flex; flex-direction: column; gap: 12px; padding-left: calc(12px + var(--sal)); padding-right: calc(12px + var(--sar)); padding-bottom: 0; }
	.yo-fire { position: sticky; left: auto; width: auto; -webkit-backdrop-filter: none; backdrop-filter: none; }
	.yo-result { display: contents; }
	.yo-head { order: 0; } #hRes { order: 1; margin-bottom: -6px; } .yo-stage { order: 2; height: clamp(230px, 62vw, 330px); }
	.yo-res { order: 3; overflow: visible; padding-top: 0; } .yo-kiln { order: 4; } .yo-gal { order: 5; } .yo-recipe { order: 6; overflow: visible; padding-right: 0; }
	.yo-fire { order: 7; position: sticky; bottom: 0; margin: 0 -12px; padding: 10px 12px calc(10px + var(--sab)); padding-right: 172px; background: linear-gradient(180deg, rgba(11, 10, 8, 0), rgba(11, 10, 8, .92) 30%); }
	.yo-embed .yo-fire { padding-right: 12px; }
	.yo-kv { height: clamp(170px, 52vw, 240px); }
	.yo-cv2 { height: 116px; }
	.yo-title h1 { font-size: 22px; gap: 8px; }
	.yo-sub { font-size: 12.5px; }
	.yo-ib span:not(.sr-only) { display: none; }
	.yo-embed .yo-head { padding: 0 76px; }
	.yo-embed .yo-title h1 { justify-content: center; }
	.yo-embed .yo-title .yo-k { text-align: center; }
	.yo-embed .yo-head { flex-direction: column; align-items: stretch; gap: 6px; }
	.yo-embed .yo-tools { justify-content: center; }
	.yo-name { font-size: 21px; }
	.yo-frame { display: none; }
	.yo-go small { display: none; }
	.yo-tile { width: 36px; } .yo-tile canvas { width: 36px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; }
}

/* 窄屏嵌在展馆里：入窑按钮右边留出「一步步看」的位置（单开时那里是站点小标签） */
@media (max-width: 719px) {
	.yo-embed .yo-fire { padding-right: 196px; }
}
