:root { --background:#f3efe5; --foreground:#18221a; --card:#fffef9; --primary:#d83c28; --muted:#667067; --border:#d8d0c2; --heading:Georgia,'Times New Roman',serif; --sans:Arial,Helvetica,sans-serif; }
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { margin:0; background:var(--background); color:var(--foreground); font-family:var(--sans); }
button,input,select { font:inherit; }
.site-header { height:92px; max-width:1320px; margin:0 auto; padding:10px 32px; display:flex; align-items:center; justify-content:space-between; }
.brand img { width:76px; height:76px; object-fit:contain; }
.header-actions,.language-switch,.admin-link { display:flex; align-items:center; }
.header-actions { gap:24px; }
.language-switch { gap:7px; font-size:12px; font-weight:800; letter-spacing:.08em; }
.language-switch button { border:0; background:none; padding:5px; color:#788078; cursor:pointer; }
.language-switch button.active { color:var(--primary); }
.admin-link { gap:7px; color:inherit; text-decoration:none; font-size:13px; font-weight:700; padding:10px 14px; border:1px solid #cfc6b7; border-radius:999px; background:rgba(255,255,255,.45); }
.hero { min-height:500px; background:#17251d; color:#fff; position:relative; display:grid; grid-template-columns:1.15fr .85fr; align-items:center; padding:70px max(32px,calc((100vw - 1256px)/2)); overflow:hidden; }
.hero::after { content:''; position:absolute; inset:0; background-image:radial-gradient(circle at 72% 20%,rgba(216,60,40,.2),transparent 25%),linear-gradient(125deg,transparent 65%,rgba(255,255,255,.03) 65%); }
.hero-copy { max-width:690px; position:relative; z-index:1; }
.eyebrow,.step-label { margin:0 0 18px; color:#e05643; font-size:12px; font-weight:900; letter-spacing:.16em; }
.hero h1 { max-width:650px; margin:0; font:700 clamp(54px,7vw,98px)/.92 var(--heading); letter-spacing:-.055em; }
.hero-lead { max-width:590px; margin:28px 0; color:#d9ded9; font-size:18px; line-height:1.65; }
.hero-badges { display:flex; gap:20px; flex-wrap:wrap; color:#f6efe3; font-size:13px; font-weight:700; }
.temple-mark { position:relative; z-index:1; display:grid; place-items:center; transform:rotate(2deg); }
.temple-mark img { width:min(390px,38vw); filter:invert(1); opacity:.9; mix-blend-mode:screen; }
.temple-mark span { color:#c9d0cb; font-size:11px; line-height:1.4; letter-spacing:.24em; text-align:center; margin-top:10px; }
.registration-shell { max-width:1120px; margin:0 auto; padding:90px 32px 100px; }
.section-intro { max-width:650px; margin-bottom:32px; }
.section-intro .step-label { margin-bottom:12px; }
.section-intro h2 { margin:0 0 10px; font:700 clamp(38px,5vw,58px)/1 var(--heading); letter-spacing:-.035em; }
.section-intro>p:last-child { color:#677067; }
.form-card { border-radius:22px; border:1px solid rgba(61,74,62,.16); background:var(--card); box-shadow:0 28px 70px rgba(46,42,32,.09); overflow:hidden; }
.form-content { padding:42px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.field { display:grid; gap:9px; }
.field label { font-size:13px; font-weight:800; }
.field input,.field select { height:50px; border:1px solid #cbc2b2; border-radius:10px; background:#fbfaf5; padding:0 14px; color:inherit; }
.field input:focus,.field select:focus { outline:3px solid rgba(216,60,40,.18); border-color:var(--primary); }
.form-divider { height:1px; background:#e5ded1; margin:34px 0; }
.race-section { margin-top:40px; }
.race-heading { display:flex; justify-content:space-between; gap:24px; align-items:end; margin-bottom:20px; }
.race-heading .step-label { margin-bottom:8px; }
.race-heading h3 { margin:0; font:700 30px/1.05 var(--heading); }
.race-heading>span { font-size:12px; font-weight:800; color:#758076; }
.race-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:13px; }
.race-card { position:relative; display:grid; place-items:center; gap:8px; min-height:154px; padding:12px; border:1px solid #ded6c8; border-radius:14px; background:#f9f7f1; color:inherit; cursor:pointer; transition:.2s ease; }
.race-card:hover { transform:translateY(-2px); border-color:#a69b8a; }
.race-card img { width:90px; height:90px; object-fit:contain; border-radius:50%; }
.race-card strong { font-size:12px; font-weight:900; }
.race-card i { position:absolute; top:9px; right:9px; width:20px; height:20px; border-radius:50%; display:none; place-items:center; background:var(--primary); color:#fff; font-style:normal; }
.race-card.selected { border-color:var(--primary); box-shadow:0 0 0 2px rgba(216,60,40,.13); background:#fff7f3; }
.race-card.selected i { display:grid; }
.consent-row { margin:36px 0 26px; padding:20px; border-radius:12px; background:#f0ede4; display:flex; align-items:flex-start; gap:13px; color:#566057; font-size:12px; line-height:1.6; }
.consent-row input { margin-top:3px; accent-color:var(--primary); }
.submit-button { width:100%; height:54px; border:0; border-radius:10px; display:flex; align-items:center; justify-content:center; gap:10px; background:var(--primary); color:#fff; font-size:14px; font-weight:900; text-transform:uppercase; letter-spacing:.07em; cursor:pointer; }
.submit-button:disabled { opacity:.45; cursor:not-allowed; }
.form-status { display:none; margin:-8px 0 22px; padding:13px 16px; border-radius:10px; font-size:13px; font-weight:700; }
.form-status.visible { display:block; }
.form-status.error { background:#fff0ed; color:#a62c1f; border:1px solid #efb8b0; }
.form-status.success { background:#eaf5eb; color:#286c35; border:1px solid #b9d9be; }
.honeypot { position:absolute !important; left:-9999px !important; }
footer { min-height:120px; background:#e7dfd0; padding:24px max(32px,calc((100vw - 1056px)/2)); display:flex; align-items:center; justify-content:space-between; color:#697168; font-size:12px; }
footer img { width:86px; }
@media(max-width:820px){.site-header{height:76px;padding:6px 18px}.brand img{width:62px;height:62px}.admin-link span:last-child{display:none}.hero{grid-template-columns:1fr;min-height:570px;padding:62px 24px}.temple-mark{position:absolute;right:-90px;bottom:-36px;opacity:.18}.temple-mark img{width:420px}.form-content{padding:26px 20px}.form-grid{grid-template-columns:1fr;gap:18px}.race-grid{grid-template-columns:repeat(2,1fr)}.race-heading{align-items:flex-start;flex-direction:column}}
@media(max-width:480px){.header-actions{gap:8px}.hero h1{font-size:54px}.hero-lead{font-size:16px}.registration-shell{padding:66px 16px 74px}.race-card{min-height:142px}footer{padding-inline:20px}}

/* Administration */
.admin-body { background:#f0ede4; }
.admin-login { min-height:100vh; display:grid; place-items:center; padding:28px; background:#17251d; }
.login-card { width:min(440px,100%); padding:32px 34px; border-radius:22px; background:var(--card); box-shadow:0 35px 90px rgba(0,0,0,.28); }
.login-card header { text-align:center; }
.login-card header img { width:110px; height:110px; object-fit:contain; }
.login-card h1 { margin:4px 0; font:700 34px/1 var(--heading); }
.login-card header p { color:var(--muted); }
.login-card>a { display:block; margin-top:22px; color:#6e766e; text-align:center; font-size:12px; }
.login-form { display:grid; gap:10px; margin-top:18px; }
.login-form label,.admin-card label,.admin-toolbar label { font-size:12px; font-weight:800; }
.login-form input,.event-panel input,.draw-controls input,.admin-toolbar select { height:46px; padding:0 13px; border:1px solid #cbc2b2; border-radius:9px; background:#fff; }
.login-form button,.primary-button,.outline-button { min-height:42px; padding:0 15px; border-radius:9px; border:1px solid transparent; display:inline-flex; align-items:center; justify-content:center; gap:7px; font-weight:800; font-size:13px; cursor:pointer; text-decoration:none; }
.login-form button,.primary-button { background:var(--primary); color:#fff; }
.outline-button { background:#fff; border-color:#cfc6b7; color:var(--foreground); }
.login-form button:disabled,.primary-button:disabled,.outline-button:disabled { opacity:.45; cursor:not-allowed; }
.admin-alert,.admin-error,.admin-message { padding:12px 14px; border-radius:9px; font-size:12px; line-height:1.5; }
.admin-alert { margin-top:18px; background:#fff7df; border:1px solid #ead08d; color:#775c17; }
.admin-error,.admin-message.error { margin-top:12px; background:#fff0ed; border:1px solid #efb8b0; color:#a62c1f; }
.admin-header { min-height:92px; display:flex; align-items:center; justify-content:space-between; padding:12px max(28px,calc((100vw - 1220px)/2)); background:#17251d; color:#fff; }
.admin-header>div { display:flex; align-items:center; gap:14px; }
.admin-header img { width:62px; height:62px; object-fit:contain; filter:invert(1); }
.admin-header p { margin:0 0 3px; color:#e45b48; font-size:10px; font-weight:900; letter-spacing:.17em; }
.admin-header h1 { margin:0; font:700 28px/1 var(--heading); }
.admin-header .outline-button { color:#fff; border-color:rgba(255,255,255,.3); background:rgba(255,255,255,.05); }
.admin-main { max-width:1220px; margin:0 auto; padding:44px 28px 90px; }
.admin-message { display:none; margin:0 0 20px; }
.admin-message.visible { display:block; }
.admin-message.success { background:#eaf5eb; border:1px solid #b9d9be; color:#286c35; }
.admin-toolbar { display:flex; align-items:end; justify-content:space-between; gap:20px; margin-bottom:22px; }
.admin-toolbar>div:first-child { min-width:290px; display:grid; gap:7px; }
.toolbar-actions { display:flex; flex-wrap:wrap; gap:9px; }
.danger-button { border-color:#d6a69e; color:#9b2d20; background:#fff8f6; }
.stats-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-bottom:18px; }
.stats-grid article { min-height:105px; padding:24px; display:flex; align-items:center; gap:18px; border:1px solid rgba(32,49,37,.1); border-radius:14px; background:var(--card); box-shadow:0 12px 35px rgba(47,44,35,.05); }
.stats-grid article>span { font-size:27px; }
.stats-grid article div { display:grid; }
.stats-grid strong { font:700 32px/1 var(--heading); }
.stats-grid small { margin-top:4px; color:#6e766e; font-size:11px; text-transform:uppercase; letter-spacing:.08em; }
.admin-grid { display:grid; grid-template-columns:1.55fr .75fr; gap:18px; align-items:start; }
.admin-card { border:1px solid rgba(32,49,37,.1); border-radius:14px; background:var(--card); box-shadow:0 12px 35px rgba(47,44,35,.05); overflow:hidden; }
.admin-card>header { padding:24px 24px 10px; }
.admin-card>header h2,.qr-panel h2 { margin:0; font:700 24px/1.1 var(--heading); }
.admin-card>header>p:not(.step-label) { margin:5px 0 0; color:#6a726a; line-height:1.5; }
.admin-card-content { padding:18px 24px 26px; }
.draw-controls { display:grid; grid-template-columns:150px 1fr; gap:12px; align-items:end; }
.draw-controls>div,.event-panel form>div { display:grid; gap:7px; }
.draw-preview { margin-top:22px; padding:20px; background:#f0ede4; border-radius:12px; }
.draw-preview h3 { margin:0 0 12px; font:700 21px/1 var(--heading); }
.draw-preview ol { margin:0; padding-left:26px; display:grid; gap:8px; }
.draw-preview li { padding-left:5px; }
.draw-preview li span,.draw-preview li small { display:block; }
.draw-preview li span { font-weight:800; }
.draw-preview li small { color:#747b74; margin-top:2px; }
.duplicate-warning { margin-top:18px; border-left:4px solid var(--primary); padding:14px 16px; background:#fff8f5; }
.duplicate-warning p { margin:5px 0 12px; color:#7b4a43; }
.duplicate-warning>div,.preview-actions { display:flex; flex-wrap:wrap; gap:8px; }
.preview-actions { margin-top:18px; }
.draw-complete { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-top:18px; padding:16px; border-radius:10px; background:#eaf5eb; color:#286c35; }
.event-panel form { display:grid; gap:16px; }
.participants-panel,.draw-history-panel,.qr-panel { margin-top:18px; }
.participants-panel .admin-card-content { padding-top:6px; }
.table-wrap { overflow-x:auto; }
.table-wrap table { width:100%; border-collapse:collapse; min-width:760px; }
.table-wrap th { color:#737a73; font-size:10px; text-transform:uppercase; letter-spacing:.09em; text-align:left; padding:12px 10px; border-bottom:1px solid #ded8cc; }
.table-wrap td { padding:14px 10px; border-bottom:1px solid #ece7df; font-size:12px; }
.table-wrap td strong,.table-wrap td small { display:block; }
.table-wrap td small { color:#798079; margin-top:3px; }
.winner-pill,.eligible-pill { display:inline-flex; border-radius:999px; padding:5px 9px; font-size:10px; font-weight:800; }
.winner-pill { background:#fff0e2; color:#a9491f; }
.eligible-pill { background:#e8f3e9; color:#33703d; }
.empty-cell { text-align:center; color:#7a817a; height:100px; }
.draw-history-panel .admin-card-content { display:grid; gap:10px; padding-top:10px; }
.draw-history-item { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:15px 0; border-bottom:1px solid #e7e1d7; }
.draw-history-item:last-child { border-bottom:0; }
.draw-history-item>div { min-width:0; display:grid; gap:4px; }
.draw-history-item small { color:#6e766e; }
.draw-history-item code { max-width:680px; overflow:hidden; color:#747b74; font-size:9px; text-overflow:ellipsis; }
.qr-panel .admin-card-content { padding:28px; display:flex; align-items:center; justify-content:space-between; gap:32px; }
.qr-panel h2 { font-size:34px; }
.qr-panel p:not(.step-label) { color:#697169; margin-bottom:20px; }
.qr-panel img { width:190px; height:190px; border:10px solid #fff; border-radius:10px; }
@media(max-width:850px){.admin-grid,.stats-grid{grid-template-columns:1fr}.admin-toolbar{align-items:stretch;flex-direction:column}.admin-toolbar>div:first-child{min-width:0}.qr-panel .admin-card-content{align-items:flex-start;flex-direction:column}}
@media(max-width:520px){.admin-header{padding:10px 16px}.admin-header h1{font-size:23px}.admin-main{padding:28px 14px 60px}.draw-controls{grid-template-columns:1fr}.toolbar-actions,.draw-complete,.draw-history-item{align-items:stretch;flex-direction:column}.toolbar-actions>*{width:100%}}
@media print{body *{visibility:hidden!important}.qr-panel,.qr-panel *{visibility:visible!important}.qr-panel{position:fixed;inset:0;margin:0;display:grid;place-items:center;box-shadow:none!important;border:0!important}.qr-panel .admin-card-content{display:grid;place-items:center;text-align:center}.qr-panel img{width:420px;height:420px}.qr-panel button,.qr-panel p:not(.step-label){display:none}}
