.abw-game { max-width: 700px; margin: 0 auto; line-height: 1.65; }
.abw-game [hidden] { display: none !important; }
.abw-ui-icon { width: 1em; margin-right: 6px; text-align: center; opacity: .7; }
.abw-stats { display: flex; justify-content: space-between; gap: 8px; padding: 0 0 14px; font-size: 11px; font-variant-numeric: tabular-nums; }
.abw-stats > span { white-space: nowrap; }
.abw-stats strong { margin-left: 4px; }
.abw-game .button { height: auto; min-height: 44px; padding: 8px 12px; border-color: rgba(127,127,127,.45); color: inherit; background: rgba(127,127,127,.04); font: inherit; font-size: 13px; line-height: 1.4; white-space: normal; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.abw-game .button:disabled { opacity: .4; cursor: default; }
.abw-game .button:focus-visible, .abw-game summary:focus-visible, .abw-map-scroll:focus-visible { outline: 3px solid #b28b22; outline-offset: 3px; }
.abw-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.abw-game .abw-tabs [aria-pressed="true"] { background: rgba(178,139,34,.14); border-color: #a5822c; font-weight: bold; }
.abw-story { height: 340px; height: clamp(240px, 43vh, 420px); overflow-y: auto; overscroll-behavior: contain; padding: 0 12px; border: 1px solid rgba(127,127,127,.25); border-radius: 8px; }
.abw-entry { position: relative; margin: 0; padding: 18px 6px 18px 18px; border-bottom: 1px solid rgba(127,127,127,.18); font-family: Georgia, serif; font-size: 15px; }
.abw-entry::before { content: '\203a'; position: absolute; left: 0; color: #a5822c; }
.abw-latest { font-size: 17px; }
.abw-story.abw-dead { background: #650b13; color: #fff0f0; animation: abw-console-death 5s ease-in-out both; }
.abw-dead .abw-entry { border-bottom-color: rgba(244,233,233,.2); }
.abw-death-message { color: #a31320; animation: abw-death-reveal 5s ease-in both; }
.abw-dead .abw-death-message { color: #ffb3b8; }
@keyframes abw-console-death { from { background-color: transparent; color: inherit; } to { background-color: #650b13; color: #fff0f0; } }
@keyframes abw-death-reveal { from { opacity: 0; } to { opacity: 1; } }
.abw-game h2 { font-family: Georgia, serif; font-size: 20px; font-weight: normal; }
.abw-items { min-height: 160px; }
.abw-items details { padding: 12px; margin: 10px 0; border: 1px solid rgba(127,127,127,.25); border-radius: 8px; }
.abw-items summary, .abw-about summary { cursor: pointer; min-height: 28px; }
.abw-items p { font-family: Georgia, serif; margin-bottom: 0; }
.abw-small { font-size: 11px; opacity: .75; }
.abw-map-scroll { max-height: 340px; overflow: auto; border: 1px solid rgba(127,127,127,.25); border-radius: 8px; position: relative; overscroll-behavior: contain; }
.abw-map { display: grid; gap: 2px; padding: 12px; width: max-content; }
.abw-map-cell { display: flex; justify-content: center; align-items: center; width: 24px; height: 24px; box-sizing: border-box; border: 1px solid rgba(127,127,127,.18); font-size: 11px; }
.abw-explored { background: rgba(127,127,127,.16); border-color: rgba(127,127,127,.45); }
.abw-here { background: #e8c66b; border: 2px solid #775615; color: #352709; font-weight: bold; }
.abw-notice { font-size: 12px; color: inherit; margin: 8px 0; }
.abw-notice:empty { display: none; }
.abw-announcer { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.abw-storage, .abw-outcome { padding: 12px; border: 1px solid #a5822c; border-radius: 8px; font-size: 13px; }
.abw-outcome { margin-top: 14px; background: rgba(178,139,34,.08); }
.abw-outcome p { margin-bottom: 0; }
.abw-outcome { margin-bottom: 16px; }
.abw-controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 12px 0; }
.abw-compass { display: grid; grid-template-columns: repeat(3, 54px); grid-template-rows: repeat(3, 46px); gap: 5px; }
.abw-game .abw-compass .button { padding: 6px; }
.abw-north { grid-column: 2; grid-row: 1; }
.abw-west { grid-column: 1; grid-row: 2; }
.abw-east { grid-column: 3; grid-row: 2; }
.abw-south { grid-column: 2; grid-row: 3; }
.abw-compass-center { grid-column: 2; grid-row: 2; text-align: center; align-self: center; font-size: 26px; opacity: .6; -webkit-user-select: none; user-select: none; }
.abw-save-controls { display: grid; gap: 10px; }
.abw-about { border: 1px solid rgba(127,127,127,.25); border-radius: 8px; background: rgba(127,127,127,.04); font-size: 12px; overflow: hidden; }
.abw-about > summary { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; box-sizing: border-box; list-style: none; font-weight: bold; }
.abw-about > summary:hover { background: rgba(127,127,127,.07); }
.abw-about > summary::-webkit-details-marker { display: none; }
.abw-about > summary::marker { content: ''; }
.abw-game .abw-about > summary::before { content: none; display: none; }
.abw-about[open] > summary { border-bottom: 1px solid rgba(127,127,127,.18); }
.abw-about > p { margin: 12px; }
.abw-game .abw-about > .button { display: inline-block; width: auto; margin: 0 12px; }
@media (max-width: 390px) {
    .abw-story { height: clamp(200px, 32vh, 300px); }
    .abw-controls { gap: 12px; }
    .abw-compass { grid-template-columns: repeat(3, 44px); grid-template-rows: repeat(3, 44px); }
    .abw-save-controls { flex: 1; }
}
@media (max-width: 350px) { .abw-controls { flex-direction: column; gap: 16px; } .abw-save-controls { width: 100%; grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { .abw-story.abw-dead, .abw-death-message { animation: none; } }
