.events-heading,
.admin-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 clamp(18px, 3vw, 32px);
}
.events-heading h2,
.admin-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4.4vw, 3.75rem);
  line-height: 1.07;
  letter-spacing: -.035em;
}
.events-heading > span {
  align-self: flex-start;
  padding: 2px 9px;
  border: 1px solid #dcc7cd;
  border-radius: 7px;
  background: #fff8f4;
  color: #7c3651;
  font-size: .85rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.event-grid { grid-template-columns: repeat(auto-fit, minmax(min(325px, 100%), 1fr)); gap: clamp(14px, 2vw, 24px) }
.box.event-summary {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(20px, 2.6vw, 32px);
  gap: 14px;
  border: 1px solid #ddc9d1;
  border-radius: 20px;
  background: linear-gradient(112deg, #fffaf2 0%, #fff5ef 55%, #f6e8ef);
  box-shadow: 0 9px 26px -22px #57233d88;
}
.event-summary::after {
  content: "";
  position: absolute;
  inset: 0 0 auto auto;
  width: 32%;
  height: 62%;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(118deg, transparent 0 15px, #a5597510 16px 18px);
  mask-image: linear-gradient(215deg, #000, transparent 80%);
}
.event-summary .event-top { gap: 10px; color: #80314f; font-size: .71rem; letter-spacing: .09em }
.event-top > span:last-child { padding: 3px 8px; border: 1px solid #e4c8d2; border-radius: 5px; color: #68354b; background: #fffaf9cf }
.event-top > span:empty { display: none }
.event-summary h3 { color: #352239; font-size: clamp(1.6rem, 3vw, 2.45rem); line-height: 1.08; letter-spacing: -.025em }
.event-summary .row { gap: 8px 12px }
.event-summary .row > * { min-width: 0; max-width: 100% }
.event-summary .mu { color: #66515d; font-size: .9rem }
.event-summary .event-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px 14px;
  padding-top: 14px;
  border-top: 1px solid #e7d6d9;
  color: #5c4452;
  font-size: .86rem;
  font-variant-numeric: tabular-nums;
}
.event-arrow { margin-left: auto; color: #872646; font-size: 1.35rem; line-height: 1 }
.empty.event-empty {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 18px;
  min-height: clamp(200px, 30vw, 315px);
  border: 1px solid #ddcbd4;
  border-radius: 20px;
  background: linear-gradient(135deg, #fffcf6, #f7eaf1);
  color: #60455b;
}
.event-bracket {
  display: block;
  position: relative;
  width: 58px;
  height: 44px;
  color: #943557;
  background: linear-gradient(currentColor,currentColor) 34px center / 21px 3px no-repeat;
}
.event-bracket::before, .event-bracket::after {
  content: ""; position: absolute; right: 22px; left: 3px; height: 18px;
  border: solid currentColor; border-width: 3px 3px 0 0; border-radius: 0 7px 0 0;
}
.event-bracket::before { top: 3px }
.event-bracket::after { bottom: 3px; transform: scaleY(-1) }
.event-back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 6px; color: #82324e; font-size: .87rem; font-weight: 700; text-decoration: none }
.event-back:hover { text-decoration: underline; text-underline-offset: .25em }
.box.event-detail, .box.draw-info { padding: clamp(20px, 3.3vw, 44px); border-radius: 22px; background: #fffdf8 }
.event-overview { min-width: 0 }
.event-overview.with-picture { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, .8fr); align-items: center; gap: clamp(20px, 3vw, 40px) }
.event-intro { min-width: 0 }
.event-intro h1 { margin: .25em 0; color: #342137; font-size: clamp(2.15rem, 4.7vw, 4.3rem); line-height: 1.06; letter-spacing: -.035em; overflow-wrap: anywhere }
.event-intro p { max-width: 62ch; margin: .65em 0 0; color: #65505d; white-space: pre-line; overflow-wrap: anywhere }
.event-overview .event-picture { background: linear-gradient(140deg, #f7e7e5, #f0dfec); border-radius: 16px }
.event-detail .event-picture img { height: clamp(150px, 21vw, 260px); animation: none }
.event-facts { display: grid; grid-template-columns: minmax(0, 1.45fr) repeat(2, minmax(0, 1fr)); gap: 0; margin: 22px 0; padding-block: 16px; border-block: 1px solid #e5d6dd }
.event-facts div { min-width: 0; padding-inline: clamp(10px, 2vw, 24px); border-inline-start: 1px solid #e5d6dd }
.event-facts div:first-child { padding-inline-start: 0; border: 0 }
.event-facts dt { color: #695662; font-size: .81rem; font-weight: 700 }
.event-facts dd { margin: .3rem 0 0; font-weight: 800; color: #38263a; font-variant-numeric: tabular-nums; overflow-wrap: anywhere }
.event-winners { list-style: none; padding: 0; margin: 10px 0 18px }
.event-winners li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 9px 14px; padding: 8px 0; border-bottom: 1px solid #eddee3 }
.event-winners li > span:first-child { color: #765269; font-weight: 700 }
.draw-info .draw-pending { padding-inline-start: 14px; border-inline-start: 3px solid #c47692; color: #66515e }
.box.draw-info h3 { margin: 0 0 .4em; color: #45273e; font-size: clamp(1.4rem, 2.4vw, 1.9rem); animation: none }
.box.draw-info h3:not(:first-child) { margin-top: 1.3em; padding-top: .85em; border-top: 1px solid #e7d8df }
.draw-info h4 { margin: 1.4em 0 .5em; color: #832e4f }
.draw-info p { margin: .5em 0 1em }
.draw-info .matches { margin: 0; gap: 10px }
.draw-info .matches li { min-width: 0; padding: 16px; border: 1px solid #e2ced8; border-inline-start: 3px solid #aa4f71; border-radius: 10px; background: #fff8f5; overflow-wrap: anywhere; animation: none }
.draw-info .matches .row { gap: 8px; margin-top: 12px }
.matches .row > * { max-width: 100%; flex: 1 1 135px }
.matches .row .btn { white-space: normal }
#ra .ok { animation: none }

.admin-heading { justify-content: space-between; flex-wrap: wrap }
.admin-heading .btn { flex: none }
.admin-tabs {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 5px; margin-bottom: 20px;
  border: 1px solid #deccd4; border-radius: 15px; background: #faf3f4;
}
.admin-tabs .btn { min-height: 44px; flex: 1 1 auto; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; box-shadow: none; color: #684c5e; text-transform: none; font-weight: 700; font-size: .88rem }
.admin-tabs [aria-pressed=true] { color: #fff9f7; background: #68354e; box-shadow: 0 2px 6px #52223c26 }
.admin-tabs .btn:focus-visible { outline-offset: -3px }
#ab { min-width: 0 }
#ab .box { padding: clamp(16px, 2.15vw, 28px); border-color: #dfcdd6; border-radius: 17px; background: #fffdfa }
#ab .box > h3 { color: #45283d }
#ab .action-tools, #ab .event-tools { gap: 8px; margin: 0 0 14px }
#ab .event-tools { margin-bottom: 0; max-width: 100% }
#ab .event-tools .btn, #ab .action-tools .btn, #ab td .btn { min-height: 40px; text-transform: none; margin-inline-start: 0 }
#ab .row > div { min-width: 0; max-width: 100%; overflow-wrap: anywhere }
#ab table td { vertical-align: middle; overflow-wrap: anywhere }
#ab table th { padding-block: 12px; font-size: .7rem; letter-spacing: .06em; color: #6d5264 }
#ab td.row:empty { border-bottom: 1px solid var(--bd) }
#ab td.row { display: table-cell }
#ab td.row .btn { margin: 2px }
#ab .empty { background: #fbf4f5; border-color: #d9c2cf }
.box.admin-signin { max-width: 430px; margin: clamp(8px, 5vw, 65px) auto; padding: clamp(24px, 3.8vw, 44px); background: linear-gradient(160deg, #fffaf0, #fffdfb 40%, #fbecf2); border-color: #dcc2ce }
.admin-signin h2 { margin: 0 0 .8em; font-size: clamp(1.85rem, 3.4vw, 2.8rem); letter-spacing: -.025em }
.admin-signin .btn { width: 100%; margin-top: 20px }
.ov .box.event-editor { max-width: 550px; max-height: 90dvh; overflow: auto; overscroll-behavior: contain }
.event-editor h3 { margin: 0; font-size: 1.65rem }
.event-prizes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 18px 0; padding: 0; border: 0 }
.event-prizes legend { font-weight: 800; color: #55364b }
.event-prizes label { margin: 5px 0 0 }
.event-prizes input { margin-top: 4px }
@media(max-width: 680px) {
  .event-overview.with-picture { grid-template-columns: minmax(0,1fr); gap: 16px }
  .event-facts { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 0 }
  .event-facts div:first-child { grid-column: 1/-1 }
  .event-facts div:nth-child(2) { border: 0; padding-inline-start: 0 }
  #ra .btn { width: 100%; min-height: 46px }
  .admin-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)) }
  .admin-tabs .btn { min-width: 0 }
  .admin-tabs .btn:last-child { grid-column: 1/-1 }
  #ab .event-tools, #ab .action-tools { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100% }
  #ab .event-tools .btn, #ab .action-tools .btn, #ab td .btn { min-height: 44px; white-space: normal }
  #ab table.admin-ledger { min-width: 0; display: block }
  #ab .admin-ledger :is(thead,tbody) { display: block }
  #ab .admin-ledger tr:has(th) { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden }
  #ab .admin-ledger tr:has(td) { display: block; padding: 10px 0; border-bottom: 1px solid #dccad2 }
  #ab .admin-ledger tr:has(td):last-child { border: 0 }
  #ab .admin-ledger td { display: block; padding: 4px 0; min-width: 0; border: 0 }
  #ab .admin-ledger td[data-field] { padding-left: min(32%, 9rem); position: relative; min-height: 29px }
  #ab .admin-ledger td[data-field]::before { content: attr(data-field); position: absolute; inset: 5px auto auto 0; width: min(30%, 8.5rem); font-size: .76rem; font-weight: 700; color: #684b60 }
  #ab .admin-ledger .row:not(:empty) { display: flex; gap: 5px; padding-top: 7px; flex-wrap: wrap }
  #ab .admin-ledger td.row:empty { display: none }
}
@media(prefers-reduced-motion:no-preference) {
  .event-summary, .event-arrow { transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease }
  .admin-tabs .btn { transition: background-color .18s ease, color .18s ease }
  @media(hover:hover) and (pointer:fine) {
    .box.event-summary:hover { border-color: #bd7794; box-shadow: 0 13px 22px -17px #77354e88; transform: translateY(-3px) }
    .event-summary:hover .event-arrow { transform: translate(2px,-2px) }
  }
}
