/* TETE 共通スタイル(白ベース・モノクロ) */
:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --line-2: #d1d5db;
  --text: #111111;
  --muted: #6b7280;
  --accent: #111111;
  --ok: #1e7a4c;
  --warn: #b45309;
  --danger: #dc2626;
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); }
.wrap { max-width: 560px; margin: 0 auto; padding: 20px 16px 64px; }
.wide { max-width: 1160px; }
.brand { display: block; margin: 0 0 6px; }
.brand img { height: 34px; width: auto; display: block; }
h1 { font-size: 21px; margin: 6px 0 4px; line-height: 1.4; }
h2 { font-size: 16px; margin: 28px 0 10px; }
h3 { font-size: 15px; margin: 22px 0 8px; }
.muted { color: var(--muted); font-size: 13px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 14px 0; }
.card.dark { background: #111; color: #fff; border-color: #111; }
.card.dark .muted { color: #d1d5db; }
.card.soft { background: var(--soft); border-color: var(--soft); }
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=datetime-local], input[type=date], input[type=time], input[type=number], select {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2);
  background: #fff; color: var(--text); font-size: 16px; font-family: inherit;
}
input:focus, select:focus, button:focus-visible { outline: 2px solid #111; outline-offset: 1px; }

/* 選択ボタン(チップ) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; min-width: 64px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--line-2); background: #fff;
  color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.chip[aria-pressed=true] { background: #111; color: #fff; border-color: #111; font-weight: 700; }

/* 売り方の選択 */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode { text-align: left; padding: 14px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; font: inherit; color: var(--text); cursor: pointer; }
.mode b { display: block; font-size: 15px; }
.mode span { display: block; font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 4px; }
.mode[aria-pressed=true] { border: 2px solid #111; background: var(--soft); }
@media (max-width: 560px) { .modes { grid-template-columns: 1fr; } }

/* プラン(購入順) */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan { position: relative; margin: 0; color: var(--text); }
.plan input { position: absolute; opacity: 0; }
.plan span { display: block; text-align: center; padding: 16px 8px; border-radius: 12px; border: 1px solid var(--line-2); cursor: pointer; }
.plan b { display: block; font-size: 20px; }
.plan input:checked + span { border: 2px solid #111; background: var(--soft); }
.plan input:disabled + span { opacity: .4; cursor: not-allowed; }

/* 枠のグリッド(時間指定) */
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 520px) { .slots { grid-template-columns: repeat(4, 1fr); } }
.slot { min-height: 56px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; font: inherit; font-size: 15px;
  color: var(--text); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.3; }
.slot small { font-size: 11px; }
.slot[aria-pressed=true] { background: #111; color: #fff; border-color: #111; font-weight: 700; }
.slot:disabled { background: var(--soft); color: var(--muted); border-color: var(--soft); cursor: not-allowed; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text); }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: #111; }
.btn {
  display: inline-block; width: 100%; min-height: 52px; padding: 14px; border: 0; border-radius: 12px; font-size: 16px; font-weight: 700;
  background: #111; color: #fff; cursor: pointer; text-align: center; text-decoration: none; margin-top: 18px; font-family: inherit;
}
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.sub { background: #fff; border: 1px solid var(--line-2); color: var(--text); }
.btn.small { width: auto; min-height: 40px; padding: 8px 12px; font-size: 13px; margin: 0; }
.btn.danger { background: var(--danger); color: #fff; border: 0; }
.error { color: var(--danger); font-size: 14px; margin-top: 10px; min-height: 1em; }
.notice { padding: 12px 14px; background: var(--soft); border-radius: 10px; font-size: 13px; }
.big-time { font-size: clamp(26px, 8vw, 34px); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .01em; line-height: 1.2; }
.sticky { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 12px 16px 18px; margin: 0 -16px; }

/* 通話画面(映像なので暗い背景) */
.stage { position: fixed; inset: 0; background: #000; display: flex; flex-direction: column; color: #fff; }
.stage video.remote { flex: 1; width: 100%; height: 100%; object-fit: cover; background: #111; }
.stage video.self {
  position: absolute; right: 12px; top: 84px; width: 26vw; max-width: 150px; aspect-ratio: 3/4; object-fit: cover;
  border-radius: 12px; border: 2px solid rgba(255,255,255,.6); transform: scaleX(-1); background: #222; z-index: 3;
}
.watermark { position: absolute; inset: 0; pointer-events: none; background-repeat: repeat; z-index: 2; }
.hud { position: absolute; top: 0; left: 0; right: 0; padding: 14px 16px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; z-index: 3; }
.hud .pillbox { background: rgba(0,0,0,.6); border-radius: 12px; padding: 6px 12px; }
.hud .name { font-weight: 700; }
.timer { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; background: rgba(0,0,0,.6); border-radius: 20px; padding: 2px 14px; }
.timer.warn { color: #fcd34d; }
.timer.hot { color: #f87171; }
.toast { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); z-index: 6; padding: 10px 18px; border-radius: 999px; background: rgba(0,0,0,.8); font-weight: 700; display: none; }
.bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 16px 22px; display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; z-index: 3; }
.bar .btn.sub { background: rgba(255,255,255,.18); color: #fff; border: 0; }
.bar .btn.outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.8); }
.info { position: absolute; left: 16px; right: 16px; bottom: 82px; z-index: 3; background: rgba(0,0,0,.65); border-radius: 12px; padding: 10px 14px; font-size: 13px; line-height: 1.6; }
.rule { position: absolute; bottom: 66px; left: 0; right: 0; text-align: center; font-size: 11px; color: rgba(255,255,255,.7); z-index: 3; }
.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; z-index: 5; background: rgba(17,17,17,.92); color: #fff; }
.overlay .muted { color: #d1d5db; }
.hidden { display: none !important; }

/* 運営画面 */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; background: var(--soft); color: var(--text); }
.pill.ok { background: #dcfce7; color: #14532d; }
.pill.ng { background: #fee2e2; color: #7f1d1d; }
.scroll { overflow-x: auto; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.partrow { display: grid; grid-template-columns: 64px 1fr 1fr auto 44px; gap: 8px; align-items: center; margin-bottom: 8px; }
@media (max-width: 560px) { .partrow { grid-template-columns: 1fr 1fr; } .partrow .pn { grid-column: 1 / -1; } }
.banner { background: var(--danger); color: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 700; margin: 12px 0; }

/* 待機室(白) */
.overlay.waitroom { background: #fff; color: #111; align-items: flex-start; overflow-y: auto; padding: 16px; }
.overlay.waitroom .muted { color: var(--muted); }
.overlay.waitroom .card.dark .muted { color: #d1d5db; }
.wr { width: 100%; max-width: 480px; margin: 0 auto; text-align: left; }
.wselfbox { position: relative; border-radius: 16px; overflow: hidden; background: #2a2a2a; aspect-ratio: 4 / 3; }
.wselfbox video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.wtag { position: absolute; left: 10px; bottom: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 12px; }
.wchecks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wchecks .card { margin: 12px 0 0; padding: 12px; font-size: 14px; }
.okmark { color: var(--ok); }
.meterbar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.meterbar div { height: 100%; width: 0; background: var(--ok); transition: width .08s; }
