.topbar{position:fixed;z-index:20;top:0;left:0;right:0;height:52px;padding:0 2rem;display:flex;justify-content:space-between;align-items:center;background:rgba(24,28,36,.94);color:#fff;font-size:.82rem;box-shadow:0 2px 18px #0003}.topbar>div{display:flex;gap:1.5rem;align-items:center}.topbar strong{color:#ffd166}.user-chip{border:1px solid #ffffff66;background:transparent;color:#fff;border-radius:2rem;padding:.45rem 1rem;cursor:pointer}.intro{padding-top:52px}.modal{display:none;position:fixed;inset:0;z-index:30;background:#07111dcc;align-items:center;justify-content:center;padding:1rem}.modal.open{display:flex}.modal-card{background:#fff;color:#30343b;width:min(430px,100%);padding:2rem;position:relative;box-shadow:0 20px 60px #0005}.modal-card.wide{width:min(900px,100%);max-height:90vh;overflow:auto}.modal-close{position:absolute;right:1rem;top:.6rem;border:0;background:none;font-size:2rem;cursor:pointer}.tabs{display:flex;gap:1rem;border-bottom:1px solid #ddd;margin-bottom:1.2rem}.tab{border:0;background:none;padding:.7rem 1rem;cursor:pointer}.tab.active{border-bottom:3px solid #e85d4a;color:#e85d4a}.auth-form label,.auth-form input,.auth-form textarea,.admin-grid input,.admin-grid textarea{display:block;width:100%}.auth-form label{margin-bottom:1rem}.auth-form input,.admin-grid input,.admin-grid textarea{margin-top:.35rem;padding:.7rem;border:1px solid #ccd2da}.fit{width:100%}.hidden{display:none!important}.form-msg{min-height:1.2em;color:#c44}.news-card{background:#f4f5f7;padding:1.5rem}.news-card img{max-width:100%}.notice{padding:1.2rem;background:#f5f5f5}.registration-form{display:grid;gap:1rem}.member-row{display:grid;grid-template-columns:1fr 1fr;gap:.8rem}.member-row input,.registration-form select,.registration-form input{padding:.65rem}.admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:2rem}.muted{color:#777}.admin-actions{display:flex;gap:.4rem}#users-list{max-height:180px;overflow:auto}@media(max-width:700px){.topbar{padding:0 .8rem}.topbar>div span{display:none}.admin-grid{grid-template-columns:1fr}.member-row{grid-template-columns:1fr}}
/* Keep news content as a card instead of a nested theme section. */
.news-card{display:grid;grid-template-columns:minmax(260px,1fr) minmax(280px,42%);gap:2rem;align-items:center;min-height:260px;background:#f4f5f7;padding:2rem}.news-card-copy{padding:1rem}.news-card-media img{display:block;width:100%;max-height:360px;object-fit:cover}.news-card h3{margin-bottom:1rem}@media(max-width:700px){.news-card{grid-template-columns:1fr;padding:1rem}}
.reveal{opacity:0;transform:translateY(26px);transition:opacity .8s ease,transform .8s ease}.reveal.is-visible{opacity:1;transform:translateY(0)}.image img{transition:transform 1.2s ease}.image:hover img{transform:scale(1.025)}.news-card{transition:box-shadow .35s ease,transform .35s ease}.news-card:hover{box-shadow:0 14px 35px #18202c15;transform:translateY(-3px)}@media(prefers-reduced-motion:reduce){.reveal{opacity:1;transform:none;transition:none}}
.topbar{gap:1rem}
.topbar .site-status{min-width:0}
.topbar .site-status strong{white-space:nowrap}
.topbar .user-actions{gap:.5rem;min-width:0;flex-shrink:0}
.topbar .user-chip{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;height:36px;padding:0 .75rem;line-height:1;border-radius:6px;box-shadow:none;font-size:.82rem;letter-spacing:0;text-transform:none;color:#fff!important}
.topbar .user-chip:hover{background:#ffffff1a}
.topbar .user-chip:focus-visible{outline:2px solid #49fcd4;outline-offset:2px}
#user-label{display:block;max-width:12rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#logout-button{flex-shrink:0}
@media(max-width:1100px){.topbar .site-status>span{display:none}}
@media(max-width:700px){.topbar{gap:.5rem}.topbar .user-actions span{display:inline-block}#user-label{max-width:5rem}.topbar .user-chip{padding:0 .5rem}.topbar .user-actions{gap:.3rem}}

/* Keep the theme's split layout and animations, with a tighter vertical rhythm. */
#wrapper{padding-bottom:2.5rem}
#wrapper>section{scroll-margin-top:76px}
#wrapper>section:not(.intro){margin-top:3rem}
#wrapper>section>header h2{margin-bottom:1.25rem;letter-spacing:0}
#wrapper>section>header:before{height:calc(100% + 4rem)}
#wrapper>section>.content{min-width:0}
#wrapper>section>.content>p{margin-bottom:1rem;line-height:1.8}
#wrapper>section.intro>header{padding-top:1rem}
#wrapper>section.intro h1{font-size:56px;line-height:1.08;letter-spacing:0;margin:0 0 1rem;text-transform:none}
#wrapper>section.intro p{line-height:1.7;letter-spacing:0;margin-bottom:1rem}
#wrapper>section.intro>.content{height:min(640px,72svh);min-height:400px;padding:0}
#wrapper .image.main{margin:1rem 0 0}
#first .image.main img{max-height:310px;object-fit:cover}
#wrapper .feature-icons{margin:0;row-gap:.25rem}
#wrapper .feature-icons li{margin:0 0 .8rem;min-height:2.5rem;padding-top:.2rem}
#wrapper .actions{margin-bottom:.75rem}
#wrapper footer .items{margin-bottom:0}
#wrapper footer .items>li{margin-bottom:1rem}
#wrapper footer h3{margin-bottom:.25rem;letter-spacing:0}
#wrapper footer{font-size:14px;line-height:1.7}
#wrapper .copyright{padding-top:1rem;font-size:12px}
.news-card{display:block;min-height:0;background:transparent;padding:0}
.news-card-copy{padding:0}
.news-card h3{font-size:16px;line-height:1.6;letter-spacing:0;margin:0 0 .5rem;text-transform:none}
.news-card-copy p{margin-bottom:1rem;line-height:1.7}
.news-card-media img{width:100%;height:auto;max-height:280px;object-fit:contain;object-position:left}
.news-card:hover{box-shadow:none;transform:none}
.notice{padding:.85rem 1rem;border-left:3px solid #28b89b;font-size:14px}

.registration-form{gap:12px;margin:0;font-size:14px}
.registration-details{display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,.65fr);gap:12px}
.registration-form label{margin:0;font-size:13px;letter-spacing:0;text-transform:none}
.registration-form input,.registration-form select{min-width:0;height:42px;margin-top:5px;padding:0 10px;font-size:14px;font-family:inherit;letter-spacing:0;border-width:1px}
.registration-form select{padding-right:34px;background-position:right 8px center}
.member-fields{display:grid;gap:8px;border-top:1px solid #e3e9e7;border-bottom:1px solid #e3e9e7;padding:12px 0}
.registration-form .member-row{display:grid;grid-template-columns:52px minmax(0,.8fr) minmax(0,1fr);gap:8px;align-items:center}
.member-row>span{font-size:12px;line-height:1.4;color:#3d4e48}
.member-row small{display:block;color:#85928d;font-size:11px}
.registration-form .member-row input{margin:0}
.registration-submit{align-items:end}
.registration-submit button{height:42px;padding:0 10px;font-size:13px;letter-spacing:0;line-height:1}
.registration-form .form-msg{margin:0;min-height:0;font-size:13px;line-height:1.5}
.form-msg[data-tone="success"]{color:#08775e}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}

.entries-heading,.entries-summary{display:flex;align-items:center;justify-content:space-between;gap:12px}
.entries-heading{margin-bottom:14px;font-size:15px}
#entries-total,#entries-count{color:#75817d;font-size:12px;white-space:nowrap;font-variant-numeric:tabular-nums}
.problem-tabs{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border-bottom:1px solid #dce5e1;gap:2px;margin-bottom:16px}
.problem-tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;height:58px;padding:4px;line-height:1;border:0;border-bottom:3px solid transparent;border-radius:4px 4px 0 0;box-shadow:none;font-size:15px;letter-spacing:0;color:#687b73!important;background:transparent;transition:background-color .2s,color .2s}
.problem-tab .problem-count{font-size:11px;font-weight:400;font-variant-numeric:tabular-nums;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.problem-tab:hover{background:#f0f6f3;box-shadow:none;color:#172b23!important}
.problem-tab[aria-selected="true"]{background:#e7faf4;border-bottom-color:#12a982;color:#096c53!important}
.problem-tab:focus-visible{outline:2px solid #12a982;outline-offset:-2px}
.entries-summary{margin-bottom:8px}
#entries-title{margin:0;font-size:14px;letter-spacing:0}
.entries-scroll{max-height:310px;overflow:auto;scrollbar-width:thin;scrollbar-color:#a8c3b9 #f4f7f5;overscroll-behavior:contain;margin:0;border-bottom:1px solid #dce5e1}
.entries-table{width:100%;table-layout:fixed;margin:0;font-size:13px;line-height:1.5}
.entries-table th{position:sticky;top:0;z-index:1;background:#f3f6f5;font-size:12px;font-weight:600;color:#69766f;padding:10px 12px}
.entries-table th:first-child{width:30%}
.entries-table th:last-child{width:23%}
.entries-table td{padding:12px;vertical-align:top;overflow-wrap:anywhere}
.entries-table tbody tr{border-color:#e6ece9;background:#fff}
.entries-table tbody tr:nth-child(odd){background:#fff}
.entries-table tbody tr:nth-child(even){background:#fafcfb}
.entries-table td:first-child{font-weight:600}
.entry-member{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 8px}
.entry-member+.entry-member{margin-top:6px}
.entry-member small{display:block;color:#89938f;font-size:11px;font-weight:400}
.score-pending{color:#947437}
.score-value{color:#08775e;font-weight:600}
.entries-table .entries-empty{height:108px;vertical-align:middle;text-align:center;font-weight:400;color:#85928d}

body.has-modal{overflow:hidden}
.modal{background:rgba(18,29,25,.62);backdrop-filter:blur(5px);padding:20px}
.modal-card{border-radius:8px;max-height:calc(100dvh - 40px);overflow:auto}
.modal-close{display:flex;align-items:center;justify-content:center;right:14px;top:14px;width:34px;height:34px;padding:0;line-height:1;font-size:16px;border-radius:6px;box-shadow:none;color:#708078!important;letter-spacing:0}
.modal-close:hover{background:#edf4f0;box-shadow:none;color:#1b3d2d!important}
.auth-card{width:min(430px,100%);padding:30px;border:1px solid #e3ebe6;border-top:4px solid #49fcd4;box-shadow:0 24px 80px #0003;animation:auth-enter .22s ease-out}
.auth-brand{display:flex;align-items:center;gap:10px;margin:0 32px 24px 0;line-height:1.4}
.auth-brand strong{font-family:Arial,sans-serif;font-weight:800;font-size:22px;color:#07846a}
.auth-brand span{font-size:12px;color:#75827b}
#auth-title{font-size:25px;line-height:1.3;letter-spacing:0;margin:0 0 22px;font-weight:700;text-transform:none}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;margin:0 0 22px;background:#eef3f0;border-radius:6px}
.auth-tabs .tab{height:36px;padding:0;line-height:1;border:0;border-radius:4px;font-size:14px;letter-spacing:0;box-shadow:none;color:#728078!important;font-family:inherit}
.auth-tabs .tab.active{background:#fff;color:#173d2e!important;box-shadow:0 1px 4px #152c1712}
.auth-tabs .tab:hover{color:#07846a!important}
.auth-tabs .tab:focus-visible,.password-toggle:focus-visible,.modal-close:focus-visible{outline:2px solid #139c79;outline-offset:2px}
.auth-form{display:flex;flex-direction:column;margin:0}
.auth-fields{display:grid;gap:14px}
.auth-form .auth-field label{margin:0 0 6px;line-height:1.4;font-size:13px;font-weight:600;letter-spacing:0;text-transform:none;color:#40564b}
.input-wrap{position:relative;display:flex;align-items:center}
.input-wrap>i{position:absolute;left:14px;font-size:13px;color:#82998c;pointer-events:none}
.auth-form .input-wrap input{display:block;width:100%;height:44px;margin:0;padding:0 42px 0 39px;border:1px solid #dce5df;border-radius:6px;outline:0;font:14px Arial,"Microsoft YaHei",sans-serif;letter-spacing:0;background:#fbfdfc;color:#203b2d;transition:border-color .2s,box-shadow .2s}
.auth-form .input-wrap input:focus{border-color:#19aa84;box-shadow:0 0 0 3px #19aa8415}
.auth-form .input-wrap input::placeholder{color:#9ba7a0}
.password-toggle{position:absolute;right:3px;top:4px;display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;line-height:1;border-radius:4px;box-shadow:none;font-size:14px;color:#82998c!important;letter-spacing:0}
.password-toggle:hover{background:#edf5f0;box-shadow:none;color:#07846a!important}
.auth-form .form-msg{font-size:12px;line-height:1.5;min-height:18px;margin:10px 0 14px;color:#b34839}
.auth-form .form-msg[data-tone="success"]{color:#07846a}
.auth-form .auth-submit{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;height:44px;margin-top:0;padding:0 14px;font-size:14px;font-family:inherit;line-height:1;letter-spacing:0;border-radius:6px;background:#49fcd4;color:#103d2d!important;box-shadow:none}
.auth-form .auth-submit:hover{background:#31e7bd}
@keyframes auth-enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}

@media(max-width:1152px){
  #wrapper{padding-bottom:0}
  #wrapper>section:not(.intro){margin:0}
  #wrapper>section:not(.intro)>header{padding:22px 32px}
  #wrapper>section:not(.intro)>header h2{margin:0;font-size:20px;line-height:1.35}
  #contest>header h2 br,#published>header h2 br{display:none}
  #wrapper>section:not(.intro)>.content{padding:24px 32px;max-width:none}
  #wrapper>section>footer{padding:8px 32px 24px}
  #wrapper .copyright{padding:0 32px 20px}
  #wrapper>section.intro>header{padding:32px}
  #wrapper>section.intro>.content{height:280px;min-height:0}
  #wrapper>section.intro h1{margin-top:0;font-size:48px}
  #first .image.main img{max-height:260px}
}
@media(max-width:600px){
  #wrapper>section:not(.intro)>header{padding:18px 20px}
  #wrapper>section:not(.intro)>.content{padding:22px 20px}
  #wrapper>section>footer{padding:8px 20px 22px}
  #wrapper>section.intro>header{padding:28px 20px}
  #wrapper>section.intro>.content{height:220px}
  #wrapper>section.intro h1{font-size:40px}
  #wrapper .copyright{padding:0 20px 18px}
  #wrapper .feature-icons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  #wrapper .feature-icons li{width:auto;padding:0;min-height:0;margin:0;font-size:13px;line-height:1.6}
  #wrapper .feature-icons li:before{position:static;display:inline-block;width:20px;height:auto;line-height:1;font-size:13px;margin-right:5px;background:none}
  .news-card-media img{max-height:220px}
  .entries-heading{font-size:14px}
  .problem-tab{height:54px}
  .entries-table td,.entries-table th{padding:10px 7px}
  .entries-scroll{max-height:280px}
  .registration-details{grid-template-columns:minmax(0,1fr) minmax(100px,.65fr);gap:10px}
  .registration-form .member-row{grid-template-columns:42px minmax(0,.8fr) minmax(0,1fr);gap:6px}
  .modal{padding:12px}
  .modal-card{max-height:calc(100dvh - 24px)}
  .auth-card{padding:24px 20px}
  .auth-brand{gap:8px;margin-bottom:20px}
  .auth-brand span{font-size:11px}
  #auth-title{font-size:23px;margin-bottom:18px}
  .auth-form .input-wrap input{font-size:16px}
}
@media(prefers-reduced-motion:reduce){.auth-card{animation:none}.problem-tab,.auth-form .input-wrap input{transition:none}}

.site-home{display:inline-flex;align-items:center;min-height:36px;border:0;text-decoration:none;white-space:nowrap}
.site-home:focus-visible{outline:2px solid #49fcd4;outline-offset:4px;border-radius:3px}
.season-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:16px}
.year-control{display:inline-flex;align-items:center;gap:8px;margin:0;font-size:12px;font-weight:400;letter-spacing:0;white-space:nowrap;color:#6a7e72}
.year-control select{width:114px;height:36px;margin:0;padding:0 28px 0 10px;border:1px solid #d9e4de;font-size:13px;background-position:right 7px center;background-size:16px}
.season-status{font-size:12px;color:#8b7661}
.season-status[data-open="true"]{color:#0c825e}
.entries-heading{flex-wrap:wrap}
#publication-status{margin-bottom:0}
.my-team-facts{grid-template-columns:1fr 1fr 1fr 1.6fr}
#news-count{font-size:12px;color:#78877f}
.public-news{padding:18px 0;border-bottom:1px solid #e3ebe6}
.public-news:first-child{padding-top:0}
.public-news time{display:block;margin-bottom:6px;font-size:12px;color:#78877f;font-variant-numeric:tabular-nums}
.public-news h3{font-size:17px;line-height:1.55;margin:0 0 10px;letter-spacing:0;text-transform:none;overflow-wrap:anywhere}
.public-news p{font-size:15px;line-height:1.8;margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
/* Default bounds also cover future content images without a dedicated class. */
:where(#wrapper > section:not(.intro) > .content) img{display:block;max-width:100%;height:auto;max-height:240px;object-fit:contain}
/* Every news image uses the same bounded frame, including future records. */
#news .content img{display:block;width:100%;max-width:100%;height:240px;max-height:240px;object-fit:contain;object-position:center;margin:14px 0 0}
.news-pagination{display:flex;align-items:center;justify-content:flex-end;gap:14px;margin-top:14px}
.news-pagination span{font-size:12px;font-variant-numeric:tabular-nums;color:#6e8276;min-width:80px;text-align:center}
@media(max-width:600px){
  :where(#wrapper > section:not(.intro) > .content) img{max-height:180px}
  #news .content img{height:180px;max-height:180px}
  .public-news{padding:16px 0}
  .public-news h3{font-size:16px}
  .public-news p{font-size:14px}
  .my-team-facts{grid-template-columns:1fr 1fr}
  .my-team-facts>div:last-child{grid-column:auto}
}
