/* ==========================================================
   chot.chat modern UI overrides
   既存CSS（styles/index/frontend）の後に読み込んで上書きする
   ========================================================== */
:root {
  --cc-blue: #3b9cff;
  --cc-blue-dark: #1f7fe6;
  --cc-cyan: #19d3f0;
  --cc-grad: linear-gradient(120deg, #3b9cff 0%, #19d3f0 100%);
  --cc-ink: #1d2433;
  --cc-text: #4a5468;
  --cc-muted: #8590a6;
  --cc-line: #e7ecf3;
  --cc-bg: #f5f8fc;
  --cc-tint: #eef6ff;
  --cc-radius: 16px;
  --cc-radius-sm: 10px;
  --cc-shadow: 0 1px 2px rgba(20, 40, 80, .04), 0 6px 20px rgba(20, 40, 80, .06);
  --cc-shadow-hover: 0 2px 4px rgba(20, 40, 80, .05), 0 14px 32px rgba(20, 40, 80, .10);
}

body {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Segoe UI", Roboto, Meiryo, sans-serif !important;
  color: var(--cc-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: .02em;
}
a { transition: color .15s ease, background-color .15s ease, box-shadow .15s ease, transform .15s ease; }

/* ---------- ボタン共通 ---------- */
.btn { border-radius: 999px; font-weight: 600; transition: all .18s ease; }
.btn:focus, .btn.focus { box-shadow: 0 0 0 .2rem rgba(59, 156, 255, .25) !important; }

/* ---------- ナビゲーション ---------- */
.navbar .btn-teal,
.subpage_navbar .btn-teal {
  border-radius: 999px !important;
  border: 0 !important;
  background: rgba(255, 255, 255, .92) !important;
  color: var(--cc-blue-dark) !important;
  font-size: .9rem;
  font-weight: 700;
  padding: .5rem 1.25rem !important;
  box-shadow: 0 2px 10px rgba(20, 60, 120, .12);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.navbar .btn-teal:hover,
.subpage_navbar .btn-teal:hover {
  background: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(20, 60, 120, .18);
}
.navbar .dropdown-menu {
  border: 1px solid var(--cc-line);
  border-radius: 14px;
  box-shadow: var(--cc-shadow-hover);
  overflow: hidden;
  padding: .35rem;
}
.navbar .dropdown-item { border-radius: 10px; }
.navbar .dropdown-item:hover { background: var(--cc-tint); color: var(--cc-blue-dark); }

/* ---------- ヒーロー ---------- */
.main_cta .join {
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--cc-grad) !important;
  box-shadow: 0 8px 24px rgba(31, 127, 230, .35);
  font-weight: 700;
  letter-spacing: .08em;
}
.main_cta .join:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(31, 127, 230, .45);
  color: #fff;
  text-decoration: none;
}

/* ---------- セクション見出し ---------- */
section.home_usage { padding-top: 4.5rem; padding-bottom: 4.5rem; }
#chatrooms { padding-top: 4rem; }
#chatrooms .row.home_usage { padding: 0 0 1.25rem !important; margin-top: 0 !important; }
.home_usage h3 {
  color: var(--cc-ink) !important;
  font-weight: 800;
  font-size: 1.85rem;
  letter-spacing: .06em;
  line-height: 1.35;
}
.home_usage h3 small {
  display: inline-block;
  margin-bottom: .5rem;
  color: var(--cc-blue) !important;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.home_usage h3 + p,
.home_usage .col > p { color: var(--cc-muted); }
.bg_blue { background: var(--cc-bg) !important; }

/* ---------- 検索・絞り込み ---------- */
#chatrooms .input-group {
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--cc-shadow);
  border: 1px solid var(--cc-line);
  padding: 4px;
  flex-wrap: nowrap;
}
#search_chatroom {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding-left: 1.1rem;
  height: 44px;
}
#search_chatroom::placeholder { color: #a7b0c2; }
#clear_search,
#search_chatroom_btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0 !important;
  border-radius: 999px !important;
  margin-left: 4px;
}
#clear_search { background: #f1f3f7 !important; color: var(--cc-muted) !important; }
#clear_search:hover { background: #ffe9ec !important; color: #e5484d !important; }
#search_chatroom_btn { background: var(--cc-grad) !important; color: #fff !important; }

