/* 22s 记忆星图。class 一律 sm- 开头（罗盘和星的零件都在 .sm-svg 里面）。弹窗借心愿单的蕾丝框 .ws-pop */
.sm { position: relative; min-height: 100%; padding-bottom: calc(30px + var(--safe-b)); color: #EDE6EC;
  background: #262838 url(../assets/star-sky.jpg) center top / cover no-repeat; }
.sm::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(30, 30, 46, .25), transparent 30%, rgba(30, 26, 40, .35)); }
.sm > * { position: relative; }
.sm-top { display: flex; align-items: flex-start; justify-content: space-between; padding: calc(var(--status-h) + 6px) 18px 0; }
.sm-tt { display: flex; flex-direction: column; align-items: flex-end; padding: 8px 14px 8px 16px; border-radius: 14px 3px 14px 3px;
  background: rgba(250, 246, 240, .12); border: 1px solid rgba(244, 238, 231, .3); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.sm-tt h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: 6px; padding-left: 6px; color: #F4EEE7; }
.sm-tt i { font-family: var(--font-script); font-style: normal; font-size: 20px; line-height: 1.1; color: #E2D7E6; }
.sm-sub { margin: 10px 22px 0; text-align: center; font-size: 12px; letter-spacing: 1px; color: #CFC5D4; }
.sm-q { display: flex; align-items: center; gap: 8px; margin: 12px 22px 0; height: 40px; padding: 0 12px; border-radius: 20px;
  background: rgba(250, 246, 240, .1); border: 1px solid rgba(233, 217, 168, .35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.sm-q > span { color: #E9D9A8; display: flex; }
.sm-q input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: inherit; font-size: 13.5px; color: #F4EEE7; }
.sm-q input::placeholder { color: rgba(237, 230, 236, .5); }
.sm-q button { width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(250, 246, 240, .15); color: #EDE6EC; display: flex; align-items: center; justify-content: center; padding: 0; }

/* 罗盘 */
.sm-map { position: relative; margin: 6px 6px 0; aspect-ratio: 1; }
.sm-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.sm-svg .cp { fill: none; stroke: #D9C38E; }
.sm-svg .o2 { stroke-width: .6; stroke-opacity: .45; } .sm-svg .o1 { stroke-width: 1.2; stroke-opacity: .7; }
.sm-svg .tk line { stroke-width: .8; stroke-opacity: .55; }
.sm-svg .rg { stroke-width: .6; stroke-opacity: .28; stroke-dasharray: 2 4; }
.sm-svg .sp line { stroke-width: .6; stroke-opacity: .22; stroke-dasharray: 1 5; }
.sm-svg .rose polygon { fill: rgba(217, 195, 142, .07); stroke-width: .7; stroke-opacity: .5; }
.sm-svg .rose polygon + polygon { fill: rgba(217, 195, 142, .04); stroke-opacity: .35; }
.sm-svg text { stroke: none; fill: #E9D9A8; font-family: var(--font-serif); text-anchor: middle; }
.sm-svg .lb { font-size: 12px; letter-spacing: 2px; fill: #E6DCC2; fill-opacity: .8; }
.sm-svg .lb.big { font-size: 13.5px; fill-opacity: 1; }
.sm-svg .nn { font-size: 13px; font-style: italic; fill-opacity: .9; }
.sm-svg .rl { font-size: 7.5px; letter-spacing: 1px; fill: #CFC5D4; fill-opacity: .55; }
/* 连线：很淡；搜到的两颗都亮时这条也亮 */
.sm-svg .eg line { stroke: #E9D9A8; stroke-width: .6; stroke-opacity: .18; transition: stroke-opacity .3s; }
.sm-svg.lit .eg line { stroke-opacity: .05; } .sm-svg.lit .eg line.on { stroke-opacity: .6; stroke-width: .9; }
/* 星：一层光晕 + 一颗亮点；核心多一个十字光芒；各自节奏地闪 */
.sm-svg .s { cursor: pointer; transition: opacity .3s; }
.sm-svg .s .halo { fill: url(#sm-g); opacity: .35; animation: sm-tw var(--tw) ease-in-out var(--dl) infinite; }
.sm-svg .s .dot { fill: #FFF4D6; }
.sm-svg .s.core .dot { fill: #F6DFA0; }
.sm-svg .s .ray { stroke: #F6DFA0; stroke-width: .7; stroke-linecap: round; opacity: .8; }
.sm-svg .s .hit { fill: transparent; }
@keyframes sm-tw { 0%, 100% { opacity: .25; } 50% { opacity: .6; } }
.sm-svg.lit .s { opacity: .18; } .sm-svg.lit .s.hit-on { opacity: 1; }
.sm-svg .s.hit-on .halo { opacity: .85; animation: none; }
.sm-svg .s.on .halo { opacity: 1; animation: none; } .sm-svg .s.on .dot { fill: #fff; }
/* 小签：点了才出来 */
.sm-tags { position: absolute; inset: 0; pointer-events: none; }
.sm-tag { position: absolute; transform: translate(-50%, calc(-100% - 10px)); display: flex; flex-direction: column; align-items: center; white-space: nowrap; padding: 4px 10px 5px; border-radius: 2px;
  background: #FBF8F3; color: var(--ink); border: 1px solid rgba(169, 154, 170, .55); box-shadow: 0 0 0 2px #FBF8F3, 0 0 0 2.6px rgba(169, 154, 170, .4), 0 4px 10px rgba(20, 18, 30, .45);
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.sm-tag.on { opacity: 1; visibility: visible; }
.sm-tag b { font-size: 12px; font-weight: 600; letter-spacing: 1px; } .sm-tag small { font-size: 10px; color: var(--ink-2); }

/* 八个方位：点了只亮这一类 */
.sm-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 18px 0; }
.sm-cats button { height: 30px; border-radius: 15px; border: 1px solid rgba(233, 217, 168, .3); background: rgba(250, 246, 240, .06); color: #E6DCE6; font: inherit; font-size: 12px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.sm-cats em { font-style: italic; font-family: var(--font-serif); font-size: 10.5px; color: #D9C38E; }
.sm-cats button[aria-pressed="true"] { background: rgba(233, 217, 168, .9); border-color: #E9D9A8; color: #3A3245; }
.sm-cats button[aria-pressed="true"] em { color: #6E5C46; }

/* 下面的清单：默认是核心记忆，搜索 / 选方位时换成结果 */
.sm-list { margin: 18px 18px 0; padding: 14px 14px 8px; border-radius: 4px; color: var(--ink);
  background: rgba(250, 246, 240, .92); box-shadow: 0 0 0 1px rgba(255, 255, 255, .5), 0 0 0 4px rgba(250, 246, 240, .2), 0 0 0 5px rgba(217, 195, 142, .5), 0 10px 24px rgba(10, 8, 20, .35); }
.sm-list h2 { margin: 0 0 6px; display: flex; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 600; letter-spacing: 2px; }
.sm-list h2 i { font-family: var(--font-script); font-style: normal; font-weight: 400; font-size: 17px; letter-spacing: 0; color: var(--mauve-deep); }
.sm-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 2px; border: 0; border-top: 1px dashed var(--lace); background: none; font: inherit; text-align: left; color: var(--ink); }
.sm-row .d { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #CDB98A; box-shadow: 0 0 6px rgba(205, 185, 138, .9); }
.sm-row .d.core { background: #B89A55; }
.sm-row span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sm-row b { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-row small { font-size: 10.5px; color: var(--ink-2); }
.sm-row em { font-style: normal; font-size: 9px; letter-spacing: 1px; color: #B89A55; }
.sm-none { margin: 6px 0; font-size: 12.5px; color: var(--ink-2); }

/* 心潮还在建星图 / 没接记忆库 */
.sm-wait { margin: 40vh 30px 0; text-align: center; font-size: 13.5px; line-height: 1.9; letter-spacing: 1px; color: #E6DCE6; }
/* 弹窗 */
.sm-meta { margin: 8px 0 0; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; font-size: 11.5px; color: var(--ink-2); }
.sm-meta span { padding: 1px 9px; border-radius: 9px; background: rgba(169, 154, 170, .16); color: var(--mauve-deep); }
.sm-meta .core { background: rgba(217, 195, 142, .3); color: #7C6A50; }
.sm-meta time { font-family: var(--font-serif); } .sm-meta em { font-style: normal; color: #B89A55; letter-spacing: 1px; }
.sm-paper { align-self: stretch; margin-top: 12px; padding: 14px 14px 10px; text-align: left; border-radius: 2px; background: #FBF6EA;
  background-image: repeating-linear-gradient(transparent 0 25px, rgba(169, 154, 170, .2) 25px 26px); background-position: 0 12px; box-shadow: 0 2px 6px rgba(60, 45, 55, .1); }
.sm-paper p { margin: 0; font-size: 14px; line-height: 26px; color: var(--ink); white-space: pre-wrap; }
.sm-paper p.ld { color: var(--ink-2); font-size: 13px; }
.sm-paper small { display: block; margin-top: 6px; font-size: 10.5px; color: var(--ink-2); }
.sm-tg { margin: 10px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.sm-tg span { font-size: 11px; padding: 1px 8px; border-radius: 8px; background: rgba(169, 154, 170, .14); color: var(--mauve-deep); }
.sm-rc { margin: 6px 0 0; font-size: 11px; color: var(--ink-2); }
.sm-rel { margin: 12px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.sm-rel small { flex-basis: 100%; font-size: 11px; letter-spacing: 1px; color: var(--ink-2); }
.sm-rel button { height: 28px; padding: 0 12px; border-radius: 14px; border: 1px solid #D9C38E; background: rgba(233, 217, 168, .18); font: inherit; font-size: 12px; color: #6E5C46; }
@media (prefers-reduced-motion: reduce) { .sm-svg .s .halo { animation: none; } }
