*{box-sizing:border-box} :root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#111827;background:#f7f8fa} body{margin:0}.shell{min-height:100vh}.topbar{position:sticky;top:0;z-index:10;display:flex;align-items:center;gap:12px;padding:14px 18px;background:rgba(255,255,255,.96);border-bottom:1px solid #e5e7eb}.brand-logo{width:40px;height:40px}.brand{font-weight:800}.brand-sub{font-size:.78rem;color:#6b7280}.container{width:min(980px,100%);margin:auto;padding:0 16px 56px}.hero h1{font-size:clamp(2rem,7vw,3.4rem);line-height:1;margin:0 0 10px}.hero p{margin:0;color:#6b7280;font-size:1.05rem}.badge{display:inline-block;margin-bottom:12px;padding:5px 9px;border-radius:999px;background:#e8f1ff;color:#165dcc;font-size:.78rem;font-weight:700}.panel{margin-top:0;padding:18px;background:#fff;border:1px solid #e5e7eb;border-radius:18px;box-shadow:0 8px 30px rgba(17,24,39,.06)}.location-grid{display:grid;gap:12px}.button{border:0;border-radius:12px;padding:13px 16px;font:inherit;font-weight:700;cursor:pointer;background:#1769e0;color:white}.button.secondary{background:#eef2f7;color:#111827}.input-row{display:grid;grid-template-columns:1fr auto;gap:10px}.input{width:100%;border:1px solid #d1d5db;border-radius:12px;padding:13px 14px;font:inherit;background:white}.status{margin:12px 0 0;color:#6b7280;font-size:.92rem}.results-head{display:flex;justify-content:space-between;align-items:end;gap:12px;margin:30px 0 12px}.results-head h2{margin:0}.count{color:#6b7280;font-size:.9rem}.list{display:grid;gap:12px}.card{display:grid;gap:8px;padding:16px;background:#fff;border:1px solid #e5e7eb;border-radius:16px}.card-top{display:flex;justify-content:space-between;gap:12px}.card h3{margin:0;font-size:1.05rem}.distance{white-space:nowrap;font-weight:800;color:#1769e0}.meta{display:flex;flex-wrap:wrap;gap:8px 14px;color:#4b5563;font-size:.9rem}.card a{color:#1769e0;font-weight:700;text-decoration:none}.empty{padding:28px;text-align:center;color:#6b7280;background:#fff;border:1px dashed #d1d5db;border-radius:16px}.footer{margin-top:36px;color:#9ca3af;font-size:.8rem;text-align:center}@media(min-width:720px){.container{padding-top:42px}.location-grid{grid-template-columns:auto 1fr}.location-grid .input-row{grid-column:1/-1}.card{padding:18px 20px}}
.filters-header{display:flex;flex-direction:column;gap:14px;margin-bottom:14px}
.filters-header h2{margin:0}
.field{display:grid;gap:6px;font-size:.86rem;color:#6b7280}
.compact-field{min-width:210px}
.field .input{color:#111827}
@media(min-width:720px){
  .filters-header{flex-direction:row;justify-content:space-between;align-items:end}
}

.section-nav{position:sticky;top:69px;z-index:9;display:flex;gap:8px;overflow-x:auto;padding:10px 16px;background:rgba(247,248,250,.96);border-bottom:1px solid #e5e7eb;backdrop-filter:blur(8px)}
.nav-item{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;border:1px solid transparent;background:transparent;border-radius:999px;padding:9px 13px;font:inherit;font-weight:700;color:#4b5563;cursor:pointer}
.nav-item.active{background:#111827;color:white}
.app-section[hidden]{display:none}
.profile-search-grid{display:grid;gap:16px}
.profile-search-box{margin:0}
.profile-search-results{display:grid;gap:8px;margin-top:14px}
.person-result{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;border:1px solid #e5e7eb;background:#fff;border-radius:12px;padding:12px 14px;cursor:pointer}
.person-result:hover{border-color:#9ca3af}
.person-result-main{display:grid;gap:2px}
.person-result-main span,.person-country{color:#6b7280;font-size:.88rem}
.profile-result{margin-top:20px}
.profile-card{display:grid;gap:18px;padding:20px;background:#fff;border:1px solid #e5e7eb;border-radius:18px;box-shadow:0 8px 30px rgba(17,24,39,.06)}
.profile-card-main{display:flex;gap:16px;align-items:flex-start}
.profile-avatar{width:96px;height:96px;border-radius:18px;object-fit:cover;border:1px solid #e5e7eb}
.profile-avatar-fallback{display:grid;place-items:center;background:#f3f4f6;font-size:2rem}
.profile-card h2{margin:4px 0 2px;font-size:1.6rem}
.profile-id{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:#6b7280}
.profile-meta{margin-top:10px}
.profile-link{display:inline-block;margin-top:12px;color:#1769e0;font-weight:700;text-decoration:none}
.profile-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.stat{padding:14px;background:#f8fafc;border-radius:14px;text-align:center}
.stat-value{display:block;font-size:1.4rem;font-weight:800}
.stat-label{display:block;margin-top:3px;color:#6b7280;font-size:.78rem}
@media(min-width:720px){.profile-search-grid{grid-template-columns:1fr 1fr}.profile-card{padding:24px}.profile-avatar{width:120px;height:120px}}

.profile-name-fields{display:grid;gap:10px}
.profile-search-button{margin-top:10px;width:100%}
@media(min-width:720px){
  .profile-name-fields{grid-template-columns:1fr 1fr}
}

.profile-results-toolbar{display:flex;justify-content:flex-end;margin-top:14px;padding-top:14px;border-top:1px solid #e5e7eb}
.profile-results-toolbar[hidden]{display:none}
.profile-results-toolbar .compact-field{width:min(260px,100%)}

.topbar .app-version{margin-left:auto;padding:5px 9px;border-radius:999px;background:#e8f1ff;color:#165dcc;font-size:.78rem;font-weight:700;white-space:nowrap}
.profile-search-region{margin-top:10px}

.profile-id-box{max-width:430px}
.profile-id-box .input-row{grid-template-columns:minmax(150px,230px) auto}
@media(max-width:719px){.profile-id-box{max-width:none}.profile-id-box .input-row{grid-template-columns:1fr auto}}

.practice-panel{display:grid;gap:18px}
.practice-controls{display:grid;grid-template-columns:minmax(300px,440px) auto;gap:10px;align-items:end;justify-content:start}
.scramble-card{padding:22px;background:#111827;color:#fff;border-radius:18px}
.scramble-label{display:block;margin-bottom:10px;font-size:.8rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:#9ca3af}
.scramble-text{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:clamp(1.25rem,4vw,2rem);line-height:1.5;word-spacing:.18em}
@media(max-width:719px){.practice-controls{grid-template-columns:1fr}.practice-controls .button{width:100%}}

.header-actions{margin-left:auto;display:flex;align-items:center;gap:8px}
.auth-button{border:1px solid #d1d5db;background:#fff;border-radius:999px;padding:7px 11px;font:inherit;font-size:.82rem;font-weight:700;color:#111827;cursor:pointer}
.auth-button:hover{background:#f3f4f6}
.auth-id{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.78rem;font-weight:700;color:#374151}

.brand-block{min-width:0}
.brand-meta{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.brand-meta .app-version{margin-left:0;padding:2px 6px;border-radius:999px;background:#e8f1ff;color:#165dcc;font-size:.62rem;font-weight:700;white-space:nowrap}
.topbar>.app-version,.header-actions .app-version{display:none}

.profile-records-wrap{width:100%;overflow-x:auto;border:1px solid #e5e7eb;border-radius:14px}
.profile-records{width:100%;border-collapse:collapse;min-width:650px;font-variant-numeric:tabular-nums}
.profile-records th,.profile-records td{padding:11px 13px;border-bottom:1px solid #e5e7eb;text-align:right;white-space:nowrap}
.profile-records th{background:#f8fafc;color:#6b7280;font-size:.78rem;font-weight:800}
.profile-records th:first-child,.profile-records td:first-child{text-align:left}
.profile-records tbody tr:last-child td{border-bottom:0}
.profile-records tbody tr:hover{background:#fafafa}
.profile-records .record-event{font-weight:700;color:#111827}
.profile-records .record-nr{font-weight:400;color:#111827}

@media(max-width:560px){
  .brand-meta{gap:5px}
  .brand-sub{font-size:.7rem}
  .brand-meta .app-version{font-size:.56rem;padding:2px 5px}
  .profile-records th,.profile-records td{padding:9px 10px}
}

.history-chart{margin-top:14px}
.history-legend{display:flex;gap:18px;justify-content:flex-end;margin:4px 2px 10px;color:#4b5563;font-size:.82rem;font-weight:700}
.history-legend span{display:inline-flex;align-items:center;gap:7px}
.legend-line{display:inline-block;width:22px;height:3px;border-radius:999px}
.legend-line.single,.history-line.single{background:#1769e0;stroke:#1769e0}
.legend-line.average,.history-line.average{background:#111827;stroke:#111827}
.history-svg-wrap{width:100%;overflow-x:auto}
.history-svg-wrap svg{display:block;width:100%;min-width:720px;height:auto}
.history-grid{stroke:#e5e7eb;stroke-width:1}
.history-axis{fill:#6b7280;font-size:11px}
.history-line{fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.history-dot.single{fill:#1769e0}
.history-dot.average{fill:#111827}
.history-dot{stroke:#fff;stroke-width:2}
.history-competition-labels{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:6px;margin:4px 26px 0 58px;color:#9ca3af;font-size:.65rem;text-align:center}
.history-competition-labels span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:719px){
  .history-legend{justify-content:flex-start}
  .history-svg-wrap svg{min-width:760px}
  .history-competition-labels{display:none}
}

/* My Profile analytics */
#section-my-profile .panel{background:transparent;border:0;box-shadow:none;padding:0}
#section-my-profile .filters-header{margin:14px 0 10px}#profile-history-panel .filters-header{padding-bottom:14px;border-bottom:1px solid #e5e7eb;margin-bottom:12px}
#section-my-profile .filters-header>div p{display:none}
.history-chart{display:grid;gap:14px;margin-top:8px}
.performance-card{background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:16px;box-shadow:0 8px 30px rgba(17,24,39,.045)}
.performance-card h3{margin:0 0 10px;font-size:1.05rem}
.history-legend{display:flex;flex-wrap:wrap;gap:16px;justify-content:flex-start;margin:0 0 8px;color:#4b5563;font-size:.76rem;font-weight:700}
.history-legend span,.mini-legend span{display:inline-flex;align-items:center;gap:6px}
.legend-line{display:inline-block;width:20px;height:3px;border-radius:999px}
.legend-line.single,.history-line.single{background:#1687ea;stroke:#1687ea}
.legend-line.average,.history-line.average{background:#ec3f91;stroke:#ec3f91}
.legend-key{display:inline-block;width:9px;height:9px;border-radius:50%;background:#16a34a}
.history-area.single{fill:#1687ea;opacity:.10}
.history-area.average{fill:#ec3f91;opacity:.10}
.history-svg-wrap{width:100%;overflow-x:auto}
.history-svg-wrap svg{display:block;width:100%;min-width:760px;height:auto}
.history-grid{stroke:#e5e7eb;stroke-width:1}
.history-axis{fill:#64748b;font-size:10px}
.history-comp{fill:#334155;font-size:10px;font-weight:700}
.history-line{fill:none;stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round}
.history-dot{stroke:#fff;stroke-width:1.8}
.history-dot.single{fill:#1687ea}
.history-dot.average{fill:#ec3f91}
.key-marker circle{stroke:#fff;stroke-width:2}
.key-marker text{font-size:10px;font-weight:800;paint-order:stroke;stroke:#fff;stroke-width:3;stroke-linejoin:round}
.key-marker.green circle{fill:#16a34a}.key-marker.green text{fill:#15803d}
.key-marker.blue circle{fill:#1687ea}.key-marker.blue text{fill:#0f5fb8}
.key-marker.neutral circle{fill:#334155}.key-marker.neutral text{fill:#334155}

.mini-chart-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}
.mini-chart-card{min-width:0;border:1px solid #e5e7eb;border-radius:12px;padding:10px;background:#fff}
.mini-title{font-size:.78rem;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mini-date{margin-top:2px;color:#64748b;font-size:.68rem}
.mini-chart-card svg{display:block;width:100%;height:auto;margin-top:4px}
.mini-axis{fill:#64748b;font-size:9px}
.mini-average{fill:#ec3f91}
.mini-legend{display:flex;gap:18px;margin-top:10px;color:#4b5563;font-size:.75rem;font-weight:700}
.legend-dot{width:9px;height:9px;border-radius:50%;background:#1687ea}
.legend-square{width:9px;height:9px;border-radius:2px;background:#ec3f91}

.insight-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.insight-card{display:flex;gap:10px;align-items:flex-start;padding:13px;border:1px solid #e5e7eb;border-radius:14px;background:#fff;min-width:0}
.insight-icon{font-size:1.2rem;line-height:1.1}
.insight-label{font-size:.7rem;font-weight:800;color:#334155}
.insight-value{margin-top:3px;font-size:1.3rem;font-weight:900}
.insight-detail{margin-top:3px;color:#64748b;font-size:.66rem;line-height:1.3}
.insight-card.green .insight-value{color:#16a34a}
.insight-card.pink .insight-value{color:#ec3f91}
.insight-card.blue .insight-value{color:#1769e0}
.insight-card.purple .insight-value{color:#7c3aed}

@media(max-width:719px){
  #section-my-profile .filters-header{margin-top:10px}
  .performance-card{padding:12px;border-radius:14px}
  .history-svg-wrap svg{min-width:780px}
  .mini-chart-grid{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:4px}
  .mini-chart-card{min-width:225px;scroll-snap-align:start}
  .insight-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .insight-card{padding:11px}
}

.history-month-grid{stroke:#eef2f7;stroke-width:1}
.history-month{fill:#475569;font-size:10px;font-weight:700}
.history-interactive-wrap{position:relative}
.history-point{cursor:pointer;outline:none}
.history-point:focus{stroke:#111827;stroke-width:2.5}
.history-tooltip{position:absolute;z-index:5;min-width:180px;max-width:220px;padding:10px 12px;border:1px solid #dbe2ea;border-radius:12px;background:rgba(255,255,255,.98);box-shadow:0 10px 30px rgba(15,23,42,.16);color:#0f172a;font-size:.75rem;line-height:1.35;pointer-events:none}
.history-tooltip strong,.history-tooltip span{display:block}
.history-tooltip strong{margin-bottom:3px;font-size:.78rem}
.history-tooltip span{color:#475569}

/* LIVE competition cockpit */
.live-shell{display:grid;gap:14px}
.live-topbar{display:flex;align-items:end;justify-content:space-between;gap:16px;padding:14px 16px;background:#fff;border:1px solid #e5e7eb;border-radius:16px}
.live-kicker{display:block;margin-bottom:4px;color:#dc2626;font-size:.68rem;font-weight:900;letter-spacing:.08em}
.live-competition-name{font-size:1.25rem;font-weight:900;color:#0f172a}.live-competition-title-row{display:flex;align-items:center;gap:8px}.live-competition-name-link{text-decoration:none}.live-competition-name-link:hover{text-decoration:underline;text-underline-offset:3px}.live-results-label{display:inline-flex;align-items:center;padding:5px 10px;border-radius:999px;background:#eff6ff;color:#1769e0;text-decoration:none;font-size:.78rem;font-weight:800;white-space:nowrap}.live-results-label:hover{background:#dbeafe}.live-competition-link{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:8px;color:#1769e0;text-decoration:none;font-size:.9rem;font-weight:900}.live-competition-link:hover{background:#eff6ff}
.live-time-field{width:min(280px,100%)}
.live-now-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.live-focus-card{min-height:150px;padding:16px;border:1px solid #e5e7eb;border-radius:16px;background:#fff}
.live-now-card{border-top:4px solid #dc2626}
.live-next-card{border-top:4px solid #1769e0}
.live-card-label{display:block;margin-bottom:12px;color:#64748b;font-size:.72rem;font-weight:900;letter-spacing:.1em}
.live-role{font-size:.82rem;font-weight:900;color:#334155}
.live-assignment-title{margin-top:6px;font-size:1.35rem;font-weight:900;color:#0f172a}
.live-assignment-meta{margin-top:6px;color:#64748b;font-size:.82rem}
.live-empty{display:flex;flex-direction:column;gap:5px;color:#64748b}
.live-empty strong{color:#0f172a;font-size:1rem}
.live-schedule-section{padding:14px 16px;background:#fff;border:1px solid #e5e7eb;border-radius:16px}
.live-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}
.live-section-head h2{margin:0;font-size:1rem}
.live-schedule-list{display:grid}
.live-schedule-row{display:grid;grid-template-columns:64px 1fr;gap:12px;padding:11px 0;border-top:1px solid #eef2f7}
.live-schedule-row:first-child{border-top:0}
.live-schedule-row.active{margin:0 -8px;padding:11px 8px;border-radius:10px;background:#fff1f2}
.live-schedule-time{padding-top:2px;font-size:.8rem;font-weight:900;color:#0f172a}
.live-assignment.compact .live-assignment-title{margin-top:2px;font-size:.95rem}
.live-assignment.compact .live-role{font-size:.72rem}
.live-assignment.compact .live-assignment-meta{margin-top:2px;font-size:.72rem}
.live-links{display:flex;gap:14px;padding:0 4px}
.live-links a{font-size:.8rem;font-weight:800;color:#1769e0;text-decoration:none}
@media(max-width:719px){
  .live-topbar{align-items:stretch;flex-direction:column}
  .live-time-field{width:100%}
  .live-now-grid{grid-template-columns:1fr}
  .live-focus-card{min-height:128px}
  .live-assignment-title{font-size:1.15rem}
  .live-section-head{align-items:flex-start;flex-direction:column}
}

.live-past-section{padding:14px 16px;background:#fff;border:1px solid #e5e7eb;border-radius:16px}
.live-past-list{display:grid}
.live-past-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 0;border-top:1px solid #eef2f7}
.live-past-row:first-child{border-top:0}
.live-past-main{display:flex;align-items:center;justify-content:space-between;gap:18px;flex:1;min-width:0}
.live-past-main>div:first-child{min-width:0}
.live-past-main strong{display:block;color:#0f172a;font-size:.88rem}
.live-past-attempts{display:block;margin-top:3px;color:#64748b;font-size:.7rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.live-past-result{text-align:right;white-space:nowrap}
.live-past-result strong{font-size:1rem}
.live-past-result span{display:block;margin-top:2px;color:#64748b;font-size:.7rem}
.live-result-status{display:inline-flex;align-items:center;justify-content:center;min-width:82px;padding:5px 9px;border-radius:999px;font-size:.68rem;font-weight:900}
.live-result-status.qualified{background:#dcfce7;color:#15803d}
.live-result-status.eliminated{background:#fee2e2;color:#b91c1c}
.live-result-status.waiting{background:#fef3c7;color:#b45309}
.live-result-status.finished{background:#f1f5f9;color:#475569}
@media(max-width:719px){
  .live-past-row{align-items:flex-start}
  .live-past-main{align-items:flex-start;flex-direction:column;gap:6px}
  .live-past-result{text-align:left}
  .live-result-status{min-width:72px}
}

@media(max-width:560px){
  .topbar{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:9px;padding:11px 12px;align-items:center}
  .brand-logo{width:36px;height:36px}
  .brand{font-size:.92rem;line-height:1.05;white-space:nowrap}
  .brand-meta{display:block}
  .brand-sub{display:none}
  .brand-meta .app-version{display:inline-block;margin-top:4px}
  .header-actions{margin-left:0;gap:6px;min-width:0}
  .auth-id{max-width:118px;font-family:inherit;font-size:.68rem;line-height:1.15;text-align:right;overflow:hidden}
  .auth-button{padding:7px 9px;font-size:.72rem;white-space:nowrap}
}
@media(max-width:390px){
  .topbar{padding-left:9px;padding-right:9px;gap:7px}
  .brand-logo{width:32px;height:32px}
  .brand{font-size:.84rem}
  .auth-id{max-width:100px;font-size:.63rem}
  .auth-button{padding:6px 8px;font-size:.68rem}
}

.live-past-row{text-decoration:none;color:inherit}
.live-past-row:hover{background:#f8fafc}
@media(max-width:719px){
  .live-past-result strong{color:#1769e0;font-size:.92rem}
}
