/* AKB48セトリメーカー。色とフォントは AKB48公式サイト（akb48official.com）に合わせる＝白地・ピンク #F676A6・文字 #333/#626262・
   游ゴシック→ヒラギノ（スマホは本体フォント・11/18 Noto Sans JP の読み込みをやめた）・見出しは太字＋英字の小見出し。セトリは打順表の形。スマホ優先。
   変数名は旧配色（紺・クリーム）のときのまま：--navy＝アクセント（ピンク）／--navy-deep＝濃いピンク／--chalk＝淡いピンク。 */
:root {
  --navy: #F676A6;
  --navy-deep: #E0558C;
  --ink: #333333;
  --sub: #626262;
  --pink: #F676A6;
  --pink-deep: #E0558C;
  --chalk: #FCE3EC;
  --paper: #FFFFFF;
  --field: #FFFFFF;
  --stripe: #FFF7FA;
  --line: #F9C9DB;
  --gray: #D0D0D0;
  --display: YuGothic, 'Yu Gothic', 'Hiragino Sans', 'ヒラギノ角ゴ ProN W3', 'Hiragino Kaku Gothic ProN', 'メイリオ', Meiryo, sans-serif;
  --body: YuGothic, 'Yu Gothic', 'Hiragino Sans', 'ヒラギノ角ゴ ProN W3', 'Hiragino Kaku Gothic ProN', 'メイリオ', Meiryo, sans-serif;
  --en: 'Dosis', sans-serif;
  --tabs-h: 60px;
  --player-h: 175px; /* Apple Music の1曲用プレーヤーの標準の高さ（92px だと再生ボタンが見切れる） */
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--field); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.6; padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); }
body.has-player { padding-bottom: calc(var(--tabs-h) + var(--player-h) + env(safe-area-inset-bottom)); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--pink-deep); outline-offset: 2px; }
a { color: var(--navy); }
[hidden] { display: none !important; }
.sl-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* スコアボード風のヘッダー */
.sl-head { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px 16px; background: var(--paper); color: var(--ink); border-bottom: 2px solid var(--pink); }
/* タイトルはユーザー支給のタイトルロゴ画像（AKB48＋セトリメーカー・11/17）。alt で文字として読める */
.sl-head__title { margin: 0; line-height: 0; }
.sl-head__titleimg { display: block; width: min(210px, 100%); height: auto; }

.sl-intro { max-width: 1120px; margin: 0 auto; padding: 14px 16px 0; font-size: 14px; }
.sl-intro p { margin: 0 0 6px; }
.sl-intro__closed { font-weight: 700; color: var(--pink-deep); }

