/* ==========================================================================
   防衛戦線(シューティング)— main.css のトークンに乗せる
   ========================================================================== */

.kz-boei [hidden] { display: none !important; }

.kz-boei-hero h1 { margin-bottom: 0; }
.kz-boei__lead {
	max-width: 860px;
	margin: 0 auto 24px;
	padding: 0;
	text-align: center;
	color: var(--kz-off-white-dim);
}

.kz-boei__panel {
	max-width: 860px;
	margin: 0 auto;
	scroll-margin-top: 12px;
}

.kz-boei__label {
	display: block;
	font-family: var(--kz-font-condensed);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--kz-muted);
	margin: 0 0 10px;
}

/* ---------- スタート画面 ---------- */
.kz-boei__screen[data-screen="start"] {
	border: 1px solid var(--kz-border);
	background:
		linear-gradient(135deg, rgba(255, 82, 82, 0.06), transparent 40%),
		var(--kz-bg-panel);
	padding: 28px 24px 32px;
	position: relative;
	overflow: hidden;
}
.kz-boei__steps { counter-reset: none; display: grid; gap: 12px; margin: 0 0 26px; }
.kz-boei__steps li { display: flex; gap: 14px; align-items: baseline; color: var(--kz-off-white-dim); font-size: 15px; }
.kz-boei__steps b {
	font-family: var(--kz-font-condensed);
	font-size: 22px;
	color: var(--kz-enemy);
	line-height: 1;
	flex: none;
	width: 30px;
}
.kz-boei__steps strong { color: var(--kz-off-white); }

.kz-boei__modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.kz-boei__mode {
	text-align: left;
	background: transparent;
	color: var(--kz-off-white);
	border: 1px solid var(--kz-border);
	padding: 14px 16px;
	display: grid;
	gap: 2px;
	transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.kz-boei__mode:hover { border-color: var(--kz-off-white-dim); transform: translateY(-2px); }
.kz-boei__mode[aria-pressed="true"] {
	border-color: var(--kz-enemy);
	background: rgba(211, 47, 47, 0.1);
	box-shadow: inset 3px 0 0 var(--kz-enemy);
}
.kz-boei__mode-en { font-family: var(--kz-font-condensed); font-size: 11px; letter-spacing: 0.18em; color: var(--kz-muted); text-transform: uppercase; }
.kz-boei__mode-ja { font-size: 18px; font-weight: 900; }
.kz-boei__mode-desc { font-size: 12px; color: var(--kz-off-white-dim); }

.kz-boei__records { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 0 10px; }
.kz-boei__records div { border-top: 1px solid var(--kz-hairline); padding-top: 8px; }
.kz-boei__records dt { font-size: 11px; color: var(--kz-muted); }
.kz-boei__records dd { margin: 0; font-family: var(--kz-font-condensed); font-size: 20px; letter-spacing: 0.04em; }
.kz-boei__collect-bar { height: 3px; background: var(--kz-hairline); margin-bottom: 8px; }
.kz-boei__records-note { margin: 0 0 24px; font-size: 12px; line-height: 1.6; color: var(--kz-muted); text-align: left; }
.kz-boei__collect-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--kz-enemy), var(--kz-danger)); transition: width .6s ease; }
.kz-boei__start { min-width: 200px; font-size: 16px; justify-content: center; text-align: center; }

@media (max-width: 600px) {
	.kz-boei__screen[data-screen="start"] { padding: 20px 16px 24px; }
	.kz-boei__modes { grid-template-columns: 1fr; }
	.kz-boei__records { grid-template-columns: 1fr 1fr; }
	.kz-boei__start { width: 100%; }
}

