/* iPad replica. The app itself is light-themed, so the screen keeps fixed colours in both themes. */
.ipad-layout, .console-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.console-layout { margin-top: 18px; }
@media (max-width: 1080px) { .ipad-layout, .console-layout { grid-template-columns: 1fr; } }
.task-card { position: sticky; top: 76px; }
@media (max-width: 1080px) { .task-card { position: static; } }
ol.tasks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
ol.tasks li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; padding: 8px 10px; border-radius: 10px; font-size: .94rem; color: var(--ink-2); }
ol.tasks li .tick { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 700 .8rem var(--font); background: var(--surface-2); border: 1px solid var(--line); }
ol.tasks li.now { background: var(--accent-soft); color: var(--ink); }
ol.tasks li.now .tick { background: var(--accent); color: #fff; border-color: var(--accent); }
ol.tasks li.done { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
ol.tasks li.done .tick { background: var(--good); color: #fff; border-color: var(--good); }

.ipad { background: #111; border-radius: 30px; padding: 16px; box-shadow: var(--shadow), inset 0 0 0 2px #2b2b2b; }
.ipad-screen { position: relative; background: #f4f6f9; color: #1b1f27; border-radius: 16px; overflow: hidden; font: 13px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; min-height: 560px; }
.ipad-screen button { font: inherit; color: inherit; cursor: pointer; }
.ip-header { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; background: linear-gradient(180deg, #121417, #2a2d33); color: #fff; padding: 10px 12px 26px; clip-path: polygon(0 0, 100% 0, 100% 72%, 60% 100%, 0 82%); }
.ip-chev { font-size: 22px; opacity: .7; }
.ip-fixture { text-align: center; display: grid; }
.ip-fixture span { font-size: 11px; opacity: .75; }
.ip-gear { background: none; border: 0; color: #fff; font-size: 20px; justify-self: end; }
.ip-body { display: grid; grid-template-columns: 1fr 230px 1fr; gap: 10px; padding: 4px 12px 14px; }
.ip-team { min-width: 0; }
.ip-tname { text-align: center; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.ip-scoreline { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
.ip-to { border: 1.5px solid #f08c3c; background: #fff; border-radius: 4px; padding: 2px 6px; display: grid; justify-items: center; font-size: 10px; line-height: 1.1; }
.ip-to b { font-size: 13px; }
.ip-score { text-align: center; font-size: 34px; font-weight: 700; }
.ip-fouls { display: grid; justify-items: center; font-size: 10px; font-weight: 700; min-width: 40px; }
.ip-fouls b { font-size: 14px; min-height: 18px; }
.ip-fouls.red b { color: #e03131; }
.ip-undo { display: block; margin: 2px auto 8px; background: none; border: 0; color: #d6336c; text-decoration: underline; }
.ip-thead { display: grid; grid-template-columns: 30px 1fr 34px 24px; font-size: 10px; font-weight: 700; color: #6b7280; padding: 0 6px 4px; border-bottom: 1px solid #e3e6eb; }
.ip-group { font-size: 11px; font-weight: 700; color: #4b5563; padding: 8px 6px 4px; }
.ip-row { display: grid; grid-template-columns: 30px 1fr 34px 24px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid #eceef2; padding: 6px; min-height: 40px; border-radius: 6px; }
.ip-row:hover { background: #eef2f8; }
.ip-row.sel { background: #fff3bf; box-shadow: inset 0 0 0 2px #f2b705; }
.ip-row.out .ip-name { text-decoration: line-through; color: #8a919e; }
.ip-num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.ip-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ip-pts, .ip-f { text-align: center; }
.ip-centre { display: grid; gap: 7px; align-content: start; }
.ip-clockrow { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; }
.ip-jbtn { background: none; border: 0; padding: 0; }
.ip-jersey { width: 32px; height: 38px; }
.ip-clock { background: none; border: 0; display: grid; justify-items: center; }
.ip-clock b { color: #f08c3c; font-size: 20px; }
.ip-start { background: #2fb36a; color: #fff !important; border: 0; border-radius: 6px; padding: 10px; font-weight: 700; letter-spacing: .05em; }
.ip-start.stop { background: #f03e3e; }
.ip-start[disabled] { background: #9aa1ac; cursor: not-allowed; }
.ip-wide { border: 1.5px solid #e64980; background: #fff; color: #c2255c !important; border-radius: 5px; padding: 6px; font-weight: 700; font-size: 11.5px; letter-spacing: .02em; min-height: 32px; }
.ip-wide.armed, .ip-pt.armed { background: #ffe066; box-shadow: 0 0 0 3px rgba(242, 183, 5, .45); }
.ip-circles { display: flex; justify-content: space-around; }
.ip-pt, .ip-miss { width: 44px; height: 44px; border-radius: 50%; background: #fff; font-weight: 700; }
.ip-pt { border: 2px solid #f2b705; color: #d39e00 !important; }
.ip-miss { border: 2px solid #f06595; color: #d6336c !important; font-size: 11px; }
.ip-overlay { position: absolute; inset: 0; background: rgba(20, 24, 31, .35); display: grid; place-items: center; z-index: 5; }
.ip-overlay.full { place-items: stretch; background: #f4f6f9; }
.ip-dialog { background: #fff; border-radius: 14px; padding: 16px; width: min(330px, 92%); box-shadow: 0 12px 40px rgba(0, 0, 0, .25); text-align: center; }
.ip-dialog p { margin: 0 0 8px; }
.ip-small { font-size: 12px; color: #4b5563; }
.ip-dbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.ip-no, .ip-yes { border: 0; border-radius: 8px; padding: 10px; font-weight: 600; min-height: 40px; }
.ip-no { background: #e9edf2; }
.ip-yes { background: linear-gradient(90deg, #111, #444); color: #fff !important; }
.ip-yes[disabled] { opacity: .4; cursor: not-allowed; }
.ip-input { width: 100%; border: 1px solid #ced4da; border-radius: 8px; padding: 8px; font: 600 15px var(--mono); text-align: center; color: #111; background: #fff; }
.ip-clockedit { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; }
.ip-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 6px 0; }
.ip-swatch { aspect-ratio: 1; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .15); }
.ip-swatch.on { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #111; }
.ip-log { overflow: auto; max-height: 100%; }
.ip-loghead { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; text-align: center; background: #1f2228; color: #fff; padding: 10px; position: sticky; top: 0; }
.ip-back { background: none; border: 0; color: #fff !important; font-size: 22px; }
.ip-logrow { display: grid; grid-template-columns: 1fr auto 70px 36px; gap: 8px; align-items: center; padding: 8px 14px; border-bottom: 1px solid #e6e9ee; }
.ip-logtime { font: 12px var(--mono); color: #6b7280; }
.ip-reassign { min-height: 32px; padding: 4px; font-size: 12px; border-radius: 6px; border: 1px solid #ced4da; background: #fff; color: #111; }
.ip-del { background: none; border: 0; font-size: 16px; }
.ip-hint { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-top: 12px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); }

@media (max-width: 760px) {
  .ipad { padding: 8px; border-radius: 20px; }
  .ip-body { grid-template-columns: 1fr; }
  .ip-centre { order: -1; position: sticky; top: 0; background: #f4f6f9; z-index: 2; padding: 6px 0; border-bottom: 1px solid #e3e6eb; }
  .ip-circles { justify-content: center; gap: 14px; }
}
