/* 기억·자동화 탭 — 지난 대화 찾기 + 가게 이름·브랜드 색 기억 (scenes/memory.html). 틀은 ta.css, 여기서는 .s-memory 아래만.
   자료 칸 보기 셋: data-v="all"(작업 폴더) → "find"(지난 대화·기억 카드) → "make"(10월 원본 옆에 11월 세로 포스터). */
.s-memory .mm-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.s-memory .ta-app { --ta-side: 1.1fr; }

/* 자료 칸 탭 이름 */
.s-memory .mm-ftab { display: none; }
.s-memory .ta-side:not([data-v="all"]) .mm-ftab { display: inline-grid; animation: mm-tab .35s var(--ta-glide) both; }
.s-memory .ta-side[data-v="all"] .mm-all { color: var(--ta-tx); font-weight: 700; box-shadow: inset 0 -2px 0 var(--ta-tx); }
@keyframes mm-tab { from { opacity: 0; transform: translateY(6px); } }
.s-memory .mm-f2 { opacity: 0; }
.s-memory .ta-side[data-v="make"] .mm-f1 { opacity: 0; }
.s-memory .ta-side[data-v="make"] .mm-f2 { opacity: 1; }

.s-memory .mm-files, .s-memory .mm-find, .s-memory .mm-make { position: absolute; inset: 0; background: #fff; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .35s, transform .5s var(--ta-glide); }
.s-memory .ta-side[data-v="all"] .mm-files, .s-memory .ta-side[data-v="find"] .mm-find, .s-memory .ta-side[data-v="make"] .mm-make { opacity: 1; transform: none; }

/* 작업 폴더 */
.s-memory .mm-files { padding: 10px 10px 0; display: grid; align-content: start; gap: 2px; }
.s-memory .mm-files li { display: flex; align-items: center; gap: 10px; padding: 8px 9px; border-radius: 10px; }
.s-memory .mm-dir { background: #eef3fa; }
.s-memory .mm-dir svg { width: 22px; height: 19px; }

/* 지난 대화 찾기 */
.s-memory .mm-find { padding: 12px 12px 0; display: grid; align-content: start; gap: 8px; }
.s-memory .mm-q { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border-radius: 9px; background: #f1f1f3; font-size: 12.5px; font-weight: 600; color: var(--ta-tx); }
.s-memory .mm-q svg { flex: none; width: 13px; height: 13px; fill: none; stroke: #6e6e73; stroke-width: 1.5; stroke-linecap: round; }
.s-memory .mm-q .caret { display: inline-block; width: 1.5px; height: 1.05em; margin-left: 1px; vertical-align: -0.15em; background: var(--cobalt); animation: ta-blink 1s steps(1) infinite; }
.s-memory .mm-k { display: flex; align-items: center; gap: 5px; margin-top: 2px !important; font-size: 11px; font-weight: 700; color: var(--ta-faint); }
.s-memory .mm-k svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.s-memory .mm-hit { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--ta-bd); opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .45s var(--ta-glide), box-shadow .3s, background .3s; }
.s-memory .mm-hit.in { opacity: 1; transform: none; }
.s-memory .mm-hit2.in { opacity: .55; }
.s-memory .mm-hit1.lit { background: #f3f7ff; box-shadow: inset 0 0 0 1.5px var(--cobalt); }
.s-memory .mm-th { flex: none; display: grid; place-items: center; width: 38px; height: 52px; border-radius: 5px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.s-memory .mm-th svg { width: 100%; height: 100%; display: block; }
.s-memory .mm-th2 { height: 38px; background: #f1f1f3; box-shadow: none; }
.s-memory .mm-th2 svg { width: 16px; height: 16px; fill: none; stroke: #8a8a8e; stroke-width: 1.4; stroke-linejoin: round; }
.s-memory .mm-ht { display: grid; min-width: 0; line-height: 1.4; }
.s-memory .mm-ht b { font-size: 12px; font-weight: 700; }
.s-memory .mm-ht small { font-size: 11px; color: var(--ta-faint); }
.s-memory .mm-ht em { margin-top: 2px; font-style: normal; font-size: 11.5px; color: #3a3a3c; }

/* 기억해 둔 가게 정보 */
.s-memory .mm-mem { display: grid; gap: 6px; margin-top: 2px; padding: 10px 12px 12px; border-radius: 12px; background: #fbf6f3; box-shadow: inset 0 0 0 1px #efe2dc; opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .45s var(--ta-glide); }
.s-memory .mm-mem.in { opacity: 1; transform: none; }
.s-memory .mm-mem .mm-k { margin: 0 !important; color: #8a5a63; }
.s-memory .mm-name { font-size: 15px; font-weight: 800; letter-spacing: -.02em; color: #7c2d3d; }
.s-memory .mm-sws { display: flex; flex-wrap: wrap; gap: 6px; }
.s-memory .mm-sw { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 4px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px #ece0db; font-size: 11px; font-weight: 600; color: #3a3a3c; opacity: 0; transform: scale(.7); transition: opacity .2s, transform .4s var(--ta-spring); }
.s-memory .mm-sw i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.s-memory .mm-mem.in .mm-sw { opacity: 1; transform: none; }
.s-memory .mm-mem.in .mm-sw:nth-child(2) { transition-delay: .12s; }
.s-memory .mm-mem.in .mm-sw:nth-child(3) { transition-delay: .24s; }

/* 포스터(세로 5:7) — 크림 바탕, 버건디 글자, 로즈 장식. 기준 폭 200px */
.s-memory .mm-make { display: flex; align-items: flex-start; justify-content: center; gap: 16px; padding: 14px 12px 0; background: #eceef1; }
.s-memory .mm-make figure { margin: 0; display: grid; justify-items: center; gap: 6px; }
.s-memory .mm-make figcaption { font-size: 11px; font-weight: 600; color: var(--ta-sub); white-space: nowrap; }
.s-memory .mm-new figcaption { color: var(--cobalt); }
.s-memory .mm-poster { position: relative; display: flex; flex-direction: column; align-items: center; width: 200px; height: 280px; padding: 0 14px 10px; overflow: hidden; background: #f8efe6; color: #7c2d3d; text-align: center; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 14px 28px -16px rgba(80, 20, 30, .45); }
.s-memory .mm-poster p { margin: 0; }
.s-memory .pp-brand { align-self: stretch; margin: 0 -14px 10px !important; padding: 5px 0; background: #7c2d3d; color: #f8efe6; font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.s-memory .pp-month { font-size: 12.5px; font-weight: 600; color: #b5566a; }
.s-memory .pp-month b { font-weight: 800; color: #7c2d3d; }
.s-memory .pp-head { margin-top: 4px !important; font-size: 19px; line-height: 1.28; font-weight: 800; letter-spacing: -.03em; word-break: keep-all; }
.s-memory .pp-art { width: 54px; height: 81px; margin: 6px 0 2px; }
.s-memory .pp-off { font-size: 13px; font-weight: 700; }
.s-memory .pp-off b { font-size: 22px; font-weight: 900; color: #c94f63; letter-spacing: -.02em; }
.s-memory .pp-date { margin-top: auto !important; align-self: stretch; padding-top: 6px; border-top: 1px dashed #e0c3c8; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.s-memory .pp-foot { margin-top: 3px !important; font-size: 12px; color: #a0707a; }
.s-memory .pp-chg { border-radius: 4px; padding: 0 2px; }
.s-memory .mm-new.hit .pp-chg { animation: mm-chg 1.6s var(--ta-glide) both; }
@keyframes mm-chg { 0%, 100% { background: transparent; box-shadow: none; } 25%, 70% { background: #dfe9ff; box-shadow: 0 0 0 1.5px var(--cobalt); } }
/* 10월 원본은 같은 포스터를 줄여 둔다 */
.s-memory .mm-pwrap { width: 90px; height: 126px; overflow: hidden; }
.s-memory .mm-pwrap .mm-poster { transform: scale(.45); transform-origin: 0 0; }
.s-memory .mm-old { opacity: 0; transform: translateX(10px); transition: opacity .35s, transform .5s var(--ta-glide); }
.s-memory .mm-old.in { opacity: .9; transform: none; }
.s-memory .mm-new { opacity: 0; transform: translateY(16px) scale(.96); transition: opacity .35s, transform .6s var(--ta-glide); }
.s-memory .mm-new.in { opacity: 1; transform: none; }
.s-memory .mm-new.in .mm-poster > * { animation: mm-part .45s var(--ta-glide) both; }
.s-memory .mm-new.in .mm-poster > :nth-child(2) { animation-delay: .1s; } .s-memory .mm-new.in .mm-poster > :nth-child(3) { animation-delay: .2s; } .s-memory .mm-new.in .mm-poster > :nth-child(4) { animation-delay: .3s; } .s-memory .mm-new.in .mm-poster > :nth-child(5) { animation-delay: .4s; } .s-memory .mm-new.in .mm-poster > :nth-child(6) { animation-delay: .5s; } .s-memory .mm-new.in .mm-poster > :nth-child(7) { animation-delay: .6s; }
@keyframes mm-part { from { opacity: 0; transform: translateY(6px); } }

/* 대화 칸 파일 카드: 포스터 미리보기 + 한 번 반짝 */
.s-memory .mm-fimg { width: 30px !important; height: 42px; border-radius: 4px; }
.s-memory .mm-fimg svg { width: 100%; height: 100%; display: block; }
.s-memory .mm-file.hit { animation: mm-flash 1.4s var(--ta-glide) both; }
@keyframes mm-flash { 0% { box-shadow: inset 0 0 0 1px var(--ta-bd), 0 0 0 0 rgba(22, 89, 239, .4); } 40% { box-shadow: inset 0 0 0 1.5px var(--cobalt), 0 0 0 6px rgba(22, 89, 239, .12); } 100% { box-shadow: inset 0 0 0 1px var(--ta-bd), 0 0 0 0 rgba(22, 89, 239, 0); } }

/* 휴대폰 배치: 자료 칸이 거의 다 덮도록 위에서부터 */
@container tadesk (max-width: 700px) {
  .s-memory .ta-side { --ta-side-top: 6%; }
  .s-memory .mm-k, .s-memory .mm-ht small, .s-memory .mm-ht em, .s-memory .mm-sw, .s-memory .mm-make figcaption { font-size: 12px; }
  .s-memory .mm-ht b, .s-memory .mm-q { font-size: 13px; }
}
@media (max-width: 860px) {
  .s-memory .ta-desk { --ta-h: 480px; }
}
@media (prefers-reduced-motion: reduce) {
  .s-memory .mm-files, .s-memory .mm-find, .s-memory .mm-make, .s-memory .mm-hit, .s-memory .mm-mem, .s-memory .mm-sw, .s-memory .mm-old, .s-memory .mm-new, .s-memory .mm-new.in .mm-poster > *, .s-memory .mm-new.hit .pp-chg, .s-memory .mm-file.hit { transition: none; animation: none; }
}