/* ---------- HUD ---------- */
.kz-boei__hud {
	display: flex;
	align-items: center;
	gap: 14px;
	font-family: var(--kz-font-condensed);
	letter-spacing: 0.06em;
	padding: 8px 2px;
}
.kz-boei__hud-wave { color: var(--kz-muted); font-size: 13px; }
.kz-boei__hud-wave b { color: var(--kz-off-white); font-size: 18px; }
.kz-boei__hud-score { font-size: 22px; font-weight: 600; }
.kz-boei__hud-score small { font-size: 11px; color: var(--kz-muted); margin-left: 3px; }
.kz-boei__hud-combo {
	color: var(--kz-danger);
	font-size: 16px;
	animation: kz-boei-pop .25s ease;
}
.kz-boei__hud-hp { margin-left: auto; display: flex; gap: 4px; }
.kz-boei__hud-hp i {
	width: 14px;
	height: 8px;
	background: rgba(255, 255, 255, 0.12);
	transform: skewX(-20deg);
}
.kz-boei__hud-hp i.is-on { background: #4caf50; box-shadow: 0 0 8px rgba(76, 175, 80, 0.6); }
.kz-boei__field.is-critical ~ * .kz-boei__hud-hp i.is-on,
.kz-boei__hud-hp:has(i:nth-child(3):not(.is-on)) i.is-on { background: #ff5252; box-shadow: 0 0 8px rgba(255, 82, 82, 0.7); }
.kz-boei__pause {
	background: transparent;
	border: 1px solid var(--kz-border);
	color: var(--kz-off-white);
	width: 44px;
	height: 40px;
	font-family: var(--kz-font-condensed);
	font-weight: 600;
}

/* ---------- 患者情報 ---------- */
.kz-boei__patient {
	display: flex;
	gap: 10px;
	align-items: center;
	padding: 8px 12px;
	border: 1px solid var(--kz-border);
	border-bottom: 0;
	background: var(--kz-bg-panel);
	font-size: 14px;
	color: var(--kz-off-white-dim);
	transition: background .3s ease, border-color .3s ease;
}
.kz-boei__patient-label {
	font-family: var(--kz-font-condensed);
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--kz-muted);
	flex: none;
}
.kz-boei__patient.is-alert {
	border-color: rgba(255, 152, 0, 0.6);
	background: linear-gradient(90deg, rgba(255, 152, 0, 0.16), rgba(255, 152, 0, 0.03));
	color: var(--kz-off-white);
	font-weight: 700;
}
.kz-boei__patient.is-alert .kz-boei__patient-label { color: var(--kz-danger); }
.kz-boei__patient-label { letter-spacing: 0.04em; text-transform: none; font-size: 11px; }
.kz-boei__patient-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kz-boei__patient-note { margin-left: auto; flex: none; font-size: 11px; font-weight: 400; color: var(--kz-muted); }
.kz-boei__patient.is-alert .kz-boei__patient-text { font-size: 15px; color: #ffb74d; }
.kz-boei__patient.is-alert .kz-boei__patient-note { color: var(--kz-off-white-dim); }
.kz-boei__patient.is-pulse { animation: kz-boei-patient-pulse .5s ease 3; }
.kz-boei__patient.is-pulse-danger { animation: kz-boei-patient-pulse-danger .5s ease 3; }
@keyframes kz-boei-patient-pulse { 50% { background: rgba(255, 152, 0, 0.42); border-color: #ffb74d; } }
@keyframes kz-boei-patient-pulse-danger { 50% { background: rgba(255, 82, 82, 0.45); border-color: #ff5252; } }
.kz-boei__ov-rules { margin: 8px 0; padding-left: 1.2em; text-align: left; font-size: 14px; line-height: 1.6; }
.kz-boei__ov-rules .is-danger { color: #ff8a80; }
.kz-boei__ov-rules .is-caution { color: #ffb74d; }
.kz-boei__ov-tip { font-size: 13px; color: var(--kz-off-white-dim); }
@media (max-width: 480px) { .kz-boei__patient-note { display: none; } }
.kz-boei__check {
	position: absolute; top: 8px; left: 50%; z-index: 5;
	transform: translate(-50%, -6px); opacity: 0; pointer-events: none;
	padding: 6px 14px; border-radius: 4px; white-space: nowrap;
	font-weight: 800; font-size: 16px; letter-spacing: 0.04em;
	transition: opacity .2s ease, transform .2s ease;
}
.kz-boei__check.is-caution { background: rgba(255, 152, 0, 0.92); color: #1a1205; }
.kz-boei__check.is-danger { background: rgba(229, 57, 53, 0.95); color: #fff; font-size: 18px; }
.kz-boei__check.is-on { opacity: 1; transform: translate(-50%, 0); }
.kz-boei__check.is-on.is-danger { animation: kz-boei-check-shake .4s ease 1; }
@keyframes kz-boei-check-shake { 25% { margin-left: -4px; } 75% { margin-left: 4px; } }
@media (prefers-reduced-motion: reduce) { .kz-boei__patient.is-pulse, .kz-boei__patient.is-pulse-danger { animation: none; } }

/* ---------- フィールド ---------- */
.kz-boei__field {
	position: relative;
	height: min(62vh, 560px);
	/* スマホのツールバー分を除いた可視高さ基準にする(vh だと手札が画面外に出る) */
	height: min(calc(100dvh - 330px), 560px);
	min-height: 300px;
	border: 1px solid var(--kz-border);
	overflow: hidden;
	touch-action: manipulation;
	user-select: none;
	-webkit-user-select: none;
}
.kz-boei__canvas { display: block; width: 100%; height: 100%; cursor: crosshair; }
.kz-boei__field::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	box-shadow: inset 0 0 0 0 rgba(255, 82, 82, 0);
	transition: box-shadow .3s ease;
}
.kz-boei__field.is-critical::after { box-shadow: inset 0 0 60px 0 rgba(255, 82, 82, 0.25); }
.kz-boei__field.is-hit-danger::after { box-shadow: inset 0 0 90px 10px rgba(255, 82, 82, 0.55); transition: none; }

/* 判定の帯(フィールドと手札の間)。フィールドに重ねず、敵の出現域を隠さない */
.kz-boei__toast {
	min-height: 58px;
	margin-top: 6px;
	transition: opacity .2s ease;
}
.kz-boei__toast-inner {
	background: rgba(8, 9, 11, 0.92);
	border: 1px solid var(--kz-border);
	border-left: 3px solid var(--kz-muted);
	padding: 7px 12px;
	display: grid;
	gap: 1px;
	font-size: 14px;
	line-height: 1.5;
	min-height: 58px;
	align-content: center;
}
.kz-boei__toast.is-danger .kz-boei__toast-inner { border-left-color: #ff5252; background: rgba(255, 82, 82, 0.1); }
.kz-boei__toast.is-ally .kz-boei__toast-inner { border-left-color: #4caf50; }
.kz-boei__toast.is-miss .kz-boei__toast-inner { border-left-color: var(--kz-muted); }
.kz-boei__toast.is-idle .kz-boei__toast-inner { border-left-color: var(--kz-off-white-dim); }
.kz-boei__toast.is-on .kz-boei__toast-inner { animation: kz-boei-pop-in .18s ease; }
.kz-boei__toast-inner strong { font-size: 15px; }
.kz-boei__toast-sub {
	font-size: 12.5px;
	color: var(--kz-off-white-dim);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.kz-boei__toast-quote { color: var(--kz-off-white-dim); }
.kz-boei__toast-tag {
	display: inline-block;
	justify-self: start;
	font-size: 11px;
	font-weight: 700;
	padding: 1px 8px;
	background: var(--kz-muted);
	color: #08090b;
	margin-right: 6px;
}
.is-danger .kz-boei__toast-tag,
.is-danger > .kz-boei__review-head .kz-boei__toast-tag { background: #ff5252; }
.is-ally .kz-boei__toast-tag { background: #4caf50; }
.kz-boei__toast-inner > .kz-boei__toast-tag + strong { display: inline; }
/* 照準欄の人体図: 右端に小さく。病気の主な場所が光る */
.kz-boei__toast-inner.has-body { grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; }
.kz-boei__toast-inner.has-body > :not(svg) { grid-column: 1; }
.kz-boei__toast-inner.has-body > .kz-body { grid-column: 2; grid-row: 1 / span 3; align-self: center; height: 52px; width: auto; }
@keyframes kz-boei-pop-in { from { transform: translateY(4px); opacity: .4; } to { transform: none; opacity: 1; } }

/* ウェーブ説明 */
.kz-boei__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(8, 9, 11, 0.72);
	backdrop-filter: blur(3px);
	z-index: 4;
	padding: 16px;
}
.kz-boei__overlay-inner {
	width: min(100%, 460px);
	background: var(--kz-bg-panel);
	border: 1px solid var(--kz-border);
	border-top: 3px solid var(--kz-enemy);
	padding: 22px 22px 24px;
	animation: kz-boei-rise .35s cubic-bezier(.2, .7, .3, 1);
}
.kz-boei__overlay-title { font-size: 22px; font-weight: 900; margin: 0 0 10px; }
.kz-boei__overlay-body { margin: 0 0 18px; color: var(--kz-off-white-dim); font-size: 14px; }
.kz-boei__overlay-body p { margin: 0 0 10px; }
.kz-boei__ov-alert { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid rgba(255, 152, 0, 0.5); background: rgba(255, 152, 0, 0.08); }
.kz-boei__ov-alert .kz-boei__toast-tag { background: var(--kz-danger); }
.kz-boei__ov-alert strong { color: var(--kz-off-white); font-size: 16px; }
.kz-boei__ov-enemies { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.kz-boei__ov-enemies li { border: 1px solid var(--kz-border); padding: 2px 10px; font-size: 13px; color: var(--kz-off-white); }
.kz-boei__ov-boss { color: var(--kz-danger); font-weight: 700; }

/* ---------- 手札 ---------- */
.kz-boei__hand {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
	margin-top: 10px;
}
.kz-boei__card {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 0;
	background: var(--kz-bg-panel);
	border: 1px solid var(--kz-border);
	border-bottom: 3px solid var(--card-color, var(--kz-enemy));
	color: var(--kz-off-white);
	text-align: left;
	overflow: hidden;
	transition: transform .15s ease, border-color .15s ease, opacity .2s ease;
	min-height: 0;
}
.kz-boei__card:hover { transform: translateY(-3px); border-color: var(--card-color); }
.kz-boei__card:active { transform: translateY(1px) scale(.98); }
.kz-boei__card:focus-visible { outline: 2px solid var(--kz-off-white); outline-offset: 2px; }
.kz-boei__card-img {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #1b1e24;
}
.kz-boei__card-img img { width: 100%; height: 100%; object-fit: cover; }
.kz-boei__card-key {
	position: absolute;
	top: 4px;
	left: 4px;
	font-family: var(--kz-font-condensed);
	font-size: 11px;
	width: 18px;
	height: 18px;
	display: grid;
	place-items: center;
	background: rgba(8, 9, 11, 0.8);
	border: 1px solid var(--kz-border);
}
.kz-boei__card-body { padding: 6px 8px 7px; }
.kz-boei__card-name {
	display: block;
	font-weight: 900;
	font-size: clamp(11px, 2.6vw, 14px);
	line-height: 1.25;
	word-break: break-all;
}
.kz-boei__card.is-cooling { opacity: .35; }
.kz-boei__card { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.kz-boei__card-hint { display: block; font-size: 10.5px; line-height: 1.3; color: var(--card-color); margin-top: 2px; font-weight: 700; }
.kz-boei__card-hint:empty { display: none; }
.kz-boei__card-brand { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 10px; line-height: 1.3; color: var(--kz-off-white-dim); }
.kz-boei__card-brand:empty { display: none; }
/* 「商品名」の見出しは幅のある画面だけ(狭い札では商品名そのものを優先) */
.kz-boei__card-brand::before { content: "商品名 "; }
@media (hover: none) { .kz-boei__card-key { display: none; } }
.kz-boei__keys { font-size: 12px; color: var(--kz-muted); margin: 8px 0 0; }
@media (hover: none) { .kz-boei__keys { display: none; } }
.kz-boei__hint-toggle { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 20px; font-size: 13px; color: var(--kz-off-white-dim); cursor: pointer; }
.kz-boei__hint-toggle input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--kz-enemy); }
.kz-boei__hint-toggle b { color: var(--kz-off-white); }
.kz-boei__streak-msg { color: var(--kz-danger); font-weight: 700; margin: -10px 0 20px; }
.kz-boei__card.is-fresh { animation: kz-boei-deal .3s cubic-bezier(.2, .7, .3, 1); }

@media (max-width: 600px) {
	.kz-boei__field { height: calc(100vh - 340px); height: calc(100dvh - 340px); min-height: 280px; }
	.kz-boei__hand { gap: 5px; }
	.kz-boei__card-body { padding: 4px 5px 5px; }
	.kz-boei__hud { gap: 10px; }
	.kz-boei__hud-score { font-size: 18px; }
	.kz-boei__hud-hp i { width: 10px; }
}

/* ---------- 結果 ---------- */
.kz-boei__screen[data-screen="result"] {
	border: 1px solid var(--kz-border);
	background: var(--kz-bg-panel);
	padding: 28px 24px 32px;
}
.kz-boei__result-title { font-size: 24px; font-weight: 900; margin: 0; }
.kz-boei__result-score {
	font-family: var(--kz-font-condensed);
	font-size: clamp(48px, 10vw, 76px);
	line-height: 1;
	margin: 10px 0 6px;
	letter-spacing: 0.02em;
}
.kz-boei__result-score small { font-size: 16px; color: var(--kz-muted); margin-left: 6px; }
.kz-boei__result-rank { color: var(--kz-off-white-dim); margin: 0 0 20px; }
.kz-boei__result-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 24px; }
.kz-boei__result-stats div { border-top: 1px solid var(--kz-hairline); padding-top: 6px; }
.kz-boei__result-stats dt { font-size: 11px; color: var(--kz-muted); }
.kz-boei__result-stats dd { margin: 0; font-family: var(--kz-font-condensed); font-size: 22px; }
@media (max-width: 600px) {
	.kz-boei__screen[data-screen="result"] { padding: 20px 16px 24px; }
	.kz-boei__result-stats { grid-template-columns: 1fr 1fr; }
}

.kz-boei__mvp { margin-bottom: 24px; }
.kz-boei__mvp-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kz-boei__mvp-card {
	position: relative;
	display: block;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	border-bottom: 3px solid var(--card-color);
	background: #1b1e24;
}
.kz-boei__mvp-card img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--z, 1)); transition: transform .4s ease; }
.kz-boei__mvp-card:hover img { transform: scale(calc(var(--z, 1) * 1.05)); }
.kz-boei__mvp-cap {
	position: absolute;
	inset: auto 0 0 0;
	padding: 30px 10px 10px;
	background: linear-gradient(180deg, transparent, rgba(8, 9, 11, 0.92) 45%);
	display: grid;
	gap: 2px;
	font-size: 12px;
	color: var(--kz-off-white-dim);
}
.kz-boei__mvp-cap b { color: var(--kz-off-white); font-size: 15px; }
.kz-boei__mvp-cap q { font-size: 11px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kz-boei__new-collect { margin: 12px 0 0; color: var(--kz-danger); font-weight: 700; font-size: 14px; }

.kz-boei__review { margin-bottom: 24px; }
.kz-boei__review-list { display: grid; gap: 8px; }
.kz-boei__review-item {
	position: relative;
	border-left: 3px solid var(--kz-muted);
	background: rgba(255, 255, 255, 0.025);
	padding: 10px 40px 10px 14px;
}
.kz-boei__review-item.is-danger { border-left-color: #ff5252; }
.kz-boei__review-item.is-danger .kz-boei__toast-tag { background: #ff5252; }
.kz-boei__review-item.is-breach { border-left-color: var(--kz-danger); }
.kz-boei__review-item.is-breach .kz-boei__toast-tag { background: var(--kz-danger); }
.kz-boei__review-head { margin: 0; font-size: 14px; }
.kz-boei__review-note { margin: 4px 0 0; font-size: 13px; color: var(--kz-off-white-dim); }
.kz-boei__review-count { position: absolute; right: 12px; top: 10px; font-family: var(--kz-font-condensed); color: var(--kz-muted); }
.kz-boei__review-perfect { color: #4caf50; font-weight: 700; }
.kz-boei__unit-link { color: var(--kz-off-white); font-weight: 700; text-decoration: underline; text-decoration-color: rgba(244, 242, 236, 0.35); text-underline-offset: 3px; }
.kz-boei__unit-link:hover { text-decoration-color: currentColor; }
.kz-boei__result-actions { display: flex; flex-wrap: wrap; gap: 10px; }

@keyframes kz-boei-pop { from { transform: scale(1.5); } to { transform: scale(1); } }
@keyframes kz-boei-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes kz-boei-deal { from { opacity: 0; transform: translateY(16px) rotate(-2deg); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
	.kz-boei__card,
	.kz-boei__overlay-inner,
	.kz-boei__hud-combo { animation: none !important; transition: none !important; }
}
.kz-boei__review-foot { font-size: 12px; color: var(--kz-muted); margin: 10px 0 0; }

/* 要注意(撃てるが減点) */
.kz-boei__toast.is-caution .kz-boei__toast-inner { border-left-color: var(--kz-danger); background: rgba(255, 152, 0, 0.08); }
.is-caution .kz-boei__toast-tag { background: var(--kz-danger); }
.kz-boei__review-item.is-caution { border-left-color: var(--kz-danger); }
.kz-boei__result-stats { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 600px) { .kz-boei__result-stats { grid-template-columns: 1fr 1fr; } }

/* ==========================================================================
   1画面に収めるレイアウト(2026-10-20)
   プレイ中はサイトのヘッダーを畳み、フィールドの高さを
   「画面の高さ − HUD − 患者行 − 判定帯 − 手札」から逆算する。
   ========================================================================== */
body.kz-boei-playing .kz-header,
body.kz-boei-playing .kz-ticker,
body.kz-boei-playing #wpadminbar { display: none; }
body.kz-boei-playing { --kz-boei-hand-h: 92px; }
body.kz-boei-playing .kz-boei-hero,
body.kz-boei-playing .kz-boei__lead { display: none; }

.kz-boei__screen[data-screen="play"] { --hud-h: 40px; --patient-h: 36px; --toast-h: 52px; --hand-h: 92px; }
.kz-boei__hud { height: var(--hud-h); padding: 0 2px; }
.kz-boei__patient { min-height: var(--patient-h); padding: 6px 12px; }
.kz-boei__toast,
.kz-boei__toast-inner { min-height: var(--toast-h); }
.kz-boei__toast-inner { padding: 5px 12px; }
.kz-boei__field {
	height: clamp(240px, calc(100dvh - var(--hud-h) - var(--patient-h) - var(--toast-h) - var(--hand-h) - 58px), 600px);
	min-height: 0;
}

/* 手札は横長のコンパクトカード(顔アイコン+名前) */
.kz-boei__hand { gap: 8px; margin-top: 6px; }
.kz-boei__card {
	flex-direction: row;
	align-items: center;
	height: var(--hand-h);
	gap: 0;
}
.kz-boei__card-img {
	flex: none;
	width: var(--hand-h);
	height: 100%;
	aspect-ratio: auto;
	border-right: 1px solid var(--kz-border);
}
.kz-boei__card-body { padding: 6px 10px; min-width: 0; }
.kz-boei__card-name { font-size: 15px; }
.kz-boei__keys { margin-top: 6px; }

@media (max-width: 600px) {
	.kz-boei__screen[data-screen="play"] { --hud-h: 36px; --patient-h: 34px; --toast-h: 50px; --hand-h: 104px; }
	.kz-boei__field { height: clamp(220px, calc(100dvh - var(--hud-h) - var(--patient-h) - var(--toast-h) - var(--hand-h) - 48px), 520px); }
	.kz-boei__hand { gap: 5px; }
	.kz-boei__card { flex-direction: column; align-items: stretch; }
	.kz-boei__card-img { width: 100%; height: 62px; border-right: 0; border-bottom: 1px solid var(--kz-border); }
	.kz-boei__card-body { padding: 4px 5px; }
	.kz-boei__card-name { font-size: 11.5px; }
	.kz-boei__toast-inner { font-size: 12.5px; }
	.kz-boei__toast-inner strong { font-size: 13.5px; }
	/* ヒントモードは札に部隊名と商品名の2行が増えるので、札を高くする(フィールドはその分縮む) */
	.kz-boei__screen[data-screen="play"].is-hint { --hand-h: 126px; }
	.is-hint .kz-boei__card-img { height: 58px; }
	.kz-boei__card-brand { display: block; font-size: 9.5px; white-space: nowrap; text-overflow: ellipsis; }
	.kz-boei__card-brand::before { content: none; }
}
.kz-boei__card-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* デフォルメ絵の札: 背景に部隊カラーのグラデーション */
.kz-boei__card.has-chibi .kz-boei__card-img {
	background: radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--card-color) 45%, transparent), transparent 70%), #15181d;
}
.kz-boei__card.has-chibi .kz-boei__card-img img { object-fit: contain; padding: 3px; }

/* ---------- 報酬イラスト(お疲れさまの一枚) ---------- */
/* 下余白: アルバムは中でスクロールするので、途中で切れた段が「出撃する」に重なって見えないよう間を空ける(指示書 A-3) */
.kz-boei__album { margin: 22px 0 24px; text-align: left; }
.kz-boei__album-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 8px; font-size: 13px; color: var(--kz-off-white-dim); }
.kz-boei__album-head b { color: var(--kz-off-white); font-size: 15px; }
.kz-boei__album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; max-height: 300px; overflow-y: auto; padding-right: 2px; }
.kz-boei__album-tile { position: relative; display: block; aspect-ratio: 3 / 4; padding: 0; overflow: hidden; border: 1px solid var(--kz-border); background: #12151a; }
.kz-boei__album-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kz-boei__album-tile:not(.is-open) img { object-fit: contain; padding: 6px; filter: brightness(0); opacity: .35; }
.kz-boei__album-tile.is-open { cursor: zoom-in; border-color: var(--card-color); }
.kz-boei__album-tile.is-open:hover { transform: translateY(-2px); }
.kz-boei__album-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 3px; font-size: 9.5px; font-weight: 700; line-height: 1.25; text-align: center; background: rgba(8, 9, 11, .8); color: var(--kz-off-white); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.kz-boei__album-tile:not(.is-open) .kz-boei__album-name { color: var(--kz-muted); }

.kz-boei__reward { margin: 20px auto 6px; max-width: 560px; text-align: left; }
.kz-boei__reward-hint { margin: 0; padding: 10px 14px; border: 1px dashed var(--kz-border); font-size: 13px; color: var(--kz-off-white-dim); }
.kz-boei__reward-card { display: grid; grid-template-columns: 150px 1fr; gap: 0; width: 100%; padding: 0; text-align: left; cursor: zoom-in; color: inherit; background: linear-gradient(120deg, color-mix(in srgb, var(--card-color) 22%, #0c0e12), #0c0e12 70%); border: 1px solid var(--card-color); box-shadow: 0 0 0 1px rgba(255, 255, 255, .03) inset, 0 18px 40px -24px var(--card-color); animation: kz-boei-reward-in .7s cubic-bezier(.2, .8, .2, 1) both; }
.kz-boei__reward-card img { width: 150px; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.kz-boei__reward-cap { display: grid; align-content: center; gap: 4px; padding: 12px 16px; }
.kz-boei__reward-cap small { font-family: var(--kz-font-condensed); letter-spacing: .14em; font-size: 11px; color: var(--card-color); }
.kz-boei__reward-cap b { font-size: 19px; }
.kz-boei__reward-cap q { font-size: 13.5px; color: var(--kz-off-white-dim); line-height: 1.6; }
.kz-boei__reward-count { font-size: 11.5px; color: var(--kz-muted); margin-top: 4px; }
@keyframes kz-boei-reward-in { 0% { opacity: 0; transform: translateY(18px) scale(.96); filter: brightness(2); } 60% { opacity: 1; filter: brightness(1.2); } 100% { transform: none; filter: none; } }
@media (max-width: 600px) {
	.kz-boei__reward-card { grid-template-columns: 112px 1fr; }
	.kz-boei__reward-card img { width: 112px; }
	.kz-boei__reward-cap b { font-size: 16px; }
}

.kz-boei__viewer { width: min(92vw, 560px); max-height: 94dvh; padding: 0; border: 1px solid var(--kz-border); background: #0c0e12; color: var(--kz-off-white); }
.kz-boei__viewer::backdrop { background: rgba(4, 5, 7, .82); }
.kz-boei__viewer img { display: block; width: 100%; max-height: calc(94dvh - 150px); object-fit: contain; background: #08090b; }
.kz-boei__viewer-cap { display: grid; gap: 4px; padding: 12px 16px 4px; }
.kz-boei__viewer-cap b { font-size: 17px; }
.kz-boei__viewer-cap q { font-size: 13.5px; color: var(--kz-off-white-dim); }
.kz-boei__viewer-actions { display: flex; gap: 8px; justify-content: flex-end; padding: 10px 16px 14px; }
@media (prefers-reduced-motion: reduce) { .kz-boei__reward-card { animation: none; } }
.kz-boei__review-op { margin: 4px 0 0; font-size: 12px; }
