/* Game controls, audio drawer, FAQ & contact styles aligned with Daily Break Club tokens. */
:root { --pause-fill: #F5D999; --pause-ink: #4A3300; --stop-fill: #FCE6E8; --stop-ink: #8E1B36; }
:root[data-theme=dark] { --pause-fill: #E4BD6D; --pause-ink: #352400; --stop-fill: #442733; --stop-ink: #FFB7C6; }

.game-command-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 4;
  padding: 12px 14px;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
}
.session-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; min-width: 112px; color: var(--muted); }
.session-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
[data-state=running] .session-dot { background: var(--accent); }
[data-state=finished] .session-dot, [data-state=stopped] .session-dot { background: var(--negative); }

.game-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; }
.game-actions button { min-height: 44px; font-size: 13px; font-weight: 600; padding: 10px 15px; border-radius: 8px; }
.game-actions .round-start, #game-controls #new { background: var(--accent); color: var(--on-accent); min-width: 118px; }
.game-actions .round-start:hover { filter: brightness(1.08); background: var(--accent); }
.game-actions .round-pause { background: var(--pause-fill); color: var(--pause-ink); }
.game-actions .round-stop { background: var(--stop-fill); color: var(--stop-ink); }

.game-audio { display: flex; align-items: center; gap: 6px; flex-shrink: 0; order: 2; }
.game-command-bar .fullscreen-action { order: 3; }
.round-sound {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 12px;
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.round-sound svg, .audio-menu summary svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.game-audio[data-sound=on] .round-sound { background: var(--accent); color: var(--on-accent); }
.game-audio[data-sound=off] .sound-waves, .game-audio[data-sound=on] .sound-slash { display: none; }

.audio-menu > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
  border-radius: 8px;
  color: var(--text);
}
.audio-menu > summary::-webkit-details-marker { display: none; }
.audio-menu > summary:hover { background: var(--hover); }
.audio-menu > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.audio-menu[open] > summary { background: var(--surface); }

.audio-panel {
  position: absolute;
  right: 12px;
  top: calc(100% + 8px);
  width: 320px;
  max-width: calc(100vw - 64px);
  background: var(--surface);
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .18);
  z-index: 12;
  max-height: min(75vh, 580px);
  overflow-y: auto;
  color: var(--text);
  font-size: 14px;
}
.audio-panel fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 14px; min-width: 0; }
.audio-panel legend { font-family: 'Inter Tight', Inter, sans-serif; font-size: 20px; font-weight: 700; margin-bottom: 18px; line-height: 1.2; }
.audio-check { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; cursor: pointer; }
.audio-check input { width: 18px; height: 18px; min-height: 18px; padding: 0; margin: 0; accent-color: var(--accent); flex-shrink: 0; }
.audio-slider { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; }
.audio-slider output { color: var(--accent); font-variant-numeric: tabular-nums; }
.audio-slider input { grid-column: 1/-1; width: 100%; min-height: 28px; padding: 0; border: 0; background: transparent; accent-color: var(--accent); cursor: pointer; }
.music-status { font-size: 12px; color: var(--muted); line-height: 1.65; margin: 16px 0 10px; max-width: none; }
#retry-music { font-size: 13px; min-height: 40px; margin-bottom: 12px; color: var(--accent); }
.track-credit { padding: 14px; background: var(--ground); border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 6px; }
.track-credit > span { font-size: 11px; color: var(--muted); }
.track-credit strong { font-size: 14px; line-height: 1.45; font-weight: 600; }
.track-credit p { font-size: 12px; color: var(--muted); line-height: 1.45; }
.track-credit > div { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 4px; }
.track-credit a { font-size: 12px; color: var(--accent); line-height: 1.5; }

.music-credits { margin-top: 36px; scroll-margin-top: 24px; }
.music-credits h2 { font-size: 28px; line-height: 1.2; margin-bottom: 16px; }
.music-credits a { color: var(--accent); }
.music-credit-list { display: grid; gap: 12px; margin: 24px 0; }
.music-credit-row { display: grid; grid-template-columns: 1fr auto; gap: 22px; background: var(--surface); border: 1px solid var(--line); padding: 18px; border-radius: 12px; align-items: center; }
.music-credit-row h3 { font-size: 19px; }
.music-credits .music-credit-row p { font-size: 14px; margin: 6px 0; line-height: 1.5; }
.music-credit-row span { display: block; font-size: 12px; color: var(--muted); line-height: 1.65; }
.music-credit-row > div:last-child { display: grid; gap: 10px; font-size: 13px; }

.fullscreen-action { font-size: 12px; background: transparent; padding: 8px; min-height: 40px; color: var(--muted); }

.input-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  order: 1;
}
.input-mode-switch button {
  min-height: 36px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}
.input-mode-switch button:hover { background: var(--raised); color: var(--text); }
.input-mode-switch button[aria-pressed=true] {
  background: var(--accent);
  color: var(--on-accent);
}
:root[data-controls=keyboard] .direction-pad,
:root[data-controls=keyboard] .touch-controls,
:root[data-controls=keyboard] .number-pad {
  display: none !important;
}

