/* =====================================================
   カラオケ最安値 — karaoke-saiyasu.com
   独立したデザインシステム。yasuda-dev.com のトークンは継承しない。

   親サイトは「オフホワイト＋朱色・グラデーション禁止・ダークモード無し」
   だが、これは別ドメインの別プロダクトなので方針を分けている:

     - 暗い画面   … カラオケは夜の遊びで、店内も暗い。実際に使う時間帯に合う
     - ネオン     … 発光表現にグラデーション(放射状)を使う。親の禁止事項から外れる
     - 数字が主役 … 比べに来ているので、金額が画面で一番強い要素

   ビルド無し・フレームワーク無しは親サイトと同じ。
   ===================================================== */

/* Outfit は自前で配信する。Google Fonts から読むと fonts.googleapis.com と
   fonts.gstatic.com への接続(DNS+TLS)が2本増え、価格の書体が出るまで待たされる。
   可変フォント1本に 500〜800 が入っている。ライセンスは fonts/OFL.txt (SIL OFL 1.1)。
   ￥(U+00A5) は latin サブセットに含まれるので、金額もこの書体で出る */
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("fonts/outfit-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* 面 */
  --bg:        #0A0812;   /* 紫みのある黒。純黒より部屋の暗さに近い */
  --surface:   #191324;
  --surface-2: #221A33;
  --line:      #2E2542;
  --line-soft: #241D36;

  /* 文字 */
  --fg:     #F6F3FF;
  --muted:  #B9AFD0;      /* --surface 上で 9:1 以上。暗所で読める下限を確保 */
  --dim:    #8A81A3;

  /* ネオン */
  --neon:      #FF2E88;   /* マゼンタ。価格と主要導線 */
  --neon-ink:  #FF6FAC;   /* 細い文字に使う明るい側 */
  --cyan:      #35E6E0;   /* 一室料金など、性質の違いを示す第二色 */
  --gold:      #FFC857;   /* 1位 */

  --neon-glow: 0 0 24px rgba(255, 46, 136, .45);
  --cyan-glow: 0 0 20px rgba(53, 230, 224, .35);

  /* 欧文と数字。和文は端末のフォント(iOSならヒラギノ)に任せて読み込みを軽くする */
  --font: "Outfit", -apple-system, BlinkMacSystemFont, "Hiragino Sans",
          "Yu Gothic UI", Meiryo, "Noto Sans JP", sans-serif;

  --container: 600px;
  --gutter: 16px;
  --r: 16px;              /* 角丸。親サイトの直角とは変えて、やわらかく */
  --r-sm: 10px;
  --tap: 48px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ステージ照明。上から差す光で「箱の中」の空気を作る。
   固定背景にして、スクロールしても光源が動かないようにする */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(90% 44% at 18% -8%, rgba(255, 46, 136, .20), transparent 62%),
    radial-gradient(80% 40% at 88% -4%, rgba(53, 230, 224, .14), transparent 60%);
}

a { color: inherit; }
img, svg { display: block; max-width: 100%; height: auto; }

.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter) calc(64px + env(safe-area-inset-bottom));
}

/* ---------------------------------------------- ヘッダー */

.hd {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(10, 8, 18, .82);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.hd__in {
  max-width: var(--container);
  margin: 0 auto;
  padding: calc(10px + env(safe-area-inset-top)) var(--gutter) 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hd__mark {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  color: var(--neon);
  filter: drop-shadow(0 0 8px rgba(255, 46, 136, .6));
}

.hd__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .02em;
}

.hd__city {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.hd__count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------------------------------------------- 見出し */

.lede {
  margin: 20px 0 0;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: .01em;
}

.lede em {
  font-style: normal;
  color: var(--neon-ink);
  text-shadow: var(--neon-glow);
}

.lede-sub {
  margin: 8px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}

/* ---------------------------------------------- パネル */

.panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  margin-top: 12px;
}

.panel__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--dim);
  text-transform: uppercase;
}

.note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}

.note--warn { color: var(--neon-ink); }

/* ---------------------------------------------- 人数 */

.people {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.people__n {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

/* 単位だけ小さく。数字側にも当たると人数が目立たなくなる */
.people__n span:last-child {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 5px;
}

.steppers { display: flex; gap: 10px; }

.step {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--fg);
  font-family: inherit;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: transform 120ms var(--ease), border-color 120ms var(--ease),
              box-shadow 120ms var(--ease);
}

.step:hover { border-color: var(--neon); }
.step:active { transform: scale(.92); box-shadow: var(--neon-glow); }
.step:disabled { opacity: .3; cursor: default; }

/* ---------------------------------------------- チップ */

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.chip {
  min-height: var(--tap);
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms var(--ease), color 120ms var(--ease),
              border-color 120ms var(--ease), background 120ms var(--ease);
}

.chip:active { transform: scale(.95); }
.chip:hover { color: var(--fg); border-color: var(--dim); }

.chip.is-on {
  background: var(--neon);
  border-color: var(--neon);
  color: #fff;
  box-shadow: var(--neon-glow);
}

/* ---------------------------------------------- スライダー */

.slider-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 14px;
}

.slider-head strong {
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: var(--tap);
  background: transparent;
  margin: 0;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -11px;
  border-radius: 50%;
  border: none;
  background: var(--neon);
  box-shadow: 0 0 0 4px rgba(255, 46, 136, .18), var(--neon-glow);
}
input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
}
input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 0 4px rgba(255, 46, 136, .18), var(--neon-glow);
}

