:root{--bg:#f3f5f1;--ink:#172a22;--muted:#64746a;--green:#245d42;--lime:#ddf58b;--line:#dce3d9;--red:#ae302b;--amber:#946310;--radius:20px}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.5 system-ui,-apple-system,'Segoe UI',sans-serif;-webkit-tap-highlight-color:transparent}button,input,select{font:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{opacity:.42;cursor:default}header{background:#102820;color:white;padding:19px 22px;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;gap:12px;align-items:center}.crest{border:1px solid #92a98d;border-radius:10px 10px 15px 15px;width:43px;height:48px;text-align:center;line-height:1.1;padding-top:6px;font-size:21px;font-weight:900;color:var(--lime)}.crest span{display:block;font-size:9px;margin-top:4px;color:#fff}h1{font-size:23px;letter-spacing:-1px;margin:0}.brand small{font-size:9px;letter-spacing:1.8px;color:#b5c7b9}h2{font-size:24px;letter-spacing:-.8px;margin:0}h3{margin:0 0 10px;font-size:17px}p{margin:6px 0 12px}.muted{color:var(--muted);font-size:13px}.eyebrow{color:var(--green);font-size:11px;letter-spacing:1.2px;font-weight:800;margin-bottom:5px}.icon-btn{border:1px solid #597366;color:white;border-radius:50%;width:36px;height:36px;background:none;font-weight:700}main{padding:22px 18px 110px;max-width:760px;margin:auto}.page-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;gap:12px}.card{padding:18px;background:white;border:1px solid var(--line);border-radius:var(--radius);margin-bottom:14px}.hero{background:#183c2c;color:#fff;border:none}.hero .muted{color:#bbd1c0}.hero h2{font-size:27px}.row{display:flex;align-items:center;gap:10px}.between{justify-content:space-between}.wrap{flex-wrap:wrap}.grow{flex:1;min-width:0}.btn{border:0;background:var(--green);color:white;min-height:48px;padding:12px 17px;border-radius:12px;font-weight:750;display:inline-flex;justify-content:center;align-items:center;gap:8px}.btn.secondary{background:#eaf0e7;color:var(--ink)}.btn.outline{background:white;border:1px solid var(--line);color:var(--ink)}.btn.danger{background:#fbe9e7;color:var(--red)}.btn.lime{background:var(--lime);color:#172a22}.btn.full{width:100%;margin-top:10px}.btn.small{min-height:42px;padding:9px 12px;font-size:13px}.badge{display:inline-block;padding:4px 9px;border-radius:6px;font-size:11px;font-weight:750;background:#eaf0e7;color:var(--green);white-space:nowrap}.badge.warn{background:#fff0cc;color:var(--amber)}.badge.red{background:#fae5e3;color:var(--red)}.badge.dark{background:#2a503c;color:#e0efdc}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:18px 0}.stat{padding:12px 6px;background:#f0f4ed;border-radius:12px;text-align:center}.stat strong{font-size:23px;display:block;line-height:1.2}.stat small{font-size:11px;color:var(--muted)}.hero .stat{background:#254a36}.hero .stat small{color:#c4d5c5}.player{display:flex;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid #edf0ea}.player:last-child{border:0}.shirt{width:43px;height:43px;border-radius:13px;display:flex;align-items:center;justify-content:center;background:#e9f0e2;color:var(--green);font-size:19px;font-weight:850;flex:none}.player strong{font-size:16px}.player .meta{font-size:12px;color:var(--muted);margin-top:3px}.player button{flex:none}.empty{text-align:center;padding:25px 12px}.empty-mark{font-size:40px;color:#75946b;margin:8px}.empty h3{margin-top:12px}.empty p{font-size:13px;color:var(--muted)}.notice{border-radius:12px;background:#fdf3dc;color:#79551b;padding:12px 14px;font-size:13px;margin:12px 0}.notice.error{background:#fbece9;color:#9b332c}.notice.success{background:#e7f3df;color:#31552a}.status-title{font-weight:800;display:flex;justify-content:space-between;gap:8px}.issue-list{margin:8px 0 0;padding-left:18px;font-size:13px}.issue-list li{margin:4px 0}.pitch{position:relative;aspect-ratio:.76;background:repeating-linear-gradient(to bottom,#285c3c 0%,#285c3c 12.5%,#2d6441 12.5%,#2d6441 25%);border-radius:18px;overflow:hidden;margin:12px 0 16px;isolation:isolate;box-shadow:0 8px 22px #17382615}.pitch svg{position:absolute;inset:5%;width:90%;height:90%;pointer-events:none}.pitch-note{position:absolute;top:8px;left:12px;font-size:9px;letter-spacing:2px;color:#d4e6c6}.token{position:absolute;transform:translate(-50%,-50%);border:0;background:none;color:white;width:76px;min-height:60px;padding:0;display:flex;flex-direction:column;align-items:center;touch-action:none;z-index:1}.token .ball{display:grid;place-items:center;width:37px;height:37px;background:#e8efc9;border:2px solid #fff7;color:#1f432d;border-radius:50%;font-size:17px;font-weight:900;box-shadow:0 3px 7px #132d2b40}.token.gk .ball{background:#f2bf67}.token.vacant .ball{background:#173e2b66;color:#e0ebd1;border:1px dashed #c9dbb0}.token .name{max-width:74px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#163b2ccc;border-radius:4px;margin-top:3px;padding:1px 5px;font-size:11px;font-weight:700}.token .role{font-size:9px;color:#d4e8b7}.token:focus-visible{outline:2px solid var(--lime)}.mini-info{display:flex;gap:7px;flex-wrap:wrap;margin-top:8px}.mini-info span{font-size:11px;color:var(--muted)}.seg{display:flex;padding:4px;background:#e5ebe1;border-radius:12px;gap:4px;margin:14px 0}.seg button{flex:1;border:0;border-radius:9px;background:none;padding:10px 4px;font-size:13px;font-weight:700;color:var(--muted)}.seg button.active{background:white;color:var(--ink);box-shadow:0 2px 5px #1b342012}nav{position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid var(--line);display:flex;justify-content:center;padding:8px 10px max(10px,env(safe-area-inset-bottom));z-index:10}nav button{flex:1;max-width:180px;background:none;border:0;color:#7b887b;font-size:11px;min-height:51px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-weight:700}nav button svg{width:23px;height:23px}nav button.active{color:var(--green)}nav button.active svg{background:#eaf3df;box-shadow:0 0 0 5px #eaf3df;border-radius:5px}dialog{border:0;padding:0;border-radius:23px;background:var(--bg);width:calc(100% - 24px);max-width:540px;max-height:88dvh;box-shadow:0 24px 80px #0005;color:var(--ink)}dialog::backdrop{background:#0c231ba8;backdrop-filter:blur(3px)}#modalContent{padding:22px}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.modal-head h2{font-size:22px}.close{border:0;border-radius:50%;background:#e4eae0;font-size:22px;width:38px;height:38px;color:var(--ink)}label{display:block;font-size:13px;font-weight:700;margin:14px 0 6px}input,select{width:100%;min-height:48px;border:1px solid #cdd8c8;border-radius:11px;background:white;padding:11px 12px;color:var(--ink)}input:focus,select:focus{outline:2px solid #83a765;outline-offset:1px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.check-label{display:flex;gap:10px;align-items:center;background:white;border:1px solid var(--line);padding:12px;border-radius:12px;font-size:14px}.check-label input{width:20px;min-height:20px;accent-color:var(--green);flex:none}.check-label small{display:block;font-weight:400;font-size:11px;color:var(--muted)}.rule-row{padding:12px 0;border-bottom:1px solid #edf0ea;font-size:13px}.rule-row strong{display:block;margin-bottom:4px}.rule-row:last-child{border:0}.slots{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.age-slot{background:#f0f4ed;border-radius:10px;padding:9px;font-size:12px}.age-slot.missing{background:#fff0d7}.age-slot strong{display:block}.step{display:flex;gap:12px;padding:10px 0}.step b{border-radius:50%;background:#e9f2de;min-width:28px;height:28px;display:grid;place-items:center;color:var(--green)}.step p{margin:0;font-size:13px}.history{border-left:2px solid #d6e1cd;padding:0 0 16px 14px;font-size:13px}.history small{color:var(--muted);display:block}.history.corrected{text-decoration:line-through;opacity:.6}#toast{position:fixed;left:50%;bottom:95px;transform:translateX(-50%);background:#132c22;color:white;padding:12px 18px;border-radius:12px;font-size:13px;z-index:100;display:none;width:max-content;max-width:90%;box-shadow:0 5px 20px #0003}.danger-zone{margin-top:22px}.divider{height:1px;background:var(--line);margin:16px 0}.sub-pair{padding:14px;background:white;border:1px solid var(--line);border-radius:14px;margin-bottom:10px}.sub-pair label{margin:4px 0}.sticky-actions{position:sticky;bottom:-22px;background:var(--bg);padding:12px 0 0}.subtitle-line{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px}.search{margin-bottom:12px}.inline-error{color:var(--red);font-size:13px;margin:10px 0}.pending{display:inline-block;width:7px;height:7px;background:#b7dd72;border-radius:50%;margin-right:5px}.rule-counts{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:10px}.rule-counts div{font-size:11px;text-align:center;background:#f1f4ec;padding:8px 2px;border-radius:9px}.rule-counts b{font-size:16px;display:block}.rules-details{font-size:13px;color:var(--muted)}.tight{margin:0}.save-note{text-align:center;font-size:11px;color:var(--muted);margin:15px 0}.header-action{background:#e5efda;color:#26462d;border:0;border-radius:9px;padding:7px 10px;font-size:12px;font-weight:700;min-height:38px}@media(min-width:650px){main{padding-top:28px}.pitch{max-width:460px;margin-left:auto;margin-right:auto}header{padding-left:max(22px,calc((100vw - 720px)/2));padding-right:max(22px,calc((100vw - 720px)/2))}}@media(prefers-reduced-motion:no-preference){dialog[open]{animation:appear .16s ease-out}@keyframes appear{from{opacity:.3;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}}

/* Native Activity already applies system bar insets; do not apply them twice. */
body.native-app nav{padding-bottom:10px}
/* Keep the whole field and substitution action visible on the match-day screen. */
body.board-populated header{padding-top:8px;padding-bottom:8px}
body.board-populated main{padding-top:12px}
body.board-populated .page-head{display:none}
body.board-populated .pitch{width:min(100%,calc((100dvh - 360px) * .76));margin:10px auto 12px}
body.board-populated .subtitle-line{margin-bottom:6px}
@media(max-height:720px){body.board-populated .pitch{width:min(100%,calc((100dvh - 330px) * .76))}body.board-populated .token .ball{width:32px;height:32px;font-size:15px}body.board-populated .token .name{font-size:10px;max-width:62px}}


/* M.N.D FC identity: original ministry emblem, navy and gold. */
:root{--ink:#1b3045;--green:#284b70;--lime:#f0d896;--muted:#68788a}
header{background:#15293e;border-bottom:2px solid #cbb477}
.crest{width:54px;height:48px;padding:2px;background:#fff;border:1px solid #e6e9ed;border-radius:12px;display:grid;place-items:center;flex:none}
.crest img{display:block;object-fit:contain;width:48px;height:43px}
.brand h1{letter-spacing:1px;font-size:24px}.brand small{color:#d8c695;letter-spacing:1.3px}
.icon-btn{border-color:#6c8094}.hero{background:#1d3853}.hero .muted{color:#d0dbe4}
.hero .stat{background:#2b4863}.hero .stat small{color:#d0dbe4}.badge.dark{background:#284b70;color:#fff}
.btn.secondary,.seg{background:#e8edf2}.badge{background:#e8edf2}.header-action{background:#e8edf2;color:#284b70}
.shirt{background:#e8edf2}.btn.lime{color:#25374a}.stat,.rule-counts div,.age-slot{background:#eef2f5}
nav button.active svg{background:#e9eff5;box-shadow:0 0 0 5px #e9eff5}
#toast{background:#15293e}


.token-info{display:block;font-size:9px;font-weight:800;padding:0 3px;border-radius:3px;margin-top:1px;white-space:nowrap;background:#e7f0fd;color:#173c65}.token-info.agency{background:#ffe2a8;color:#533900}.token-status{font-size:9px;line-height:1.2;color:#fff;background:#173729dd;border-radius:3px;padding:0 3px;white-space:nowrap}.token .ball{width:32px;height:32px;font-size:15px}.subtitle-line strong{flex:1;font-size:13px}.subtitle-line .header-action{white-space:nowrap;padding:6px 8px}.token{min-height:72px}


.token .ball{position:relative}
.token .ball img{width:100%;height:100%;border-radius:50%;object-fit:cover;pointer-events:none}
.token .ball small{position:absolute;bottom:-2px;right:-4px;background:#163b2c;color:white;border-radius:8px;padding:0 3px;font-size:9px}
#photoPreview{border-radius:50%}
#nav[hidden]{display:none}.club-pitch{padding:10px;margin:8px 0;color:white;border-radius:10px;background:repeating-linear-gradient(90deg,#24563e 0 40px,#2d6047 40px 80px)}.club-formation{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.club-formation div{display:grid;justify-items:center;text-align:center}.club-formation img{border-radius:50%}.club-formation small{font-size:10px}#teamForm textarea{display:block;width:100%;min-height:64px}
.annual-scroll{max-height:65vh;overflow:auto;position:relative}.annual table{border-spacing:0;font-size:13px;min-width:100%}.annual th,.annual td{padding:7px 6px;text-align:center;border-bottom:1px solid #ccd8cf;background:white}.annual th small{display:block;font-weight:400;min-width:80px;max-width:130px}.annual th:first-child{position:sticky;left:0;min-width:72px;z-index:1;background:#f1f6ef}.annual thead th{position:sticky;top:0;z-index:2;background:#e5eee6}.annual thead th:first-child{z-index:3}.annual .present{color:#14663a}.annual .absent{color:#923b32}.annual .outside{color:#737b75}
