/* pomio web — design/デザイン仕様.md v1.0「シグナル」のトークンに準拠 */
* { box-sizing: border-box; }
body { margin: 0; background: #14171E; color: #EFF1F4; font-family: "Hiragino Sans", "Noto Sans JP", sans-serif; }
a { color: #ff8a8e; text-decoration: none; }
header { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px; background: #1D222C; height: 44px; }
header .logo { display: flex; align-items: center; }
header .logo img { height: 22px; display: block; }
button { border: 0; border-radius: 18px; padding: 8px 16px; background: #FF5A60; color: #fff; cursor: pointer; font-size: 0.95em; }
button.ghost { background: #262C38; }
input { border: 1px solid #2E3542; border-radius: 18px; padding: 8px 12px; background: #1D222C; color: #EFF1F4; font-size: 0.95em; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; padding: 16px; }
.card { background: #1D222C; border-radius: 14px; padding: 16px; cursor: pointer; }
.card .live { color: #FF5A60; font-size: 0.8em; font-weight: bold; }
.card h3 { margin: 6px 0; }
.card .meta { color: #8A93A5; font-size: 0.85em; }
.empty { text-align: center; color: #8A93A5; padding: 48px 16px; }

.watch-pc { display: flex; height: calc(100vh - 44px); overflow: hidden; }
.watch-pc .main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.watch-pc .chat { width: 320px; border-left: 1px solid #2E3542; display: flex; flex-direction: column; }
.watch-sp { display: flex; flex-direction: column; height: calc(100dvh - 44px); overflow: hidden; }
.watch-sp .chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }

video { width: 100%; background: #000; max-height: 50vh; object-fit: contain; }
.watch-pc video { flex: 1; max-height: none; min-height: 0; }
.stream-info { padding: 6px 14px; border-bottom: 1px solid #2E3542; }
.stream-info h2 { margin: 0 0 2px; font-size: 1em; }
.stream-info .meta { color: #8A93A5; font-size: 0.82em; }

.chat-log { flex: 1; overflow-y: auto; padding: 8px 10px; min-height: 0; }
.chat-log .msg { margin-bottom: 6px; font-size: 0.9em; line-height: 1.45; word-break: break-word; }
.chat-log .msg .name { color: #9FB4D8; margin-right: 6px; }
.chat-log .gift { background: linear-gradient(90deg, #FF5A60, #FF8A5C); border-radius: 10px; padding: 6px 10px; color: #fff; font-weight: bold; }
.chat-log .sys { color: #8A93A5; font-size: 0.8em; text-align: center; }
.chat-form { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid #2E3542; flex-shrink: 0; }
.chat-form input { flex: 1; min-width: 0; }
.chat-form button { flex-shrink: 0; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #262C38; color: #fff; padding: 10px 18px; border-radius: 20px; font-size: 0.9em; opacity: 0.95;
  max-width: min(92vw, 420px); text-align: center; line-height: 1.5; z-index: 1100; }
.toast a { color: var(--signal, #FF5A60); font-weight: 600; white-space: nowrap; }

.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; }
.modal { background: #1D222C; border-radius: 14px; padding: 22px; width: min(92vw, 360px); }
.modal h3 { margin-top: 0; }
.modal .row { margin-bottom: 10px; }
.modal input { width: 100%; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.hidden { display: none !important; }
.note { color: #8A93A5; font-size: 0.8em; }

/* ギフトモーダル */
.gift-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0; }
.gift-card { border: none; border-radius: 14px; padding: 18px 8px; background: linear-gradient(135deg, #FF5A60, #FF8A5C); color: #fff; cursor: pointer; text-align: center; transition: transform .15s, opacity .15s; }
.gift-card:hover { transform: scale(1.04); }
.gift-card:active { transform: scale(0.97); }
.gift-card:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.gift-card .gift-emoji { font-size: 1.8em; display: block; margin-bottom: 4px; }
.gift-card .gift-name { font-size: 0.82em; opacity: 0.9; }
.gift-card .gift-price { font-size: 1.1em; font-weight: bold; font-variant-numeric: tabular-nums; margin-top: 2px; }
.gift-comment { width: 100%; margin-bottom: 4px; }

/* 配信一覧カード: サムネイル(ライブプレビュー) + 配信名 + 配信者 */
.card { padding: 0; overflow: hidden; }
.thumb { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.thumb video, .thumb .thumb-img { width: 100%; height: 100%; max-height: none; object-fit: cover; display: block; }
.thumb .live { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.55); padding: 2px 8px; border-radius: 6px; }
.thumb .thumb-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #55607a; font-size: .85em; }
.card-body { padding: 10px 12px; }
.card-owner { display: flex; align-items: center; gap: 6px; color: #8A93A5; font-size: .85em; margin: 0 0 2px; }
.owner-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: #2E3542; }

/* 法務ページ(規約/プライバシー/ガイドライン/特商法)のリッチ表示 */
.legal { max-width: 740px; margin: 0 auto; padding: 8px 20px 72px; }
.legal h1 { font-size: 1.5em; margin: 18px 0 6px; }
.legal h2 { font-size: 1.15em; margin: 30px 0 10px; border-bottom: 1px solid #2E3542; padding-bottom: 6px; }
.legal h3 { font-size: 1em; margin: 20px 0 6px; color: #EFF1F4; }
.legal p, .legal li { line-height: 1.85; }
.legal ul, .legal ol { padding-left: 1.4em; margin: 8px 0; }
.legal li { margin: 5px 0; }
.legal strong { color: #fff; font-weight: 700; }
.legal a { color: #FF8A8E; }
.legal table { border-collapse: collapse; width: 100%; margin: 14px 0; font-size: .95em; }
.legal th, .legal td { border: 1px solid #2E3542; padding: 10px 12px; text-align: left; vertical-align: top; }
.legal th { background: #262C38; white-space: nowrap; width: 30%; }
.legal .lead { color: #8A93A5; margin: 4px 0 8px; }
.legal .updated { color: #8A93A5; font-size: .85em; margin-top: 28px; border-top: 1px solid #2E3542; padding-top: 12px; }
.legal .back { text-align: center; margin-top: 24px; }