#serch_key p { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .75rem 0 1rem; color: var(--cc-muted); font-size: .85rem; }
#serch_key .btn {
  margin: 0;
  border: 1px solid var(--cc-line) !important;
  background: #fff !important;
  color: var(--cc-text) !important;
  font-weight: 600;
  padding: .3rem .95rem;
  box-shadow: 0 1px 2px rgba(20, 40, 80, .04);
}
#serch_key .btn:hover { border-color: var(--cc-blue) !important; color: var(--cc-blue-dark) !important; background: var(--cc-tint) !important; }

.room-sort { padding-top: .75rem; }
.room-sort .input-group { border-radius: 999px; overflow: hidden; border: 1px solid var(--cc-line); background: #fff; box-shadow: 0 1px 2px rgba(20, 40, 80, .04); flex-wrap: nowrap; }
.room-sort select,
.room-sort .input-group-text { border: 0 !important; background: transparent !important; height: 36px !important; }
.room-sort select { padding-left: 1rem; color: var(--cc-text); }
.room-sort .input-group-text { color: var(--cc-muted); }

/* ---------- チャットルームカード ---------- */
.chatroom-card {
  border: 1px solid var(--cc-line) !important;
  border-radius: var(--cc-radius) !important;
  box-shadow: var(--cc-shadow) !important;
  overflow: hidden;
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
}
.chatroom-card:hover { transform: translateY(-3px); box-shadow: var(--cc-shadow-hover) !important; }
.chatroom-card .header { background: transparent !important; }
.chatroom-card .title {
  color: var(--cc-ink) !important;
  font-weight: 700 !important;
  letter-spacing: .02em;
}
.chatroom-card .text { color: var(--cc-muted) !important; }
.chatroom-card .number {
  color: var(--cc-ink) !important;
  font-weight: 800 !important;
  font-variant-numeric: tabular-nums;
}
.chatroom-card .number-title { color: var(--cc-muted) !important; }
.chatroom-card .join {
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--cc-grad) !important;
  color: #fff !important;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(31, 127, 230, .28);
}
.chatroom-card .join:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(31, 127, 230, .38); text-decoration: none; }

/* 小サイズ表示（トップの既定） */
#chat-room-loop a { text-decoration: none !important; }
#chat-room-loop .card.sml {
  border: 1px solid var(--cc-line) !important;
  border-radius: var(--cc-radius) !important;
  box-shadow: var(--cc-shadow);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
#chat-room-loop a:hover .card.sml {
  transform: translateY(-3px);
  box-shadow: var(--cc-shadow-hover);
  border-color: #cfe3ff !important;
}
#chat-room-loop .card.sml .card-sml { background-color: var(--cc-bg) !important; }
#chat-room-loop .card.sml .card-header {
  background: transparent !important;
  border-bottom: 0 !important;
  padding-bottom: 0;
  padding-top: 1.1rem;
}
#chat-room-loop .card.sml .card-title {
  color: var(--cc-ink) !important;
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  letter-spacing: .02em;
}
#chat-room-loop .card.sml .card-text { color: var(--cc-muted) !important; font-size: .85rem; }
#chat-room-loop .card.sml .number {
  color: var(--cc-ink) !important;
  font-weight: 800 !important;
  font-size: 1.9rem !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
