/* ── GOAT GETAWAY (goat-chase.js) ── */
.chase-section { background: var(--cream); }
.goat-chase { max-width: 520px; margin: 2rem auto 0; }
.gc-hud { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-family: var(--f-josefin); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--dark-brown); margin-bottom: .5rem; }
.gc-hud b { font-size: 1rem; }
.gc-lives { letter-spacing: 0; font-size: 1rem; min-width: 3.5rem; text-align: center; }
.gc-stage { position: relative; border: 4px solid #4b6a40; border-radius: 6px; overflow: hidden; background: #e7dfc9; }
.gc-canvas { display: block; width: 100%; height: auto; touch-action: none; outline: none; }
.gc-canvas:focus-visible { box-shadow: inset 0 0 0 3px #f5c542; }
.gc-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .7rem; padding: 1.5rem; text-align: center; background: rgba(40, 45, 32, .82); color: #fff8ea; }
.gc-overlay[hidden] { display: none; }
.gc-overlay h3 { font-family: var(--f-playfair); font-size: 1.8rem; margin: 0; }
.gc-overlay p { max-width: 360px; line-height: 1.55; font-size: .95rem; margin: 0; }
.gc-overlay .btn-dark { background: #b8432f; border: 0; cursor: pointer; }
.gc-goal { margin-top: .6rem; font-size: .9rem; color: var(--dark-brown); }
.gc-goal-bar { display: block; height: 8px; margin-top: .3rem; border-radius: 4px; background: rgba(92,61,46,.15); overflow: hidden; }
.gc-goal-fill { display: block; height: 100%; width: 0; background: #3f8f3a; transition: width .3s; }
.gc-goal.is-open { font-weight: 700; color: #a33a2a; }
.gc-goal.is-open .gc-goal-fill { background: #a33a2a; }
.gc-pad { display: grid; grid-template-columns: repeat(3, 56px); grid-template-rows: repeat(2, 48px); gap: 6px; justify-content: center; margin-top: .9rem; }
.gc-pad button { border: 0; border-radius: 10px; background: var(--dark-brown); color: #fff; font-size: 1.1rem; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.gc-pad button:active { background: #b8432f; }
.gc-pad [data-dir="up"] { grid-column: 2; grid-row: 1; }
.gc-pad [data-dir="left"] { grid-column: 1; grid-row: 2; }
.gc-pad [data-dir="down"] { grid-column: 2; grid-row: 2; }
.gc-pad [data-dir="right"] { grid-column: 3; grid-row: 2; }
.gc-help { text-align: center; font-size: .8rem; color: var(--brown); opacity: .8; margin-top: .6rem; }
@media (hover: hover) and (pointer: fine) { .gc-pad { display: none; } }

/* Shared high scores */
.gc-name { width: 100%; max-width: 320px; font-size: .9rem; }
.gc-name[hidden] { display: none; }
.gc-name-row { display: flex; gap: .4rem; margin-top: .4rem; }
.gc-name input { flex: 1; min-width: 0; padding: .55rem .7rem; border: 0; border-radius: 6px; font: inherit; }
.gc-name button { padding: .55rem 1rem; border: 0; border-radius: 6px; background: #f5c542; color: #3d3e32; font-weight: 700; cursor: pointer; }
.gc-board { margin-top: 1.4rem; background: var(--white); border: 1px solid rgba(92,61,46,0.12); padding: 1.1rem 1.3rem; }
.gc-board[hidden] { display: none; }
.gc-board h3 { font-family: var(--f-playfair); font-size: 1.3rem; color: var(--dark-brown); margin: 0 0 .6rem; }
.gc-top { list-style: none; margin: 0; padding: 0; }
.gc-top li { display: grid; grid-template-columns: 2.2rem 1fr auto 4.5rem; gap: .5rem; align-items: center; padding: .4rem .3rem; border-bottom: 1px dashed rgba(92,61,46,0.15); color: var(--dark-brown); font-size: .95rem; }
.gc-top li span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-top li span:nth-child(3) { font-size: .8rem; color: var(--brown); }
.gc-top li span:nth-child(4) { text-align: right; font-weight: 700; color: var(--rust); font-variant-numeric: tabular-nums; }
.gc-top li.is-you { background: rgba(110,138,114,.18); font-weight: 700; }
.gc-top li.gc-empty { display: block; font-style: italic; color: var(--brown); }
.gc-plays { font-size: .8rem; color: var(--brown); opacity: .8; margin: .6rem 0 0; }

/* Easy / Hard choice */
.gc-modes { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: center; }
.gc-modes[hidden] { display: none; }
.gc-mode { display: flex; flex-direction: column; align-items: center; gap: .15rem; min-width: 8.5rem; padding: .7rem 1.1rem; border: 0; cursor: pointer; background: #5b8a4a !important; }
.gc-mode-hard { background: #b8432f !important; }
.gc-mode small { font-size: .62rem; letter-spacing: .04em; text-transform: none; opacity: .9; font-weight: 400; }
.gc-diff { font-style: normal; font-size: .75rem; opacity: .75; }
.gc-start[hidden] { display: none !important; }
/* Bigger maze on computers (fits the screen height) */
@media (min-width: 900px) {
  .goat-chase { max-width: min(860px, calc((100vh - 170px) * 0.86)); min-width: 600px; }
}
