:root{--forest:#092f30;--deep:#071f29;--jade:#0f4544;--gold:#d7b374;--cream:#f9f5ed;--fog:#dbe8e8;--ink:#122e32;--muted:#5b7272;--line:#d8dedb;--red:#a83938}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--cream);color:var(--ink);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}html{scroll-behavior:smooth}body{overflow-x:hidden}button,input{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}a{color:inherit}button:focus-visible,input:focus-visible{outline:3px solid #ba7d3a;outline-offset:3px}[hidden]{display:none!important}.app-shell{min-height:100dvh;background:var(--cream)}.wrap{max-width:1100px;margin:auto}.masthead{height:82px;background:var(--deep);display:flex;align-items:center;justify-content:space-between;padding:12px max(24px,calc((100vw - 1100px)/2));border-bottom:1px solid #42616a;position:relative;z-index:20}.brand{display:flex;align-items:center;gap:11px;color:#f8ebca;text-decoration:none}.brand img{height:52px;width:52px}.brand strong{display:block;font:600 24px Georgia,serif;letter-spacing:.045em}.brand em{font-style:normal;color:var(--gold)}.brand small{display:block;margin-top:3px;font-size:8px;letter-spacing:.22em;color:#b9d4d2}.head-account{border:1px solid #68807f;color:#f5eedc;background:transparent;padding:11px 16px;border-radius:5px;font-size:13px;font-weight:650}.head-account:hover{background:#204647}.view{min-height:70vh}.hero{position:relative;min-height:480px;overflow:hidden;background:linear-gradient(90deg,rgba(4,29,41,.97) 0%,rgba(7,39,51,.90) 42%,rgba(7,39,51,.20) 100%),url("./assets/mountains.svg") center/cover;color:#fbf5e8}.hero:before{content:"";position:absolute;inset:0;background:linear-gradient(0deg,#051d28 0%,transparent 37%);pointer-events:none}.hero-content{max-width:1100px;margin:auto;padding:90px 24px 75px;position:relative;z-index:2}.hero h1{max-width:640px;margin:18px 0 22px;font:600 clamp(48px,6vw,84px)/.98 Georgia,serif;letter-spacing:-.035em}.hero h1 em{font-style:italic;color:#d9bf8b}.hero p{font-size:19px;color:#d2e3e3;max-width:460px;line-height:1.5}.hero-crest{position:absolute;right:14%;top:85px;opacity:.14}.hero-crest img{width:290px}.hero-foot{position:absolute;bottom:0;left:0;right:0;display:flex;justify-content:space-between;gap:12px;padding:18px max(24px,calc((100vw - 1100px)/2));font-size:10px;letter-spacing:.2em;color:#d4d6cf;z-index:2}.kicker{display:block;font-size:11px;font-weight:800;letter-spacing:.2em;color:#e1bf7c}.kicker.dark{color:#8a672d}.hero-ctas{display:flex;flex-wrap:wrap;gap:12px;margin-top:30px}.primary,.secondary,.ghost{display:inline-flex;align-items:center;justify-content:center;gap:12px;border-radius:5px;border:1px solid transparent;min-height:47px;padding:12px 22px;font-weight:750;font-size:14px}.primary{background:var(--gold);color:#162f2d;border-color:#d2a85e}.primary:hover{background:#f0ca88}.ghost{background:rgba(255,255,255,.08);color:#fff;border-color:#7f9b9a}.secondary{background:var(--forest);color:white}.secondary:hover{background:#15534c}.content{padding:44px 24px 72px}.section-title{display:flex;align-items:end;justify-content:space-between;gap:18px}.section-title h2{font:600 30px/1.15 Georgia,serif;margin:8px 0 0}.section-subtle{font-size:13px;color:var(--muted)}.section-gap{margin-top:55px}.date-strip{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:7px;margin-top:20px}.date{position:relative;min-height:60px;border-radius:6px;border:1px solid #d5dbd9;background:#fff;color:#36545a;padding:8px 4px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}.date strong{font-weight:850;font-size:17px}.date small{font-size:8px;letter-spacing:.1em}.date.locked{background:#e9edeb;color:#899a99}.date.live{background:var(--forest);color:#fff;border-color:#0d4c48}.date.current{outline:2px solid #ba9455;outline-offset:2px}.date:focus-visible{outline:3px solid #ca9b42}.event-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:20px}.event-card{background:#fff;border:1px solid var(--line);border-radius:10px;overflow:hidden;text-align:left;padding:0;box-shadow:0 6px 18px rgba(9,42,46,.06);transition:transform .18s,box-shadow .18s;display:flex;flex-direction:column;color:var(--ink)}.event-card:hover{transform:translateY(-3px);box-shadow:0 10px 28px rgba(9,42,46,.1)}.event-art{height:150px;position:relative;overflow:hidden;background:linear-gradient(160deg,#124e5c99,#0a2932bb),url("./assets/mountains.svg") center/cover}.event-art:before{content:"";position:absolute;inset:auto 0 0 0;height:90px;background:linear-gradient(0deg,rgba(0,30,35,.8),transparent)}.event-art .event-num{position:absolute;top:15px;left:16px;background:#f5edda;color:#123737;border-radius:3px;font-size:10px;padding:7px 9px;font-weight:850;letter-spacing:.1em}.event-symbol{position:absolute;right:20px;bottom:12px;font-size:62px;font-family:Georgia,serif;color:#e8d0a3;text-shadow:0 5px 20px #012e3c}.event-body{padding:18px;display:flex;flex-direction:column;gap:8px;min-height:126px}.event-body h3{font:600 22px Georgia,serif;margin:0}.event-body p{font-size:12px;line-height:1.5;color:var(--muted);margin:0}.status{display:inline-flex;align-items:center;align-self:flex-start;background:#dfece4;color:#235a45;padding:6px 9px;border-radius:3px;font-size:10px;font-weight:800;letter-spacing:.03em}.status.locked{background:#ebebeb;color:#778482}.status.testing{background:#fbf0d5;color:#75531e}.feature-row{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:19px}.feature{background:#e9eee9;border-top:3px solid var(--forest);padding:23px;min-height:172px}.feature-number{font:500 34px Georgia,serif;color:#9c8358}.feature h3{font-size:17px;margin:8px 0}.feature p{font-size:13px;line-height:1.6;color:#526768;margin:0}.page-banner{background:linear-gradient(95deg,#072936ed,#123d47dc),url("./assets/mountains.svg") center/cover;min-height:214px;padding:46px max(24px,calc((100vw - 1100px)/2));color:#fff}.page-banner h1{font:600 clamp(34px,5vw,53px) Georgia,serif;margin:12px 0}.page-banner p{color:#d4e3e5;line-height:1.5;max-width:590px;font-size:14px}.all-events{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.all-events button{text-align:left;border:1px solid #d2dcd8;background:#fff;border-radius:5px;padding:15px;min-height:100px;display:flex;flex-direction:column;gap:8px;color:var(--ink)}.all-events button.active-day{background:#e2eee7;border-color:#658b75}.all-events button:disabled{opacity:1;background:#e9edeb;color:#8d9d9c}.all-events strong{font:600 20px Georgia,serif}.all-events small{font-size:11px;color:#6f8483}.callout,.notice{background:#efe8d9;padding:15px 18px;border-left:3px solid #c09952;font-size:13px;line-height:1.5;color:#5c523c;border-radius:3px}.notice:empty{display:none}.table-wrap{overflow:auto;background:#fff;border:1px solid #d7dfda;border-radius:7px;margin-top:18px}.table-wrap table{border-collapse:collapse;width:100%;font-size:13px}.table-wrap th{background:var(--forest);color:#fff;text-align:left;font-size:11px;letter-spacing:.06em;padding:15px}.table-wrap td{padding:14px 15px;border-bottom:1px solid #e4e9e5}.table-wrap tr:last-child td{border:0}.table-wrap tr.me{background:#f7f0da}.table-wrap td.num{font-weight:800;color:#8b6b37}.empty{padding:26px;color:var(--muted);text-align:center;line-height:1.6}.profile-card{background:#fff;padding:25px;border-radius:8px;border:1px solid var(--line);max-width:620px}.profile-card h2{font:600 28px Georgia,serif}.profile-card p{line-height:1.7;color:var(--muted)}.bottom-nav{display:flex;justify-content:space-around;background:var(--deep);border-top:1px solid #39545a;padding:7px 10px calc(7px + env(safe-area-inset-bottom));position:sticky;bottom:0;z-index:15}.bottom-nav button{color:#b4c4c4;background:transparent;border:0;padding:7px 18px;min-width:74px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;font-size:10px;font-weight:700}.bottom-nav button span{font-size:22px}.bottom-nav button.active{color:#efd59f}footer{padding:22px;text-align:center;background:#061d27;color:#829a9c;font-size:9px;letter-spacing:.2em}.dialog,.race-dialog{border:0;padding:0;max-height:94dvh;border-radius:10px;box-shadow:0 25px 80px rgba(0,0,0,.35)}.dialog::backdrop,.race-dialog::backdrop{background:#041d24c9}.dialog{width:min(92vw,500px)}.modal{padding:32px;position:relative}.close{position:absolute;right:12px;top:8px;background:none;border:0;color:#567;font-size:29px}.modal h2{font:600 34px Georgia,serif;margin:12px 0}.modal p{line-height:1.55;font-size:13px;color:var(--muted)}.modal-crest{width:64px;height:64px;display:block;margin-bottom:12px}.modal label{display:block;font-size:12px;font-weight:800;margin:12px 0;color:#233f40}.modal input{display:block;width:100%;margin-top:6px;border:1px solid #bdc9c5;border-radius:4px;padding:12px;background:#fff;min-height:45px;color:var(--ink)}.full{width:100%}.text-button{border:0;background:none;color:#26645d;font-size:13px;font-weight:750;text-decoration:underline;padding:12px 6px}.modal .text-button{display:block;margin:auto}.modal .result-panel{background:var(--forest);border-radius:5px;color:#fff;font-weight:700;margin:16px 0;padding:20px}.race-rules{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:7px 0;margin:14px 0}.race-rules div{display:flex;gap:12px;align-items:center;font-size:13px;padding:9px 1px}.race-rules strong{font:700 23px Georgia,serif;color:#9d793d;min-width:24px}.action-row{display:flex;gap:12px;margin-top:16px}.action-row button{flex:1;min-width:0}.race-dialog{width:min(98vw,1200px);height:min(94dvh,820px);background:#081c25;color:white;display:flex;flex-direction:column;overflow:hidden}.race-dialog:not([open]){display:none}.race-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 18px;background:#0d3436;border-bottom:1px solid #47716c}.race-head span{display:flex;flex-direction:column}.race-head strong{font:600 20px Georgia,serif}.race-head small{font-size:10px;color:#e1d0a9}.race-head button{background:#b3433b;color:#fff;border:0;padding:11px;border-radius:5px}.race-dialog iframe{flex:1;width:100%;min-height:0;border:0;background:#0e2530}.race-message{padding:16px;background:#ead3a3;color:#1f3937;font-size:14px;font-weight:700}.toast{position:fixed;bottom:100px;left:50%;transform:translateX(-50%) translateY(15px);opacity:0;pointer-events:none;background:#0d3937;color:#fff;padding:12px 20px;border-radius:5px;z-index:80;transition:.2s;max-width:90vw;text-align:center}.toast.on{opacity:1;transform:translateX(-50%)}@media(max-width:850px){.event-grid{grid-template-columns:repeat(2,1fr)}.date-strip{grid-template-columns:repeat(8,1fr)}.all-events{grid-template-columns:repeat(3,1fr)}.hero-crest{right:2%;opacity:.1}}@media(max-width:600px){.masthead{height:69px;padding:8px 16px}.brand img{width:39px;height:39px}.brand strong{font-size:17px}.brand small{font-size:6px;letter-spacing:.13em}.head-account{padding:10px;font-size:11px}.hero{min-height:415px}.hero-content{padding:80px 20px 76px}.hero h1{font-size:51px}.hero p{font-size:15px}.hero-foot{padding:16px 20px;font-size:8px;letter-spacing:.1em}.content{padding:31px 17px 55px}.section-title h2{font-size:27px}.section-title{align-items:start}.section-subtle{font-size:11px;text-align:right}.date-strip{grid-template-columns:repeat(6,1fr);gap:5px}.date{min-height:51px}.event-grid{grid-template-columns:1fr}.event-art{height:135px}.feature-row{grid-template-columns:1fr;gap:9px}.feature{min-height:0}.all-events{grid-template-columns:repeat(2,1fr)}.page-banner{padding:37px 18px;min-height:180px}.bottom-nav button{padding:7px;min-width:64px}.modal{padding:25px 21px}.action-row{flex-direction:column}.race-head{padding:9px}.race-head strong{font-size:16px}.race-head button{font-size:11px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;scroll-behavior:auto!important}}
/* Unlocked-event empty states */
.unlock-message{grid-column:1/-1;min-height:150px;display:flex;align-items:center;justify-content:center;background:#edf1ed;border:1px dashed #aabeb4;border-radius:8px;padding:25px;font-size:15px;}

/* Elflympics icon system v3 — lightweight reusable SVG sprite, transparent artwork. */
.elf-icon{width:1.5em;height:1.5em;display:inline-block;vertical-align:middle;flex:0 0 auto;overflow:visible;pointer-events:none}
.head-account{display:inline-flex;align-items:center;justify-content:center;gap:7px}
.head-account .elf-icon{height:18px;width:18px;background:#f8efe0;border-radius:50%;padding:1px}
.head-account span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:120px}
.bottom-nav{align-items:center;min-height:81px}
.bottom-nav button{gap:3px;min-height:66px;padding:3px 9px}
.bottom-nav button .nav-mark{display:flex;align-items:center;justify-content:center;height:43px;width:43px;background:#eee7d8;border:1px solid #8a7850;border-radius:12px;padding:4px;transition:transform .15s,background .15s}
.bottom-nav button .nav-mark .elf-icon{height:100%;width:100%;display:block}
.bottom-nav button .nav-label{font-size:10px;line-height:1.05}
.bottom-nav button.active .nav-mark{background:#ead09a;border-color:#e7bd69;box-shadow:0 0 0 2px rgba(223,183,93,.13)}
.bottom-nav button:active .nav-mark{transform:scale(.94)}
.bottom-nav button:focus-visible .nav-mark{outline:3px solid #c99b37;outline-offset:2px}
.section-title h2,.page-banner h1{display:flex;align-items:center;gap:10px}
.section-title h2>.elf-icon{width:32px;height:32px}
.page-banner h1>.elf-icon{width:48px;height:48px;background:#faf0da;border-radius:10px;padding:5px}
.feature h3{display:flex;align-items:center;gap:8px}
.date{gap:2px}
.date .elf-icon{width:22px;height:22px}
.date.live .elf-icon{background:#f6e8c8;border-radius:6px;padding:2px}
.date.locked .elf-icon{opacity:.65}
.date small{font-size:7px}
.all-events .tile-header{display:flex;align-items:center;justify-content:space-between;gap:5px;width:100%}
.all-events .tile-header .elf-icon{height:26px;width:26px}
.all-events button.active-day .tile-header .elf-icon{background:#fff8e9;border-radius:6px}
.event-card .status{display:flex;align-items:center;gap:5px}
.event-card .status .elf-icon{height:21px;width:21px}
.event-card .event-art>.elf-icon{position:absolute;right:20px;bottom:10px;height:68px;width:68px;background:#f3e9d0;border-radius:50%;padding:7px;box-shadow:0 6px 20px #001b2ba8}
.result-panel{display:flex;align-items:center;gap:12px}
.result-panel .elf-icon{height:42px;width:42px;background:#f8ecce;border-radius:9px;padding:4px}
.race-rules .elf-icon{height:30px;width:30px;flex-shrink:0}
.action-row .elf-icon,.hero-ctas .elf-icon,.primary .elf-icon,.secondary .elf-icon{height:23px;width:23px;background:#f7eedf;border-radius:5px;padding:2px}
#eventBoard .elf-icon{height:19px;width:19px}
.rank-cell{display:inline-flex;align-items:center;gap:6px;font-weight:700}
.rank-cell .elf-icon{height:30px;width:30px}
.rank-cell .tie-mark{width:18px;height:18px}
.profile-card .profile-heading{display:flex;align-items:center;gap:10px}
.profile-card .profile-heading .elf-icon{height:44px;width:44px}
@media(max-width:600px){.bottom-nav{min-height:77px}.bottom-nav button{min-width:0;flex:1;padding:3px}.bottom-nav button .nav-mark{height:40px;width:40px}.page-banner h1>.elf-icon{height:38px;width:38px}.section-title h2>.elf-icon{width:28px;height:28px}}
@media(prefers-reduced-motion:reduce){.bottom-nav button .nav-mark{transition:none}}

/* Keep the app header inside the screen when competitor names are long. */
@media(max-width:600px){
 .masthead .brand{flex:1 1 auto;min-width:0;overflow:hidden}
 .masthead .brand>span{min-width:0;overflow:hidden}
 .masthead .brand strong{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .masthead .brand small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .masthead .head-account{flex:0 1 auto;min-width:0;max-width:122px}
 .masthead .head-account span{min-width:0;max-width:68px;white-space:nowrap;text-overflow:ellipsis}
}

/* V4 — USES THE APPROVED V2 PNG ICON ARTWORK; NO REDRAWN SVG SYMBOLS. */
.elf-icon{background-image:url("./assets/approved-icons-v2.png") !important;background-repeat:no-repeat!important;background-size:600% 300%!important;padding:0!important;position:relative;}
.elf-icon.elf-icon--home{background-position:0% 0% !important;}
.elf-icon.elf-icon--events{background-position:20% 0% !important;}
.elf-icon.elf-icon--standings{background-position:40% 0% !important;}
.elf-icon.elf-icon--profile{background-position:60% 0% !important;}
.elf-icon.elf-icon--practice{background-position:80% 0% !important;}
.elf-icon.elf-icon--official-race{background-position:100% 0% !important;}
.elf-icon.elf-icon--locked{background-position:0% 50% !important;}
.elf-icon.elf-icon--unlocked{background-position:20% 50% !important;}
.elf-icon.elf-icon--result-recorded{background-position:40% 50% !important;}
.elf-icon.elf-icon--attempt-used{background-position:60% 50% !important;}
.elf-icon.elf-icon--medal-gold{background-position:80% 50% !important;}
.elf-icon.elf-icon--medal-silver{background-position:100% 50% !important;}
.elf-icon.elf-icon--medal-bronze{background-position:0% 100% !important;}
.elf-icon.elf-icon--trophy{background-position:20% 100% !important;}
.elf-icon.elf-icon--sign-in{background-position:40% 100% !important;}
.elf-icon.elf-icon--settings{background-position:60% 100% !important;}
.elf-icon.elf-icon--notifications{background-position:80% 100% !important;}
.elf-icon.elf-icon--tie{background-position:100% 100% !important;}

/* V5: actual approved Elflympics 2026 transparent PNG artwork (not recreated). */
.masthead{min-height:92px;height:auto;padding-top:7px;padding-bottom:7px;gap:14px}
.masthead .brand{min-width:0;flex:0 1 auto;display:flex;align-items:center;overflow:visible}
.masthead .brand img.brand-logo{display:block;width:clamp(210px,24vw,294px);height:auto;max-width:100%;object-fit:contain;flex-shrink:1}
.masthead .head-account{flex:0 0 auto}
.hero-content{padding-top:46px}
.hero-logo{display:block;width:min(540px,100%);height:auto;object-fit:contain;margin:0 0 20px -9px;filter:drop-shadow(0 12px 22px rgba(2,18,25,.25))}
.hero{min-height:555px}
.hero h1{margin-top:12px}
.hero-crest{display:none}
.modal .modal-crest{display:block;width:min(100%,300px);height:auto;max-height:120px;object-fit:contain;margin:0 0 13px -6px}
@media(max-width:600px){
 .masthead{min-height:76px;height:auto;padding:7px 12px;gap:7px}
 .masthead .brand{flex:1 1 auto;min-width:0;overflow:hidden}
 .masthead .brand img.brand-logo{width:min(58vw,216px);height:auto;max-width:100%;flex-shrink:1}
 .masthead .head-account{flex:0 0 auto;max-width:115px}
 .hero{min-height:490px}
 .hero-content{padding:40px 18px 85px}
 .hero-logo{width:min(100%,410px);margin:0 0 18px -5px}
 .hero h1{font-size:clamp(40px,11vw,51px);margin-top:10px}
 .hero p{font-size:15px}
}
@media(max-width:365px){
 .masthead .brand img.brand-logo{width:50vw}
 .masthead .head-account{max-width:104px}
}


/* === ELF V6: NORTH POLE CHAMPIONSHIP BACKGROUND TRIAL ===
   Reversible visual-only change. Remove this entire block to restore V5.
   Uses the two existing approved compositions, converted to lightweight AVIF.
   No changes to player logic, icons, logo, events or race restrictions.
*/
html{background:#071e2d}
body{background:transparent}
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:#092b38 url("./assets/elflympics-village-desktop.avif") center center / cover no-repeat;
}
.app-shell{position:relative;z-index:1;background:transparent}
.hero{
  background-image:
    linear-gradient(90deg,rgba(4,24,36,.84) 0%,rgba(5,28,42,.61) 43%,rgba(5,30,45,.18) 100%),
    url("./assets/elflympics-village-desktop.avif");
  background-position:center center;
  background-size:cover;
  background-repeat:no-repeat;
}
.hero::before{
  background:linear-gradient(0deg,rgba(4,21,32,.70) 0%,transparent 38%);
}
.page-banner{
  background-image:
    linear-gradient(90deg,rgba(5,27,38,.87),rgba(8,43,53,.40)),
    url("./assets/elflympics-village-desktop.avif");
  background-position:center 52%;
  background-size:cover;
  background-repeat:no-repeat;
}
.view>.content.wrap{
  background:rgba(249,247,240,.92);
  border:1px solid rgba(255,255,255,.6);
  border-radius:16px;
  margin-top:22px;
  margin-bottom:24px;
  box-shadow:0 18px 45px rgba(2,22,34,.22);
}
@media(max-width:600px){
  body::before{
    background-image:url("./assets/elflympics-village-mobile.avif");
    background-position:center 56%;
  }
  .hero{
    background-image:
      linear-gradient(180deg,rgba(4,25,39,.55) 0%,rgba(4,24,36,.70) 65%,rgba(4,20,33,.82) 100%),
      url("./assets/elflympics-village-mobile.avif");
    background-position:center 60%;
    background-size:cover;
  }
  .page-banner{
    background-image:
      linear-gradient(90deg,rgba(4,26,36,.85),rgba(4,26,36,.42)),
      url("./assets/elflympics-village-mobile.avif");
    background-position:center 62%;
  }
  .view>.content.wrap{
    width:calc(100% - 20px);
    margin:12px 10px 18px;
    padding:25px 15px 40px;
    border-radius:13px;
    background:rgba(249,247,240,.94);
    box-shadow:0 12px 30px rgba(2,22,34,.23);
  }
}
@media(prefers-reduced-data:reduce){
  /* Avoid additional effects on metered connections. */
  .view>.content.wrap{box-shadow:none}
}
/* === END ELF V6 BACKGROUND TRIAL === */

/* Workshop is an isolated deployment of the same Elflympics shell. */
.workshop-ribbon{background:#f2dbab;color:#102d30;text-align:center;font-weight:850;letter-spacing:.09em;font-size:11px;padding:10px 12px;position:relative;z-index:500}
.workshop-ribbon[hidden]{display:none}