#chat-room-loop .card.sml .number-title { color: var(--cc-muted) !important; font-weight: 600 !important; font-size: .72rem !important; }
#chat-room-loop a:hover .col-4,
#chat-room-loop a:hover .col-8 { opacity: 1 !important; }
#chat-room-loop a .join_room,
#chat-room-loop a:hover .join_room {
  opacity: 1 !important;
  position: absolute !important;
  top: auto !important;
  left: auto !important;
  right: 1rem !important;
  bottom: 1rem !important;
  width: auto !important;
  height: auto !important;
  background: transparent !important;
}
#chat-room-loop .join_room span {
  top: 0 !important;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem 1rem !important;
  border-radius: 999px !important;
  background: var(--cc-tint) !important;
  color: var(--cc-blue-dark) !important;
  font-size: .82rem;
  font-weight: 700;
  transition: all .2s ease;
}
#chat-room-loop .join_room span::after {
  content: "\f061";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: .75em;
}
#chat-room-loop a:hover .join_room span {
  background: var(--cc-grad) !important;
  color: #fff !important;
  box-shadow: 0 6px 14px rgba(31, 127, 230, .3);
}

#load-more {
  background: #fff !important;
  color: var(--cc-blue-dark) !important;
  border: 1px solid var(--cc-line) !important;
  padding: .6rem 2rem;
  font-size: .9rem;
  box-shadow: var(--cc-shadow);
}
#load-more:hover { border-color: var(--cc-blue) !important; transform: translateY(-1px); }
#load-more-end { color: var(--cc-muted); }

#chatrooms p.card {
  border: 0 !important;
  border-radius: var(--cc-radius);
  background: var(--cc-tint);
  color: var(--cc-text);
  line-height: 1.9;
}

/* ---------- 使い方・便利な機能 ---------- */
#howtouse h4,
#useful h4 {
  color: var(--cc-ink);
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 1rem;
}
.steps {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 28px !important;
  height: 28px !important;
  line-height: 1 !important;
  margin: 0 !important;
  font-size: .85rem !important;
  font-weight: 800;
  background: var(--cc-grad) !important;
  box-shadow: 0 4px 10px rgba(31, 127, 230, .3);
}
#howtouse img.bordere2e2e2 {
  border: 1px solid var(--cc-line) !important;
  border-radius: 14px;
  box-shadow: var(--cc-shadow);
}
#howtouse p,
#useful p { font-size: .9rem; line-height: 1.85; color: var(--cc-text); }

#useful .row > [class*="col-"].mt-4 > .text-center img {
  max-width: 120px;
  padding: 1rem;
  background: var(--cc-bg);
  border-radius: 24px;
}

/* ---------- ニュース ---------- */
.XMLSampleRequest > div > a {
  display: block;
  height: 100%;
  background: #fff;
  border-radius: var(--cc-radius);
  overflow: hidden;
  box-shadow: var(--cc-shadow);
  border: 1px solid var(--cc-line);
  color: var(--cc-ink) !important;
  font-weight: 600;
  font-size: .9rem;
  line-height: 1.6;
  text-decoration: none !important;
}
.XMLSampleRequest > div > a:hover { transform: translateY(-3px); box-shadow: var(--cc-shadow-hover); color: var(--cc-blue-dark) !important; }
.XMLSampleRequest > div > a img {
  display: block;
  width: 100% !important;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  margin: 0 !important;
}
.XMLSampleRequest > div > a p { margin: 0 !important; padding: .9rem 1rem 1.1rem; }

/* ---------- フッター ---------- */
.footer {
  background: #fff !important;
  border-top: 1px solid var(--cc-line);
  padding-top: 1.75rem !important;
  padding-bottom: 1.75rem !important;
  color: var(--cc-muted);
}
.footer a { color: var(--cc-text); }
.footer a:hover { color: var(--cc-blue-dark); text-decoration: none; }

/* ---------- 下層ページ（about / privacy / terms / contact） ---------- */
.subpage_title {
  background: none !important;
  color: var(--cc-ink) !important;
  font-weight: 800 !important;
  font-size: 1.9rem !important;
  letter-spacing: .06em;
  padding: 0 !important;
  margin-top: 4.5rem;
}
.subpage_title::after {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  margin: .9rem auto 0;
  border-radius: 4px;
  background: var(--cc-grad);
}
.foot_contents h2 {
  color: var(--cc-ink) !important;
  font-weight: 700;
  font-size: 1.15rem;
  margin-top: 2.25rem;
  margin-bottom: .6rem;
  border: 0 !important;
  background: none !important;
}
.foot_contents p { line-height: 1.95; }
.foot_contents a { color: var(--cc-blue-dark); }

