/* Faustrecht: the platform fighter in the Goldfurt arena (js/brawl.js). Terra palette:
   Waldgrün #243A32 · Gold #C49A52 · Pergament #E7D9BC. */

.landing.brawl-mode { padding: 0; overflow: hidden; }
.brawl-host { position: fixed; inset: 0; z-index: 30; }
.bw {
	position: absolute; inset: 0; overflow: hidden;
	font-family: 'Alegreya', Georgia, serif; color: #f4e8cc;
	background: #2a3a44;
}
/* The painted valley as a soft backdrop behind the transparent 3D canvas. */
.bw::before {
	content: ''; position: absolute; inset: -20px;
	background: url('../img/landing.webp') center 35% / cover no-repeat;
	filter: blur(5px) saturate(1.05) brightness(0.82);
}
.bw::after {
	content: ''; position: absolute; inset: 0; pointer-events: none;
	background: radial-gradient(ellipse at 50% 40%, transparent 40%, rgba(10, 14, 18, 0.55));
}
.bw-view { position: absolute; inset: 0; z-index: 1; }
.bw-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bw-labels { position: absolute; inset: 0; pointer-events: none; }
.bw-tag {
	position: absolute; left: 0; top: 0; padding: 1px 8px; border-radius: 999px;
	font: 800 12px/1.5 'Cinzel', serif; letter-spacing: .06em; color: #fff;
	background: var(--pc); box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
	white-space: nowrap;
}
.bw-tag::after {
	content: ''; position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%);
	border: 5px solid transparent; border-bottom: 0; border-top-color: var(--pc);
}

