.memory-game { --memory-ink: #183c3a; --memory-green: #176455; color: var(--memory-ink); }
.memory-toolbar, .memory-settings { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 16px 0; }
.memory-toolbar { border-bottom: 2px solid #b1d6cc; }
.memory-toolbar > strong { margin-right: auto; }
.memory-settings .field { flex: 1 1 200px; max-width: 320px; margin: 0; }
#memory-play { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; padding: 24px 0; align-items: center; }
.memory-scene { position: relative; aspect-ratio: 1; min-width: 0; max-height: 540px; background: #e5f4f0; border: 2px solid #278778; border-radius: 8px; overflow: hidden; }
#memory-poster { width: 100%; height: 100%; object-fit: contain; }
.memory-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px; margin: 0; height: 100%; list-style: none; }
.memory-board li { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; background: #fff; border: 1px solid #94b9b1; border-radius: 6px; }
.memory-board .memory-empty { background: #d2e9e1; }
.memory-slot { position: absolute; top: 3px; left: 6px; font-size: 12px; color: #31594e; }
.memory-icon { width: 76px; height: 76px; max-width: 72%; flex-shrink: 1; }
.memory-name { font-size: 14px; font-weight: 700; line-height: 1.2; }
.memory-recall .memory-slot { position: static; font-size: 28px; font-weight: 700; color: #183c3a; }
.memory-recall .memory-target { background: #fff4bd; outline: 3px solid #805700; outline-offset: -4px; }
.memory-controls { min-width: 0; }
.memory-controls h2 { font-size: 24px; line-height: 1.25; }
.memory-countdown { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.memory-countdown progress { width: 100%; accent-color: var(--memory-green); }
.memory-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.memory-options:empty { display: none; }
.memory-option { display: flex; align-items: center; gap: 8px; justify-content: center; min-height: 88px; background: #fff; border: 2px solid #739a8f; border-radius: 8px; color: #183c3a; font: inherit; font-weight: 700; padding: 8px; cursor: pointer; }
.memory-option .memory-icon { width: 52px; height: 52px; }
.memory-option:hover { border-color: #176455; background: #e5f4f0; }
.memory-game button:focus-visible, #memory-question:focus-visible { outline: 3px solid #965400; outline-offset: 3px; }
.memory-game .primary-action { background: #176455; color: #fff; }
.memory-review { list-style: none; padding: 0; }
.memory-review li { padding: 10px 12px; margin: 8px 0; border-left: 4px solid #a84928; background: #fff0e8; color: #74371e; }
.memory-review .is-correct { border-color: #176455; background: #e5f4f0; color: #164e42; }
.memory-paused { padding: 80px 24px; text-align: center; background: #e5f4f0; }
.memory-fact { padding: 20px 0; }
.memory-game [hidden] { display: none !important; }
@media (max-width: 760px) {
    #memory-play { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .memory-scene { width: 100%; max-width: 440px; justify-self: center; }
    .memory-controls h2 { font-size: 21px; }
}
@media (max-width: 380px) {
    .memory-board { padding: 6px; gap: 5px; }
    .memory-board .memory-icon { width: 49px; height: 49px; }
    .memory-name { font-size: 12px; }
    .memory-option { flex-direction: column; gap: 2px; }
}
