.av-intro h1 { margin: 0 0 8px; font-size: 28px; }
.av-intro p { margin: 0; max-width: 70ch; }
.av-progress { margin-top: 8px !important; font-weight: 700; }
.hint { font-weight: 400; font-size: 13px; color: var(--muted); }

.av-board {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; padding: 18px; border-radius: var(--radius);
  background: linear-gradient(160deg, #0f5132, #1b7a4a); box-shadow: var(--shadow);
}
.av-case {
  position: relative; aspect-ratio: 1; border: 0; border-radius: 12px; cursor: pointer; font: inherit; color: #fff;
  background: #c0392b; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .18); display: grid; place-items: center; transition: transform .15s;
}
.av-case:nth-child(3n) { background: #b8860b; }
.av-case:nth-child(4n) { background: #1f4e8c; }
.av-case:nth-child(5n) { background: #7b2d8b; }
.av-case b { font-size: clamp(22px, 4vw, 38px); font-weight: 800; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.av-case .icon { position: absolute; bottom: 6px; right: 8px; font-size: 18px; }
.av-case:hover:not(:disabled) { transform: translateY(-3px); }
.av-case:disabled { cursor: default; filter: saturate(.5) brightness(.85); }
.av-case.opened { background: #fff8e1; color: #1d1b16; box-shadow: inset 0 0 0 3px #ffcf00; }
.av-case.opened b { text-shadow: none; }
.av-case.today { outline: 4px solid #ffcf00; outline-offset: 2px; animation: av-pulse 1.6s ease-in-out infinite; }
@keyframes av-pulse { 50% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .av-case.today { animation: none; } }

.av-wait { grid-column: 1 / -1; text-align: center; color: #fff; padding: 20px; }
.av-wait b { display: block; font-size: 42px; }

.av-door { border: 0; border-radius: 16px; padding: 22px; width: min(560px, calc(100vw - 32px)); background: var(--surface); color: var(--text); }
.av-door::backdrop { background: rgba(10, 30, 20, .6); }
.av-close { position: absolute; top: 8px; right: 10px; margin: 0; }
.av-close button { border: 0; background: none; font-size: 26px; cursor: pointer; color: var(--muted); }
.av-day { margin: 0; font-weight: 700; color: #c0392b; text-transform: uppercase; letter-spacing: .05em; font-size: 13px; }
.av-door h2 { margin: 4px 0 6px; font-size: 26px; }
.av-door h3 { font-size: 15px; margin: 14px 0 6px; }
.av-pieces { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; max-height: 300px; overflow: auto; }
.av-pieces li { border: 1px solid var(--line); border-radius: 8px; padding: 6px; display: flex; flex-direction: column; gap: 3px; font-size: 11px; position: relative; }
.av-pieces img { width: 100%; height: 56px; object-fit: contain; background: #fff; border-radius: 6px; }
.av-pieces .q { position: absolute; top: 4px; right: 4px; background: var(--text); color: var(--bg); border-radius: 99px; padding: 0 6px; font-weight: 700; }
.av-acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.av-door .end { background: #fff4cc; border-radius: 10px; padding: 10px 12px; font-weight: 600; }

@media (max-width: 640px) {
  .av-board { grid-template-columns: repeat(4, 1fr); padding: 12px; gap: 8px; }
}