/* 入店と退店の差。スライダーを2本置くと「で、何時間？」が読み取れないので出す */
.span {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.span strong {
  color: var(--cyan);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------- ボタン */

.btn {
  min-height: var(--tap);
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--neon);
  background: var(--neon);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--neon-glow);
  transition: transform 120ms var(--ease), filter 120ms var(--ease);
}

.btn:active { transform: scale(.96); }
.btn:hover { filter: brightness(1.1); }
.btn.is-off {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--muted);
  box-shadow: none;
}

/* ---------------------------------------------- 条件サマリーバー */

/* 条件パネルを過ぎたら出る。何の条件で並んでいるかを見失わせない。
   sticky だと非表示のときも高さを取り、条件パネルと結果の間に空白が残るので
   fixed で浮かせる。位置は .wrap と同じ幅・中央揃えに合わせる */
.bar {
  position: fixed;
  top: calc(52px + env(safe-area-inset-top));
  left: 50%;
  width: min(calc(100% - 32px), calc(var(--container) - 32px));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(25, 19, 36, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  opacity: 0;
  transform: translateX(-50%) translateY(-8px);
  pointer-events: none;
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}

.bar.is-on { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
.bar__txt { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar__edit { flex: 0 0 auto; color: var(--neon-ink); font-weight: 700; }

/* ---------------------------------------------- 節約バナー */

/* flex にすると <strong> が別の行送り単位になり、文が三つに割れて折り返す。
   1文なので通常のインライン組みで扱う */
.save {
  margin: 16px 0 0;
  padding: 13px 16px;
  border-radius: var(--r);
  border: 1px solid rgba(53, 230, 224, .35);
  background: rgba(53, 230, 224, .07);
  color: var(--cyan);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
}

.save strong {
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-shadow: var(--cyan-glow);
  white-space: nowrap;
}

/* ---------------------------------------------- 結果 */

.results { list-style: none; margin: 14px 0 0; padding: 0; }
.results > li + li { margin-top: 10px; }
.results.is-loading { min-height: 240px; }

/* 固定バーの下に潜らせない */
.results > li { scroll-margin-top: 108px; }

.empty {
  padding: 20px 16px;
  border: 1px dashed var(--line);
  border-radius: var(--r);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.r {
  position: relative;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

/* 1位だけネオンで囲う。一覧の中で目線が最初に落ちる場所を作る */
.r.is-top {
  border-color: var(--neon);
  background: linear-gradient(180deg, rgba(255, 46, 136, .10), rgba(255, 46, 136, 0) 55%), var(--surface);
  box-shadow: 0 0 0 1px rgba(255, 46, 136, .35), 0 8px 40px rgba(255, 46, 136, .16);
}

.r-head { display: flex; align-items: flex-start; gap: 11px; }

.r-rank {
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  margin-top: 1px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--dim);
  font-size: 12.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
}

.r.is-top .r-rank {
  background: var(--gold);
  border-color: var(--gold);
  color: #2A1B00;
  box-shadow: 0 0 16px rgba(255, 200, 87, .45);
}

.r-id { min-width: 0; flex: 1 1 auto; }

.r-name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.r-meta { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }

/* 最寄駅は公式サイトの記述をそのまま持っているので、
   「（ページ表記は…国道1号線沿い）」のような注釈が付いた店がある。
   1行に切る — カードの主役は駅名の但し書きではなく金額 */
.r-station {
  margin: 1px 0 0;
  font-size: 12px;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 価格。ここが画面で一番強い */
.r-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 12px 0 0;
}

.r-total {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
  color: var(--neon-ink);
}

.r.is-top .r-total { text-shadow: var(--neon-glow); }

/* 「￥1,160〜」の〜。桁の読み取りを邪魔しない大きさに落とす */
.r-tilde { font-size: 19px; font-weight: 700; color: var(--muted); margin-left: 1px; }

.r-per {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.r-plan {
  margin: 9px 0 0;
  padding: 9px 11px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.r-plan b { color: var(--fg); font-weight: 600; }
.r-plan .until { color: var(--cyan); font-weight: 700; }

.r-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }

.tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.tag--room {
  background: rgba(53, 230, 224, .1);
  border-color: rgba(53, 230, 224, .45);
  color: var(--cyan);
}

/* 下限表記。総額の意味が他店と揃わないので、灰色のタグに紛れさせない */
.tag--warn {
  background: rgba(255, 200, 87, .1);
  border-color: rgba(255, 200, 87, .45);
  color: var(--gold);
}

.r-acts { display: flex; gap: 8px; margin-top: 12px; }

.act {
  flex: 1 1 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--fg);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 120ms var(--ease), border-color 120ms var(--ease);
}

.act:active { transform: scale(.97); }
.act:hover { border-color: var(--dim); }

.act--main {
  background: var(--neon);
  border-color: var(--neon);
  color: #fff;
}
.act--main:hover { border-color: var(--neon); filter: brightness(1.1); }

.act svg { width: 15px; height: 15px; flex: 0 0 auto; }

.more { margin: 14px 0 0; text-align: center; font-size: 12px; color: var(--dim); }

/* ---------------------------------------------- フッター */

.foot {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  line-height: 1.75;
  color: var(--dim);
}

.foot p { margin: 0 0 6px; }
.foot a { color: var(--muted); }

/* ---------------------------------------------- 配慮 */

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  html { scroll-behavior: auto; }
}

/* 発光は装飾。ハイコントラスト設定では影を消して輪郭で見せる */
@media (prefers-contrast: more) {
  :root { --neon-glow: none; --cyan-glow: none; }
  .r.is-top { background: var(--surface); }
}
