.av-mode { --av-gold: #d9bd78; --av-good: #87caba; --av-evil: #e59799; display: grid; gap: 18px; }
.av-mode h2 { margin: 8px 0 14px; font-family: Georgia, "Microsoft YaHei", serif; letter-spacing: .04em; }
.av-mode h3 { margin: 10px 0; }
.av-mode p { line-height: 1.75; }
.av-hero { background: radial-gradient(ellipse at 90% 0, #63512b55, transparent 60%), linear-gradient(135deg, #202c30, #171d29); border-color: #b3995655; }
.av-overline { font-size: 11px; color: var(--av-gold); letter-spacing: .18em; font-weight: 700; }
.av-hero-title, .av-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.av-hero-title h2 { font-size: 38px; }
.av-emblem { font-family: Georgia, serif; font-size: 64px; color: var(--av-gold); text-shadow: 0 4px 24px #c4a66640; }
.av-names { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.av-names label { color: #a6b1c0; font-size: 12px; display: grid; gap: 7px; }
.av-names input { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #3b495c; border-radius: 10px; padding: 10px 12px; color: #e7e8ed; background: #101722; }
.av-checks { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.av-checks label { display: inline-flex; align-items: center; gap: 8px; }
.av-checks input { width: 18px; height: 18px; }
.av-role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.av-role-option { display: grid; grid-template-columns: 34px minmax(0, 1fr) 60px; align-items: center; gap: 10px; padding: 14px; border: 1px solid #364355; border-radius: 13px; background: #141b27; }
.av-role-option strong { font-size: 14px; }
.av-role-option small { display: block; color: #a6b1c0; font-size: 11px; line-height: 1.65; margin-top: 5px; }
.av-role-option select { width: 60px; min-height: 44px; padding: 7px; border: 1px solid #40516a; border-radius: 9px; color: #e7e8ed; background: #101722; }
.av-role-icon { font-size: 27px; }
.av-mode .good, .av-good { color: var(--av-good); }
.av-mode .evil, .av-evil { color: var(--av-evil); }
.av-deck-status { color: var(--av-gold); }
.av-rules, .av-history { padding: 16px 18px; border: 1px solid #344053; border-radius: 14px; background: #161e2b; font-size: 13px; color: #b8c2d1; }
.av-mode .panel > .av-rules { margin-top: 20px; }
.av-rules summary, .av-history summary { cursor: pointer; color: #ded9c9; font-weight: 650; min-height: 24px; }
.av-rules a { color: var(--av-gold); }
.av-role-reference { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.av-cover { min-height: 230px; border: 1px solid #a88c4955; border-radius: 20px; background: repeating-linear-gradient(45deg, #cdb57605 0, #cdb57605 2px, transparent 2px, transparent 12px), radial-gradient(ellipse at center, #384746, #182329 70%); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; margin: 20px 0; padding: 20px; box-shadow: inset 0 0 0 7px #b89f5120; }
.av-cover > span { font-size: 64px; color: var(--av-gold); margin-bottom: 10px; }
.av-cover strong { color: #ece1c9; letter-spacing: .14em; font-size: 19px; }
.av-cover p { color: #aebbbb; font-size: 13px; margin-bottom: 0; }
.av-identity { text-align: center; padding: 26px 20px; border: 1px solid currentColor; border-radius: 18px; margin: 20px 0; background: #10272888; }
.av-identity.evil { background: #37202b88; }
.av-identity p { max-width: 500px; margin: 10px auto 20px; color: #d0d6df; }
.av-identity h2 { font-size: 32px; }
.av-seats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.av-seat { min-height: 85px; padding: 12px 7px; border: 1px solid #465568; border-radius: 13px; background: #1c2937; color: #e6e8ee; display: flex; align-items: center; justify-content: center; gap: 8px; flex-direction: column; cursor: pointer; }
.av-seat b { width: 29px; height: 29px; border: 1px solid #8f9b9b66; border-radius: 50%; display: grid; place-items: center; color: var(--av-gold); }
.av-seat span { font-size: 12px; overflow-wrap: anywhere; }
.av-seat.selected { border-color: var(--av-gold); background: #524932; box-shadow: inset 0 0 0 1px var(--av-gold); }
.av-seat:disabled { opacity: .35; cursor: default; }
.av-recognition .av-seat:disabled { opacity: 1; }
.av-private-caption { color: var(--av-gold); font-size: 12px; border-left: 3px solid var(--av-gold); padding: 8px 12px; margin: 18px 0; background: #c9ad4b10; }
.av-recognition, .av-team-strip, .av-private-result { border: 1px solid #456273; border-radius: 16px; padding: 18px; background: #1a2835; margin: 18px 0; }
.av-private-result { text-align: center; }
.av-private-result strong { display: block; font-size: 32px; padding: 28px 0; }
.av-timer { display: flex; align-items: center; justify-content: space-between; padding: 12px 17px; background: #0f1924; border: 1px solid #394754; border-radius: 12px; margin: 18px 0; }
.av-timer span { font-size: 12px; color: #a2b4bf; }
.av-timer strong { font-variant-numeric: tabular-nums; font-size: 28px; color: var(--av-gold); }
.av-board { background: radial-gradient(ellipse at 40% 45%, #20413e, #132528 75%); border: 1px solid #ab94556b; border-radius: 20px; padding: 20px; box-shadow: inset 0 0 0 5px #b79e5810; }
.av-board-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--av-gold); margin-bottom: 20px; }
.av-board-top > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.av-board-top b { font-size: 28px; }
.av-board-top small { color: #b3c8c6; font-size: 10px; }
.av-quests { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.av-quest { border: 1px solid #839e8c44; background: #10201e66; border-radius: 13px; min-height: 142px; padding: 10px 2px; display: flex; align-items: center; flex-direction: column; gap: 6px; text-align: center; color: #acc3be; }
.av-quest strong { font-family: Georgia, serif; display: grid; place-items: center; width: 45px; height: 45px; border-radius: 50%; border: 1px solid #b2a67477; font-size: 25px; color: #c9c0a0; }
.av-quest small { font-size: 10px; }
.av-quest > span { font-size: 13px; }
.av-quest.current { border-color: var(--av-gold); background: #c4a95718; }
.av-quest.success strong { background: #327b6c; border-color: #94d4bc; color: #d2f0da; }
.av-quest.failed strong { background: #783b47; border-color: #d68993; color: #f9d0ce; }
.av-quest em { font-size: 9px; font-style: normal; color: var(--av-gold); }
.av-board-bottom { margin-top: 17px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 11px; color: #b6c4c5; }
.av-choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0; }
.av-choice-row .btn { min-height: 95px; font-size: 19px; }
.av-votes { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0; }
.av-votes > span { font-size: 12px; padding: 6px 9px; border-radius: 7px; border: 1px solid #49626a; }
.av-votes .yes { color: var(--av-good); background: #26524744; }
.av-votes .no { color: var(--av-evil); background: #71374433; }
.av-history article { border-top: 1px solid #384756; padding: 14px 0; }
.av-history article:first-of-type { margin-top: 12px; }
.av-history p { margin: 8px 0; }
.av-warning, .av-note { padding: 13px 16px; border-left: 3px solid #ba9b54; background: #ac8e3412; border-radius: 0 10px 10px 0; }
.av-warning { color: #f1b3a7; border-color: #da8f82; background: #ca624616; }
.av-selection { color: var(--av-gold); font-size: 13px; }
.av-outcome { text-align: center; padding: 25px 10px; }
.av-outcome > span { font-size: 75px; }
.av-final-players { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px 0; }
.av-final-players article { display: grid; gap: 10px; border: 1px solid #4b6371; background: #182531; border-radius: 12px; padding: 16px; overflow-wrap: anywhere; }
.av-final-players small { color: #b6c4cf; }
.av-dialog { max-width: min(440px, calc(100vw - 32px)); background: #202b39; color: #e7e8ed; border: 1px solid #a68e57; border-radius: 19px; padding: 25px; box-shadow: 0 20px 80px #0009; }
.av-dialog::backdrop { background: #080c15cc; backdrop-filter: blur(5px); }
.av-dialog p { line-height: 1.8; color: #bcc7d5; overflow-wrap: anywhere; }
.av-dialog h2 { font-size: 20px; }
.av-mode button:focus-visible, .av-mode summary:focus-visible { outline: 2px solid var(--av-gold); outline-offset: 4px; }
.av-mode .btn { min-height: 46px; }
.av-seal-row { margin-top: 16px; padding-top: 14px; border-top: 1px solid #354352; }
@media (max-width: 600px) {
  .judge-mode-nav:has([data-judge-mode="avalon"].active) button { font-size: 12px; padding: 12px 4px; white-space: nowrap; }
  .av-mode { gap: 12px; }
  .av-role-grid { grid-template-columns: 1fr; }
  .av-names { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .av-seats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .av-board { padding: 15px 11px; }
  .av-quests { gap: 5px; }
  .av-quest { min-height: 133px; border-radius: 9px; }
  .av-quest strong { width: 35px; height: 35px; font-size: 23px; }
  .av-quest small { font-size: 9px; }
  .av-board-top > span { font-size: 13px; white-space: nowrap; }
  .av-hero-title h2 { font-size: 31px; }
  .av-role-reference { grid-template-columns: 1fr; }
  .av-heading { align-items: start; }
  .av-heading .btn { font-size: 12px; padding: 10px; }
  .av-choice-row .btn { font-size: 17px; }
}
