/* 共有ページ（/v/<ID>。docs/SHARE_PAGE.md）。ログインなしで開く 1 枚のページ。地は Night（サムネのカードと同じ）。スマホ（390px）から PC まで。 */
:root {
  --night: #1b1715;
  --night-2: #2a2320;
  --paper: #faf5ec;
  --muted: #b5a99f;
  --orange: #ee6a2f;
  --orange-text: #f4895a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.sp {
  margin: 0;
  min-height: 100vh;
  background: var(--night);
  color: var(--paper);
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}
:lang(ko) body.sp, body.sp:lang(ko) { font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif; }
:lang(zh-Hant) body.sp, body.sp:lang(zh-Hant) { font-family: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif; }
a { color: inherit; }
.sp-bar { padding: 14px 16px 6px; max-width: 960px; width: 100%; margin: 0 auto; }
.sp-brand { display: inline-block; line-height: 0; }
.sp-brand img { height: 36px; width: auto; }
.sp-main { flex: 1; width: 100%; max-width: 960px; margin: 0 auto; padding: 8px 16px 24px; display: flex; flex-direction: column; gap: 20px; }
/* ログ画面のタイルと同じ見た目: 2 列・間なし・時刻は真ん中（style.css の .mframes と同じ字・影）。1 本だけなら全幅 */
.sp-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-radius: 12px; overflow: hidden; background: #000; }
.sp-grid.single { grid-template-columns: minmax(0, 1fr); }
/* 2×2 で 3 本のときの下の 1 本（横いっぱい。上の 2 つと同じ高さ） */
.sp-cell.wide { grid-column: 1 / -1; aspect-ratio: 32 / 9; }
.sp-cell { position: relative; aspect-ratio: 16 / 9; background: #000; container-type: inline-size; overflow: hidden; }
.sp-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.sp-time {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; pointer-events: none;
  color: rgba(255, 255, 255, .92); font: 500 clamp(13px, 6.5cqw, 28px) / 1 "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Noto Sans JP", sans-serif; letter-spacing: .02em; font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55), 0 0 1px rgba(0, 0, 0, .5);
  transform: translateZ(0);
}
.sp-cell.now .sp-time { color: var(--orange-text); }
/* 1 マス（layout single）: 1 つの枠で 1 本ずつ順に流す（share-page.js）。押すと止まる・もう一度押すと続き。下に何本目かの小さな点 */
.sp-seq { position: relative; border-radius: 12px; overflow: hidden; background: #000; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sp-seq-stage { position: relative; aspect-ratio: 16 / 9; container-type: inline-size; }
.sp-seq-item { position: absolute; inset: 0; opacity: 0; transition: opacity .18s ease; }
.sp-seq-item.on { opacity: 1; }
.sp-seq .sp-time { display: flex; align-items: center; justify-content: center; font-size: clamp(16px, 5cqw, 44px); }
.sp-seq-item.now .sp-time { color: var(--orange-text); }
.sp-seq-item.now .pub-memo { color: rgba(255, 255, 255, .92); }
.sp-seq-dots { position: absolute; left: 0; right: 0; bottom: 10px; z-index: 3; display: flex; justify-content: center; gap: 7px; pointer-events: none; }
.sp-seq-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .42); box-shadow: 0 0 2px rgba(0, 0, 0, .5); transition: background .18s ease, transform .18s ease; }
.sp-seq-dots span.on { background: #fff; transform: scale(1.15); }
.sp-seq.paused .sp-seq-dots span.on { background: var(--orange-text); }
@media (prefers-reduced-motion: reduce) { .sp-seq-item, .sp-seq-dots span { transition: none; } }
.sp-head { display: flex; flex-direction: column; gap: 2px; }
.sp-title { margin: 0; font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Noto Sans JP", sans-serif; font-weight: 900; font-size: clamp(22px, 5.5vw, 30px); line-height: 1.35; overflow-wrap: anywhere; }
:lang(ko) .sp-title, :lang(zh-Hant) .sp-title { font-family: inherit; }
.sp-by { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.sp-ended { padding: 24px 0 4px; }
.sp-ended h1 { margin: 0 0 6px; font-size: clamp(22px, 5.5vw, 28px); font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Noto Sans JP", sans-serif; font-weight: 900; }
.sp-ended p { margin: 0; color: var(--muted); }
.sp-head, .sp-cta { width: 100%; max-width: 760px; margin-inline: auto; }
.sp-cta { background: var(--night-2); border-radius: 16px; padding: 20px 18px; border-top: 4px solid var(--orange); }
.sp-cta h2 { margin: 0 0 6px; font-size: 20px; line-height: 1.4; }
.sp-cta p { margin: 0 0 16px; color: var(--muted); }
.sp-cta .sp-hook { margin: 0 0 6px; color: inherit; font-size: 18px; font-weight: 700; line-height: 1.5; }
.sp-cta .sp-sub { font-size: 13px; }
.sp-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sp-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1.5px solid rgba(250, 245, 236, .4); text-decoration: none; font-weight: 700; flex: 1 1 160px; text-align: center; }
.sp-btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.sp-btn:focus-visible { outline: 3px solid var(--paper); outline-offset: 2px; }
.sp-foot { padding: 12px 16px 24px; text-align: center; font-size: 12px; color: var(--muted); }
.sp-foot a { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .sp-btn { transition: none; } }

/* ---- 自分のログの公開（/explore・/explore/<ID>。server/src/public-logs.ts・explore.js）。地と字は共有ページと同じ ---- */
.pub-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pub-home { font-size: 14px; color: var(--muted); text-decoration: none; padding: 8px 4px; }
.pub-home:hover { color: var(--paper); }
.pub-feed { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.pub-day-link { display: flex; flex-direction: column; gap: 8px; text-decoration: none; border-radius: 14px; }
.pub-day-link:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }
.pub-day-link .sp-time { font-size: clamp(11px, 5cqw, 18px); }
.pub-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 2px; }
.pub-day-title { font-weight: 700; overflow-wrap: anywhere; }
.pub-day-count { color: var(--muted); font-size: 13px; white-space: nowrap; }
.pub-divider { grid-column: 1 / -1; color: var(--muted); font-size: 13px; padding-top: 6px; border-top: 1px solid rgba(250, 245, 236, .12); }
.pub-next { align-self: center; flex: 0 0 auto; min-width: 200px; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.pub-next:disabled { opacity: .6; }
.pub-empty { padding: 24px 0; }
/* ひとことは時刻の下（ログのタイルと同じ並び） */
.sp-time { flex-direction: column; gap: 4px; }
.pub-memo { display: block; max-width: 88%; font-size: max(11px, .5em); font-weight: 500; line-height: 1.3; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-cell .sp-time { display: flex; align-items: center; justify-content: center; }
/* 共有ページの枠のひとこと（2026-10-26。ログのタイルの .mf-caption と同じ: 時刻は真ん中のまま、ひとことはその下に最大 2 行・白・やわらかい影） */
.sp-cell .sp-time .pub-memo, .sp-seq .sp-time .pub-memo {
  position: absolute; left: 8%; right: 8%; top: calc(50% + clamp(10px, 4.2cqw, 20px)); max-width: none; margin: 0;
  font: 500 clamp(13px, 4.6cqw, 22px) / 1.3 "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif; letter-spacing: 0; font-variant-numeric: normal;
  white-space: normal; overflow-wrap: anywhere; text-overflow: clip;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  color: rgba(255, 255, 255, .95); text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 0 1px rgba(0, 0, 0, .5);
}
.sp-seq .sp-time .pub-memo { top: calc(50% + clamp(12px, 3.4cqw, 30px)); font-size: clamp(12px, 2.6cqw, 22px); }
/* 「時刻を表示」がオフの共有（2026-10-26）: 時刻は出さず、ひとことを枠の縦の真ん中に（時刻の位置に入れ替わる） */
.sp-cell .sp-time.no-time .pub-memo, .sp-seq .sp-time.no-time .pub-memo { top: 50%; transform: translateY(-50%); }
.pub-more { position: absolute; top: 6px; right: 6px; z-index: 3; width: 34px; height: 34px; border-radius: 999px; border: 0; background: rgba(0, 0, 0, .45); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.pub-more:focus-visible { outline: 3px solid var(--paper); }
.pub-menu { position: absolute; z-index: 20; min-width: 180px; background: var(--night-2); border: 1px solid rgba(250, 245, 236, .18); border-radius: 12px; padding: 6px; display: flex; flex-direction: column; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.pub-menu[hidden], .pub-menu [hidden] { display: none; }
.pub-menu button, .pub-menu a { all: unset; cursor: pointer; padding: 10px 12px; border-radius: 8px; }
.pub-menu button:hover, .pub-menu a:hover, .pub-menu button:focus-visible, .pub-menu a:focus-visible { background: rgba(250, 245, 236, .1); }
.pub-dialog { max-width: min(440px, calc(100vw - 32px)); width: 100%; background: var(--night-2); color: var(--paper); border: 1px solid rgba(250, 245, 236, .18); border-radius: 16px; padding: 18px; }
.pub-dialog::backdrop { background: rgba(0, 0, 0, .6); }
.pub-dialog h2 { margin: 0 0 6px; font-size: 19px; }
.pub-dialog fieldset { border: 0; padding: 0; margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.pub-dialog legend { font-weight: 700; margin-bottom: 4px; }
.pub-dialog textarea { width: 100%; min-height: 72px; background: var(--night); color: inherit; border: 1px solid rgba(250, 245, 236, .25); border-radius: 10px; padding: 8px; font: inherit; margin-bottom: 12px; }
.pub-dialog .sp-btn { background: transparent; color: inherit; font: inherit; cursor: pointer; }
.pub-dialog .sp-btn.primary { background: var(--orange); color: #fff; }
.pub-dialog .sp-btn:disabled { opacity: .5; cursor: default; }
.pub-dim { color: var(--muted); font-size: 13px; margin: 0; }
.pub-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30; background: var(--paper); color: var(--night); padding: 10px 16px; border-radius: 999px; font-size: 14px; max-width: calc(100vw - 32px); }
