/* ============================================================
   Cổng thi (30/10) — trang công khai #/cuoc-thi, #/cuoc-thi/:id, #/cuoc-thi/:id/vinh-danh, #/chung-nhan/:code (scripts/app/thi/*)
   + nút "Cuộc thi" ở màn đăng nhập, dải "đăng ký để dự thi" ở màn đăng ký. Màu theo token brand (--primary…), chạy tốt 375px.
   ============================================================ */
.thi { --thi-r: 20px; display: flex; flex-direction: column; min-height: 100%; }
.thi.is-guest { min-height: 100vh; background: radial-gradient(1100px 520px at 0% -10%, var(--primary-soft2), transparent 60%), radial-gradient(900px 480px at 110% 0%, rgba(255, 196, 0, .12), transparent 60%), var(--bg); }
.thi-body { flex: 1 1 auto; width: 100%; }
.thi.is-guest .thi-body { padding: 22px 16px 32px; }
.thi-page { max-width: 1180px; margin: 0 auto; }

/* thanh trên (khách) */
.thi-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 10px max(16px, calc((100% - 1180px) / 2)); background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
[data-dark] .thi-top { background: rgba(20, 30, 51, .86); }
.thi-top-brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text-1); font-weight: 800; }
.thi-top-brand img { width: 38px; height: 38px; border-radius: 10px; object-fit: contain; background: var(--surface-3); flex: 0 0 auto; }
.thi-top-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.thi-top-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.thi-top-nav { display: flex; gap: 4px; margin-left: auto; }
.thi-top-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; color: var(--text-2); font-weight: 600; font-size: var(--fs-sm); }
.thi-top-nav a:hover { background: var(--surface-3); }
.thi-top-nav a.is-on { background: var(--primary-soft); color: var(--primary); }
.thi-top-login { margin: 0; flex: 0 0 auto; }
.thi-foot { text-align: center; padding: 18px 16px 26px; font-size: var(--fs-xs); color: var(--text-3); }

/* hero danh sách */
.thi-hero { position: relative; overflow: hidden; border-radius: var(--thi-r); padding: 30px 30px 34px; color: #fff; background: radial-gradient(120% 160% at 100% 0%, rgba(255, 210, 90, .38), transparent 55%), linear-gradient(135deg, #5b3fd6 0%, var(--primary) 55%, var(--navy) 100%); box-shadow: 0 16px 38px rgba(var(--primary-rgb), .26); }
.thi-hero-in { position: relative; z-index: 1; max-width: 640px; }
.thi-hero-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .18); color: #ffe08a; font-size: var(--fs-xs); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.thi-hero h1 { margin: 12px 0 6px; font-size: 32px; line-height: 1.18; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.thi-hero p { margin: 0; color: rgba(255, 255, 255, .86); font-size: var(--fs); max-width: 520px; }
.thi-hero-art { position: absolute; right: 26px; bottom: -18px; color: rgba(255, 255, 255, .16); transform: rotate(-12deg); }

