*{box-sizing:border-box}html{background:#e9ece6;color:#162f26;font:16px/1.5 system-ui,sans-serif}body{margin:0}main{max-width:460px;margin:16px auto;min-height:calc(100dvh - 32px);background:#faf8f1;border-radius:23px;overflow:clip;display:flex;flex-direction:column;box-shadow:0 6px 42px #173d3110}header,nav{display:flex;align-items:center;background:#193d31;color:#fff}header{gap:9px;padding:17px 21px;font-size:20px}em{color:#e1fa80;font-style:normal}.mark{background:#ddf979;color:#193d31;border-radius:10px;padding:2px 8px}header button{margin-left:auto;background:#e1fa80;color:#173d31;min-height:36px}article{padding:18px 20px 28px;flex:1}h1{font:700 28px/1.2 Georgia,serif;margin:0 0 14px}h2{font:700 22px/1.25 Georgia,serif;margin:8px 0}p{margin:6px 0 13px}.card,form{border:1px solid #d8ded4;border-radius:17px;background:#fff;padding:16px;margin:12px 0}.line{display:flex;align-items:center;justify-content:space-between;gap:10px}.eyebrow,small{color:#4b6355;font-size:13px}.eyebrow{font-weight:750}.action,button{font:inherit;font-weight:600;border:0;border-radius:11px;padding:8px 13px;cursor:pointer}.action{display:block;width:100%;background:#193d31;color:white;margin:10px 0 0;min-height:46px}.secondary{background:#edf2dd;color:#193d31}button:focus-visible,input:focus-visible{outline:3px solid #4c791c}button:disabled{opacity:.65;cursor:default}#notice:empty{display:none}#notice{background:#eef6cf;border-radius:11px;padding:9px 12px}nav{position:sticky;bottom:0;justify-content:space-around;padding:5px 0 max(5px,env(safe-area-inset-bottom));z-index:2}nav button{background:none;color:#d1e0d6;font-size:13px;padding:9px 3px;min-height:42px}nav button[aria-current=page]{color:#e1fa80;text-decoration:underline;text-underline-offset:5px}.tag{background:#eff8c6;border-radius:20px;padding:3px 9px;font-size:13px;font-weight:650}input,textarea{font:inherit;max-width:100%}textarea{width:100%;min-height:100px}label{display:block;margin:12px 0}canvas{width:100%;height:auto;border-radius:10px}.row{display:flex;gap:8px}.row button{flex:1}ul{padding-left:20px}@media(max-width:480px){main{margin:0;min-height:100dvh;border-radius:0}}
video{width:100%;height:auto;border-radius:10px}button[hidden],video[hidden]{display:none}code{overflow-wrap:anywhere}
dialog{max-width:min(360px,90vw);padding:20px;border:1px solid #d8ded4;border-radius:16px;color:#162f26}dialog::backdrop{background:#162f2680}dialog .secondary{width:100%;margin-top:8px}.inline-status{font-weight:600}.inline-status:empty{display:none}.row .action{margin:0}.row{align-items:stretch;margin:.5em 0}.card small{display:block}
.milestone{position:relative;background:#193d31;color:white;padding:16px 55px 15px 16px}.milestone .eyebrow{color:#e1fa80;letter-spacing:.06em}.milestone p{margin-bottom:0}.seal{position:absolute;right:15px;top:15px;display:grid;place-items:center;width:32px;height:32px;background:#e1fa80;color:#193d31;border-radius:50%;font-weight:800}
@media(prefers-reduced-motion:no-preference){.celebrate .seal{animation:stamp .65s ease-out}.celebrate .seal::after{content:'';position:absolute;inset:-4px;border:2px solid #e1fa80;border-radius:50%;animation:ripple .85s ease-out forwards}@keyframes stamp{0%{transform:scale(.5)}65%{transform:scale(1.2)}100%{transform:scale(1)}}@keyframes ripple{from{transform:scale(.8);opacity:.9}to{transform:scale(1.55);opacity:0}}}
body.capturing{overflow:hidden}.capture-shell{position:fixed;inset:0;z-index:8;max-width:510px;margin:0 auto;height:100vh;height:100dvh;box-sizing:border-box;overflow:auto;padding:max(8px,env(safe-area-inset-top)) 12px max(10px,env(safe-area-inset-bottom));background:#142b23;color:#fff;border:0;border-radius:0;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:6px}
.capture-top,.capture-controls{display:flex;align-items:center;gap:9px}.capture-top .secondary,.capture-controls .secondary{min-height:44px}.capture-shell .inline-status{margin:0;font-size:14px}.capture-shell>video,.capture-shell canvas{width:100%;height:100%;min-height:0;object-fit:contain;border-radius:8px;background:#0b1612}.capture-shell>video{grid-row:3}.capture-controls{grid-row:4}.capture-controls .action,.capture-shell .row .action{margin:0;background:#e1fa80;color:#173d31}.capture-controls button{flex:1}.capture-shell [hidden],.capture-shell section:empty{display:none}.capture-shell.shot-review{grid-template-rows:auto minmax(0,1fr)}.shot-review>section{display:grid;min-height:0;grid-template-rows:minmax(0,1fr) auto auto auto;gap:4px}.shot-review>section p{font-size:14px;margin:0}.shot-review .row{grid-row:4;margin:0}.capture-shell>.inline-status:empty{display:none}

.home-link{color:inherit;text-decoration:none}

.replay-button{margin:10px 8px 8px 0}.replay .exit{margin-left:auto;color:white;font-size:15px;padding:10px}.replay h1{margin-top:4px}.replay h1:focus{outline:none}.replay .card img{display:block;width:100%;height:min(35dvh,240px);object-fit:contain;background:#edf2e9;border-radius:10px}.replay .secondary{width:100%;min-height:44px;margin-top:8px}.replay a.action{text-align:center;text-decoration:none}

label[hidden]{display:none}
.bar{height:8px;background:#edf2dd;border-radius:6px;overflow:hidden;margin:8px 0}.bar i{display:block;height:100%;background:#193d31}.board .line{padding:7px 4px;border-bottom:1px solid #eef2ea}.board .line:last-child{border-bottom:0}.board .me{background:#eff8c6;border-radius:8px;font-weight:700}.skill{padding:8px 0;border-bottom:1px solid #eef2ea}.skill:last-child{border-bottom:0}.skill .tag{white-space:nowrap}a.action{text-align:center;text-decoration:none;box-sizing:border-box}label input[type=checkbox]{margin-right:6px}
.bar i{width:0;transition:width 1.1s cubic-bezier(.2,.8,.2,1)}
.league-hero{position:relative;overflow:hidden;background:linear-gradient(150deg,#193d31,#235a43);color:#fff;border:0}.league-hero .eyebrow{color:#e1fa80;letter-spacing:.08em}.league-hero small{color:#cfe0d6}.league-hero h2{color:#fff}
.clock{font-variant-numeric:tabular-nums;font-size:13px;font-weight:700;background:#ffffff1f;border-radius:20px;padding:3px 10px;white-space:nowrap}
.standing{display:flex;align-items:center;gap:16px;margin:12px 0 8px}.big-rank{font:800 60px/1 Georgia,serif;color:#e1fa80;text-shadow:0 0 26px #e1fa8066}.standing b{display:block;font-size:24px;font-variant-numeric:tabular-nums}
.bar.glow{background:#ffffff26;height:12px;border-radius:8px}.bar.glow i{background:linear-gradient(90deg,#b8e84d,#e1fa80);box-shadow:0 0 14px #e1fa80aa;border-radius:8px}.league-hero .chase{color:#fff;font-weight:650}
.action.lime{background:#e1fa80;color:#193d31}
.toast{margin-top:12px;background:#e1fa80;color:#193d31;font-weight:800;border-radius:12px;padding:9px 12px;animation:pop .55s cubic-bezier(.2,1.6,.4,1)}
.confetti{position:absolute;inset:0;pointer-events:none}.confetti i{position:absolute;top:-12px;width:8px;height:13px;border-radius:2px;animation:fall 2.3s ease-in forwards}
.seg{display:flex;background:#edf2dd;border-radius:12px;padding:4px;gap:4px;margin-bottom:12px}.seg-btn{flex:1;background:none;color:#193d31}.seg-btn[aria-pressed=true]{background:#193d31;color:#e1fa80}
.podium{display:flex;align-items:flex-end;justify-content:center;gap:8px;margin:6px 0 14px}.spot{flex:1;max-width:132px;min-width:0;text-align:center;animation:rise .6s cubic-bezier(.2,.9,.3,1.25) both}.place-1{animation-delay:.12s}.place-3{animation-delay:.24s}
.spot .medal{display:block;font-size:28px;line-height:1.1}.spot b{display:block;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.card .spot small{color:#193d31;font-weight:750;font-size:13px}
.plinth{margin-top:6px;border-radius:12px 12px 4px 4px;background:#edf2dd;font:800 22px Georgia,serif;color:#193d31;display:grid;place-items:center}.place-1 .plinth{height:88px;background:linear-gradient(#e1fa80,#c9ec54)}.place-2 .plinth{height:62px}.place-3 .plinth{height:44px}.spot.mine .plinth{outline:3px solid #193d31;outline-offset:-3px}
.avatar{display:inline-grid;place-items:center;width:44px;height:44px;border-radius:50%;font-weight:800;font-size:18px;margin:4px auto}.place-1 .avatar{width:58px;height:58px;font-size:24px;box-shadow:0 0 0 3px #e1fa80,0 0 24px #e1fa80bb}.avatar.mine{box-shadow:0 0 0 3px #193d31}
.t-novice{background:#eef6cf;color:#193d31}.t-archivist{background:#cfe8dc;color:#193d31}.t-curator{background:#f3e0b5;color:#5a3d00}.t-luminary{background:#ffd75e;color:#4a3300}
.ranklist{list-style:none;padding:0;margin:0}.rankrow{display:flex;align-items:center;gap:10px;padding:8px 6px;border-bottom:1px solid #eef2ea;animation:slide .4s ease-out both;animation-delay:calc(var(--i)*60ms + .3s)}.rankrow:last-child{border-bottom:0}
.rankrow .pos{width:22px;text-align:center;font-weight:800;color:#4b6355}.rankrow .avatar{width:34px;height:34px;font-size:15px;margin:0;flex:none}.rankrow .who{flex:1;min-width:0}.rankrow .who b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rankrow .xp{font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}
.rankrow.me{background:#eff8c6;border-radius:12px;box-shadow:inset 3px 0 0 #193d31}.you-chip{background:#193d31;color:#e1fa80;font-size:11px;font-weight:800;border-radius:20px;padding:2px 8px}
.empty{text-align:center;color:#4b6355;padding:16px 0}details summary{cursor:pointer;font-weight:650;color:#193d31;margin-top:8px}
@keyframes rise{from{transform:translateY(26px);opacity:0}}@keyframes slide{from{transform:translateX(-14px);opacity:0}}@keyframes pop{from{transform:scale(.6);opacity:0}}@keyframes fall{to{transform:translateY(330px) rotate(var(--r));opacity:0}}
@media(prefers-reduced-motion:reduce){.spot,.rankrow,.toast,.confetti i{animation:none}.bar i{transition:none}}
#earnings{scroll-margin-top:12px}#earnings h3{margin:16px 0 0;font-size:16px}#earnings details p{margin:6px 0}

main{max-width:580px;margin:min(3.5vh,30px) auto;border:1px solid #d7dfd4;border-radius:22px}@media(max-width:600px){main{border:0;border-radius:0;margin:0 auto;min-height:100svh}}

/* League, profile and Earnings use the same surfaces as the Task map. */
html:has(.profile-page) { background:var(--ow-canvas) }
.profile-page main { max-width:740px; background:var(--ow-paper) }
.profile-page article { padding:clamp(16px,4vw,32px); min-width:0 }
.profile-page h1 { font-size:clamp(2.6rem,8vw,4.15rem); line-height:1.02; letter-spacing:-.04em }
.profile-page h2 { overflow-wrap:anywhere }
.profile-page #view > .card { border-radius:20px; padding:clamp(14px,3vw,22px) }
.profile-page #view > .league-hero {
  background-color:var(--ow-night);
  background-image:radial-gradient(ellipse at top right,#48764973,transparent 70%),
    linear-gradient(#d2ead410 1px,transparent 1px),linear-gradient(90deg,#d2ead410 1px,transparent 1px);
  background-size:auto,30px 30px,30px 30px;
  border:1px solid #35594b;
  box-shadow:0 14px 24px -17px #153d35b8;
}
.profile-page .action {
  display:flex; align-items:center; justify-content:center; min-height:50px; border-radius:13px;
}
.profile-page .action[hidden] { display:none }
.profile-page .action.secondary,.profile-page button.secondary { border:1px solid #c8d6c5; background:#eef3e6 }
.profile-page .profile-links {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(min(8rem,100%),1fr)); gap:9px;
}
.profile-page .profile-links .action { margin:0 }
.profile-page .profile-links .action:first-child { background:var(--ow-lime); color:#193d31; border:1px solid #cadf80 }
.profile-page .profile-signer canvas { width:min(100%,280px); margin:9px auto 0; display:block }
.profile-page .clock { border:1px solid #99b6a04d }
.profile-page .seg { background:#edf3e6; border:1px solid #d4e0d0; border-radius:15px }
.profile-page .seg-btn { min-height:46px }
.profile-page .seg-btn[aria-pressed=true] { background:var(--ow-night); color:var(--ow-lime) }
.profile-page .plinth { background:linear-gradient(#edf5df,#dbe8ce) }
.profile-page .place-1 .plinth { background:linear-gradient(var(--ow-lime),#bddb59) }
.profile-page .rankrow { min-height:52px; gap:8px }
.profile-page .rankrow .pos { flex:none }
.profile-page .rankrow.me { background:#ebf5d5 }
.profile-page #earnings { background:#f9fff2; border-color:#c6d9b9 }
.profile-page #earnings h2 { font-size:clamp(1.65rem,6vw,2.55rem); line-height:1.12 }
.profile-page article input:not([type=checkbox]):not([type=radio]),.profile-page article textarea {
  width:100%; min-height:46px; border:1px solid #aabfad; border-radius:10px;
  background:#fff; color:#193d31; padding:9px 11px;
}
.profile-page article :is(button,a,summary):focus-visible { outline:3px solid #6b913c; outline-offset:3px }
.profile-page nav { background:var(--ow-paper); border-top:1px solid #cbd8c9; color:#193d31 }
.profile-page nav button { min-height:44px; min-width:64px; color:#315744 }
.profile-page nav button[aria-current=page] { color:#193d31 }
@media(prefers-reduced-motion:no-preference) {
  .profile-page .action,.profile-page .seg-btn { transition:background-color .16s,filter .12s }
  .profile-page article .action:active:not(:disabled) { filter:brightness(.92) }
}
.guide-link{display:block;margin-top:14px}
html[lang=es] .nick [data-lang=en],html:not([lang=es]) .nick [data-lang=es]{display:none}
.podium .spot b.nick{white-space:normal;line-height:1.2}.avatar.animal{font-size:25px}.place-1 .avatar.animal{font-size:32px}.rankrow .avatar.animal{font-size:20px}

.league-name-options{min-width:0;margin:14px 0 6px;padding:0;border:0}
.league-name-options legend{padding:0;font-weight:650}
.league-name-options label{display:flex;align-items:center;gap:9px;min-height:44px;margin:0;cursor:pointer}
.league-name-options input{flex:none;width:18px;height:18px;margin:0;accent-color:#193d31}
.league-name-options ~ button{margin:12px 0 6px}