/* ---------- フォーム共通（ログイン・登録・問い合わせ） ---------- */
.form-control {
  border-radius: 12px !important;
  border: 1px solid var(--cc-line) !important;
  background-color: #f8fafc !important;
  color: var(--cc-ink);
  box-shadow: none !important;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.form-control:focus {
  background-color: #fff !important;
  border-color: var(--cc-blue) !important;
  box-shadow: 0 0 0 4px rgba(59, 156, 255, .15) !important;
}
#chatrooms .form-control,
.room-sort .form-control { background-color: transparent !important; border-radius: 0 !important; }
#chatrooms .form-control:focus,
.room-sort .form-control:focus { box-shadow: none !important; }
#chatrooms .input-group:focus-within { border-color: var(--cc-blue); box-shadow: 0 0 0 4px rgba(59, 156, 255, .15); }

.input-group-text { border-radius: 12px; border-color: var(--cc-line); background: var(--cc-tint); color: var(--cc-text); }

.btn-primary,
.btn-user {
  border: 0 !important;
  background: var(--cc-grad) !important;
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(31, 127, 230, .28);
}
.btn-primary:hover,
.btn-user:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(31, 127, 230, .38); }

/* base.min（ログイン・登録） */
.base-mini-bg {
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(59, 156, 255, .14), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(25, 211, 240, .14), transparent 60%),
    #f5f8fc !important;
  background-attachment: fixed !important;
  min-height: 100vh;
}
/* 白抜きロゴが淡い背景に埋もれるのでブランド青で表示 */
.base-mini-bg .main_logo_min img {
  filter: brightness(0) saturate(100%) invert(52%) sepia(77%) saturate(2337%) hue-rotate(193deg) brightness(101%) contrast(101%);
}
.base-mini-bg .card {
  border: 1px solid rgba(255, 255, 255, .7) !important;
  border-radius: 24px !important;
  box-shadow: 0 2px 6px rgba(20, 40, 80, .04), 0 24px 60px rgba(20, 40, 80, .10) !important;
}
.base-mini-bg .card h1 { color: var(--cc-ink) !important; font-weight: 800; letter-spacing: .06em; }
.base-mini-bg .card hr { border-top-color: var(--cc-line); }
.base-mini-bg .nav-pills {
  background: #f1f4f9;
  border-radius: 999px;
  padding: 4px;
}
.base-mini-bg .nav-pills .nav-link {
  border-radius: 999px !important;
  color: var(--cc-muted) !important;
  font-weight: 700;
  background: transparent !important;
  padding: .5rem 1rem;
}
.base-mini-bg .nav-pills .nav-link.active {
  background: #fff !important;
  color: var(--cc-blue-dark) !important;
  box-shadow: 0 2px 8px rgba(20, 40, 80, .10);
}
.base-mini-bg .form-control-user { height: 48px; padding-left: 1.1rem; font-size: .95rem; }
.base-mini-bg .btn-user { height: 48px; font-size: 1rem; letter-spacing: .08em; }

/* ---------- モバイル ---------- */
@media (max-width: 575.98px) {
  section.home_usage { padding-top: 3rem; padding-bottom: 3rem; }
  .home_usage h3 { font-size: 1.5rem; }
  .subpage_title { font-size: 1.5rem !important; margin-top: 4rem; }
  .base-mini-bg .card { border-radius: 18px !important; }
}

/* ---------- ヒーローのロゴ（白SVG） ---------- */
/* 白いロゴが白グラデーション／明るい写真に埋もれるのでブランド青で表示 */
.main_logo img {
  filter: brightness(0) saturate(100%) invert(52%) sepia(77%) saturate(2337%) hue-rotate(193deg) brightness(101%) contrast(101%);
}
