/* 商店街さがし — 昭和の絵本：生成り・こげ茶の線・朱の差し色 */
:root { --accent: #c8432b; --accent-ink: #fff; --accent-soft: #f8e2d9; --bg: #f4eddf; --surface: #fffaf0; --surface-2: #efe5d2; --line: #ddcfb6; --text: #33281e; --text-sub: #6d5f50; --gold: #e0a92a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --accent: #f07a5c; --accent-ink: #1b1512; --accent-soft: #3d241c; --bg: #17140f; --surface: #221d17; --surface-2: #2d261e; --line: #3d3328; --text: #f1e8da; --text-sub: #b9aa96; }
}
:root[data-theme="dark"] { --accent: #f07a5c; --accent-ink: #1b1512; --accent-soft: #3d241c; --bg: #17140f; --surface: #221d17; --surface-2: #2d261e; --line: #3d3328; --text: #f1e8da; --text-sub: #b9aa96; }
body { background: var(--bg); }

/* ホーム */
.ss-title-art { position: relative; border-radius: 16px; overflow: hidden; border: 2px solid var(--text); aspect-ratio: 16 / 9; background: #e9e1d0; }
.ss-title-art img, .ss-title-art video, .ss-title-art canvas { display: block; width: 100%; height: 100%; object-fit: cover; }
.ss-title-logo { position: absolute; left: 0; right: 0; top: 0; padding: 12px 14px 26px; background: linear-gradient(rgba(40, 28, 18, .78), rgba(40, 28, 18, 0)); color: #fff8ea; display: flex; flex-direction: column; text-shadow: 0 2px 4px rgba(0, 0, 0, .5); }
.ss-title-kicker { font-size: 12px; letter-spacing: .2em; font-weight: 700; color: #ffd98a; }
.ss-title-name { font-family: var(--font-serif); font-weight: 900; font-size: clamp(30px, 9vw, 46px); line-height: 1.15; }
.ss-lead { margin: 4px 0 0; }
.ss-h { font-size: 17px; margin: 18px 0 0; }
.ss-chapters { display: grid; gap: 8px; }
.ss-ch { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--text); text-align: left; cursor: pointer; }
.ss-ch:hover:not(:disabled) { border-color: var(--accent); }
.ss-ch.is-locked { opacity: .55; cursor: default; }
.ss-ch.is-clear { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.ss-ch-no { flex: none; font-weight: 900; font-size: 13px; color: var(--accent); width: 44px; }
.ss-ch-body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.ss-ch-body small { color: var(--text-sub); font-size: 12px; }
.ss-ch-star { color: var(--gold); font-size: 14px; letter-spacing: 1px; }
.ss-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ss-row2 > * { min-width: 0; font-size: 14px; padding: 8px 10px; }
.ss-daily .mn-daily { margin-bottom: 8px; }

/* 物語 */
.ss-story-title { font-family: var(--font-serif); font-size: 22px; }
.ss-story-img { width: 100%; border-radius: 14px; border: 2px solid var(--text); aspect-ratio: 16 / 9; object-fit: cover; }
.ss-story-body { display: flex; gap: 12px; align-items: flex-start; }
.ss-hero { flex: none; width: 84px; height: 84px; object-fit: contain; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--line); }
.ss-hero-fb { display: flex; align-items: center; justify-content: center; font-size: 36px; }
.ss-story-text { flex: 1; min-width: 0; font-family: var(--font-serif); font-size: 16px; line-height: 1.95; }
.ss-story-text p { margin: 0 0 .7em; opacity: 0; animation: ss-line .6s ease-out forwards; }
@keyframes ss-line { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ss-story-text p { opacity: 1; } }

/* さがす画面 */
.mn-app.ss-playing { padding-top: 8px; }
.ss-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ss-top-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; font-weight: 800; font-size: 15px; }
.ss-top-name small { font-size: 11px; color: var(--accent); font-weight: 800; }
.ss-top-stat { flex: none; font-size: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-variant-numeric: tabular-nums; }
.ss-stage { position: relative; border-radius: 14px; overflow: hidden; border: 2px solid var(--text); height: clamp(280px, calc(100vh - 380px), 560px); height: clamp(280px, calc(100dvh - 380px), 560px); background: #e9e1d0; }
.ss-canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.ss-bar { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.ss-bar-sp { flex: 1; }
.ss-zbtn { width: 48px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font-weight: 900; font-size: 20px; cursor: pointer; padding: 0; }
.ss-zall { font-size: 13px; width: 60px; }
.ss-hint { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text-sub); font-weight: 800; font-size: 13px; cursor: pointer; }
.ss-hint.is-ready { background: #fff4c8; color: #33281e; box-shadow: 0 0 0 3px rgba(224, 169, 42, .5); }
.ss-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.ss-flash.on { animation: ss-flash .45s ease-out; }
@keyframes ss-flash { 0% { opacity: .85; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ss-flash.on { animation: none; } }
.ss-cap { min-height: 58px; margin: 8px 0; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; line-height: 1.45; }
.ss-cap b { font-size: 15px; }
.ss-cap span { font-size: 13px; color: var(--text-sub); }
.ss-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ss-item { position: relative; min-height: 60px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 2px; }
.ss-item.is-sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.ss-item.is-secret { border-style: dashed; border-color: var(--gold); }
.ss-item.is-got { background: var(--surface-2); }
.ss-item.is-got canvas { opacity: .55; filter: grayscale(.5); }
.ss-q { font-size: 24px; font-weight: 900; color: var(--gold); }
.ss-check { position: absolute; right: 3px; top: 1px; color: var(--accent); font-weight: 900; font-size: 22px; line-height: 1; text-shadow: 0 0 3px var(--surface); }
.ss-under { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--text-sub); }
.ss-quit { min-height: 44px; font-size: 13px; padding: 6px 12px; }
@media (min-width: 720px) {
  .ss-list { grid-template-columns: repeat(8, 1fr); }
  .ss-stage { height: clamp(320px, calc(100vh - 330px), 600px); }
}

/* 結果 */
.ss-res-big { display: flex; flex-direction: column; align-items: center; text-align: center; }
.ss-res-stars { color: var(--gold); font-size: 30px; letter-spacing: 4px; }
.ss-res-line { text-align: center; font-weight: 800; font-size: 17px; }
.ss-result .mn-kicker { text-align: center; }
.ss-strip { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ss-photo { width: 58px; height: 64px; background: #fffdf6; border: 1px solid #cdbfa5; box-shadow: 0 2px 4px rgba(0, 0, 0, .15); padding: 4px 4px 10px; display: flex; align-items: center; justify-content: center; transform: rotate(-2deg); }
.ss-photo:nth-child(even) { transform: rotate(2deg); }
.ss-photo.is-miss { opacity: .5; color: #a08a6a; font-weight: 900; }
.ss-outro { font-family: var(--font-serif); line-height: 1.9; }
.ss-outro p:last-child { margin-bottom: 0; }
.ss-unlock { background: var(--accent-soft); color: var(--accent); font-weight: 800; border-radius: 10px; padding: 8px 12px; }
.ss-share { border-color: var(--accent); color: var(--accent); }
.ss-friend b { display: block; }

/* 図鑑 */
.ss-zukan { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 6px; }
.ss-z { min-height: 56px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 2px; color: var(--text-sub); font-weight: 800; }
.ss-z.is-none { background: var(--surface-2); }
.ss-zinfo { min-height: 3em; font-size: 14px; }

.ss-stoast { position: absolute; left: 50%; top: 8px; transform: translate(-50%, -8px); max-width: calc(100% - 24px); padding: 7px 14px; border-radius: 999px; background: rgba(40, 30, 22, .88); color: #fff8ea; font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-stoast.on { opacity: 1; transform: translate(-50%, 0); }
.ss-missed p { margin: 4px 0 0; font-size: 14px; }
.ss-resbtn { min-height: 44px; padding: 6px 14px; font-size: 14px; }
.ss-bar > * { white-space: nowrap; flex: none; }
.ss-bar > .ss-bar-sp { flex: 1 1 auto; }
