:root { --hook-cyan: #6df5ed; --hook-pink: #ff6ca8; }
.hook-shell { padding-block: 42px 28px; }
.hook-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 30px; }
.hook-heading h1 { font-size: clamp(38px, 5.5vw, 72px); letter-spacing: -.055em; line-height: 1.05; margin: 14px 0; }
.hook-heading h1 em { color: var(--hook-cyan); font-style: normal; }
.hook-heading p { color: #a6b0bf; margin: 0; }
.hook-heading .quiet-link { font-size: 12px; color: #b3c1ce; padding-bottom: 4px; }
.hook-arena { background: #101824; border: 1px solid #31404d; border-radius: 14px; padding: 14px; box-shadow: 0 24px 80px #0005; }
.hook-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.hook-top .eyebrow { font-size: 10px; letter-spacing: .12em; }
.hook-top button { color: #d6e8f1; background: #1b2736; border: 1px solid #405568; border-radius: 6px; padding: 8px 12px; min-height: 38px; cursor: pointer; font: inherit; font-size: 11px; }
.hook-hud { display: grid; grid-template-columns: 1fr 1fr 1fr 1.5fr .65fr; gap: 8px; margin-bottom: 12px; }
.hook-hud > div { min-width: 0; background: #162231; border: 1px solid #293949; padding: 10px 14px; border-radius: 6px; }
.hook-hud span { display: block; font-size: 9px; letter-spacing: .1em; color: #9aaebf; }
.hook-hud strong { display: block; font-size: clamp(18px, 2.6vw, 29px); line-height: 1.25; color: #eff8ff; font-variant-numeric: tabular-nums; margin-top: 5px; }
.hook-hud small { font-size: 12px; color: #a4c2cf; }
.hook-stage { position: relative; background: #090f1a; border-radius: 8px; overflow: hidden; width: 100%; margin-inline: auto; }
.hook-stage canvas { display: block; width: 100%; height: auto; aspect-ratio: 1000 / 650; outline-offset: -3px; }
.hook-intro { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; background: linear-gradient(90deg,#07111bdd,#07111b77,#07111bdd); padding: 18px; pointer-events: none; }
.hook-intro h2 { font-size: clamp(25px, 4.8vw, 60px); letter-spacing: -.045em; line-height: 1.05; margin: 18px 0 10px; color: #f3fcff; }
.hook-intro p { color: #b3c7d4; font-size: 14px; line-height: 1.6; }
.hook-intro .eyebrow { color: var(--hook-cyan); font-size: 10px; }
.hook-chip { border: 1px solid #446270; color: #d1f4f3; border-radius: 30px; font-size: 9px; letter-spacing: .12em; padding: 8px 14px; margin-top: 8px; }
.hook-feedback { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); color: var(--hook-cyan); font-weight: 800; letter-spacing: .08em; text-align: center; text-shadow: 0 2px 8px #000; font-size: clamp(11px,2vw,20px); white-space: nowrap; pointer-events: none; }
.hook-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 12px; }
.hook-controls button { min-width: 84px; min-height: 56px; padding: 8px 18px; border-radius: 7px; border: 1px solid #3b5868; color: #d5effa; background: #1c3041; font: inherit; font-weight: 700; touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; }
.hook-controls button.pressed, .hook-controls button:active { background: #28585d; border-color: var(--hook-cyan); color: #fff; }
.hook-controls p { text-align: center; font-size: 11px; line-height: 1.8; color: #a1b4c5; margin: 0; }
.hook-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #2e3d4b; padding-top: 12px; }
.hook-bottom p, #save-status { color: #b2c6d1; font-size: 12px; line-height: 1.5; margin: 0; }
.hook-arena .cta { border: 0; cursor: pointer; min-height: 44px; font: inherit; font-size: 12px; white-space: nowrap; background: var(--hook-cyan); color: #0b202b; }
.hook-arena .cta:disabled { opacity: .55; cursor: wait; }
.hook-finish { margin-top: 14px; padding: 20px; border: 1px solid #3c716e; background: #132b32; border-radius: 8px; }
.hook-finish h2 { font-size: 27px; margin: 8px 0; }
.hook-finish p { font-size: 13px; line-height: 1.6; }
.hook-finish label { font-size: 12px; display: block; margin: 12px 0 8px; }
.hook-save { display: flex; gap: 8px; }
.hook-save input { min-width: 0; flex: 1; color: #e8f7ff; background: #0c1c26; border: 1px solid #54707c; border-radius: 5px; padding: 12px; font: inherit; font-size: 13px; }
.hook-note { color: #9bafbf; font-size: 11px !important; line-height: 1.6; }
.hook-rules { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 30px; margin-block: 40px 60px; }
.hook-rules article { border-top: 1px solid #3b4d5d; padding-top: 18px; }
.hook-rules span { color: var(--hook-cyan); font-size: 10px; letter-spacing: .12em; }
.hook-rules h2 { font-size: 18px; margin-block: 12px; }
.hook-rules p { color: #a3b2bf; line-height: 1.7; font-size: 13px; }
.hook-ranking-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 24px; }
.hook-ranking-heading h2 { font-size: clamp(25px,3vw,36px); letter-spacing: -.04em; margin: 12px 0 0; }
#ranking-status { color: #a5b9c7; font-size: 12px; max-width: 330px; line-height: 1.6; }
.hook-ranking-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.hook-ranking-grid article { background: #131e2a; border: 1px solid #31404e; border-radius: 8px; padding: 20px; }
.hook-ranking-grid .eyebrow { font-size: 9px; color: var(--hook-cyan); }
.hook-ranking-grid h3 { font-size: 19px; margin: 12px 0 20px; }
.hook-ranking-grid ol { list-style: none; padding: 0; margin: 0; counter-reset: rank; }
.hook-ranking-grid li { counter-increment: rank; display: flex; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid #2d3b48; font-size: 12px; }
.hook-ranking-grid li::before { content: counter(rank,decimal-leading-zero); color: #748d9d; font-size: 10px; }
.hook-ranking-grid li span { overflow-wrap: anywhere; min-width: 0; flex: 1; }
.hook-ranking-grid li strong { color: var(--hook-cyan); white-space: nowrap; }
.hook-ranking-grid ol:empty::after { content: 'El horizonte espera tu primera marca.'; color: #8299ab; font-size: 12px; }
.hook-footer { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid #2e3b49; padding-block: 24px; color: #90a2b2; font-size: 11px; }
[hidden] { display: none !important; }
.hook-arena:is(:fullscreen,.game-fullscreen-fallback) { display: flex; flex-direction: column; height: 100dvh; min-height: 0; padding: 8px max(10px,env(safe-area-inset-right)) 8px max(10px,env(safe-area-inset-left)); border: 0; border-radius: 0; overflow: auto; gap: 6px; }
.hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-top { margin: 0; flex-shrink: 0; justify-content: flex-end; }
.hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-hud { margin: 0; flex-shrink: 0; }
.hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-stage { min-height: 100px; flex: 1 1 0; }
.hook-arena:is(:fullscreen,.game-fullscreen-fallback) canvas { width: 100%; height: 100%; object-fit: contain; aspect-ratio: auto; }
.hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-controls { flex-shrink: 0; padding: 0; }
.hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-bottom { flex-shrink: 0; padding-top: 6px; }
.hook-arena:is(:fullscreen,.game-fullscreen-fallback):has(.hook-finish:not([hidden])) .hook-stage { display: none; }
.hook-arena:is(:fullscreen,.game-fullscreen-fallback):has(.hook-finish:not([hidden])) .hook-controls { display: none; }
.hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-finish { flex-shrink: 0; margin-top: 0; }
@media (max-width: 700px) {
  .hook-shell { padding-top: 25px; }
  .hook-heading { display: block; margin-bottom: 22px; }
  .hook-heading .quiet-link { display: inline-block; margin-top: 16px; }
  .hook-heading .eyebrow { font-size: 9px; }
  .hook-arena { padding: 10px; }
  .hook-top .eyebrow { font-size: 8px; max-width: 130px; line-height: 1.5; }
  .hook-top button { padding: 8px; font-size: 10px; }
  .hook-hud { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 5px; }
  .hook-hud > div { grid-column: span 2; padding: 7px 8px; }
  .hook-hud span { font-size: 8px; letter-spacing: .04em; }
  .hook-hud strong { font-size: 20px; margin-top: 3px; }
  .hook-hud small { font-size: 11px; }
  .hook-controls { gap: 8px; }
  .hook-controls p { display: none; }
  .hook-controls button { min-width: 65px; padding: 8px 12px; }
  .hook-bottom { align-items: stretch; flex-direction: column; }
  .hook-bottom .cta { justify-content: center; }
  .hook-rules, .hook-ranking-grid { grid-template-columns: 1fr; gap: 20px; }
  .hook-rules { margin-block: 30px 40px; }
  .hook-ranking-heading { display: block; }
  .hook-save { flex-direction: column; }
  .hook-intro h2 { margin-block: 8px; }
  .hook-intro p { font-size: 11px; margin: 4px 0; }
  .hook-chip { padding: 5px 9px; font-size: 8px; margin-top: 5px; }
  .hook-intro .eyebrow { font-size: 8px; }
  .hook-footer { flex-wrap: wrap; }
}
@media (max-height: 540px) and (orientation: landscape) {
  .hook-arena:is(:fullscreen,.game-fullscreen-fallback) { display: grid; grid-template-columns: minmax(0,1fr) 210px; grid-template-rows: auto minmax(0,1fr) auto; gap: 6px 12px; }
  .hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-top { grid-column: 2; grid-row: 1; }
  .hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-hud { grid-column: 1; grid-row: 1; }
  .hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-hud > div { padding: 5px 7px; }
  .hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-hud strong { font-size: 18px; }
  .hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-stage { grid-column: 1; grid-row: 2 / 4; width: 100%; height: 100%; min-height: 0; }
  .hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-controls { grid-column: 2; grid-row: 2; flex-wrap: wrap; align-self: center; justify-content: center; }
  .hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-controls p { display: none; }
  .hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-controls button { min-width: 80px; }
  .hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-bottom { grid-column: 2; grid-row: 3; flex-direction: column; }
  .hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-bottom p { font-size: 10px; }
  .hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-finish { grid-column: 1; grid-row: 2 / 4; padding: 10px; }
}

:root { --hook-cyan: #bca4ff; --hook-pink: #75f5df; }
.hook-controls { justify-content: center; }
.hook-controls .hook-trigger { min-width: min(100%, 300px); background: #332c50; border-color: #8d77bd; color: #f1eaff; font-size: 14px; }
.hook-controls .hook-trigger span { display: block; font-size: 9px; letter-spacing: .08em; margin-top: 4px; }
.hook-hud { grid-template-columns: repeat(4,minmax(0,1fr)); }
.hook-hud > div { grid-column: auto !important; }
.hook-wind-meter i:nth-child(2) { height: 10px; }.hook-wind-meter i:nth-child(3) { height: 15px; }
.hook-arena:is(:fullscreen,.game-fullscreen-fallback):has(.hook-finish:not([hidden])) .hook-finish { padding: 9px; }
.hook-arena:is(:fullscreen,.game-fullscreen-fallback):has(.hook-finish:not([hidden])) .hook-finish h2 { font-size: 21px; }
@media (max-height: 540px) and (orientation: landscape) {
  .hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-controls { padding-top: 35px; }
}
.hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-finish { padding: 12px; }
.hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-finish h2 { font-size: 23px; margin: 4px 0; }
.hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-finish p { margin: 6px 0; font-size: 12px; line-height: 1.4; }
.hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-finish label { margin: 6px 0; font-size: 11px; }
.hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-finish input { padding: 9px; }
.hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-finish .hook-note { font-size: 10px !important; }
.hook-hud strong small { display: inline; }
.hook-feedback { width: calc(100% - 20px); white-space: normal; overflow-wrap: anywhere; }
.hook-feedback[data-warning="true"] { color: #ffb18d; }
@media(max-width:700px) { .hook-hud { grid-template-columns: repeat(2,minmax(0,1fr)); } .hook-stage canvas { aspect-ratio: 4 / 3; } }
@media(max-height:540px) and (orientation:landscape) { .hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-controls .hook-trigger { min-width:100%; min-height:80px; } }

/* Independent hook and jump controls share the arena width. */
.hook-hud { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hook-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hook-controls .hook-trigger { width: 100%; min-width: 0; min-height: 64px; padding-inline: 10px; }
.hook-jump { border-color: #df937a !important; background: #493044 !important; }
.hook-jump.pressed { background: #ffd2a3 !important; color: #201e30 !important; }
.hook-ranking-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media(max-width: 650px) { .hook-ranking-grid { grid-template-columns: 1fr; } }
.hook-arena:is(:fullscreen,.game-fullscreen-fallback) .hook-hud { grid-template-columns: repeat(2, minmax(0, 1fr)); }