/* ---- HUD ---- */
.bw-hud {
	position: absolute; left: 0; right: 0; bottom: 14px; z-index: 3;
	display: flex; justify-content: center; gap: 14px; padding: 0 12px; pointer-events: none; flex-wrap: wrap;
}
.bw-card {
	position: relative; display: flex; align-items: center; gap: 10px;
	min-width: 210px; padding: 8px 14px 8px 8px; border-radius: 14px;
	background: linear-gradient(180deg, rgba(36, 58, 50, .92), rgba(20, 32, 28, .94));
	border: 2px solid var(--pc); box-shadow: 0 8px 20px rgba(0, 0, 0, .45);
}
.bw-card.out { opacity: .45; filter: grayscale(.8); }
.bw-card.hit { animation: bw-shake .3s; }
.bw-face { width: 52px; height: 52px; border-radius: 10px; background: rgba(0, 0, 0, .3); border: 2px solid var(--pc); object-fit: cover; }
.bw-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.bw-info b { font: 700 15px 'Cinzel', serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.bw-sub { font-size: 12px; color: #c9b88e; }
.bw-stocks { display: flex; gap: 4px; margin-top: 4px; }
.bw-stocks i { width: 11px; height: 11px; border-radius: 50%; background: var(--pc); box-shadow: 0 0 0 2px rgba(0, 0, 0, .35); }
.bw-stocks i.lost { background: transparent; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.bw-dmg { font: 800 40px/1 'Cinzel', serif; text-shadow: 0 3px 0 rgba(0, 0, 0, .55), 0 0 12px rgba(0, 0, 0, .4); display: flex; align-items: baseline; }
.bw-dmg small { font-size: 18px; margin-left: 2px; color: #e8dcc0; }
@keyframes bw-shake {
	0%, 100% { transform: none; }
	20% { transform: translate(-6px, 2px) rotate(-2deg); }
	45% { transform: translate(5px, -2px) rotate(1.5deg); }
	70% { transform: translate(-3px, 1px); }
}

.bw-banner {
	position: absolute; left: 50%; top: 22%; z-index: 4; transform: translate(-50%, -50%);
	font: 800 clamp(34px, 7vw, 84px)/1 'Cinzel', serif; color: var(--pc);
	text-shadow: 0 4px 0 #1a120a, 0 0 30px rgba(0, 0, 0, .6); white-space: nowrap; pointer-events: none;
}
.bw-banner.pop { animation: bw-pop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes bw-pop { from { transform: translate(-50%, -50%) scale(.4); opacity: 0; } }
.bw-flash { position: absolute; inset: 0; z-index: 5; pointer-events: none; background: #fff; opacity: 0; }
.bw-flash.on { animation: bw-flash .35s ease-out; }
@keyframes bw-flash { from { opacity: .55; } to { opacity: 0; } }

.bw-pausebtn {
	position: absolute; top: 14px; right: 14px; z-index: 6; width: 44px; height: 44px; border-radius: 12px;
	font: 800 16px 'Cinzel', serif; color: #f4e8cc; cursor: pointer;
	background: rgba(36, 58, 50, .85); border: 2px solid #c49a52;
}
.bw-loading { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; font: 700 22px 'Cinzel', serif; text-shadow: 0 2px 8px #000; }

/* ---- menus ---- */
.bw-menu, .bw-over {
	position: absolute; inset: 0; z-index: 8; overflow-y: auto;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 16px;
}
.bw-over { background: rgba(10, 14, 18, .55); }
.bw-title { text-align: center; }
.bw-title h1 {
	margin: 0; font: 800 clamp(48px, 9vw, 96px)/1 'Cinzel', serif; letter-spacing: .04em;
	color: #f1dfb4; text-shadow: 0 4px 0 #3a2410, 0 0 40px rgba(0, 0, 0, .6);
}
.bw-title p { margin: 10px auto 0; max-width: 34em; font-size: 18px; text-shadow: 0 2px 8px rgba(0, 0, 0, .9); }
.bw-panel {
	width: min(560px, 100%); padding: 22px; border-radius: 18px;
	background: linear-gradient(180deg, rgba(36, 58, 50, .94), rgba(22, 34, 30, .96));
	border: 2px solid #c49a52; box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
}
.bw-panel.small { width: min(360px, 100%); text-align: center; }
.bw-panel h2 { margin: 0 0 14px; font: 800 28px 'Cinzel', serif; color: #f1dfb4; }
.bw-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.bw-row > span { width: 64px; font: 700 14px 'Cinzel', serif; color: #c9b88e; }
.bw-seg { display: flex; flex: 1; border-radius: 10px; overflow: hidden; border: 1px solid rgba(196, 154, 82, .5); min-width: 220px; }
.bw-seg button {
	flex: 1; padding: 9px 10px; border: 0; cursor: pointer; font: 700 15px 'Alegreya', serif;
	color: #e8dcc0; background: rgba(0, 0, 0, .2);
}
.bw-seg button + button { border-left: 1px solid rgba(196, 154, 82, .35); }
.bw-seg button.on { background: #c49a52; color: #1d1608; }
.bw-seg button:disabled { opacity: .35; cursor: default; }
.bw-keys { display: grid; gap: 6px; margin: 16px 0 18px; padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, .22); font-size: 14px; }
.bw-keys div { display: flex; gap: 10px; }
.bw-keys b { min-width: 118px; color: #f1dfb4; }
.bw-keys span { color: #d8cbaa; }
.bw-keys.abil { margin-top: -6px; }
.bw-keys h3 { margin: 0 0 2px; font: 700 13px 'Cinzel', serif; letter-spacing: .08em; color: #c49a52; text-transform: uppercase; }
.bw-gear { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 0; padding: 10px 14px; border-radius: 12px; background: rgba(196, 154, 82, .14); border: 1px solid rgba(196, 154, 82, .4); font-size: 15px; }
.bw-gear > span { font: 700 13px 'Cinzel', serif; color: #c9b88e; }
.bw-gear b { color: #f1dfb4; flex: 1; }
.bw-link { border: 0; background: none; padding: 0; cursor: pointer; font: 700 14px 'Alegreya', serif; color: #e0b866; text-decoration: underline; text-underline-offset: 3px; }
.bw-legend {
	position: absolute; left: 14px; top: 14px; z-index: 6; max-width: min(560px, calc(100% - 90px)); padding: 7px 12px; border-radius: 10px;
	font-size: 13px; line-height: 1.5; color: #e8dcc0; background: rgba(20, 32, 28, .62); pointer-events: none;
}
.bw-legend b { color: #f1dfb4; }
.bw-view canvas { cursor: crosshair; }
.bw-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.bw-btn {
	padding: 12px 22px; border-radius: 12px; cursor: pointer; font: 800 16px 'Cinzel', serif; letter-spacing: .04em;
	border: 2px solid #c49a52; transition: transform .12s, filter .12s;
}
.bw-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.bw-btn.go { background: linear-gradient(180deg, #e0b866, #b8863e); color: #1d1608; }
.bw-btn.ghost { background: rgba(0, 0, 0, .25); color: #f1dfb4; }
.bw-result { text-align: center; color: var(--pc) !important; text-shadow: 0 3px 0 #1a120a; font-size: 34px !important; }
.bw-table { width: 100%; border-collapse: collapse; margin: 6px 0 18px; font-size: 15px; }
.bw-table th { font: 700 12px 'Cinzel', serif; color: #c9b88e; text-align: right; padding: 4px 8px; }
.bw-table td { padding: 7px 8px; text-align: right; border-top: 1px solid rgba(196, 154, 82, .2); }
.bw-table td:first-child { text-align: left; font-weight: 700; }
.bw-table td i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--pc); margin-right: 8px; }

/* ---- touch controls ---- */
.bw-touch { position: absolute; inset: auto 0 0 0; height: 200px; z-index: 7; pointer-events: none; }
.bw-stick {
	position: absolute; left: 22px; bottom: 96px; width: 120px; height: 120px; border-radius: 50%;
	background: rgba(0, 0, 0, .25); border: 2px solid rgba(241, 223, 180, .45); pointer-events: auto; touch-action: none;
}
.bw-stick i { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px; border-radius: 50%; background: rgba(241, 223, 180, .75); }
.bw-buttons { position: absolute; right: 16px; bottom: 96px; display: grid; grid-template-columns: repeat(3, 60px); gap: 8px; pointer-events: auto; }
.bw-buttons button[data-b="jump"] { grid-column: span 2; }
.bw-buttons button {
	height: 56px; border-radius: 16px; border: 2px solid #c49a52; touch-action: none;
	font: 800 12px 'Cinzel', serif; color: #f1dfb4; background: rgba(36, 58, 50, .8);
}
.bw-buttons button.on { background: #c49a52; color: #1d1608; }
.bw-touch ~ .bw-view .bw-hud, .bw:has(.bw-touch) .bw-hud { bottom: auto; top: 8px; }

@media (max-width: 700px) {
	.bw-card { min-width: 0; padding: 6px 10px 6px 6px; gap: 6px; }
	.bw-face { width: 36px; height: 36px; }
	.bw-info b { font-size: 12px; max-width: 70px; }
	.bw-sub { display: none; }
	.bw-dmg { font-size: 26px; }
	.bw-dmg small { font-size: 13px; }
	.bw-hud { gap: 6px; }
	.bw-keys b { min-width: 90px; }
}
