/* Fametown Arena · kit arcade (v1, 2026-10-29). Maqueta común de Serpiente Star, 2048 Star y Duelo de Luz. Prefijo «ak». */
.ak-page { max-width: 1240px; margin: 0 auto; padding: 16px 12px 44px; }
.ak-shell {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	grid-template-rows: auto auto auto auto 1fr;
	grid-template-areas: "board head" "board hud" "board pad" "board ctrl" "board foot";
	gap: 14px 20px;
	align-items: start;
	padding: 16px;
	border: 1px solid var(--ftg-line);
	border-radius: 22px;
	background: radial-gradient(120% 60% at 50% -20%, var(--ak-glow, rgba(124, 92, 255, .16)), transparent 60%), linear-gradient(180deg, var(--ftg-surface-2), var(--ftg-surface));
	box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .7);
}
.ak-head { grid-area: head; padding-top: 2px; }
.ak-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ak-head h1 { font: 600 clamp(24px, 2.7vw, 31px)/1.05 Outfit, sans-serif; letter-spacing: -.015em; color: #fff; margin: 0; text-align: left; text-shadow: none; }
.ak-badge { font: 800 12px/1 Outfit, sans-serif; letter-spacing: .04em; color: #1a1036; background: var(--ak-accent, var(--ftg-gold)); padding: 5px 9px; border-radius: 999px; box-shadow: 0 2px 0 #e0245e; }
.ak-head p { margin: 8px 0 0; color: var(--ftg-muted); font-size: 14px; line-height: 1.5; }

.ak-hud { grid-area: hud; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ak-stat { min-width: 0; border: 1px solid var(--ftg-line); border-radius: 14px; background: rgba(255, 255, 255, .04); padding: 8px 12px 9px; }
.ak-stat > span { display: block; color: var(--ftg-muted); font: 500 11.5px/1.2 Inter, sans-serif; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ak-stat strong { display: block; margin-top: 3px; color: #fff; font: 600 clamp(17px, 1.8vw, 21px)/1.15 Outfit, sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ak-stat--main strong { color: var(--ftg-gold); }
.ak-stat--wide { grid-column: 1 / -1; }
.ak-stat.is-bump strong { animation: akBump .45s var(--ftg-spring); }
@keyframes akBump { 40% { transform: scale(1.16); } }
.ak-bar { position: relative; height: 6px; margin-top: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.ak-bar b { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 99px; background: linear-gradient(90deg, #14b8a6, #7c5cff 60%, #e0245e); transition: width .2s linear; }

.ak-stage {
	grid-area: board;
	position: relative;
	width: 100%;
	aspect-ratio: var(--ak-ratio, 1);
	max-height: calc(100vh - 110px);
	max-height: calc(100svh - 110px);
	min-height: 320px;
	margin: 0 auto;
	border-radius: 14px;
	overflow: hidden;
	background: #07020f;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 0 0 5px #0b0618, 0 0 0 6px var(--ak-ring, rgba(124, 92, 255, .35)), 0 24px 50px -18px rgba(0, 0, 0, .9);
	touch-action: none;
	user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
	overscroll-behavior: contain;
	scroll-margin-top: 64px;
	outline: 0;
}
.ak-stage:fullscreen { border-radius: 0; max-height: none; aspect-ratio: auto; width: 100vw; height: 100vh; }
.ak-stage canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; }

.ak-toast { position: absolute; left: 50%; top: 12px; z-index: 4; max-width: calc(100% - 120px); padding: 8px 14px; border-radius: 999px; background: rgba(20, 11, 38, .88); border: 1px solid rgba(124, 92, 255, .55); color: #fff; font: 600 13.5px/1.3 Inter, sans-serif; text-align: center; opacity: 0; transform: translate(-50%, -10px) scale(.96); pointer-events: none; transition: opacity .25s var(--ftg-ease), transform .35s var(--ftg-spring); }
.ak-toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.ak-toast.is-gold { border-color: rgba(245, 197, 66, .8); color: #ffe7a0; }
.ak-toast.is-pink { border-color: rgba(224, 36, 94, .75); }
.ak-toast.is-teal { border-color: rgba(20, 184, 166, .8); color: #b8fff4; }
.ak-hint { position: absolute; left: 50%; bottom: 14px; z-index: 3; transform: translateX(-50%); max-width: calc(100% - 24px); padding: 8px 14px; border-radius: 999px; background: rgba(20, 11, 38, .82); border: 1px solid rgba(255, 255, 255, .16); color: #fff; font: 600 13px/1.25 Inter, sans-serif; text-align: center; pointer-events: none; opacity: 0; transition: opacity .4s var(--ftg-ease); }
.ak-hint.show { opacity: 1; }

.ak-tr { position: absolute; right: 10px; top: 10px; z-index: 3; display: flex; gap: 8px; }
.ak-stage .ak-ibtn { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; min-width: 0; min-height: 0; margin: 0; padding: 0; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .28); background: rgba(20, 11, 38, .55); color: #fff; box-shadow: none; cursor: pointer; touch-action: manipulation; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); transition: background .2s, transform .2s var(--ftg-spring); }
.ak-stage .ak-ibtn:hover { background: rgba(124, 92, 255, .45); transform: translateY(-1px); }
.ak-stage .ak-ibtn svg { width: 19px; height: 19px; }
.ak-stage .ak-ibtn:focus-visible { outline: 2px solid #b9a8ff; outline-offset: 2px; }

.ak-overlay { position: absolute; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; padding: 14px; background: linear-gradient(180deg, rgba(4, 2, 16, .35), rgba(4, 2, 16, .8)); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); opacity: 0; visibility: hidden; transition: opacity .25s var(--ftg-ease), visibility 0s linear .25s; }
.ak-overlay.active { opacity: 1; visibility: visible; transition: opacity .25s var(--ftg-ease); }
.ak-panel { width: min(100%, 460px); max-height: 100%; overflow: auto; border: 1px solid var(--ftg-line-2); border-radius: 20px; background: radial-gradient(120% 80% at 50% -20%, var(--ak-glow, rgba(124, 92, 255, .3)), transparent 60%), linear-gradient(180deg, #1f1442, #140b26); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); padding: 20px 20px 18px; text-align: center; transform: translateY(14px) scale(.97); transition: transform .45s var(--ftg-spring); scrollbar-width: thin; }
.ak-overlay.active .ak-panel { transform: none; }
.ak-panel h2 { margin: 0 0 10px; font: 800 clamp(22px, 4vw, 31px)/1.1 Outfit, sans-serif; color: var(--ak-accent, var(--ftg-gold)); text-shadow: 0 3px 0 #e0245e, 0 10px 24px rgba(224, 36, 94, .35); letter-spacing: .04em; }
.ak-panel p { margin: 0 0 14px; color: var(--ftg-text); opacity: .92; line-height: 1.5; font-size: 14.5px; }
.ak-panel p b { color: #fff; }
.ak-extra:empty { display: none; }
.ak-extra { margin: 0 0 14px; }
.ak-res { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ak-res > span { border: 1px solid var(--ftg-line); border-radius: 14px; background: rgba(255, 255, 255, .04); padding: 8px 6px; }
.ak-res small { display: block; color: var(--ftg-muted); font: 500 11.5px/1.3 Inter, sans-serif; }
.ak-res b { display: block; color: #fff; font: 600 18px/1.3 Outfit, sans-serif; font-variant-numeric: tabular-nums; }
.ak-res b.is-gold { color: var(--ftg-gold); }
.ak-modes { display: grid; gap: 8px; text-align: left; }
.ak-shell .ak-mode { appearance: none; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; width: 100%; min-height: 0; height: auto; margin: 0; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--ftg-line-2); background: linear-gradient(160deg, rgba(124, 92, 255, .26), rgba(20, 11, 38, .9)); color: #fff; text-align: left; text-transform: none; letter-spacing: normal; font: inherit; line-height: 1.3; cursor: pointer; transition: transform .2s var(--ftg-spring), border-color .2s, box-shadow .2s; }
.ak-shell .ak-mode:hover:not(:disabled), .ak-shell .ak-mode:focus-visible { transform: translateY(-2px); border-color: var(--ak-accent, var(--ftg-gold)); box-shadow: 0 10px 22px -12px rgba(124, 92, 255, .9); outline: none; }
.ak-shell .ak-mode:disabled { opacity: .5; cursor: default; }
.ak-mode i { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .07); color: var(--ak-accent, var(--ftg-gold)); font-style: normal; }
.ak-mode i svg { width: 24px; height: 24px; }
.ak-mode b { display: block; font: 700 15.5px/1.2 Outfit, sans-serif; }
.ak-mode small { display: block; color: var(--ftg-muted); font: 500 12.5px/1.35 Inter, sans-serif; margin-top: 2px; }
.ak-mode em { font: 700 12px/1 Outfit, sans-serif; font-style: normal; color: var(--ftg-gold); white-space: nowrap; }
.ak-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ak-acts .glass-btn { flex: 1 1 150px; max-width: 230px; padding: 0 16px; }
.glass-btn.ak-ghost { background: rgba(255, 255, 255, .06); border: 1px solid var(--ftg-line-2); box-shadow: none; }
.glass-btn.ak-ghost:hover:not(:disabled) { background: rgba(124, 92, 255, .22); border-color: rgba(124, 92, 255, .6); box-shadow: none; }

.ak-controls { grid-area: ctrl; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ak-controls .glass-btn { min-width: 0; padding: 0 10px; }
.ak-controls .ak-end { grid-column: 1 / -1; background: linear-gradient(90deg, #7c5cff, #e0245e); }
.ak-btn-pause .ico-play, .ak-btn-pause.is-paused .ico-pause { display: none; }
.ak-btn-pause.is-paused .ico-play { display: inline; }
.ak-btn-sound .ico-off, .ak-btn-sound.is-off .ico-on { display: none; }
.ak-btn-sound.is-off .ico-off { display: inline; }
.ak-btn-sound.is-off { color: var(--ftg-muted); }

/* Mando táctil (cruceta o giros), solo en pantallas táctiles */
.ak-pad { grid-area: pad; display: none; }
.ak-pad button { appearance: none; display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; margin: 0; padding: 0; border-radius: 18px; border: 1.5px solid rgba(255, 255, 255, .18); background: linear-gradient(180deg, rgba(124, 92, 255, .3), rgba(20, 11, 38, .9)); color: #fff; box-shadow: none; touch-action: none; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .08s, background .12s; }
.ak-pad button svg { width: 28px; height: 28px; pointer-events: none; }
.ak-pad button.is-on { transform: scale(.94); background: linear-gradient(180deg, rgba(245, 197, 66, .5), rgba(124, 92, 255, .5)); }
.ak-pad--cross { grid-template-columns: repeat(3, 64px); grid-template-rows: repeat(2, 56px); gap: 8px; justify-content: center; }
.ak-pad--cross [data-dir="0"] { grid-column: 2; grid-row: 1; }
.ak-pad--cross [data-dir="3"] { grid-column: 1; grid-row: 2; }
.ak-pad--cross [data-dir="2"] { grid-column: 2; grid-row: 2; }
.ak-pad--cross [data-dir="1"] { grid-column: 3; grid-row: 2; }
.ak-pad--turn { grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.ak-pad--turn button { height: 64px; }

.ak-foot { grid-area: foot; color: var(--ftg-muted); font-size: 12.5px; line-height: 1.75; }
.ak-foot p { margin: 0 0 6px; }
.ak-foot kbd, .ak-card kbd { display: inline-block; min-width: 22px; padding: 1px 6px; margin: 0 1px; border-radius: 6px; border: 1px solid var(--ftg-line-2); border-bottom-width: 2px; background: rgba(255, 255, 255, .05); color: #fff; font: 600 11px/1.5 Inter, sans-serif; text-align: center; }
.ak-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ak-guide { margin-top: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ak-card { border: 1px solid var(--ftg-line); border-radius: 18px; background: linear-gradient(180deg, var(--ftg-surface-2), var(--ftg-surface)); padding: 18px 18px 16px; }
.ak-card h2 { margin: 0 0 12px; font: 600 19px/1.2 Outfit, sans-serif; color: #fff; }
.ak-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ak-card li { font-size: 13.5px; line-height: 1.5; color: var(--ftg-text); padding-left: 16px; position: relative; }
.ak-card li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 2px; background: var(--ak-accent, var(--ftg-gold)); transform: rotate(45deg); }
.ak-card li b { color: #fff; font-weight: 600; }
.ak-card p { margin: 12px 0 0; color: var(--ftg-muted); font-size: 13px; line-height: 1.55; }

@media (max-width: 1100px) and (min-width: 900px) {
	.ak-shell { grid-template-columns: minmax(0, 1fr) 250px; }
	.ak-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
	.ak-page { padding: 10px 6px 28px; }
	.ak-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "head" "hud" "board" "pad" "ctrl"; gap: 10px; padding: 12px 10px; border-radius: 18px; }
	.ak-head p { font-size: 13.5px; margin-top: 4px; }
	.ak-hud { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
	.ak-stat { padding: 6px 8px 7px; border-radius: 12px; }
	.ak-stat > span { font-size: 10.5px; letter-spacing: 0; }
	.ak-stat strong { font-size: 16px; }
	.ak-stat--wide { grid-column: auto; }
	.ak-stat--opt { display: none; }
	.ak-stage { aspect-ratio: var(--ak-ratio-m, var(--ak-ratio, 1)); max-height: calc(100svh - 170px); min-height: 280px; border-radius: 12px; }
	.ak-controls { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.4fr); }
	.ak-controls .glass-btn { min-height: 46px; padding: 0 8px; font-size: 14px; gap: 6px; }
	.ak-controls .ak-end { grid-column: auto; }
	.ak-end .ak-lg { display: none; } .ak-end .ak-sm { display: inline; }
	.ak-foot { display: none; }
	.ak-guide { grid-template-columns: minmax(0, 1fr); }
}
.ak-sm { display: none; }
@media (pointer: coarse) {
	.ak-pad { display: grid; }
}
@media (max-width: 560px) {
	.ak-controls { gap: 6px; }
	.ak-controls .glass-btn:not(.ak-end) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.ak-controls .glass-btn svg { width: 20px; height: 20px; }
	.ak-overlay { padding: 8px; }
	.ak-panel { padding: 14px 12px 12px; border-radius: 16px; }
	.ak-panel h2 { font-size: 22px; margin-bottom: 6px; }
	.ak-panel p { font-size: 13px; margin-bottom: 10px; line-height: 1.4; }
	.ak-shell .ak-mode { grid-template-columns: 36px 1fr auto; padding: 8px 10px; gap: 10px; }
	.ak-mode i { width: 36px; height: 36px; }
	.ak-mode small { font-size: 11.5px; }
	.ak-acts .glass-btn { min-height: 42px; flex-basis: 120px; }
	.ak-toast { max-width: calc(100% - 24px); top: 60px; font-size: 12.5px; }
	.ak-hint { font-size: 12px; padding: 7px 11px; }
}
@media (max-width: 420px) { .ak-head p { display: none; } }
@media (prefers-reduced-motion: reduce) {
	.ak-stat.is-bump strong { animation: none; }
	.ak-panel, .ak-toast { transition: none; }
}
