.memory-wall { display: flex; flex-direction: column; width: 100%; height: 100%; max-width: 100%; min-width: 0; min-height: 350px; color: #35523f; }
.memory-video { height: auto; min-height: 0; }
.memory-viewport { position: relative; isolation: isolate; flex: 1 1 auto; min-height: 0; width: 100%; min-width: 0; overflow: hidden; border-radius: 25px; touch-action: pan-y pinch-zoom; cursor: grab; background: radial-gradient(ellipse at 45% 42%, #fbfcf6 0, #f4f7ed 50%, #eaf1e3 100%); outline-offset: -4px; }
.memory-viewport::after { content: ''; position: absolute; z-index: 3; inset: 0; pointer-events: none; border: 1px solid #dfe8d880; border-radius: inherit; box-shadow: inset 0 0 50px 3px #eef4e665; }
.memory-viewport:focus-visible { outline: 2px solid #7fa37d; }
.memory-plane { position: absolute; inset: 0; }
.memory-ornament { position: absolute; bottom: 14px; right: 17px; z-index: 1; color: #859a7a; font-size: 9px; letter-spacing: .18em; pointer-events: none; }
.memory-frame { position: absolute; top: 0; left: 0; width: 240px; height: 210px; }
.memory-frame, .memory-vertical, .memory-sheet, .memory-content { pointer-events: none; }
.memory-frame[hidden] { display: none; }
.memory-vertical, .memory-sheet, .memory-content { width: 100%; height: 100%; }
.memory-sheet { position: relative; background: #fff; padding: 2px; border: 1px solid #dfe5da; border-radius: 7px; box-shadow: 0 5px 16px #3549330b; }
.memory-gallery .memory-tilt-0 { rotate: -3deg; }
.memory-gallery .memory-tilt-1 { rotate: 2deg; }
.memory-gallery .memory-tilt-2 { rotate: -2deg; }
.memory-gallery .memory-tilt-3 { rotate: 4deg; }
.memory-gallery .memory-tilt-4 { rotate: -4deg; }
.memory-gallery .memory-tilt-5 { rotate: 3deg; }
.memory-video .memory-sheet { padding: 0; border: 0; background: transparent; border-radius: 0; box-shadow: none; }
.memory-content { position: relative; overflow: hidden; border-radius: 4px; background: #fff; transition: transform .16s ease; }
.memory-video .memory-content { background: transparent; border-radius: 0; }
.memory-video[data-keyboard-row="0"] .memory-frame[data-memory-group="0"] .memory-content,
.memory-video[data-keyboard-row="1"] .memory-frame[data-memory-group="1"] .memory-content,
.memory-video[data-keyboard-row="2"] .memory-frame[data-memory-group="2"] .memory-content { outline: 1px solid #7c9a72; outline-offset: 3px; }
.memory-frame:hover { z-index: 5; }
.memory-frame:focus-within { z-index: 6; }
.memory-frame:hover .memory-content { transform: translateY(-2px); }
.memory-content > * { display: block; width: 100%; height: 100%; min-width: 0; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: hidden; pointer-events: auto; }
.memory-content > *:hover { transform: none; box-shadow: none; }
.memory-content > *:focus-visible { outline: 2px solid #608761; outline-offset: -3px; }
.memory-gallery .memory-content .figure-image-viewport { width: 100%; height: calc(100% - 54px); min-height: 0; }
.memory-gallery .memory-content .figure-caption { display: block; height: 54px; padding: 7px 9px 5px; }
.memory-gallery .memory-content strong { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.5; font-weight: 550; }
.memory-gallery .memory-content small { display: block; margin-top: 3px; font-size: 10px; color: #81907c; }
.memory-video .memory-content > a { display: flex; flex-direction: column; }
.memory-video .memory-content .ranked-cover { flex: 0 0 auto; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 5px; background: transparent; }
.memory-video .memory-content img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; }
.memory-video .memory-content .ranked-copy { flex: 0 0 auto; min-height: 0; padding: 8px 2px 0; }
.memory-video .memory-content h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 6px; font-size: 16px; line-height: 1.5; }
.memory-video .memory-content p { margin-top: 5px; font-size: 12px; line-height: 1.4; }
.memory-toolbar { display: flex; flex: 0 0 auto; justify-content: space-between; align-items: center; gap: 14px; padding: 7px 3px 2px; min-height: 43px; }
.memory-status { font-size: 11px; color: #7b8a75; letter-spacing: .035em; }
.memory-controls { display: flex; align-items: center; gap: 6px; }
.memory-button { appearance: none; display: inline-flex; align-items: center; justify-content: center; min-width: 42px; min-height: 34px; padding: 6px 12px; border: 1px solid #dbe4d3; border-radius: 9px; background: #f8fbf3; color: #45654d; font: inherit; font-size: 11px; cursor: pointer; }
.memory-button:hover { background: #e9f1e1; border-color: #b9cdb0; }
.memory-button:focus-visible { outline: 2px solid #779d78; outline-offset: 3px; }
.memory-button:disabled { opacity: .45; cursor: default; }
.memory-arrow { font-size: 17px; }
.memory-dragging .memory-viewport { cursor: grabbing; }
.memory-dragging .memory-content { user-select: none; }
.memory-default-card, .memory-empty { padding: 20px; color: #748469; font-size: 12px; }
.memory-static .memory-plane { position: relative; display: flex; gap: 16px; overflow-x: auto; padding: 20px; }
.memory-static .memory-frame { position: relative; flex: 0 0 240px; }
.memory-static.memory-video .memory-plane { display: grid; grid-template-rows: repeat(3, max-content); grid-auto-flow: column; grid-auto-columns: 480px; gap: 20px 28px; padding: 6px 12px; }
.memory-static.memory-video .memory-frame { width: 100%; height: auto; }
.memory-static.memory-video .memory-vertical, .memory-static.memory-video .memory-sheet, .memory-static.memory-video .memory-content, .memory-static.memory-video .memory-content > a { height: auto; }
.memory-static.memory-gallery .memory-plane { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow-y: auto; overflow-x: hidden; }
.memory-static.memory-gallery .memory-frame { width: 100%; height: auto; min-height: 240px; }
.memory-static.memory-gallery .memory-vertical, .memory-static.memory-gallery .memory-sheet, .memory-static.memory-gallery .memory-content { height: auto; min-height: 240px; }
.memory-static.memory-gallery .memory-content .figure-image-viewport { height: auto; min-height: 180px; }
@media (max-width: 759px) { .memory-static.memory-gallery .memory-plane { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 439px) { .memory-static.memory-gallery .memory-plane { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 620px) {
  .memory-viewport { border-radius: 17px; }
  .memory-gallery .memory-content strong { font-size: 12px; }
  .memory-gallery .memory-content small { font-size: 10px; }
  .memory-video .memory-content h3 { font-size: 15px; }
  .memory-static.memory-video .memory-plane { grid-auto-columns: min(350px, 88vw); row-gap: 16px; }
  .memory-toolbar { flex-wrap: wrap; gap: 8px; }
  .memory-button { min-height: 40px; min-width: 40px; }
  .memory-ornament { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) { .memory-content { transition: none; } .memory-frame:hover .memory-content { transform: none; } }
