:root{--accent:#d94720;--ink:#18252e;--line:#d7e0e6;--muted:#566875;background:#eef1f4;color:#1b2730}
.boulder-numbers{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.boulder-numbers span{display:inline-flex;align-items:center;justify-content:center;min-width:38px;height:38px;padding:5px 9px;border:1px solid #d7e0e6;border-radius:7px;background:#eef2f5;color:#18252e;font-weight:750}.correction-preview{display:block;border-radius:10px;padding:18px;background:#fff0e8;color:#92320f;font-size:1.15rem;font-weight:750}header>.row:first-child{min-width:0;flex:1}.brand{min-width:0}.event-name{display:block;overflow-wrap:anywhere;line-height:1.2}header>.row:last-child{flex-shrink:0}
@media(max-width:760px){header{flex-wrap:wrap;gap:12px}header>.row:first-child{flex-basis:150px}nav.open{top:var(--header-height,77px)}}
button{border-radius:10px;min-height:48px;padding:13px 18px;line-height:1.3;touch-action:manipulation}
button.danger{background:#fff0f0;color:#a01f33;border:1px solid #edc3ca}
input,select{max-width:100%;padding:12px;min-height:48px;font-size:1rem}
input[type=checkbox]{width:24px;height:24px;min-height:24px;flex-shrink:0}
label{gap:8px;min-width:0}h1,h2,p{overflow-wrap:anywhere}
header{padding:17px 28px;min-height:82px}.brand{font-size:1.25rem}.brand em{color:#ff8053}header small{color:#c2cdd5}header button{background:#32434f}.mobile-toggle{display:none}
.shell{grid-template-columns:230px minmax(0,1fr);max-width:1720px;min-height:calc(100vh - 82px)}nav{padding:24px 14px}nav button{color:#455c6a;font-weight:600}nav button.selected{background:#fff0e8;color:#a83212;border-left:0;box-shadow:inset 4px 0 var(--accent)}
.nav-group{display:block;margin:22px 13px 8px;font-size:.75rem;color:#657785;text-transform:uppercase;letter-spacing:.1em;font-weight:800}.profile{padding:6px 14px 16px}.version{display:block;color:#647581;font-size:.8rem;margin:24px 14px}
main{padding:30px;max-width:100%}.topline{gap:14px;margin-bottom:24px}.topline h1{font-size:1.9rem;line-height:1.2;margin:7px 0}.eyebrow{font-size:.75rem;color:#566875}
.grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),1fr));gap:18px}.card{border-radius:15px;margin-bottom:20px;box-shadow:0 3px 10px #19293204;min-width:0}.card h2{margin:6px 0 14px;font-size:1.3rem;letter-spacing:-.025em}.card p{color:var(--muted);line-height:1.55}
.big{font-size:2.9rem;font-weight:850;letter-spacing:-.055em;margin:10px 0}.tile{gap:14px;min-height:200px;margin-bottom:0}.tile.owned{border-color:var(--accent)}.tile button{align-self:stretch}.tile h2{font-size:1.45rem}
.welcome{margin:0 0 26px}.welcome strong{font-size:1.2rem}.welcome p{color:var(--muted);margin:8px 0}.pill{border-radius:7px;color:#993112;padding:7px 10px;font-size:.875rem;line-height:1.35}.pill.neutral{background:#edf1f4;color:#536773}
.table-wrap{max-width:100%;border-radius:12px}th{color:#455967;background:#e8eef2}td{overflow-wrap:anywhere}td[data-field=number] input,td[data-field=order] input{min-width:70px;width:80px}td[data-field=name] input{min-width:155px}td[data-field=email] input{min-width:200px}td[data-field=password] input{min-width:135px}.field-help{display:block;max-width:210px;color:#7b461b;font-size:.8rem;line-height:1.5;margin-top:7px}.row-actions button{white-space:nowrap;margin:3px}
.queue-item{padding:17px 0}.queue-item:last-child{border-bottom:0}.queue-item small{font-size:.9rem;color:var(--muted)}.queue-count strong{font-size:1.55rem;color:var(--ink)}.queue-count{margin:10px 0 0}.sector-toolbar{margin-bottom:18px}.attempt-actions button{min-height:76px;font-size:1.1rem}.next-athlete{border-top:4px solid var(--accent)}.next-athlete h2{font-size:1.65rem}.toggle{padding:14px 0;line-height:1.45}
.login-art h1{line-height:1.08}.login-art h1 span{color:#ff8053}.login-main h2{margin:0 0 8px}
#notice{width:max-content;max-width:calc(100vw - 28px);border-radius:12px;z-index:50;line-height:1.45}dialog{border-radius:16px;max-width:520px;width:calc(100% - 28px);max-height:90dvh;overflow:auto;color:var(--ink)}dialog.wide{max-width:1100px}dialog h2{line-height:1.3}dialog p{line-height:1.6}.dialog-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin-top:22px}.filters{align-items:end}
.total .eyebrow{color:#ff9b77}.total p{color:#c6d1d9}.note,.security-note{font-size:.875rem;line-height:1.6;color:var(--muted)}.security-note{background:#fff3e7;color:#794519;border-radius:8px;padding:12px 15px}.narrow{max-width:650px}.import-bar{display:flex;flex-wrap:wrap;gap:12px}.save-bar{position:sticky;bottom:0;z-index:5;display:flex;justify-content:flex-end;gap:12px;padding:14px 0;background:#eef1f4ee;backdrop-filter:blur(8px);border-top:1px solid var(--line)}.mail-settings{margin-top:28px}.assignment{padding:18px 0;border-bottom:1px solid var(--line)}.assignment p{margin:7px 0 0;font-size:.9rem}.error-text{color:#9c2335;font-weight:650}
.qr-card{max-width:650px;text-align:center}.qr-card label{text-align:left;margin-bottom:24px}.qr-image{display:block;width:min(100%,320px);height:auto;margin:18px auto;background:white}.qr-image.large{width:min(100%,650px)}.qr-url{font-family:ui-monospace,Consolas,monospace;font-size:.95rem;overflow-wrap:anywhere}.qr-card .row{justify-content:center}#print-area{display:none}
@media(min-width:1000px){nav{position:sticky;top:0;align-self:start;min-height:calc(100vh - 82px)}.home-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:761px) and (max-width:1000px){.shell{display:grid;grid-template-columns:195px minmax(0,1fr)}nav{display:block}nav button{width:100%;white-space:normal}.profile{display:block}main{padding:24px 18px}.settings{grid-template-columns:1fr}}
@media(max-width:760px){
 header{padding:13px 16px;position:sticky;top:0;z-index:20;min-height:77px}.brand{font-size:1rem;letter-spacing:.025em}header small{font-size:.75rem;max-width:170px}header .row{gap:8px}header img{max-width:45px;height:32px}header button{padding:10px 12px;min-height:44px}.mobile-toggle{display:inline-block}.logout{font-size:.875rem}.shell{display:block}
 nav{display:none;border-right:0;border-bottom:1px solid var(--line);padding:16px;max-height:calc(100dvh - 77px);overflow:auto}nav.open{display:block;position:fixed;inset:77px 0 auto;z-index:19;box-shadow:0 15px 20px #17232d33}nav button{width:100%;min-height:48px;white-space:normal;text-align:left}nav button.selected{border-bottom:0}.profile{display:block}main{padding:23px 16px 32px}.topline{margin-bottom:20px;align-items:start}.topline h1{font-size:1.65rem}.topline button{padding:10px 12px;font-size:.875rem}.eyebrow{font-size:.7rem}
 .grid{grid-template-columns:1fr;gap:14px}.home-grid{grid-template-columns:1fr 1fr;gap:12px}.home-grid .tile{padding:17px;min-height:170px}.home-grid .tile h2{font-size:1.05rem}.home-grid .tile button{font-size:.9rem;padding:11px}.card{padding:20px;border-radius:13px}.tile{min-height:initial}.tile h2{font-size:1.5rem}.tile p{margin:12px 0}.row{gap:10px}.settings{grid-template-columns:1fr;gap:18px}
 .login-wrap{display:block}.login-art{padding:25px 24px}.login-art h1{font-size:2.3rem;margin:25px 0 10px}.login-art p,.login-art small{display:none}.login-main{padding:28px 24px}.login-main h2{font-size:1.8rem}.attempt-actions{gap:10px}.attempt-actions button{padding:16px 8px;min-height:76px;font-size:1rem}.next-athlete h2{font-size:1.45rem}.big{font-size:2.8rem}.import-bar button{flex:1;font-size:.9rem}.save-bar{padding:12px 0 calc(12px + env(safe-area-inset-bottom));justify-content:stretch}.save-bar button{flex:1}
 .table-wrap{border:0;background:transparent;overflow:visible;margin:16px 0}table,tbody{display:block;width:100%}thead{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;background:white;border:1px solid var(--line);border-radius:12px;padding:18px;margin-bottom:16px}td{display:block;border:0;padding:0;min-width:0;overflow-wrap:anywhere}td::before{content:attr(data-label);display:block;margin-bottom:7px;color:var(--muted);font-size:.8rem;font-weight:650}td[data-label=Nome],td[data-label=Atleta],td[data-label=E-mail],td[data-label=Conferência],td[data-label=Ações]{grid-column:1/-1}td input,td select,td[data-field=number] input,td[data-field=order] input{min-width:0!important;width:100%!important;max-width:100%}td[data-field=active] input{width:24px!important}.row-actions{display:flex;gap:8px;flex-wrap:wrap;padding-top:12px;border-top:1px solid var(--line)}.row-actions::before{display:none}.row-actions button{margin:0;flex:1}.field-help{max-width:none}
 .filters{display:grid;grid-template-columns:1fr 1fr;gap:12px}.filters>*{max-width:none;min-width:0}.filters label{font-size:.875rem}dialog{padding:22px 18px}dialog .table-wrap{max-height:55dvh;overflow:auto}.assignment .row{width:100%}.assignment button{flex:1}.qr-card{padding:18px}.qr-image{width:min(100%,320px)}.sector-toolbar{gap:12px}.sector-toolbar button{min-height:44px}.narrow{max-width:none}
}
@media(max-width:350px){.home-grid{grid-template-columns:1fr}.brand{font-size:.9rem}header .row{gap:6px}main{padding-inline:12px}.card{padding:17px}tbody tr{padding:14px;gap:12px}.attempt-actions{grid-template-columns:1fr}}
@media print{header,nav,button,.filters,.eyebrow,.save-bar,#notice,dialog{display:none!important}.shell{display:block}main{padding:0}.table-wrap{overflow:visible;border:0}.card{break-inside:avoid}body{background:white}table{display:table}thead{display:table-header-group;position:static;clip-path:none;width:auto;height:auto}tbody{display:table-row-group}tbody tr{display:table-row}td,th{display:table-cell;padding:9px}td::before{display:none}.printing-qr #app{display:none}.printing-qr #print-area{display:block;text-align:center;padding:30px}.printing-qr #print-area img{width:120mm;max-width:90%;height:auto}}
.attempt-feedback{max-width:650px;margin:30px auto;text-align:center;padding:35px 24px}.attempt-feedback h1{font-size:2rem;margin:16px 0}.attempt-feedback p{font-size:1.1rem;line-height:1.6}.attempt-feedback .eyebrow{font-size:.85rem}.feedback-symbol{font-size:3rem;color:#d94720}.attempt-feedback button{margin-top:22px;width:100%;min-height:54px}.feedback-points strong{color:#a73212}
/* 1.5 */
main{--menu-title-size:1.45rem;--menu-title-weight:700;scroll-padding-top:160px}.home-grid .tile h2{font-size:var(--menu-title-size);font-weight:var(--menu-title-weight)}
.topline .floating-back{position:fixed;right:16px;top:calc(var(--header-height,82px) + 10px);z-index:18;min-height:52px;font-size:var(--menu-title-size);font-weight:var(--menu-title-weight);box-shadow:0 3px 12px #18252e33;border:1px solid #c2cdd5;padding:10px 16px}main:has(.floating-back){padding-top:80px}header{position:sticky;top:0;z-index:20}
.home-info{font-size:.95rem;line-height:1.6;overflow-wrap:anywhere;flex:1}.home-info strong{font-size:1.06em;color:var(--ink)}
.boulder-number{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:46px;min-height:46px;padding:8px 12px;background:#eef2f5;color:var(--ink);border:1px solid var(--line);overflow:visible}.boulder-numbers{gap:15px;padding-top:8px}.boulder-card{position:relative}
.status-badge,.boulder-numbers .status-badge{position:absolute;top:-9px;right:-9px;display:inline-flex;align-items:center;justify-content:center;min-width:23px;height:23px;padding:2px 5px;border:2px solid white;border-radius:50px;font-size:.72rem;font-weight:800;line-height:1;color:white;box-shadow:0 1px 4px #0002;z-index:1}.status-badge.completed,.boulder-numbers .status-badge.completed{background:#178348}.status-badge.tried,.boulder-numbers .status-badge.tried{background:#bb5700}.boulder-card>.status-badge{top:10px;right:10px;min-width:28px;height:28px;font-size:.85rem}.result-boulder{position:relative}.result-boulder>.status-badge{top:8px;right:8px}
.battery-banner{padding:13px 16px;margin-bottom:20px;background:#fff0e8;border:1px solid #eccdbd;border-radius:10px;display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between;font-size:.9rem}
@media(max-width:760px){main{--menu-title-size:1.05rem}.home-info{font-size:.8rem}.home-grid .tile{gap:9px}.result-row{position:relative}.result-boulder{position:static}.result-boulder>.status-badge{top:10px;right:10px}main:has(.floating-back){padding-top:77px}.battery-banner{flex-direction:column}}
@media print{.status-badge,.battery-banner{display:none!important}main:has(.floating-back){padding-top:0}}

/* 1.6 */
.sector-judge{display:block;color:var(--muted);font-size:.875rem;font-weight:500;line-height:1.5;margin:-5px 0 14px;overflow-wrap:anywhere}
header .mode-control{background:#e9f0f4;color:#18252e;font-size:1.15rem;font-weight:800;min-height:48px;padding:12px 17px;border-radius:10px;white-space:nowrap}.mode-label{display:inline-flex;align-items:center}
@media(max-width:760px){header .header-actions{flex-wrap:wrap;justify-content:flex-end}header>.row:last-child{flex-shrink:1}header .mode-control{font-size:1rem;padding:10px 13px;min-height:46px}.sector-judge{font-size:.8rem}}
@media(max-width:420px){header>.row:first-child{flex-basis:100%}header .header-actions{width:100%;justify-content:flex-end}header .header-actions .mode-control{margin-right:auto}}
/* 2.0 */
.sales-main{max-width:1280px;margin:auto;padding:36px 28px}.sales-overview{padding:18px 0 26px;color:var(--muted)}.festival-tile h2{font-size:1.35rem}.festival-tile dl{font-size:.9rem;line-height:1.5}.festival-tile dt{color:var(--muted);margin-top:12px}.festival-tile dd{margin:3px 0 0;font-weight:600;overflow-wrap:anywhere}.button-link{display:inline-flex;align-items:center;min-height:48px;padding:12px 16px;border-radius:10px;text-decoration:none;background:var(--ink);color:white;font-weight:650}.festival-banner{padding:14px 18px;margin-bottom:18px;border:1px solid var(--line);background:#fff;border-radius:12px;display:grid;gap:6px}.festival-banner span,.festival-banner p{font-size:.875rem;margin:0;color:var(--muted)}.festival-banner.closed,.festival-banner.scheduled{background:#fff0e8;border-color:#e4b6a2}input:disabled,select:disabled{opacity:.75;cursor:not-allowed}a:focus-visible{outline:3px solid #ed572a80;outline-offset:3px}
@media(max-width:760px){.sales-main{padding:24px 16px}.sales-main .topline{flex-wrap:wrap}.sales-main .topline button{min-height:48px;font-size:1rem}}
@media print{.festival-banner,.sales-overview{display:none}.sales-main{padding:0}}

/* 2.1: painel compacto de festivais */
.sales-filters{display:flex;flex-wrap:wrap;align-items:end;gap:14px}.sales-filters label{flex:1;min-width:180px}.sales-filters select{width:100%}.sales-filters button{min-height:46px}.sales-table{overflow-x:auto}.sales-table table{min-width:850px;width:100%}.sales-table td{max-width:300px;overflow-wrap:anywhere}.sales-table th{text-align:left}.sales-table button{white-space:nowrap;min-height:44px}.sales-details{display:flex;align-items:center;flex-wrap:wrap;gap:16px;margin-bottom:22px}.sales-details span{color:var(--muted);font-size:.9rem}
@media(max-width:600px){.sales-filters label{flex-basis:100%}.sales-filters button{width:100%}}
@media print{.sales-filters,.sales-details{display:none}.sales-table table{min-width:0}}
/* Adapter for current form and dialog markup; approved 2.2 presentation above. */
.modalhead{display:flex;justify-content:space-between;align-items:center;gap:12px}.modalhead h2{margin:0}.formgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.full{grid-column:1/-1}.actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:16px}.check{display:flex;align-items:center;gap:10px}.check input{width:auto}.form-error,.error{color:#a52c3b}.badge{display:inline-block;padding:5px 9px;border-radius:16px;background:#eaf0f4}.green,.topflag{color:#17834b}.orange{color:#b95112}.muted{color:#65727e}.mode-control{min-height:44px}.boulder-number{position:relative}.version{display:block;margin-top:20px;color:#65727e}#toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);background:#182028;color:white;padding:15px 24px;max-width:90vw;border-radius:9px;display:none;z-index:60}nav.open{top:var(--header-height,77px)}.home-info{line-height:1.7;margin-bottom:12px}.ticket{font-size:1.5rem;font-weight:700}.tablewrap{overflow:auto}.compact{margin-top:16px}.confirm-dialog{z-index:80}
@media(max-width:760px){.formgrid{grid-template-columns:1fr}.header-actions{width:100%;justify-content:flex-end}.header-actions .mode-control{margin-right:auto}.actions button{flex:1;min-width:120px}}
.correction-fields{grid-template-columns:1fr!important}.tablewrap sub{font-size:.72em;vertical-align:sub}
.actions .undo-attempt{flex:0 0 100%;justify-content:flex-start;max-width:none}
.table-wrap td{white-space:nowrap}

.jam-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;width:100%;margin:12px 0 16px}.actions .jam-actions{flex:0 0 100%}.jam-actions button{width:100%;min-width:0;min-height:62px}.jam-actions button.selected-zone,.jam-actions button.accent.selected-zone{background:#198754;color:#fff}.jam-actions button.jam-failed{background:#182028;color:#fff}.jam-actions .jam-failed{grid-column:1/-1}.jam-spacer{display:block}

/* 3.7: resultado compacto no cartão do boulder. */
.boulder-score{line-height:1.55;margin:16px 0 0}.boulder-score strong{color:var(--ink)}.boulder-score span{white-space:nowrap}.boulder-score sub{font-size:.72em;vertical-align:sub}
