/* KPOS チュートリアルのページ(iPad・iPhone・パソコン)。明るい紙の色と、暗い画面の色の両方 */
:root { --bg: #f4f0e8; --card: #fffdf8; --ink: #2b2722; --soft: #6b6258; --line: #e3dccd; --accent: #a8323e; --gold: #b8975a; --seen: #3c6b2e; color-scheme: light dark; }
@media (prefers-color-scheme: dark) { :root { --bg: #171512; --card: #24201b; --ink: #f1e9da; --soft: #b8aa8d; --line: #3a342a; --accent: #e07a83; --gold: #c9a961; --seen: #8fc27a; } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif; -webkit-text-size-adjust: 100%; }
/* 上の帯は KPOS のアイコンと同じ: 生成りの地に朱の KPOS(Futura・下の線。2026-11-16 店主の指示) */
.tp-head { background: #f4efe6; color: #2b2722; padding: calc(18px + env(safe-area-inset-top, 0px)) 20px 16px; border-bottom: 3px solid #a8323e; }
.tp-head-in, .tp-main, .tp-player, .tp-foot { max-width: 1100px; margin: 0 auto; }
.tp-head h1 { margin: 0; display: flex; align-items: center; gap: 14px; font-size: 24px; letter-spacing: .08em; font-weight: 600; color: #2b2722; }
.tp-head h1 span { line-height: 24px; position: relative; top: -3px; } /* KPOS の文字と下の線を合わせた高さの真ん中に置く(2026-11-16 店主の指示) */
.tp-mark { height: 46px; width: auto; display: block; }
.tp-sub { margin: 6px 0 0; font-size: 14px; color: #6b6258; }
.tp-main { padding: 8px 16px 24px; }
.tp-loading { padding: 40px 0; text-align: center; color: var(--soft); }
.tp-group { margin-top: 22px; }
.tp-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.tp-group-head h2 { margin: 0; font-size: 20px; }
.tp-count { font-size: 13px; color: var(--soft); white-space: nowrap; }
.tp-note { margin: 6px 0 0; font-size: 14px; color: var(--soft); }
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 12px; }
.tp-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.tp-card:active { transform: scale(.985); }
.tp-thumb { position: relative; display: block; aspect-ratio: 16 / 10; background: #e9e3d6; }
.tp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tp-dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 12px; padding: 1px 6px; border-radius: 4px; }
.tp-seen { position: absolute; left: 6px; top: 6px; background: var(--seen); color: #fff; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.tp-card.is-seen .tp-thumb img { opacity: .75; }
.tp-card-text { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.tp-no { font-size: 12px; color: var(--soft); }
.tp-card-text strong { font-size: 16px; line-height: 1.4; }
.tp-desc { font-size: 13px; color: var(--soft); line-height: 1.5; }
.tp-player { padding: 12px 16px 24px; }
.tp-player-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.tp-player-group { color: var(--soft); font-size: 14px; }
.tp-video-wrap { background: #000; border-radius: 10px; overflow: hidden; }
.tp-video-wrap video { display: block; width: 100%; max-height: calc(100vh - 220px); background: #000; }
.tp-player-info h2 { margin: 12px 0 4px; font-size: 22px; }
.tp-player-desc { margin: 0; color: var(--soft); }
.tp-player-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.tp-btn { appearance: none; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 15px; padding: 10px 16px; border-radius: 8px; cursor: pointer; }
.tp-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; margin-left: auto; }
.tp-btn[hidden] { display: none; }
.tp-foot { padding: 20px 16px calc(24px + env(safe-area-inset-bottom, 0px)); text-align: center; font-size: 12px; color: var(--soft); }
body.is-playing .tp-head { display: none; }
/* 暗証番号の画面 */
.tp-gate { padding: 40px 16px; }
.tp-gate-box { max-width: 380px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.tp-gate-box label { font-weight: 700; font-size: 17px; }
.tp-gate-box input { font: inherit; font-size: 22px; letter-spacing: .2em; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.tp-gate-box .tp-btn-primary { margin-left: 0; font-size: 17px; }
.tp-gate-msg { margin: 0; min-height: 1.4em; color: var(--accent); font-size: 14px; }
.tp-gate-note { margin: 0; color: var(--soft); font-size: 13px; }
.tp-link { margin-top: 8px; border: 0; background: none; color: var(--soft); text-decoration: underline; font: inherit; font-size: 12px; cursor: pointer; }
.tp-link[hidden], .tp-gate[hidden], .tp-main[hidden] { display: none; }
