/* 1 Minute Challenge guide in the Drills topic (drills-omc.js). Classes start with om-.
   Uses the brand tokens from styles.css and layout classes from drills.css and drills-stt.css. */

/* One guide at a time: #drills[data-guide] is set from the hash. The drill picker stays. */
#drills[data-guide="omc"] #drills-root > section:not(.dr-pick) { display: none; }
#drills:not([data-guide="omc"]) #drills-omc-root { display: none; }
#drills[data-guide="omc"] .dr-dcard[href="#dr-target"] { border-color: transparent; box-shadow: var(--shadow); }
#drills[data-guide="omc"] .dr-dcard[href="#one-minute-challenge"] { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft), var(--shadow); }

.om-top .st-cta .pill svg { width: 18px; height: 18px; }

/* 02 LED states */
.om-leds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.om-led { display: grid; gap: 8px; align-content: start; }
.om-led .st-led { margin-bottom: 8px; padding: 6px; }
.om-led__k { display: inline-flex; align-items: center; gap: 8px; font: 700 12px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--inv-primary); }
.om-led__k i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; background: #e7f35a; color: #061a3a; display: grid; place-items: center; letter-spacing: 0; font-size: 12px; }
.om-led b { font: italic 800 23px/1.08 var(--f-display); color: #fff; }
.om-led__d { color: var(--inv-muted); font-size: 14.5px; }
@media (max-width: 960px) { .om-leds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .om-leds { gap: 14px 10px; } .om-led b { font-size: 18px; } .om-led__d { font-size: 13.5px; } }

/* 03 Beat the clock */
.om-game { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; background: var(--card); border-radius: 24px; box-shadow: var(--shadow); padding: clamp(14px, 2.4vw, 26px); }
.om-g-led { display: grid; grid-template-columns: 1fr 1fr; background: #000; border-radius: 16px; min-height: 150px; box-shadow: inset 0 0 0 2px #1a2230; overflow: hidden; }
.om-g-led .om-led-half { display: grid; place-content: center; justify-items: center; gap: 4px; padding: 14px 8px; }
.om-g-led .om-led-half + .om-led-half { border-inline-start: 2px solid #1c1f24; }
.om-led-start { color: #fff; font: 700 clamp(18px, 2.6vw, 28px)/1.05 var(--f-display); text-align: center; letter-spacing: .02em; }
.om-led-p { color: #8a8f99; font: 700 15px/1 var(--f-display); }
.om-led-n { color: #fff; font: 700 clamp(44px, 6vw, 72px)/1 var(--f-mono); }
.om-led-c { color: #fff; font: 700 clamp(18px, 2.6vw, 30px)/1 var(--f-mono); letter-spacing: .02em; white-space: nowrap; }
.om-led-c.is-red { color: #f6a49b; }
.om-led-c.is-done { white-space: normal; text-align: center; line-height: 1.1; font-size: clamp(14px, 1.8vw, 20px); }
.om-g-led .om-led-half { min-width: 0; }
.om-g-court { position: relative; background: #0d2e5c; border-radius: 18px; overflow: hidden; }
#om-court { width: 100%; height: auto; display: block; cursor: crosshair; touch-action: none; user-select: none; -webkit-user-select: none; direction: ltr; }
.om-g-next { position: absolute; inset-inline-start: 14px; top: 12px; background: rgba(0,0,0,.45); color: #fff; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 20px; pointer-events: none; }
.om-c-fill { fill: #1a52a3; }
.om-c-singles { fill: #1e5fb8; }
.om-c-line { stroke: #fff; stroke-width: 2.5; fill: none; }
.om-c-net { stroke: #e8f2ff; stroke-width: 5; stroke-dasharray: 2 5; }
.om-c-aim { fill: #e7f35a; fill-opacity: .1; stroke: #e7f35a; stroke-opacity: .55; stroke-width: 2; stroke-dasharray: 6 6; pointer-events: none; }
.om-mark { stroke-width: 3; }
.om-mark.is-in { fill: #fff; stroke: #19c37d; }
.om-mark.is-out { fill: #ff8a7a; stroke: #a8202a; }
.om-mark.is-last { stroke-width: 4.5; }
.om-trail { fill: none; stroke: #e7f35a; stroke-width: 3; stroke-dasharray: 2 7; stroke-linecap: round; opacity: .8; }
.om-ball { fill: #e7f35a; }
.om-pop rect { fill: #e7f35a; }
.om-pop text { fill: #061a3a; font: 700 15px var(--f-body); }
.om-pop.is-out rect { fill: #e5484d; }
.om-pop.is-out text { fill: #fff; }
.om-pl circle { stroke: #fff; stroke-width: 2.5; }
.om-pl text { fill: #fff; font: 700 15px var(--f-body); }
.om-pl--a circle { fill: var(--p1); }
.om-pl--b circle { fill: var(--p2); }
.om-pl--c circle { fill: #9b3fe0; }
.om-pl--d circle { fill: #10c56e; }
.om-pl.is-up circle { stroke: #e7f35a; stroke-width: 4; }
.om-g-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.om-g-len { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); }
.om-seg { display: inline-flex; background: #e9edf5; border-radius: 40px; padding: 4px; gap: 4px; }
.om-seg button { border: 0; background: transparent; color: var(--ink); font-weight: 600; font-size: 14px; padding: 7px 14px; border-radius: 40px; }
.om-seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.om-g-best { display: flex; align-items: baseline; gap: 8px; font-weight: 600; color: var(--muted); }
.om-g-best b { font: 700 22px/1 var(--f-mono); color: var(--ink); }
.om-g-reset { margin-inline-start: auto; background: transparent; }
.om-g-msg { min-height: 0; font: 700 18px/1.3 var(--f-display); color: var(--success); }
.om-g-msg:not(.is-on) { display: none; }

/* 05 four players */
.om-four { margin-top: 72px; background: linear-gradient(180deg, #eef2fb 0%, var(--bg) 100%); padding-bottom: 8px; }
.om-four .st-sec { padding-top: 64px; }
.om-four__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(18px, 3vw, 36px); align-items: center; }
.om-four__svg { width: 100%; height: auto; display: block; background: #0d2e5c; border-radius: 18px; direction: ltr; }
.om-half { fill-opacity: .14; }
.om-half--ab { fill: #e7f35a; }
.om-half--cd { fill: #3fe08e; }
.om-arrow { fill: none; stroke-width: 3; stroke-dasharray: 3 7; stroke-linecap: round; }
.om-arrow--ab { stroke: #e7f35a; }
.om-arrow--cd { stroke: #3fe08e; }
.om-cnt rect { fill: #e7f35a; }
.om-cnt text { fill: #061a3a; font: 700 14px var(--f-body); }
.om-cnt--cd rect { fill: #3fe08e; }
.om-four__led { margin: 0; display: grid; gap: 10px; }
.om-four__led figcaption { color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .om-four__grid { grid-template-columns: minmax(0, 1fr); } }

/* large screens: court on the left, LED panel and controls beside it, so the whole game fits on one screen */
@media (min-width: 1000px) {
  .om-game { grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "court led" "court bar" "court msg" "court note" "court ."; grid-template-rows: auto auto auto auto 1fr; column-gap: 20px; align-items: start; }
  .om-g-court { grid-area: court; }
  .om-g-led { grid-area: led; min-height: 0; }
  .om-g-led .om-led-half { padding: 16px 6px; }
  .om-led-n { font-size: 54px; }
  .om-led-c { font-size: 20px; }
  .om-led-start { font-size: 20px; }
  .om-g-bar { grid-area: bar; flex-direction: column; align-items: stretch; gap: 12px; }
  .om-g-len, .om-g-best { justify-content: space-between; }
  .om-g-reset { margin-inline-start: 0; justify-content: center; }
  .om-g-msg { grid-area: msg; }
  .om-game > .dr-note { grid-area: note; }
}
/* four players: diagram, LED panel and the three screens in one compact block */
@media (min-width: 861px) { .om-four__grid { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); } }
.dk-page .om-four__svg { max-height: 250px; }
.dk-page .om-four .st-taps--3, .dk-page.om-four .st-taps--3 { margin-top: 4px; }
.dk-page .om-four__svg { max-height: 230px; }
.dk-page .om-four__led .st-led img { max-height: 200px; object-fit: contain; }
.dk-page.om-four .st-taps--3 .dr-scr img { max-height: 250px; }
/* in the guide pager on large screens: diagram and LED panel on the left, the three screens on the right */
.dk-page.om-four .st-sec { padding-top: 0; }
@media (min-width: 1000px) {
  .dk-page.om-four .st-sec { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); grid-template-areas: "head head" "grid taps"; column-gap: 28px; align-items: start; }
  .dk-page.om-four .st-head { grid-area: head; }
  .dk-page.om-four .om-four__grid { grid-area: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .dk-page.om-four .st-taps--3 { grid-area: taps; margin-top: 0; max-width: none; }
  .dk-page .om-four__svg { max-height: none; }
}
.om-tips { margin-top: 16px; grid-template-columns: minmax(0, 1fr); max-width: 640px; }
.om-tips .st-tip { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; padding: 14px 18px; align-items: start; }
.om-tips .st-tip > :first-child { grid-row: span 2; }
.om-tips .st-tip > :not(:first-child) { grid-column: 2; }
.om-tips .st-tip__ic { width: 40px; height: 40px; margin: 0; }
