/* 共有ページ（/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;
  /* 枠の時刻・ひとことの大きさ（共有の画面の「大きさ」。中 = 1）。--sp-pick は選んだフォント（標準なら空）。docs/FONT_CHOICE.md */
  --sp-scale: 1;
  color-scheme: dark;
}
/* 共有の画面で選んだフォントと大きさ（src/shares.ts が html の data-font・data-font-size に入れる。標準・中なら付けない）。値の後ろのカンマは続きにつなぐためのもの */
html[data-font="pop"] { --sp-pick: "Mochiy Pop One",; }
html[data-font="soft"] { --sp-pick: "Potta One",; }
html[data-font="bold"] { --sp-pick: "Dela Gothic One",; }
html[data-font="pixel"] { --sp-pick: "DotGothic16",; }
html[data-font] .sp-time { font-synthesis: none; }
html[data-font-size="s"] { --sp-scale: .85; }
html[data-font-size="l"] { --sp-scale: 1.2; }
* { 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; }
/* 枠の静止画（動画の上に重ね、最初のコマが描かれたら share-page.js が隠す。video の poster は src を入れると黒になるため）。時刻・ひとこと（z-index 2）より下 */
.sp-poster { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.sp-poster.off { visibility: hidden; }
.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 calc(clamp(13px, 6.5cqw, 28px) * var(--sp-scale)) / 1 var(--sp-pick,) "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; }
.sp-seq-item.on { opacity: 1; }
.sp-seq .sp-time { display: flex; align-items: center; justify-content: center; font-size: calc(clamp(16px, 5cqw, 44px) * var(--sp-scale)); }
.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-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; }
/* みんなのログの上の帯は、スクロールしても上に貼りつける（2026-10-30 のオーナー「ホームへ戻るは固定追従」）。地の色を窓の幅いっぱいに敷く */
.pub .pub-bar { position: sticky; top: 0; z-index: 20; background: var(--night); box-shadow: 0 0 0 100vmax var(--night); clip-path: inset(0 -100vmax); padding-top: max(14px, env(safe-area-inset-top)); padding-bottom: 10px; }
.pub-home { font-size: 14px; color: var(--muted); text-decoration: none; padding: 8px 4px; }
.pub-home:hover { color: var(--paper); }
/* 1 日のページ（/explore/<ID>）は、スマホではログの画面と同じく縦 1 列・左右の余白ゼロ・動画どうしの間ゼロ・角 6px（2026-10-31 のオーナー） */
/* 2 本の日は 1 列（縦に並べる。2026-11-03 のオーナー） */
.pub-grid.pair { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 600px) {
  .pub-grid { grid-template-columns: minmax(0, 1fr); margin-inline: -16px; border-radius: 0; background: transparent; }
  .pub-grid .sp-cell { border-radius: 6px; }
}
.pub-feed { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }
/* みんなのログの一覧（/explore）は、上の帯と見出しの幅はそのまま、動画の一覧だけ窓の横幅いっぱいに広げる。列は最大 3 で、1 枚がいちばん大きくなる数
   （1 枚の幅 420px 以上が入るだけ。2026-11-01 のオーナー「動画のコンテンツ幅はウィンドウ横幅めいっぱい。最大３列で可能な限り動画を大きく」） */
.sp-main.pub-wide { max-width: none; }
.pub-wide .pub-feed { grid-template-columns: repeat(auto-fill, minmax(max(min(100%, 420px), calc((100% - 36px) / 3)), 1fr)); }
.pub-wide > .pub-next { align-self: center; }
.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) * var(--sp-scale)); max-width: none; margin: 0;
  font: 500 calc(clamp(13px, 4.6cqw, 22px) * var(--sp-scale)) / 1.3 var(--sp-pick,) "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) * var(--sp-scale)); font-size: calc(clamp(12px, 2.6cqw, 22px) * var(--sp-scale)); }