/* tab */
.thi-tabs { display: flex; gap: 8px; margin: 18px 0 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.thi-tabs::-webkit-scrollbar { display: none; }
.thi-tabs button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font: inherit; font-weight: 700; font-size: var(--fs-sm); cursor: pointer; transition: all .15s var(--ease); }
.thi-tabs button:hover { border-color: var(--primary-line); }
.thi-tabs button.is-on { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: var(--sh-primary); }
.thi-tabs button i { font-style: normal; min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-size: 11px; line-height: 20px; text-align: center; }
.thi-tabs button.is-on i { background: rgba(255, 255, 255, .25); color: #fff; }
.thi-tab-s { display: none; }

/* thẻ cuộc thi */
.thi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.thi-card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--thi-r); background: var(--surface); overflow: hidden; cursor: pointer; box-shadow: var(--sh-1); transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s; outline: none; }
.thi-card:hover, .thi-card:focus-visible { transform: translateY(-3px); box-shadow: var(--sh-3); border-color: var(--primary-line); }
.thi-card.is-hot { border-color: rgba(230, 126, 34, .6); }
.thi-cover { position: relative; aspect-ratio: 16 / 8; display: flex; align-items: center; justify-content: center; overflow: hidden; color: #fff; }
.thi-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thi-cover.is-t0 { background: linear-gradient(135deg, #6a5cff, #3d7bff); }
.thi-cover.is-t1 { background: linear-gradient(135deg, #ff8a3d, #ff5f6d); }
.thi-cover.is-t2 { background: linear-gradient(135deg, #11b981, #0e9f9a); }
.thi-cover.is-t3 { background: linear-gradient(135deg, #b44cf0, #6a5cff); }
.thi-cover.is-t4 { background: linear-gradient(135deg, #f7b500, #ff7a00); }
.thi-cover-ico { width: 78px; height: 78px; border-radius: 50%; background: rgba(255, 255, 255, .95); color: #f2a300; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px rgba(0, 0, 0, .18); }
.thi-cover .thi-state { position: absolute; left: 12px; top: 12px; z-index: 1; }
.thi-state { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: var(--info); font-size: 11.5px; font-weight: 800; white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, .1); }
.thi-state i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.thi-state.is-live { color: var(--ok); } .thi-state.is-live i { animation: thi-blink 1s ease-in-out infinite; }
.thi-state.is-grading { color: var(--warn); }
.thi-state.is-done { color: var(--purple); }
.thi-state.is-cancel { color: var(--danger); }
@keyframes thi-blink { 50% { opacity: .25; } }
.thi-card-body { display: flex; flex-direction: column; flex: 1 1 auto; gap: 8px; padding: 14px 16px 14px; }
.thi-card-t { margin: 0; font-size: var(--fs-md); font-weight: 800; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thi-card-who { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-2); font-weight: 600; }
.thi-card-meta { display: flex; flex-direction: column; gap: 3px; font-size: var(--fs-xs); color: var(--text-3); font-weight: 600; }
.thi-card-meta span { display: inline-flex; align-items: center; gap: 6px; }
.thi-card-seat-t { font-size: var(--fs-xs); color: var(--text-2); } .thi-card-seat-t b { color: var(--text-1); }
.thi-bar { height: 6px; margin-top: 5px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.thi-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #8b6cff); }
.thi-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--border); }
.thi-card-foot .edu-btn { margin: 0; flex: 0 0 auto; }
.thi-cd { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-sm); font-weight: 700; color: var(--primary); min-width: 0; }
.thi-card.is-hot .thi-cd { color: var(--accent-orange); }
.thi-go { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: 800; color: var(--text-2); flex: 0 0 auto; }
.thi-card:hover .thi-go { color: var(--primary); }

/* chi tiết */
.thi-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; font-size: var(--fs-sm); font-weight: 700; color: var(--text-2); }
.thi-back:hover { color: var(--primary); }
.thi-dhero { position: relative; overflow: hidden; min-height: 240px; display: flex; align-items: flex-end; border-radius: var(--thi-r); background: radial-gradient(120% 160% at 100% 0%, rgba(255, 210, 90, .35), transparent 55%), linear-gradient(135deg, #5b3fd6 0%, var(--primary) 55%, var(--navy) 100%); background-size: cover; background-position: center; color: #fff; box-shadow: var(--sh-2); }
.thi-dhero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .05) 20%, rgba(0, 0, 0, .62)); }
.thi-dhero:not(.has-img)::before { background: radial-gradient(circle at 12% 130%, rgba(255, 255, 255, .22) 0 34%, transparent 35%); }
.thi-dhero-in { position: relative; z-index: 1; padding: 26px 28px 46px; max-width: 860px; }
.thi-dhero-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.thi-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; background: rgba(255, 255, 255, .2); color: #fff; font-size: 11.5px; font-weight: 800; }
.thi-dhero h1 { margin: 0; font-size: 30px; line-height: 1.2; font-weight: 800; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .25); }
.thi-dhero p { display: flex; align-items: center; gap: 7px; margin: 8px 0 0; color: rgba(255, 255, 255, .92); font-weight: 600; }
.thi-count { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin: -26px 18px 0; position: relative; z-index: 2; padding: 12px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-2); }
.thi-count-l { font-size: var(--fs-sm); font-weight: 700; color: var(--text-2); }
.thi-count-box { display: flex; gap: 8px; }
.thi-count-box div { min-width: 58px; padding: 6px 8px; border-radius: 12px; background: var(--primary-soft); text-align: center; }
.thi-count-box b { display: block; font-size: 22px; line-height: 1.1; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.thi-count-box small { font-size: 11px; color: var(--text-3); font-weight: 700; }
.thi-dgrid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; margin-top: 20px; align-items: start; }
.thi-side { grid-column: 2; grid-row: 1; position: sticky; top: 76px; }
.thi:not(.is-guest) .thi-side { top: 84px; }
.thi-main { grid-column: 1; grid-row: 1; min-width: 0; }
.thi-side-card { padding: 18px; border-radius: var(--thi-r); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-2); display: flex; flex-direction: column; gap: 12px; }
.thi-acts { display: flex; flex-direction: column; gap: 10px; }
.thi-acts .edu-btn { margin: 0; white-space: normal; text-align: center; line-height: 1.25; }
.thi-note { margin: 0; font-size: var(--fs-xs); color: var(--text-3); line-height: 1.5; }
.thi-board-btn { margin: 0; }
.thi-me { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); color: var(--text-2); }
.thi-me b { display: block; font-size: var(--fs-sm); }
.thi-me small { display: block; font-size: var(--fs-xs); margin-top: 2px; }
.thi-me.is-register { background: var(--primary-soft); color: var(--primary); }
.thi-me.is-enter, .thi-me.is-resume, .thi-me.is-review { background: var(--ok-soft); color: var(--ok); }
.thi-me.is-pending, .thi-me.is-wait { background: var(--info-soft); color: var(--info); }
.thi-me.is-rejected, .thi-me.is-locked { background: var(--danger-soft); color: var(--danger); }
.thi-ok { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--ok-soft); color: var(--ok); }
.thi-ok b { display: block; } .thi-ok small { display: block; color: var(--text-2); font-size: var(--fs-xs); }
.thi-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.thi-kv > div { display: flex; flex-direction: column; padding: 9px 12px; border: 1.5px dashed var(--border-strong); border-radius: 12px; min-width: 0; }
.thi-kv span { font-size: 11px; color: var(--text-3); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.thi-kv b { font-size: var(--fs); font-weight: 800; overflow-wrap: anywhere; }
.thi-kv .is-giai { background: #fff6d8; border-color: #f5d27a; } .thi-kv .is-giai b { color: #8a5a00; }
.thi-seat { padding-top: 12px; border-top: 1px solid var(--border); }
.thi-seat-t { font-size: var(--fs-sm); color: var(--text-2); } .thi-seat-t b { color: var(--text-1); font-size: var(--fs-md); }
.thi-seat-d { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 8px; font-size: var(--fs-xs); color: var(--text-3); font-weight: 600; }
.thi-share { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: transparent; color: var(--text-3); font: inherit; font-size: var(--fs-xs); font-weight: 700; cursor: pointer; padding: 4px; }
.thi-share:hover { color: var(--primary); }
.thi-sec { padding: 20px 22px; border-radius: var(--thi-r); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-1); }
.thi-sec + .thi-sec { margin-top: 16px; }
.thi-sec h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: var(--fs-lg); font-weight: 800; }
.thi-sec h2 edu-icon { color: var(--primary); }
.thi-sec h3 { margin: 16px 0 10px; font-size: var(--fs); font-weight: 800; } .thi-sec h3:first-child { margin-top: 0; }
.thi-sec h3 em { color: var(--danger); font-style: normal; }
.thi-form { border: 2px solid var(--primary-line); box-shadow: 0 0 0 4px var(--primary-soft); scroll-margin-top: 80px; }
.thi-form > div + div { margin-top: 18px; }
.thi-form-acts { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.thi-form-acts .edu-btn { margin: 0; }
.thi-cas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.thi-ca { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface-2); font: inherit; text-align: left; color: var(--text-1); }
.thi-ca b { font-size: var(--fs-sm); } .thi-ca span { font-size: var(--fs-xs); color: var(--text-2); } .thi-ca small { font-size: 11px; color: var(--text-3); font-weight: 700; }
.thi-cas.is-pick .thi-ca { cursor: pointer; background: var(--surface); }
.thi-cas.is-pick .thi-ca:disabled { cursor: default; }
.thi-ca.is-on { border-color: var(--primary); background: var(--primary-soft); }
.thi-ca.is-off { opacity: .5; }
.thi-ca-ok { position: absolute; right: 10px; top: 10px; color: var(--primary); }
.thi-html { font-size: var(--fs); line-height: 1.65; color: var(--text-1); overflow-wrap: anywhere; }
.thi-html img { max-width: 100%; height: auto; border-radius: 10px; }
.thi-html table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.thi-html td, .thi-html th { border: 1px solid var(--border); padding: 6px 8px; }
.thi-html h1, .thi-html h2, .thi-html h3 { font-size: var(--fs-md); margin: 1em 0 .4em; }
.thi-html p { margin: 0 0 .7em; }
.thi-pre { white-space: pre-line; line-height: 1.65; }

/* vinh danh */
.thi-bhero { text-align: center; padding: 26px 16px 8px; }
.thi-bhero .thi-hero-badge { background: #fff3cd; color: #a06a00; }
.thi-bhero h1 { margin: 10px 0 4px; font-size: 28px; font-weight: 800; line-height: 1.2; }
.thi-bhero p { margin: 0; color: var(--text-3); font-size: var(--fs-sm); }
.thi-podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 12px; max-width: 760px; margin: 18px auto 22px; }
.thi-podium > div { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 18px 10px 0; text-align: center; min-width: 0; }
.thi-podium b { font-size: var(--fs); font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thi-podium small { font-size: 11.5px; color: var(--text-3); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thi-podium em { font-style: normal; font-weight: 800; color: var(--primary); }
.thi-podium i { display: block; width: 100%; margin-top: 8px; border-radius: 14px 14px 0 0; }
.thi-podium .is-1 i { height: 96px; background: linear-gradient(180deg, #ffd25a, #f2a300); }
.thi-podium .is-2 i { height: 70px; background: linear-gradient(180deg, #e3e9f4, #b8c3d6); }
.thi-podium .is-3 i { height: 52px; background: linear-gradient(180deg, #ffc9a3, #e08a4c); }
.thi-pod-ava { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 3px solid var(--border-strong); font-weight: 800; font-size: 20px; color: var(--text-2); box-shadow: var(--sh-2); }
.thi-podium .is-1 .thi-pod-ava { width: 64px; height: 64px; border-color: #f2a300; color: #f2a300; }
.thi-bfilter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.thi-bfilter .edu-input { flex: 1 1 260px; max-width: 360px; }
.thi-bgiai { display: flex; flex-wrap: wrap; gap: 6px; }
.thi-bgiai button { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: inherit; font-size: var(--fs-xs); font-weight: 700; cursor: pointer; }
.thi-bgiai button.is-on { background: #fff3cd; border-color: #f5d27a; color: #8a5a00; }
.thi-btable { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); overflow: hidden; }
.thi-brow { display: grid; grid-template-columns: 64px minmax(0, 1.2fr) minmax(0, 1.4fr) 80px 120px; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: var(--fs-sm); }
.thi-brow.is-head { border-top: 0; background: var(--surface-2); font-size: 11.5px; font-weight: 800; color: var(--text-3); text-transform: uppercase; letter-spacing: .03em; }
.thi-brow.is-top { background: linear-gradient(90deg, rgba(255, 210, 90, .12), transparent 60%); }
.thi-bno { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface-3); font-weight: 800; }
.thi-bno.is-r1 { background: #f2a300; color: #fff; } .thi-bno.is-r2 { background: #9aa6bd; color: #fff; } .thi-bno.is-r3 { background: #d9803f; color: #fff; }
.thi-bwho { min-width: 0; } .thi-bwho b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .thi-bwho small { display: none; color: var(--text-3); font-size: 11.5px; }
.thi-bc-w { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thi-bsc { font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.thi-bgi { display: inline-block; padding: 2px 9px; border-radius: 999px; background: #fff3cd; color: #8a5a00; font-style: normal; font-size: 11.5px; font-weight: 800; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.thi-bempty { padding: 18px; text-align: center; color: var(--text-3); font-size: var(--fs-sm); }
.thi-board .thi-note { margin-top: 12px; text-align: center; }

/* tra cứu chứng nhận */
.thi-cert { max-width: 720px; }
.thi-chero { text-align: center; padding: 30px 22px 26px; border-radius: var(--thi-r); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-2); margin-bottom: 18px; }
.thi-chero-ico { width: 62px; height: 62px; margin: 0 auto 10px; border-radius: 18px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.thi-chero h1 { margin: 0 0 6px; font-size: 26px; font-weight: 800; }
.thi-chero p { margin: 0 auto 18px; color: var(--text-2); max-width: 460px; }
.thi-csearch { display: flex; gap: 10px; max-width: 520px; margin: 0 auto; }
.thi-csearch .edu-input { flex: 1 1 auto; text-transform: uppercase; letter-spacing: .08em; font-family: var(--font-mono); }
.thi-csearch .edu-btn { margin: 0; flex: 0 0 auto; }
.thi-cres { border-radius: var(--thi-r); overflow: hidden; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--sh-2); }
.thi-cres-head { display: flex; align-items: center; gap: 8px; padding: 14px 18px; font-weight: 800; }
.thi-cres.is-ok .thi-cres-head { background: var(--ok-soft); color: var(--ok); }
.thi-cres.is-bad .thi-cres-head { background: var(--danger-soft); color: var(--danger); }
.thi-cres-body { padding: 18px; }
.thi-cres-body p { margin: 0; color: var(--text-2); }
.thi-cres-name { font-size: 26px; font-weight: 800; text-align: center; }
.thi-cres-giai { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 6px 0 16px; font-weight: 800; color: #a06a00; font-size: var(--fs-md); }

/* màn đăng nhập / đăng ký (web) */
.edw-auth-contest { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 16px; padding: 12px 14px; border: 1px solid #f5d27a; border-radius: 16px; background: linear-gradient(135deg, #fff8e1, #ffefc2); color: #6b4300; font: inherit; text-align: left; cursor: pointer; transition: transform .15s var(--ease), box-shadow .15s; }
.edw-auth-contest:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(224, 161, 0, .2); }
.edw-auth-contest-ico { width: 40px; height: 40px; border-radius: 12px; background: #fff; color: #e0a100; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.edw-auth-contest-t { flex: 1 1 auto; min-width: 0; }
.edw-auth-contest-t b { display: block; font-size: var(--fs); }
.edw-auth-contest-t small { display: block; font-size: var(--fs-xs); opacity: .85; }
.edw-auth-thi { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 14px; padding: 12px 14px; border-radius: 14px; background: #fff6d8; color: #6b4300; }
.edw-auth-thi b { display: block; font-size: var(--fs-sm); }
.edw-auth-thi small { display: block; font-size: var(--fs-xs); margin-top: 2px; color: #7a5a1a; }
.edw-auth-thi a { font-weight: 700; cursor: pointer; }
[data-dark] .edw-auth-contest, [data-dark] .edw-auth-thi { background: rgba(242, 163, 0, .14); border-color: rgba(242, 163, 0, .35); color: #ffd98a; }
[data-dark] .edw-auth-thi small { color: #f0cf8a; }

/* ---- màn hẹp ---- */
@media (max-width: 960px) {
  .thi-dgrid { grid-template-columns: minmax(0, 1fr); }
  .thi-side { grid-column: 1; grid-row: 1; position: static; }
  .thi-main { grid-row: 2; }
}
@media (max-width: 760px) {
  .thi-top { gap: 8px; padding: 8px 12px; }
  .thi-top-name { max-width: 150px; font-size: var(--fs-sm); }
  .thi-top-nav a span { display: none; }
  .thi-top-nav a { padding: 8px; }
  .thi.is-guest .thi-body { padding: 14px 12px 24px; }
  .thi-hero { padding: 22px 18px 24px; }
  .thi-hero h1 { font-size: 24px; }
  .thi-hero-art { display: none; }
  .thi-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .thi-tab-l { display: none; } .thi-tab-s { display: inline; }
  .thi-tabs button { padding: 0 12px; }
  .thi-dhero { min-height: 200px; }
  .thi-dhero-in { padding: 20px 18px 34px; }
  .thi-dhero h1 { font-size: 23px; }
  .thi-count { margin: -22px 10px 0; padding: 10px 12px; }
  .thi-count-box div { min-width: 48px; padding: 5px 6px; }
  .thi-count-box b { font-size: 18px; }
  .thi-sec { padding: 16px 14px; }
  .thi-side-card { padding: 14px; }
  .thi-brow { grid-template-columns: 44px minmax(0, 1fr) 56px; padding: 10px 12px; }
  .thi-brow > span:nth-child(5) { grid-column: 2 / -1; margin-top: -6px; }
  .thi-brow.is-head > span:nth-child(5) { display: none; }
  .thi-bc-w { display: none; }
  .thi-bwho small { display: block; }
  .thi-podium { gap: 6px; }
  .thi-podium b { font-size: var(--fs-sm); }
  .thi-csearch { flex-direction: column; }
  .thi-cres-name { font-size: 22px; }
  .thi-bhero h1 { font-size: 22px; }
}
@media (max-width: 420px) {
  .thi-top-login { padding: 0 10px; }
  .thi-top-nav { display: none; }
  .thi-top-login { margin-left: auto; }
  .thi-count { flex-direction: column; align-items: stretch; text-align: center; }
  .thi-count-box { justify-content: center; }
  .thi-kv { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .thi-state.is-live i { animation: none; } .thi-card, .edw-auth-contest { transition: none; } }
.edw-auth-cert { justify-content: center; margin-top: 10px; } .edw-auth-cert a { display: inline-flex; align-items: center; gap: 6px; }

/* ===== 31/10 — đơn vị tổ chức, thi tại đâu (bảng ca + link Google Maps), phí dự thi (QR VietQR) — trang công khai + popup HS / PH + vé ===== */
.thi-card-org { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-3); font-weight: 700; }
.thi-card-meta .thi-fee { color: var(--primary); font-weight: 800; }
.thi-dhero-org { opacity: .92; } .thi-dhero-org b { font-weight: 800; }
.thi-side-info { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text-2); line-height: 1.5; }
.thi-side-info > div { display: flex; gap: 7px; align-items: flex-start; } .thi-side-info edu-icon { flex: 0 0 auto; margin-top: 1px; color: var(--text-3); }
.thi-side-info em { font-style: normal; color: var(--text-3); }
.thi-ca .thi-ca-dd, .ct-ca-dd { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-weight: 600; }
/* bảng lịch thi: giờ · hình thức · địa điểm · phòng */
.thi-catbl { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.thi-catbl-h, .thi-catbl-r { display: grid; grid-template-columns: minmax(90px, .8fr) minmax(130px, 1fr) 104px minmax(0, 2fr) minmax(70px, .7fr); gap: 12px; padding: 11px 14px; align-items: start; }
.thi-catbl-h { background: var(--surface-2); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--text-3); }
.thi-catbl-r { border-top: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text-1); }
.thi-catbl-r small { display: block; font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.thi-catbl-r small.is-mine { color: var(--primary); font-weight: 800; }
.thi-catbl-r.is-mine { background: var(--primary-soft); }
.thi-catbl-r.is-off { opacity: .6; }
.thi-ht { display: inline-block; padding: 2px 9px; border-radius: 999px; font-style: normal; font-size: 11.5px; font-weight: 800; }
.thi-ht.is-on { background: var(--primary-soft); color: var(--primary); } .thi-ht.is-tt { background: #fff1db; color: #8a5200; }
.thi-map { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 12px; font-weight: 800; color: var(--primary); text-decoration: none; }
.thi-map:hover { text-decoration: underline; }
.thi-muted { color: var(--text-3); }
/* nơi thi trong popup cuộc thi (HS / PH) + vé */
.ct-card-where { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 2px 0 6px; font-size: 12px; color: var(--text-3); font-weight: 600; }
.ct-card-where span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.edu-ct-tag.is-fee { background: var(--primary-soft); color: var(--primary); }
.ct-venue { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0; padding: 11px 13px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.ct-venue > edu-icon { flex: 0 0 auto; margin-top: 2px; color: var(--primary); }
.ct-venue > div { flex: 1; min-width: 0; } .ct-venue b { display: block; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.ct-venue small { display: block; font-size: 12px; color: var(--text-2); overflow-wrap: anywhere; }
.ct-venue-map { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; font-size: 12px; font-weight: 800; color: var(--primary); text-decoration: none; }
.ct-venue-addr { display: block; font-style: normal; font-weight: 600; font-size: 12px; color: var(--text-2); }
/* phí dự thi — contest_pay.part.html */
.ct-pay { margin: 10px 0; padding: 12px 14px; border: 1.5px solid #f2c26b; border-radius: 14px; background: #fff8ea; }
.ct-pay.is-paid { border-color: var(--ok); background: var(--ok-soft); }
.ct-pay-h { display: flex; align-items: center; gap: 8px; color: #8a5200; } .ct-pay.is-paid .ct-pay-h { color: var(--ok); }
.ct-pay-h b { flex: 1; font-size: var(--fs-sm); font-weight: 800; }
.ct-pay-amt { font-size: var(--fs-md); font-weight: 800; color: var(--text-1); white-space: nowrap; }
.ct-pay-b { display: flex; gap: 14px; align-items: flex-start; margin-top: 10px; }
.ct-pay-qr { width: 168px; max-width: 46%; height: auto; flex: 0 0 auto; border-radius: 10px; background: #fff; border: 1px solid var(--border); }
.ct-pay-kv { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ct-pay-kv > div { display: flex; flex-direction: column; } .ct-pay-kv span { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .03em; }
.ct-pay-kv b { font-size: var(--fs-sm); font-weight: 800; color: var(--text-1); overflow-wrap: anywhere; }
.ct-pay-code { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; color: #8a5200 !important; }
.ct-pay-note { margin: 10px 0 0; font-size: 12px; color: var(--text-2); line-height: 1.5; }
@media (max-width: 760px) {
  .thi-catbl-h { display: none; }
  .thi-catbl-r { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .thi-catbl-r > span[data-l]:before { content: attr(data-l) ": "; font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; }
  .thi-catbl-r > span[data-l] > span { display: inline; }
}
@media (max-width: 420px) {
  .ct-pay-b { flex-direction: column; align-items: center; }
  .ct-pay-qr { max-width: 220px; width: 70%; }
  .ct-pay-kv { width: 100%; }
}