.game-setup { background: var(--ground); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }
.game-setup > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; padding: 12px 14px; font-size: 14px; font-weight: 600; list-style: none; }
.game-setup > summary::-webkit-details-marker { display: none; }
.setup-summary { font-size: 12px; font-weight: 400; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.setup-summary > span { font-size: 18px; transition: transform .15s; }
.game-setup[open] .setup-summary > span { transform: rotate(180deg); }
.setup-content { padding: 0 14px 14px; }
.setup-help { font-size: 12px; color: var(--muted); margin-bottom: 12px; max-width: 64ch; }
.game-controls { gap: 10px; align-items: end; margin: 0; }
.game-controls > label { min-width: 125px; flex: 1 1 140px; font-size: 12px; color: var(--text); gap: 6px; }
.game-controls select, .game-controls input { background: var(--surface); border: 1px solid var(--line); font-size: 13px; max-width: none; min-height: 42px; padding: 8px 10px; width: 100%; }
.game-controls > button { min-height: 42px; font-size: 13px; background: var(--surface); border: 1px solid var(--line); padding: 8px 13px; }
.game-controls > button[aria-pressed=true] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

.game-score { padding: 11px 14px; border-radius: 9px; background: var(--raised); border: 1px solid var(--line); color: var(--text); font-size: 14px; margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.game-status { padding: 8px 0 0; min-height: 36px; font-size: 14px; line-height: 1.55; }
[data-state=finished] .game-status, [data-state=stopped] .game-status { color: var(--text); font-weight: 500; }

.controls-guide ul { padding: 0; list-style: none; margin: 0 0 14px; color: var(--muted); font-size: 14px; display: grid; gap: 10px; }
.controls-guide li { padding-left: 14px; position: relative; }
.controls-guide li::before { content: ''; width: 5px; height: 5px; position: absolute; left: 0; top: 9px; border-radius: 50%; background: var(--accent); }

.game-instructions { display: grid; grid-template-columns: 1.4fr 1fr; gap: 38px; padding: 36px 0 24px; }
.game-instructions h2 { font-size: 25px; margin-bottom: 14px; }
.game-instructions p { color: var(--muted); line-height: 1.75; font-size: 16px; }
.game-tip { background: var(--surface); border: 1px solid var(--line); padding: 22px; border-radius: 14px; align-self: start; }
.game-tip h3 { font-size: 20px; margin-bottom: 10px; }

.game-faq { display: grid; grid-template-columns: 1fr 1.65fr; gap: 44px; padding: 32px 0 42px; }
.faq-intro h2 { font-size: 28px; margin-bottom: 12px; }
.faq-intro p { color: var(--muted); margin-bottom: 20px; max-width: 30ch; }
.faq-intro a { font-size: 14px; font-weight: 600; color: var(--accent); }
.faq-list { display: grid; gap: 10px; align-content: start; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; list-style: none; padding: 16px 18px; font-size: 15px; font-weight: 600; cursor: pointer; line-height: 1.45; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary span { font-size: 22px; line-height: 1; font-weight: 400; color: var(--accent); flex-shrink: 0; transition: transform .15s; }
.faq-item[open] summary span { transform: rotate(45deg); }
.faq-item p { padding: 0 18px 18px; color: var(--muted); font-size: 15px; line-height: 1.7; max-width: 70ch; }

.practice-notice { background: var(--pause-fill); color: var(--pause-ink); padding: 12px 15px; border-radius: 9px; font-size: 13px; line-height: 1.5; max-width: none; width: 100%; }
.archery-canvas { aspect-ratio: 16/9; min-height: 0; width: 100%; height: auto; }
.archery-hud { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
.archery-hud > div { background: var(--ground); border: 1px solid var(--line); padding: 11px 13px; border-radius: 9px; display: grid; gap: 4px; }
.archery-hud span { font-size: 12px; color: var(--muted); }
.archery-hud strong { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.archery-hud #archery-wind { font-size: 14px; color: var(--accent); }
.archery-shot-controls { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; width: 100%; align-items: end; padding: 14px; background: var(--ground); border: 1px solid var(--line); border-radius: 12px; }
.archery-shot-controls label { display: grid; grid-template-columns: 1fr auto; gap: 6px; font-size: 13px; align-items: center; text-align: left; }
.archery-shot-controls output { font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.archery-shot-controls input { grid-column: 1/-1; padding: 0; min-height: 32px; accent-color: var(--accent); border: 0; background: transparent; width: 100%; cursor: pointer; }
.touch-controls .touch-primary { background: var(--accent); color: var(--on-accent); font-weight: 600; }

/* Contact Page */
.contact-page { max-width: 1100px; }
.contact-intro { display: flex; justify-content: space-between; align-items: end; gap: 28px; padding: 28px 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; margin: 20px 0 28px; }
.contact-intro h1 { font-size: 38px; margin-bottom: 14px; }
.contact-intro p { color: var(--muted); font-size: 16px; line-height: 1.7; max-width: 56ch; }
.contact-intro > a { color: var(--accent); font-size: 14px; font-weight: 600; white-space: nowrap; }
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(255px, 1fr); gap: 24px; margin-bottom: 56px; align-items: start; }
.contact-form-panel { padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; min-width: 0; }
.contact-form-panel h2 { font-size: 26px; margin-bottom: 8px; }
.contact-form-lead { color: var(--muted); font-size: 14px; line-height: 1.65; margin-bottom: 24px; }
.contact-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 18px; }
.contact-fields > label { display: block; min-width: 0; font-size: 14px; font-weight: 500; line-height: 1.5; }
.contact-fields label > span:not(.optional) { color: var(--negative); }
.contact-fields .optional { color: var(--muted); font-size: 12px; font-weight: 400; }
.contact-fields input, .contact-fields select, .contact-fields textarea { display: block; width: 100%; margin-top: 8px; background: var(--ground); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; color: var(--text); font: inherit; font-weight: 400; min-height: 46px; font-size: 14px; }
.contact-fields textarea { resize: vertical; min-height: 170px; line-height: 1.65; }
.contact-message { grid-column: 1/-1; }
.contact-submit { display: flex; align-items: center; gap: 20px; margin: 24px 0 16px; }
.contact-submit > .primary { white-space: nowrap; }
.contact-submit p, .contact-data-note { font-size: 12px; color: var(--muted); line-height: 1.7; }
.contact-aside { display: grid; gap: 18px; }
.contact-aside > section { background: var(--surface); border: 1px solid var(--line); padding: 24px; border-radius: 16px; }
.contact-aside h2 { font-size: 20px; margin-bottom: 12px; }
.contact-aside p { color: var(--muted); font-size: 14px; line-height: 1.7; margin-top: 12px; }
.contact-aside a { display: block; color: var(--accent); font-size: 14px; font-weight: 600; margin-top: 6px; overflow-wrap: anywhere; }
.contact-result { background: var(--ground); border: 1px solid var(--line); padding: 20px; border-radius: 12px; margin-top: 24px; }
.contact-result h3 { font-size: 22px; margin-bottom: 16px; }
.contact-result dl { margin: 0 0 18px; font-size: 13px; }
.contact-result dl > div { display: grid; grid-template-columns: 60px 1fr; gap: 10px; margin-bottom: 6px; }
.contact-result dt { color: var(--muted); }
.contact-result dd { margin: 0; overflow-wrap: anywhere; }
.contact-result textarea { width: 100%; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; line-height: 1.7; padding: 12px; margin-top: 8px; }
.contact-draft-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.contact-status { color: var(--accent); font-size: 14px; margin-top: 14px; }

@media (max-width: 780px) {
  .game-command-bar .session-title { width: 100%; order: 0; }
  .game-actions { order: 1; flex-basis: 100%; }
  .input-mode-switch { order: 2; }
  .game-audio { flex: 1; order: 3; }
  .game-command-bar .fullscreen-action { order: 4; min-height: 44px; width: auto; margin-left: auto; }
  .audio-panel { max-width: none; left: 12px; right: 12px; width: auto; }
  .game-instructions, .game-faq, .contact-layout { grid-template-columns: 1fr; gap: 22px; }
  .contact-intro { display: block; padding: 24px; }
  .contact-intro > a { display: inline-block; margin-top: 14px; }
  .contact-aside { grid-template-columns: 1fr 1fr; }
  .contact-aside > section:first-child { grid-column: 1 / -1; }
}

@media (max-width: 540px) {
  .contact-fields { grid-template-columns: 1fr; }
  .contact-submit { display: block; }
  .contact-submit > .primary { width: 100%; margin-bottom: 12px; }
  .contact-aside { grid-template-columns: 1fr; }
  .contact-aside > section:first-child { grid-column: auto; }
  .archery-shot-controls { grid-template-columns: 1fr 1fr; }
  .archery-shot-controls > button { grid-column: 1 / -1; width: 100%; }
  .audio-menu > summary svg { display: none; }
  .music-credit-row { grid-template-columns: 1fr; gap: 14px; }
}

/* Long-form game guides */
.game-article { max-width: 820px; padding: 12px 0 28px; }
.game-article section { margin: 0 0 30px; }
.game-article h2 { font-size: 24px; margin-bottom: 12px; }
.game-article p, .game-article li { color: var(--muted); line-height: 1.75; font-size: 16px; }
.game-article p + p { margin-top: 12px; }
.game-article ul { padding-left: 22px; margin: 10px 0; display: grid; gap: 6px; }
.article-table-wrap { overflow-x: auto; margin: 14px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.game-article table { width: 100%; border-collapse: collapse; font-size: 15px; }
.game-article th, .game-article td { text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.game-article th { background: var(--raised); color: var(--text); font-weight: 600; }
.game-article tr:last-child td { border-bottom: 0; }
.article-links { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; }
.article-links h2 { font-size: 20px; }
.article-links ul { list-style: none; padding: 0; }
.article-links a { color: var(--accent); font-weight: 600; text-decoration: none; }
.article-links a:hover { text-decoration: underline; }
