/* Lingkana scoring flow: one job per screen, big buttons, no extra chrome. */
body.lk-flow header.top,
body.lk-flow #tabs,
body.lk-flow nav.tabs,
body.lk-flow #scroller > p.small.muted,
body.lk-flow .demo-pill,
body.lk-flow #avtoast{display:none!important}
body.lk-flow #shell{min-height:100dvh;background:#f4f5f7;color:var(--ink)}
/* Cards keep the app theme. Text on them uses the theme ink, not the light-skin colour. */
body.lk-flow .card,
body.lk-flow .card h1,
body.lk-flow .card h2,
body.lk-flow .card h3,
body.lk-flow .card label,
body.lk-flow .card li,
body.lk-flow .card th,
body.lk-flow .card td,
.lkf .card,
.lkf .card h1,
.lkf .card h2,
.lkf .card h3,
.lkf .card label,
.lkf .card th,
.lkf .card td{color:var(--ink)}
.lk-err{color:#ffb4ab;font-weight:700}
[data-theme=light] .lk-err{color:#8f1d1d}
.lk-ok{background:var(--green-bg);color:var(--ink);border:1px solid var(--green);border-radius:10px;padding:10px 12px;font-weight:800;margin:8px 0 12px}
body.lk-flow #scroller{padding:0 0 88px;background:#f4f5f7}
body.lk-flow #app{padding:16px;max-width:430px;margin:0 auto}
body.lk-flow{--lk-green:#2e7d32;--lk-green-d:#1b5e20;--lk-grey:#6b7280;--lk-grey-d:#4b5563;--lk-red:#c62828}
/* Template league home reuses .lk-btn; it is not under body.lk-flow, so it needs the same tokens. */
#lgview.lkf{--lk-green:#2e7d32;--lk-green-d:#1b5e20;--lk-grey:#6b7280;--lk-grey-d:#4b5563;--lk-red:#c62828}
.lkf{font-family:var(--body,system-ui,sans-serif);color:#1a1a1a}
.lkf h1{font-size:22px;margin:0 0 16px;font-weight:800;color:#111}
.lkf h2{font-size:18px;margin:0 0 10px;font-weight:800;color:#111}
.lkf p{margin:0 0 10px}
.lkf label{display:block;font-size:14px;font-weight:700;margin:12px 0 6px;color:#333}
.lkf input[type=text],
.lkf input[type=password],
.lkf input[type=search],
.lkf select{width:100%;min-height:48px;border:1px solid #c5c9d0;border-radius:10px;padding:10px 12px;font-size:16px;background:#fff;color:#111}
.lkf .lk-msg{min-height:1.2em;color:#c62828;font-size:14px;margin:8px 0 0}
.lk-home{display:flex;flex-direction:column;gap:14px;padding-top:24px}
.lk-btn{display:block;width:100%;border:0;border-radius:12px;min-height:64px;padding:16px 18px;font:800 18px var(--body,system-ui,sans-serif);cursor:pointer;text-align:center}
.lk-btn.green{background:var(--lk-green);color:#fff}
.lk-btn.green:active{background:var(--lk-green-d)}
.lk-btn.grey{background:#fff;color:#111827;border:2px solid #1f2937}
.lk-btn.grey:active{background:#e5e7eb}
.lk-btn:disabled,.lk-btn[disabled]{background:#e5e7eb;color:#9ca3af;border-color:#e5e7eb;opacity:1;cursor:not-allowed}
/* Register page: the action is green. A disabled Register is a dull control, not a faded green one. Back is a solid light button. */
#lkregpage #lkreggo{background:#2e7d32;color:#fff;border:0;opacity:1}
#lkregpage #lkreggo:disabled{background:#374151;color:#9ca3af;border:1px solid #4b5563;opacity:1;cursor:not-allowed}
#lkregpage #lkregback,#lkregpage #lkqrshare{background:#fff;color:#111827;border:2px solid #1f2937}
#lkqrsharemsg:empty{display:none}
#lkqrsharemsg{margin:8px 0 0;font-weight:700}
.lk-bar{position:fixed;left:0;right:0;bottom:0;display:flex;gap:10px;padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px));background:#fff;border-top:1px solid #e5e7eb;z-index:20;max-width:430px;margin:0 auto}
.lk-bar .lk-btn{min-height:56px;font-size:17px;flex:1}
.lk-bar .lk-btn.grey{flex:0 0 42%}
.lk-count{display:inline-flex;align-items:center;justify-content:center;min-width:2.2em;height:1.6em;margin-left:8px;padding:0 8px;border-radius:999px;background:#111;color:#fff;font-size:13px;font-weight:800;vertical-align:middle}
.lk-selbox{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:10px 12px;margin:0 0 14px}
.lk-selbox h3{margin:0 0 8px;font-size:14px;text-transform:uppercase;letter-spacing:.04em;color:#6b7280}
.lk-selbox li{list-style:none;margin:0;padding:6px 0;border-top:1px solid #f0f0f0;font-weight:700}
.lk-selbox ul{margin:0;padding:0}
.lk-tgt{margin:14px 0 6px;font-size:13px;font-weight:800;text-transform:uppercase;color:#6b7280}
.lk-row,
.lkf label.lk-row{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:10px 12px;margin:0 0 8px;font-weight:500;font-size:15px;color:#1a1a1a}
.lk-row input,
.lkf label.lk-row input{width:18px;height:18px;min-width:18px;min-height:18px;padding:0;margin:0;border:0;background:transparent;box-shadow:none;accent-color:var(--lk-green);flex:0 0 auto}
.lk-row .nm,
.lkf label.lk-row .nm{flex:0 1 auto;max-width:calc(100% - 32px);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;color:#1a1a1a}
.lk-row.locked{opacity:.85}
.lk-row.locked .nm{color:var(--lk-red)}
.lk-padlock{color:var(--lk-red);font-size:18px;line-height:1;flex:0 0 auto}
.lk-grouphdr{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#6b7280;margin:14px 0 6px}
.lk-selcount{font-weight:700}
.lkf label.lk-paidrow{margin:0}
.lk-search-list button{display:block;width:100%;text-align:left;background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:14px 12px;margin:0 0 8px;font:700 16px var(--body,system-ui,sans-serif);cursor:pointer}
.lk-search-list button.on{border-color:var(--lk-green);background:#e8f5e9}
.lk-tick{display:flex;align-items:center;gap:10px;margin:8px 0 14px;font-weight:700}
.lk-tick input{width:22px;height:22px;accent-color:var(--lk-green)}
.lk-list table{width:100%;border-collapse:collapse;background:#fff;border-radius:10px;overflow:hidden}
.lk-list th,.lk-list td{text-align:left;padding:10px 8px;border-bottom:1px solid #eee;font-size:15px}
.lk-list th{font-size:12px;text-transform:uppercase;color:#6b7280}
.lk-score-head{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin:0 0 8px}
.lk-score-head .tot{font-size:28px;font-weight:800;color:#111}
.lk-slots{display:flex;gap:8px;margin:8px 0 12px}
.lk-slots span{flex:1;min-height:56px;border:2px solid #d1d5db;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:800;background:#fff}
.lk-slots span.on{border-color:var(--lk-green);background:#e8f5e9}
.lk-pad{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.lk-pad button{min-height:64px;border:0;border-radius:12px;font:800 22px var(--body,system-ui,sans-serif);background:#111;color:#fff;cursor:pointer}
.lk-pad button.m{background:#6b7280}
.lk-end{margin:8px 0 0;font-size:15px;color:#4b5563}
.lk-host{margin:16px 0 0;background:transparent;border:0;color:#374151;text-decoration:underline;font:600 14px var(--body,system-ui,sans-serif);padding:0;cursor:pointer}
.lk-qrbox{background:#fff;border:1px dashed #c5c9d0;border-radius:12px;padding:20px;text-align:center;margin:12px 0}

/* League scoring uses the app's own Score End / Score Sheet look, stacked for the group. */
body.lk-flow .ad{margin:0 0 12px;max-width:100%}
body.lk-flow #lksheet.ad,body.lk-flow #lgentry.ad{margin:0}
body.lk-flow #lksheet .ad-sheet{margin:10px}
body.lk-flow #scroller{padding:0 0 24px}

/* Keep Back / Finished / Add Scores on screen when four sheets are stacked. */
body.lk-flow #lksheet.ad{padding-bottom:calc(8px + 72px + env(safe-area-inset-bottom,0px))}
body.lk-flow #lksheet .ad-foot{
  position:fixed;left:0;right:0;bottom:0;
  max-width:430px;margin:0 auto;z-index:21;
  padding-bottom:calc(10px + env(safe-area-inset-bottom,0px));
}
body.lk-flow #lksheet .ad-discard{margin-bottom:8px}

body.lk-flow #sbar{display:none!important}

/* Event list cards and event home (12 Nov 2026). Flyer is the card background only, never the event-home page. */
.st-evlist{display:flex;flex-direction:column;gap:14px;margin:8px 0 16px}
.st-evcard{position:relative;display:block;width:100%;min-height:186px;border:0;padding:0;border-radius:16px;overflow:hidden;background-color:#111;background-size:cover;background-position:top center;background-repeat:no-repeat;text-align:left;color:#fff;cursor:pointer;box-shadow:0 8px 20px rgba(0,0,0,.22)}
.st-evcard-shade{position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.15) 20%,rgba(0,0,0,.78) 100%)}
.st-evcard-body{position:absolute;left:0;right:0;bottom:0;padding:16px 16px 14px;z-index:1}
.st-evcard-body b{display:block;font:800 20px/1.2 var(--body,system-ui,sans-serif);letter-spacing:.01em}
.st-evcard-body .st-evsub{display:block;margin-top:4px;font:600 13px/1.35 var(--body,system-ui,sans-serif);color:rgba(255,255,255,.9)}
.st-evcard:focus{outline:2px solid #fff;outline-offset:2px}
#lgcard .st-evlist{margin:10px 0 4px}
#lgcard h3.st-evh{margin:0 0 2px}

.lk-evhome{padding-top:8px}
.lk-evbrand{text-align:center;margin:0 0 22px}
.lk-evbrand img{display:block;margin:0 auto 10px;max-width:min(280px,86%);height:auto;object-fit:contain}
.lk-evbrand.lingkana{background:#000;border-radius:14px;padding:18px 16px 16px;margin:0 0 22px}
.lk-evbrand.tpl{background:#0b1a3a;border-radius:14px;padding:18px 16px 16px;margin:0 0 22px;min-height:200px;display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box}
.lk-evbrand.tpl img{max-height:110px}
.lk-evbrand.tpl .lk-evname{color:#fff;font-size:18px}
.lk-evbrand.onion{background:#140f0a;border-radius:14px;padding:14px 10px 12px;margin:0 0 22px}
.lk-evbrand .lk-evname{margin:0;font-size:15px;font-weight:700;color:#eee}
.lk-potbanner{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;gap:12px;width:100%;border:2px solid #ffe49a;border-radius:14px;padding:12px 16px;margin:-10px 0 20px;background:linear-gradient(135deg,#fff3b0 0%,#ffcc33 35%,#e0a518 70%,#9c6a00 100%);color:#3a2300;font:800 15px var(--body,system-ui,sans-serif);cursor:pointer;box-shadow:0 4px 14px rgba(180,120,0,.45),inset 0 1px 0 rgba(255,255,255,.65);text-shadow:0 1px 0 rgba(255,255,255,.35)}
.lk-potbanner-icon{font-size:28px;line-height:1;filter:drop-shadow(0 1px 1px rgba(0,0,0,.25))}
.lk-potbanner-text{display:flex;flex-direction:column;align-items:center;line-height:1.15}
.lk-potbanner-label{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;opacity:.85}
.lk-potbanner-amt{font-size:25px;font-weight:900}
.lk-potbanner-shine{position:absolute;top:0;left:-60%;width:40%;height:100%;background:linear-gradient(120deg,transparent,rgba(255,255,255,.65),transparent);transform:skewX(-20deg);animation:lkPotShine 3.4s ease-in-out infinite;pointer-events:none}
@keyframes lkPotShine{0%{left:-60%}55%{left:130%}100%{left:130%}}
.lk-potbanner:active{filter:brightness(0.95)}
@media (prefers-reduced-motion: reduce){.lk-potbanner-shine{animation:none;display:none}}
.lk-home{display:flex;flex-direction:column;gap:14px;padding-top:8px}
.lk-rules,#lkrulespage,#lkliteloginpage,#lkpotview,#lkresults{padding-bottom:calc(96px + env(safe-area-inset-bottom, 0px))}
.lk-rules{padding-top:8px}
.lk-rules h1{margin-bottom:8px}
.lk-rules ul{margin:0;padding-left:1.15em;line-height:1.45}
.lk-rules li{margin:0 0 10px}
.lkf #lkevlist h1{margin-bottom:6px}
#lkhome .lk-bar, .lk-rules .lk-bar, #lkevlist .lk-bar{margin-top:18px}
#lkhome .lk-bar .lk-btn, .lk-rules .lk-bar .lk-btn{flex:1 1 100%}

/* 13-target picker and returning-archer name list (12 Nov 2026). */
.lk-tgrid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:12px 0 18px}
.lk-tbtn{position:relative;min-height:56px;border:1px solid #d1d5db;border-radius:12px;background:#fff;color:#111;font:800 18px var(--body,system-ui,sans-serif);cursor:pointer}
.lk-tbtn:active{background:#e8f5e9}
.lk-tcount{position:absolute;top:4px;right:6px;min-width:1.2em;padding:0 4px;border-radius:999px;background:#111;color:#fff;font-size:11px;line-height:1.4}
.lk-known{margin:10px 0 14px;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.lk-known > p{flex:1 1 100%;margin:0 0 4px}
.lk-known-btn{border:1px solid #d1d5db;background:#fff;border-radius:999px;padding:8px 14px;font:700 15px var(--body,system-ui,sans-serif);cursor:pointer;color:#111}
.lk-known-btn.on{background:var(--lk-green,#2e7d32);color:#fff;border-color:var(--lk-green,#2e7d32)}
.lk-maintabs{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 12px}
.lk-maintabs .lk-known-btn{font-size:16px;padding:10px 16px}
.lk-nighttabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 14px}
.lk-nighttabs .lk-known-btn{font-size:13px;padding:6px 12px}
.lkf .lk-tick{display:flex;align-items:center;gap:8px;margin:0 0 8px;font-weight:500}
.lkf .lk-tick input{width:18px;height:18px;accent-color:var(--lk-green,#2e7d32)}
#lkpaidlist .lk-paidrow{cursor:default}
#lkpaidlist .lk-paidrow label{display:flex;align-items:center;gap:8px;flex:1;min-width:0;cursor:pointer}
.lk-remove,.lk-cancel{border:0;background:transparent;font:700 14px var(--body,system-ui,sans-serif);padding:6px 4px;cursor:pointer}
.lk-remove{color:#8f1d1d}
.lk-cancel{color:#111827}
.lk-dropask{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:14px}
#lkregqr{margin:16px 0;padding:12px;background:#fff;color:#111;border:1px solid #d1d5db;border-radius:12px;text-align:center}
#lkregqr h2{font-size:16px;margin:0 0 6px;color:#111}
#lkregqr p,#lkregqr a{color:#111}
#lkqrsvg svg{width:min(220px,70vw);height:auto;display:block;margin:8px auto}
.lk-namelist{display:flex;flex-direction:column;gap:8px;margin:8px 0 12px}
/* The name list scrolls on its own. The PIN and passcode sit above it, and the page keeps
   a gap under them equal to the fixed Back/Login bar plus the iPhone home indicator. */
#lkloginpage,
#lkrosterpage{padding-bottom:calc(96px + env(safe-area-inset-bottom, 0px))}
#lkloginpage .lk-namelist{max-height:min(320px, 42dvh);overflow-y:auto;-webkit-overflow-scrolling:touch}
#lkloginpage #lkpin,
#lkloginpage #lkpin2,
#lkloginpage #lkpw,
#lkloginpage #lkcode,
#lkloginpage #lkscorer{scroll-margin-bottom:calc(120px + env(safe-area-inset-bottom, 0px))}
body.lk-flow #scroller{scroll-padding-bottom:calc(112px + env(safe-area-inset-bottom, 0px))}
.lk-namebtn{display:block;width:100%;min-height:48px;border:1px solid #d1d5db;background:#fff;border-radius:12px;padding:10px 14px;font:700 16px var(--body,system-ui,sans-serif);text-align:left;color:#111;cursor:pointer}
.lk-namebtn.on{background:#2e7d32;color:#fff;border-color:#1b5e20}
#lkassigned .lk-group{margin:8px 0 12px;padding:0;list-style:decimal inside}
#lkassigned .lk-group li{padding:8px 0;border-bottom:1px solid #e5e7eb;font-weight:600;color:#111}
#lkassigned .you{font-weight:800}
/* League theme control: same button the main app paints (scoretool.theme). */
body.lk-flow #lktheme{position:fixed;top:calc(8px + env(safe-area-inset-top,0px));right:10px;z-index:30;margin:0}
/* Dark mode. Light colours above stay the light theme. */
[data-theme=dark] body.lk-flow #shell,
[data-theme=dark] body.lk-flow #scroller{background:#0b0f17;color:#eef2f8}
[data-theme=dark] .lkf{color:#eef2f8}
[data-theme=dark] .lkf h1,
[data-theme=dark] .lkf h2{color:#eef2f8}
[data-theme=dark] .lkf label{color:#cbd5e1}
[data-theme=dark] .lkf input[type=text],
[data-theme=dark] .lkf input[type=password],
[data-theme=dark] .lkf input[type=search],
[data-theme=dark] .lkf select{background:#131a26;color:#eef2f8;border-color:#3d4f68}
[data-theme=dark] .lk-btn.grey,
[data-theme=dark] #lkregpage #lkregback,
[data-theme=dark] #lkregpage #lkqrshare{background:#1b2433;color:#eef2f8;border:2px solid #94a3b8}
[data-theme=dark] .lk-btn.grey:active{background:#243044}
[data-theme=dark] .lk-btn:disabled,
[data-theme=dark] .lk-btn[disabled]{background:#1b2433;color:#64748b;border-color:#1b2433}
[data-theme=dark] #lkregpage #lkreggo:disabled{background:#1b2433;color:#94a3b8;border-color:#3d4f68}
[data-theme=dark] .lk-bar{background:#131a26;border-top-color:#243042}
[data-theme=dark] .lk-msg{color:#ffb4ab}
[data-theme=dark] .lk-selbox,
[data-theme=dark] .lk-row,
[data-theme=dark] .lkf label.lk-row,
[data-theme=dark] .lk-search-list button,
[data-theme=dark] .lk-list table,
[data-theme=dark] .lk-slots span,
[data-theme=dark] .lk-qrbox,
[data-theme=dark] .lk-namebtn,
[data-theme=dark] .lk-tbtn,
[data-theme=dark] .lk-known-btn,
[data-theme=dark] #lkregqr{background:#131a26;color:#eef2f8;border-color:#3d4f68}
[data-theme=dark] .lk-row .nm,
[data-theme=dark] .lkf label.lk-row .nm,
[data-theme=dark] #lkassigned .lk-group li,
[data-theme=dark] .lk-score-head .tot,
[data-theme=dark] #lkregqr h2,
[data-theme=dark] #lkregqr p,
[data-theme=dark] #lkregqr a,
[data-theme=dark] .lk-cancel{color:#eef2f8}
[data-theme=dark] .lk-selbox h3,
[data-theme=dark] .lk-tgt,
[data-theme=dark] .lk-list th,
[data-theme=dark] .lk-end,
[data-theme=dark] .lk-grouphdr,
[data-theme=dark] .lk-host{color:#9aa7ba}
[data-theme=dark] .lk-selbox li,
[data-theme=dark] .lk-list td,
[data-theme=dark] #lkassigned .lk-group li{border-color:#243042}
[data-theme=dark] .lk-search-list button.on,
[data-theme=dark] .lk-slots span.on{background:#0f3324;color:#eef2f8}
[data-theme=dark] .lk-namebtn.on,
[data-theme=dark] .lk-known-btn.on{background:#2e7d32;color:#fff;border-color:#1b5e20}
[data-theme=dark] .lk-pad button{background:#e8eef8;color:#0b0f17}
[data-theme=dark] .lk-pad button.m{background:#64748b;color:#fff}
[data-theme=dark] .lk-count,
[data-theme=dark] .lk-tcount{background:#e8eef8;color:#0b0f17}
[data-theme=dark] .lk-remove{color:#ffb4ab}
[data-theme=dark] body.lk-flow .card,
[data-theme=dark] body.lk-flow .card h1,
[data-theme=dark] body.lk-flow .card h2,
[data-theme=dark] body.lk-flow .card h3,
[data-theme=dark] body.lk-flow .card label{color:#eef2f8}

/* 25 Nov 2026: Registered Archers paid boxes. Blue = registered for that night, not paid yet; green tick = paid. */
.lk-paidbox{-webkit-appearance:none;appearance:none;width:26px;height:26px;margin:2px;border:2px solid #9ca3af;border-radius:6px;background:#fff;vertical-align:middle;cursor:pointer}
.lk-paidbox.lk-regd{background:#3b82f6;border-color:#1d4ed8;box-shadow:0 0 0 2px #bfdbfe}
.lk-paidbox:checked{background:#16a34a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat;border-color:#15803d;box-shadow:none}
.lk-paidbox:focus-visible{outline:3px solid #f59e0b;outline-offset:1px}
.lk-key{display:inline-block;width:14px;height:14px;border-radius:4px;vertical-align:-2px}
.lk-key-reg{background:#3b82f6;border:2px solid #1d4ed8}
.lk-key-paid{background:#16a34a;border:2px solid #15803d}
.lk-regdot{color:#2563eb}

.lk-rules .lk-admin{margin:18px 0 0;padding:0;border:0}
.lk-rules .lk-admin h2{font-size:18px;margin:16px 0 8px}
.lk-rules .lk-admin input{width:100%;box-sizing:border-box}