/* 「時刻を表示」がオフの共有（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); }
/* ワールド名（公開・共有ページで、本人が「ワールド名を出す」を選んだときだけ。2026-11-01）: ログの画面の .frame-world と同じ見た目（左下・薄い黒の角丸の札・🌐） */
.pub-world { position: absolute; left: 8px; bottom: 8px; z-index: 1; max-width: 60%; padding: 2px 8px; border-radius: 8px; background: rgba(0, 0, 0, .55); color: #fff; font-size: clamp(10px, 3cqw, 13px); line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
/* 抜粋に入らなかった本数（一覧のカードの最後の枠の右下。2026-11-03） */
.pub-rest { position: absolute; right: 8px; bottom: 8px; z-index: 1; padding: 2px 10px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: clamp(12px, 3.6cqw, 15px); font-weight: 700; line-height: 1.5; pointer-events: none; }
.sp-seq .pub-world { bottom: 26px; }
/* いいね（2026-11-04）: 1 日のページは枠の右下の丸いボタン（ログインしていない人は押すとログインへ）、一覧のカードは数だけを右上に */
.pub-like { position: absolute; right: 6px; bottom: 6px; z-index: 3; min-width: 44px; height: 36px; padding: 0 12px; box-sizing: border-box; border-radius: 999px; background: rgba(0, 0, 0, .5); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-size: 18px; line-height: 1; text-decoration: none; }
.pub-like-n { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pub-like:focus-visible { outline: 3px solid var(--paper); }
.pub-like-badge { position: absolute; top: 6px; right: 6px; z-index: 1; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: clamp(11px, 3.2cqw, 13px); font-weight: 700; line-height: 1.5; pointer-events: none; }

/* コンテストのページ（/contest・/contest/<slug>）と探す画面の先頭の受賞作・開催中の帯（server/src/contest.ts・/contest-page.js） */
.ct-top { display: flex; flex-direction: column; gap: 12px; }
.ct-hero { display: flex; flex-direction: column; gap: 6px; }
.ct-kicker { margin: 0; color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ct-title { margin: 0; }
.ct-desc { margin: 0; }
.ct-pill { display: inline-block; padding: 1px 10px; border-radius: 999px; border: 1px solid rgba(250, 245, 236, .35); color: var(--paper); font-size: 12px; font-weight: 700; }
.ct-pill.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.ct-pill.on.voting, .sp.app-colors .ct-pill.on.voting { background: #8a5cf6; border-color: #8a5cf6; color: #fff; }
.ct-pill.soon { background: var(--paper); border-color: var(--paper); color: #2a2320; }
/* 始まる前の「応募は 11/20 20:00 から」（応募できないことを目立たせる） */
.ct-soon { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 10px 16px; border-radius: 12px; border: 2px dashed currentColor; font-size: 16px; }
.ct-soon strong { font-weight: 800; }
.ct-pill.done { border-color: var(--orange-text); color: var(--orange-text); }
.ct-dates { color: var(--muted); }
.ct-vote-line { margin: 4px 0 0; font-size: 14px; }
.ct-vote-line .pub-dim, .pub-dim { color: var(--muted); }
.ct-h2 { margin: 6px 0 -8px; font-size: 16px; }
.ct-cell .ct-by { position: absolute; left: 8px; top: 8px; z-index: 1; max-width: calc(100% - 56px); padding: 2px 8px; border-radius: 8px; background: rgba(0, 0, 0, .5); color: #fff; font-size: clamp(10px, 3cqw, 12px); line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.ct-award { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); z-index: 2; max-width: calc(100% - 16px); padding: 2px 10px; border-radius: 999px; background: var(--orange); color: #fff; font-size: clamp(10px, 3.2cqw, 13px); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.ct-cell .ct-award + .ct-by { top: auto; bottom: 8px; left: auto; right: 8px; }
.ct-vote { position: absolute; right: 8px; bottom: 8px; z-index: 3; min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .75); background: rgba(0, 0, 0, .5); color: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: transform .12s ease, background-color .12s ease; }
.ct-vote:active { transform: scale(.94); }
.ct-vote:focus-visible { outline: 3px solid var(--paper); outline-offset: 2px; }
.ct-vote .ct-vote-on { display: none; }
.ct-vote[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); }
.ct-vote[aria-pressed="true"] .ct-vote-on { display: inline; }
.ct-vote[aria-pressed="true"] .ct-vote-off { display: none; }
/* コンテストの枠のワールド名は、公開のログと同じく左下（2026-11-01。前は右下の［投票する］を避けて 50px 上げていて、枠の途中に浮いて見えた）。
   ［投票する］は右下なので、幅だけかからないようにする。結果で名前が右下に来るときは、名前と半分ずつ */
.ct-cell .pub-world { bottom: 8px; max-width: calc(100% - 132px); }
.ct-cell:has(.ct-award) .pub-world, .ct-cell:has(.ct-award) .ct-award + .ct-by { max-width: calc(50% - 12px); }
.ct-shake { animation: ct-shake .3s; }
@keyframes ct-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .ct-shake { animation: none; } .ct-vote { transition: none; } }
/* 受賞作の大きな枠（.ct-grand。賞ごとの札は左上の .ct-win-tags に並べる） */
.ct-grand { display: flex; flex-direction: column; gap: 8px; }
.ct-grand-media { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; container-type: inline-size; box-shadow: 0 0 0 2px var(--orange); }
.ct-grand-media .sp-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.ct-grand-media:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }
.ct-grand-tag { position: absolute; left: 10px; top: 10px; z-index: 1; padding: 3px 12px; border-radius: 999px; background: var(--orange); color: #fff; font-size: clamp(11px, 2.6cqw, 15px); font-weight: 700; }
.ct-grand-line { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.ct-grand-line span { color: var(--muted); font-size: 14px; }
/* 受賞作を並べる（結果のページ・探す画面の先頭。1 本 = 大きく 1 枠・2 本 = 2 列・3 本 = 最初を大きく残りを 2 列。スマホは 2 本でも縦に） */
.ct-wins { display: flex; flex-direction: column; gap: 10px; }
.ct-wins-h { margin: 0; }
.ct-wins-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.ct-wins-grid > .ct-win { grid-column: span 2; min-width: 0; }
.ct-wins.n2 .ct-wins-grid > .ct-win, .ct-wins.n3 .ct-wins-grid > .ct-win:not(:first-child) { grid-column: auto; }
@media (max-width: 560px) { .ct-wins.n2 .ct-wins-grid > .ct-win { grid-column: span 2; } }
.ct-win-tags { position: absolute; left: 10px; top: 10px; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 20px); pointer-events: none; }
.ct-win-tags .ct-grand-tag { position: static; }
.ct-wins.n3 .ct-win:not(:first-child) .ct-grand-tag { padding: 2px 9px; font-size: clamp(10px, 4.2cqw, 13px); }
/* 開催中の帯・一覧 */
.ct-band { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "kicker go" "title go"; gap: 2px 12px; align-items: center; padding: 12px 16px; border-radius: 14px; background: linear-gradient(120deg, var(--orange), #f5a25e); color: #2a2320; text-decoration: none; }
.ct-band:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }
.ct-band-kicker { grid-area: kicker; font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ct-band .ct-pill { border-color: rgba(42, 35, 32, .4); color: #2a2320; background: rgba(255, 255, 255, .45); }
.ct-band .ct-dates { color: #2a2320; }
.ct-band-title { grid-area: title; font-size: 17px; overflow-wrap: anywhere; }
.ct-band-go { grid-area: go; font-weight: 700; background: rgba(255, 255, 255, .55); padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.ct-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
/* 応募作の数が奇数のとき、最後の空いたマスを黒くしない */
.ct-grid { background: transparent; }
/* 探す画面（横幅いっぱいの一覧）でも、先頭の大賞・開催中の帯は見出しと同じ幅に */
.pub-wide > .ct-top { width: 100%; max-width: 760px; margin-inline: auto; }
/* 応募の 1 行と［応募する］（コンテストのページの上。2026-11-01 のオーナー「応募までが長い」） */
.ct-enter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 6px; }
.ct-enter-line { margin: 0; flex: 1 1 240px; font-size: 14px; }
/* 応募のボタン・札と票の札の 1 行（中身が無ければ高さ 0） */
.ct-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 6px; }
.ct-actions:empty { display: none; }
.ct-actions .ct-enter { display: contents; }
.ct-actions .ct-vote-line { margin: 0; }
.ct-enter .ct-enter-btn { flex: 0 0 auto; min-height: 44px; padding: 0 26px; }
/* 小さな札（「〜12/6」「あと 3 本」「あと 3 票」。2026-11-19 のオーナー「文字情報多すぎるね」で、文の代わりに） */
.ct-tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 11px; border-radius: 999px; background: var(--night-2); color: var(--paper); font-size: 13px; font-weight: 700; line-height: 1.6; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ct-tag strong { font-weight: inherit; }
.ct-kicker .ct-tag { padding: 0 10px; font-size: 12px; line-height: 1.75; }
.ct-ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ct-ico.sm { width: 16px; height: 16px; }
.ct-ico.xl { width: 56px; height: 56px; stroke-width: 1.4; }
/* 流れの列（撮る → 応募 → 投票 → 受賞）。スマホ（390px）でも 1 行。いまの段に色 */
.ct-flowbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: 6px; }
.ct-steps-row { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; min-width: 0; }
.ct-step { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px 5px 8px; border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
.ct-step .ct-ico { width: 18px; height: 18px; }
.ct-step.on { background: var(--orange); color: #fff; }
.ct-step-arrow { color: var(--muted); opacity: .6; font-size: 14px; padding: 0 1px; }
.ct-flowbar .ct-about-link { margin: 0; font-size: 13px; margin-left: auto; }
@media (max-width: 380px) { .ct-step { padding: 4px 7px 4px 6px; font-size: 12px; gap: 3px; } .ct-step .ct-ico { width: 16px; height: 16px; } }
/* 応募作が 0 本のとき: 大きめのアイコンと 1 行だけ */
.ct-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 0 28px; color: var(--muted); text-align: center; }
.ct-empty p { margin: 0; font-size: 15px; font-weight: 700; }
/* コンテストについて（/contest/about。X の投稿に添える説明のページ）と、一覧・コンテストのページの上の「コンテストについて ›」 */
.ct-about-link { margin: 2px 0 0; font-size: 14px; }
.ct-about-link a { color: var(--orange-text); text-decoration: none; font-weight: 700; }
.ct-about-link a:hover { text-decoration: underline; }
.ct-about { width: 100%; max-width: 760px; margin-inline: auto; display: flex; flex-direction: column; gap: 26px; }
.ct-about-sec { display: flex; flex-direction: column; gap: 10px; }
.ct-about-h { margin: 0; font-size: 18px; line-height: 1.4; padding-left: 10px; border-left: 4px solid var(--orange); }
.ct-about-sec p { margin: 0; line-height: 1.75; }
.ct-about-note { color: var(--muted); font-size: 14px; }
.ct-about-note a { color: var(--orange-text); }
.ct-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 10px; counter-reset: ct-flow; }
.ct-flow li { counter-increment: ct-flow; background: var(--night-2); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.ct-flow li::before { content: counter(ct-flow); width: 26px; height: 26px; border-radius: 50%; background: var(--orange); color: #fff; font-size: 14px; font-weight: 700; display: grid; place-items: center; }
.ct-flow strong { font-size: 15px; line-height: 1.4; }
.ct-flow span { color: var(--muted); font-size: 14px; line-height: 1.65; }
.ct-steps, .ct-rules { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 6px; line-height: 1.75; }
.ct-steps li::marker { color: var(--orange-text); font-weight: 700; }
.ct-about .sp-actions { margin: 0; display: flex; }
.ct-about .sp-actions .sp-btn { flex: 0 1 auto; }
/* 「コンテストについて」の［‹ 戻る］ */
.ct-backline { margin: 0 0 -10px; }
.ct-back { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px solid rgba(250, 245, 236, .3); color: var(--paper); text-decoration: none; font-size: 14px; font-weight: 700; }
.ct-back:hover { border-color: var(--orange-text); color: var(--orange-text); }
.ct-back:focus-visible { outline: 3px solid var(--paper); outline-offset: 2px; }
/* 応募作を大きく見る（/contest-page.js。枠を押すと開く） */
.ct-cell, .ct-grand div.ct-grand-media { cursor: zoom-in; }
.ct-viewer { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: transparent; color: #fff; }
.ct-viewer::backdrop { background: rgba(10, 8, 7, .92); }
.ct-viewer-in { position: relative; box-sizing: border-box; height: 100%; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; padding: max(60px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
.ct-viewer-stage { position: relative; display: grid; place-items: center; min-height: 0; touch-action: pan-y; }
.ct-viewer-video { display: block; width: min(100%, calc((100dvh - 170px) * 16 / 9)); max-height: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; border-radius: 12px; }
.ct-viewer-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; width: 100%; max-width: 960px; margin: 0 auto; }
.ct-viewer-by { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.ct-viewer-award { padding: 2px 10px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 13px; font-weight: 700; }
.ct-viewer-world { color: var(--muted); font-size: 13px; }
.ct-viewer-bar .ct-vote { position: static; }
.ct-viewer-x { position: absolute; top: max(10px, env(safe-area-inset-top)); right: 12px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; font-size: 20px; cursor: pointer; }
.ct-viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .45); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.ct-viewer-nav.prev { left: 4px; }
.ct-viewer-nav.next { right: 4px; }
.ct-viewer-nav[hidden] { display: none; }
.ct-viewer-x:focus-visible, .ct-viewer-nav:focus-visible { outline: 3px solid var(--paper); outline-offset: 2px; }

/* 文書ごとの画面の移動（ログインしていない人のページ・サーバーのページとアプリの行き来）でも、新しい画面が描けるまで前の画面を出したままにする
   （真っ白・真っ暗の一瞬を出さない。2026-11-07 のオーナー「遷移自体に時間かかるのと、画面を全て構築し直してる感じが気になる」。対応していないブラウザは今までどおり） */
@view-transition { navigation: auto; }
/* かざり（飾り・見た目・音）のある共有: 書き出す動画と同じ描き方の canvas（share-page-deco.js。2026-11-09）。音は押したら鳴る */
.sp-deco { position: relative; display: grid; justify-items: center; gap: 8px; }
.sp-deco-canvas { display: block; width: 100%; max-height: 78vh; object-fit: contain; border-radius: 12px; background: #000; }
.sp-bgm { min-height: 40px; padding: 6px 16px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; background: var(--orange, #ee6a2f); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.sp-bgm[aria-pressed="true"] { background: #2a2320; }
.sp-bgm-mark { position: absolute; top: 8px; right: 8px; padding: 2px 9px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-weight: 700; pointer-events: none; }
/* ログインしている人のコンテストのページは、アプリと同じ明暗（端末の明るい・暗いの設定。style.css の :root と同じ色）。
   ログインしている人の /explore はアプリの殻（アプリの色）で出るのに、コンテストのページだけ Night のままでホームと合っていなかった（2026-11-19）。
   ログインしていない人・共有のページ（/v/・/s/）は今までどおり Night。印は body（アプリの中ではシャドウの .ct-app-body）の .app-colors */
@media (prefers-color-scheme: light) {
  .sp.app-colors {
    --night: #faf5ec;
    --night-2: #f0e6d7;
    --paper: #2a2320;
    --muted: #6e625b;
    --orange-text: #b4431a;
    /* 左のメニュー・下のタブ（appnav.css）もアプリの明るい色に */
    --bg: #faf5ec;
    --surface: #fffdf8;
    --text: #2a2320;
    --line: #e6dccb;
    --link: #b4431a;
    --accent: #ee6a2f;
    --accent-text: #2a2320;
    color-scheme: light;
  }
  .sp.app-colors .sp-btn:not(.primary) { border-color: rgba(42, 35, 32, .3); }
  .sp.app-colors .ct-pill.soon { background: #2a2320; border-color: #2a2320; color: #fff; }
  .sp.app-colors .ct-pill:not(.on):not(.done):not(.soon), .sp.app-colors .ct-back { border-color: rgba(42, 35, 32, .3); }
  .sp.app-colors .pub-divider { border-top-color: rgba(42, 35, 32, .12); }
  .sp.app-colors .pub-menu, .sp.app-colors .pub-dialog { background: #fffdf8; border-color: rgba(42, 35, 32, .14); box-shadow: 0 8px 24px rgba(42, 35, 32, .18); }
  .sp.app-colors .pub-menu button:hover, .sp.app-colors .pub-menu a:hover, .sp.app-colors .pub-menu button:focus-visible, .sp.app-colors .pub-menu a:focus-visible { background: rgba(42, 35, 32, .06); }
  .sp.app-colors .pub-dialog textarea { border-color: rgba(42, 35, 32, .25); }
  .sp.app-colors .sp-brand .logo-dark { display: none; }
}
.sp-brand .logo-light { display: none; }
@media (prefers-color-scheme: light) { .sp.app-colors .sp-brand .logo-light { display: inline-block; } }
/* アプリと同じ明暗のページでは、オレンジの面の上の字をアプリと同じ Ink に（style.css の .btn = --accent-text。brand/BRAND.md「Orange の面に載せる文字は Ink。白文字は使わない」）。
   動画の上に重ねる札（黒い半透明の地）は白のまま */
.sp.app-colors .sp-btn.primary, .sp.app-colors .ct-step.on, .sp.app-colors .ct-pill.on, .sp.app-colors .ct-award, .sp.app-colors .ct-grand-tag,
.sp.app-colors .ct-vote[aria-pressed="true"], .sp.app-colors .ct-flow li::before, .sp.app-colors .ct-viewer-award { color: #2a2320; }
.sp.app-colors .ct-vote[aria-pressed="true"] { border-color: var(--orange); }