.sl-main { max-width: 1120px; margin: 0 auto; padding: 8px 16px 24px; display: grid; gap: 20px; }
.sl-panel-head { display: flex; align-items: baseline; justify-content: space-between; margin: 8px 0 10px; }
.sl-panel-head h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--pink); }
.sl-count { font-size: 13px; color: var(--sub); }
/* 公演を選んで作る・やり直しの位置（11/17） */
.sl-panel-head__side { display: flex; align-items: center; gap: 10px; }
.sl-shownow { margin: 6px 0 0; font-weight: 700; color: var(--pink-deep); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
/* 小さな枠付きボタン（公演を変更・最初からやり直す・11/17 ユーザー指示で文字リンク風からボタンに）。「＋MC」などと同じ見た目の小型版 */
.sl-minibtn { padding: 5px 12px; border: 1px solid var(--pink); border-radius: 999px; background: var(--paper); color: var(--pink-deep); font: inherit; font-size: 13px; font-weight: 700; line-height: 1.3; cursor: pointer; white-space: nowrap; }
.sl-minibtn:hover, .sl-minibtn:focus-visible { background: var(--stripe); }
.sl-hero__reset { margin: 8px 0 0; }
.sl-showpick { width: min(92vw, 460px); border-radius: 18px; }
.sl-showpick__inner { padding: 22px 18px 16px; display: grid; gap: 12px; text-align: center; }
.sl-showpick__inner h2 { margin: 0 0 4px; font-size: 18px; color: var(--ink); }
.sl-showpick__btn { display: grid; gap: 2px; padding: 16px 12px; border: 2px solid var(--pink); border-radius: 14px; background: var(--paper); color: var(--ink); cursor: pointer; font: inherit; }
.sl-showpick__btn:hover, .sl-showpick__btn:focus-visible { background: var(--stripe); }
.sl-showpick__when { font-size: 14px; font-weight: 700; color: var(--pink-deep); }
.sl-showpick__name { font-size: 20px; font-weight: 700; }
.sl-showpick__draft { justify-self: center; margin-top: 4px; padding: 1px 10px; border-radius: 999px; background: var(--pink); color: #fff; font-size: 12px; font-weight: 700; }

/* 曲一覧 */
.sl-search input { width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: 999px; background: var(--paper); }
.sl-search input:focus { border-color: var(--pink); outline: none; }
/* 11/18 重さ点検: 曲の一覧が入るまで場所を空けておく（フッターが押し下げられて画面がずれるのを防ぐ・JS が body に is-ready を付ける） */
body.sl-maker:not(.is-ready) .sl-songlist { min-height: 100vh; }
.sl-songlist { list-style: none; margin: 12px 0 0; padding: 0; background: var(--paper); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.sl-song { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); }
.sl-song:first-child { border-top: 0; }
.sl-song__play { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--navy); background: var(--paper); color: var(--navy); font-size: 14px; }
.sl-song__play:hover { background: var(--navy); color: #fff; }
.sl-song__body { flex: 1; min-width: 0; }
.sl-song__title { margin: 0; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.sl-song__links { margin: 2px 0 0; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; }
.sl-svc { color: var(--sub); text-decoration: none; border-bottom: 1px solid var(--line); }
/* スマホ・タブレットでは Spotify を出さない（検索リンクがスマホのブラウザ版では空の検索画面になるため・PC は両方出す・11/17 ユーザー指示） */
@media (pointer: coarse) {
  .sl-svc--spotify { display: none; }
}
.sl-song__add { flex: none; min-width: 48px; height: 44px; padding: 0 10px; border: 0; border-radius: 999px; background: var(--pink); color: #fff; font-family: var(--display); font-weight: 700; font-size: 18px; }
.sl-song__add.is-used { background: var(--paper); color: var(--pink); box-shadow: inset 0 0 0 2px var(--pink); }

/* 打順表 */
.sl-card { background: var(--paper); border: 2px solid var(--pink); border-radius: 6px; }
.sl-rows { list-style: none; margin: 0; padding: 0; }
.sl-row { display: grid; grid-template-columns: 24px 58px 1fr auto; align-items: center; min-height: 58px; border-bottom: 1px solid var(--line); background: var(--paper); }
.sl-row:nth-child(even) { background: var(--stripe); }
.sl-row__handle { align-self: stretch; display: grid; place-items: center; color: var(--gray); cursor: grab; touch-action: none; user-select: none; font-size: 18px; }
.sl-row__no { align-self: stretch; display: grid; place-items: center; background: var(--pink); color: #fff; font-family: var(--en); font-weight: 600; font-size: 18px; }
.sl-row--song .sl-row__no { border-right: 0; }
.sl-row__main { box-sizing: border-box; display: block; padding: 8px 10px; min-width: 0; }
.sl-row__title { display: block; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.sl-row__who { display: block; font-size: 13px; color: var(--sub); }
.sl-row__who b { color: var(--pink-deep); }
.sl-row__slot { padding: 0 10px; color: var(--sub); }
.sl-row--kagenare .sl-row__no, .sl-row--overture .sl-row__no, .sl-row--mc .sl-row__no { background: var(--chalk); color: var(--pink); border-right: 0; }
.sl-row--encore, .sl-row--wencore { background: var(--chalk) !important; min-height: 44px; }
.sl-row--encore .sl-row__no, .sl-row--wencore .sl-row__no { background: transparent; }
.sl-row__section { padding: 0 10px; color: var(--pink); font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .08em; }
.sl-row--encore .sl-row__handle, .sl-row--wencore .sl-row__handle { color: var(--pink); }
.sl-row__ops { display: flex; gap: 2px; padding-right: 6px; }
.sl-row__ops button { width: 34px; height: 38px; border: 1px solid var(--gray); border-radius: 8px; background: var(--paper); color: var(--sub); font-size: 15px; }
.sl-row__ops button:disabled { opacity: .3; cursor: default; }
.sl-row--encore .sl-row__ops button, .sl-row--wencore .sl-row__ops button { background: var(--paper); border-color: var(--line); color: var(--pink); }
.sl-row.is-drag { opacity: .5; }
.sl-row.is-over { box-shadow: inset 0 3px 0 var(--pink-deep); }
.sl-empty { margin: 0; padding: 22px 16px; color: var(--sub); font-size: 14px; }
.sl-slots { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; border-top: 2px dashed var(--line); }
.sl-slots button { padding: 8px 12px; border: 1px solid var(--pink); border-radius: 999px; background: var(--paper); color: var(--pink); font-size: 14px; }
.sl-slots button:disabled { opacity: .35; cursor: default; }

.sl-finish { margin-top: 18px; display: grid; gap: 10px; }
.sl-reset-bottom { justify-self: center; }
.sl-nick span { display: block; font-size: 13px; margin-bottom: 4px; }
.sl-nick input { width: 100%; padding: 12px 14px; border: 2px solid var(--gray); border-radius: 10px; background: var(--paper); }
.sl-nick input:focus { border-color: var(--pink); outline: none; }
.sl-msg { margin: 0; font-size: 14px; min-height: 0; }
.sl-msg.is-error { color: var(--pink-deep); font-weight: 700; }
.sl-primary { display: block; width: 100%; padding: 15px 18px; border: 0; border-radius: 999px; background: var(--pink); color: #fff; font-family: var(--display); font-weight: 700; font-size: 18px; text-align: center; text-decoration: none; }
.sl-primary:hover { opacity: .85; }
.sl-primary:disabled { background: var(--gray); cursor: default; opacity: 1; }
.sl-secondary { display: block; width: 100%; padding: 13px 18px; border: 2px solid var(--pink); border-radius: 999px; background: var(--paper); color: var(--pink); font-weight: 700; text-align: center; text-decoration: none; }
.sl-text { background: none; border: 0; color: var(--sub); text-decoration: underline; font-size: 14px; padding: 6px; justify-self: center; }

/* 下のタブ（スマホ） */
.sl-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: 1fr 1fr; height: calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--paper); border-top: 2px solid var(--pink); }
.sl-tabs button { border: 0; background: none; color: var(--sub); font-weight: 700; font-size: 15px; }
.sl-tabs button[aria-current="true"] { color: var(--pink); box-shadow: inset 0 -4px 0 var(--pink); }
.sl-tabs span { display: inline-block; min-width: 24px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--pink); color: #fff; font-size: 13px; }
body[data-tab="songs"] .sl-lineup, body[data-tab="lineup"] .sl-songs { display: none; }

.sl-player { position: fixed; left: 0; right: 0; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); z-index: 19; height: var(--player-h); background: #000; display: flex; }
.sl-player__frame { flex: 1; }
.sl-player__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.sl-player__close { width: 44px; border: 0; background: #333; color: #fff; font-size: 20px; }

.sl-toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + 16px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 30; margin: 0; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.sl-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
body.has-player .sl-toast { bottom: calc(var(--tabs-h) + var(--player-h) + 16px + env(safe-area-inset-bottom)); }

/* 出演メンバーのシート */
dialog { border: 0; padding: 0; color: var(--ink); }
dialog::backdrop { background: rgba(0, 0, 0, .5); }

/* できあがり */
.sl-result { width: calc(100% - 32px); max-width: 640px; max-height: 92vh; border-radius: 16px; }
.sl-result__inner { padding: 18px 16px; display: grid; gap: 10px; }
.sl-result h2 { margin: 0; font-family: var(--display); font-weight: 700; color: var(--pink); }
.sl-result img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; max-height: 50vh; object-fit: contain; background: #F7F7F7; }
.sl-result__wait { margin: 0; color: var(--sub); }
.sl-result__actions { display: grid; gap: 8px; }
.sl-result form { text-align: center; }
.sl-result__hint { margin: 0; font-size: 13px; color: var(--sub); text-align: center; }

.sl-foot { text-align: center; padding: 24px 16px 32px; font-size: 13px; color: var(--sub); border-top: 1px solid var(--line); }
.sl-foot img { width: 80px; height: auto; }
.sl-foot p { margin: 4px 0; }
.sl-foot__note { max-width: 36em; margin: 4px auto !important; }

/* 閲覧ページ */
.sl-view-main { max-width: 900px; margin: 0 auto; padding: 16px; }
.sl-view-main h1 { font-family: var(--display); font-weight: 700; color: var(--pink); font-size: 24px; margin: 8px 0; }
.sl-view-card { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.sl-view-list { list-style: none; margin: 16px 0; padding: 0; background: var(--paper); border: 2px solid var(--pink); border-radius: 6px; }
.sl-view-list li { display: grid; grid-template-columns: 58px 1fr; border-bottom: 1px solid var(--line); }
.sl-view-list .sl-row__no { min-height: 48px; }
.sl-view-list .sl-view-body { padding: 8px 10px; }
.sl-view-cta { margin: 20px 0; }

/* PC：左に曲一覧、右に打順表 */
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  body.has-player { padding-bottom: var(--player-h); }
  .sl-tabs { display: none; }
  .sl-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; }
  body[data-tab] .sl-songs, body[data-tab] .sl-lineup { display: block; }
  .sl-lineup { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; padding-right: 4px; }
  body.has-player .sl-lineup { max-height: calc(100vh - var(--player-h) - 24px); }
  .sl-player { bottom: 0; }
  .sl-toast { bottom: 24px; }
  .sl-head { padding: 18px 32px; }
  .sl-head__titleimg { width: 270px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* トップ（告知）・使い方。公式サイトの見出し＝ピンクの日本語＋英字の小見出し */
.sl-page { max-width: 760px; margin: 0 auto; padding: 16px 16px 32px; }
.sl-section-title { margin: 24px 0 16px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1.3; color: var(--pink); }
.sl-section-title__en { display: block; font-family: var(--en); font-weight: 600; font-size: 15px; letter-spacing: .08em; }
.sl-hero { text-align: center; padding: 8px 0 24px; border-bottom: 1px solid var(--line); }
.sl-hero__logo { width: min(320px, 80%); height: auto; }
.sl-hero__catch { margin: 4px 0 8px; font-family: var(--display); font-weight: 700; font-size: clamp(18px, 5vw, 24px); color: var(--pink); }
.sl-concept { margin: 0 0 12px; line-height: 1.9; }
.sl-hero__event { margin: 12px 0 0; font-weight: 700; font-size: 18px; color: var(--pink); }
.sl-hero__date { margin: 2px 0 0; color: var(--ink); }
.sl-hero__lead { margin: 16px 0 20px; line-height: 1.8; }
.sl-hero__btn { max-width: 420px; margin: 0 auto; }
.sl-hero__howto { margin: 12px 0 0; font-size: 14px; }
.sl-hero__howto a, .sl-howto__skip a { color: var(--sub); }
.sl-info__list { margin: 0; display: grid; grid-template-columns: 7em 1fr; border-top: 1px solid var(--line); }
.sl-info__list dt, .sl-info__list dd { margin: 0; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.sl-info__list dt { font-weight: 700; color: var(--pink); }
.sl-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sl-step { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: start; padding: 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); }
.sl-step__no { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--pink); color: #fff; font-family: var(--en); font-weight: 600; font-size: 22px; }
.sl-step h2 { margin: 2px 0 4px; font-size: 17px; line-height: 1.4; }
.sl-step p { margin: 0; font-size: 14px; color: var(--sub); }
.sl-howto__go { max-width: 420px; margin: 24px auto 0; }
.sl-howto__skip { margin: 12px 0 0; text-align: center; font-size: 14px; }
body.sl-top, body.sl-howto { padding-bottom: 0; }
/* 利用規約（11/18） */
.sl-terms { line-height: 1.8; }
.sl-terms h2 { margin: 28px 0 8px; padding-left: 10px; border-left: 4px solid var(--pink); font-size: 17px; line-height: 1.5; }
.sl-terms p { margin: 0 0 10px; }
.sl-terms ul { margin: 0 0 10px; padding-left: 1.4em; }
.sl-terms a { color: var(--pink-deep); }
.sl-terms__contact { max-width: 420px; margin: 4px auto 16px !important; }
.sl-terms a.sl-secondary { color: var(--pink); }
.sl-terms__date { margin-top: 28px !important; text-align: right; color: var(--sub); font-size: 14px; }
.sl-foot__links { margin: 4px 0; }
.sl-foot__links a { color: var(--sub); }
.sl-finish__note { margin: 0; font-size: 13px; color: var(--sub); line-height: 1.6; }
.sl-finish__note a { color: var(--pink-deep); }

/* 最初の1曲の案内（maker-guide.js）。下の操作は邪魔しない＝暗幕なし・対象をピンクの枠で示す */
.is-guide-target { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 10px; animation: sl-guide-pulse 1.4s ease-in-out infinite; }
@keyframes sl-guide-pulse { 50% { outline-color: var(--line); } }
.sl-guide { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabs-h) + 12px + env(safe-area-inset-bottom)); z-index: 40; max-width: 520px; margin: 0 auto; padding: 14px 16px; border: 2px solid var(--pink); border-radius: 14px; background: var(--paper); box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }
body.has-player .sl-guide { bottom: calc(var(--tabs-h) + var(--player-h) + 12px + env(safe-area-inset-bottom)); }
.sl-guide__text { margin: 0 0 10px; font-weight: 700; color: var(--pink); font-size: 16px; }
.sl-guide__ops { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.sl-guide__next { padding: 8px 18px; border: 0; border-radius: 999px; background: var(--pink); color: #fff; font-weight: 700; }
.sl-guide__close { padding: 8px 12px; border: 1px solid var(--gray); border-radius: 999px; background: var(--paper); color: var(--sub); font-size: 13px; }
@media (min-width: 900px) { .sl-guide { bottom: 24px; } body.has-player .sl-guide { bottom: calc(var(--player-h) + 24px); } }
@media (prefers-reduced-motion: reduce) { .is-guide-target { animation: none; } }
/* 案内中は吹き出しの高さ分だけ下に余白を足す（一覧の最後の曲や「カードを作る」が隠れないように） */
body.is-guiding { padding-bottom: calc(var(--tabs-h) + 170px + env(safe-area-inset-bottom)); }
body.is-guiding.has-player { padding-bottom: calc(var(--tabs-h) + var(--player-h) + 170px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { body.is-guiding { padding-bottom: 170px; } body.is-guiding.has-player { padding-bottom: calc(var(--player-h) + 170px); } }
.sl-guide__text:focus { outline: none; }

/* タイトルはセトリメーカーのトップへのリンク（見た目は見出しのまま） */
.sl-head__home { color: inherit; text-decoration: none; }
/* 入っている曲の「✓」と、その場の選択肢（外す／もう1回入れる／やめる） */
.sl-song { flex-wrap: wrap; }
.sl-song__menu { flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; margin-top: 4px; border-radius: 10px; background: var(--stripe); border: 1px solid var(--line); }
.sl-song__menu p { flex: 1 0 100%; margin: 0; font-size: 13px; color: var(--sub); }
.sl-song__menu button { padding: 8px 14px; border: 1px solid var(--pink); border-radius: 999px; background: var(--paper); color: var(--pink); font-weight: 700; font-size: 14px; }
.sl-song__menu .sl-song__menu-cancel { border-color: var(--gray); color: var(--sub); font-weight: 400; }
