:root {
  /* === 基本カラー === */
  --bg: #0b0f14;         /* 背景 */
  --card: #111923;       /* カード/パネル */
  --fg: #e6edf3;         /* メインテキスト */
  --muted: #99a3ad;      /* サブテキスト */

  /* ブランドカラー */
  --accent: #2dd4bf;     /* ティール */

  /* 状態色 */
  --ok: #2dd4bf;
  --warn: #f59e0b;
  --bad: #ef4444;

  /* 線・罫線 */
  --line: #1f2a37;

  /* チャート関連 */
  --mini-h: 220px;
  --title-h: 56px;
  --lwc-title-pad-top: 18px;
  --lwc-title-pad-bottom: 6px;
  --lwc-title-height: 76px;
  --lwc-chart-bottom-offset: 0px;
  --lwc-axis-align-nudge: 18px;
  --lwc-axis-fine: 0px;
  --lwc-chart-reduce: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial,
               "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
  letter-spacing: .02em;
}

/* === 共通カード === */
.widgetcard, .login-card, .cat-col, .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: none;
}
.widgetcard:hover, .login-card:hover, .card:hover {
  transform: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* === 共通カード === */
.widgetcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;

  /* 👇 ここを追加 */
  max-width: 98%;      /* 横幅を90%に制限 */
  margin: 0 auto;
  margin-top: 20px;
}


/* === セクションタイトル === */
.section-title {
  margin: 20px 12px 8px;
  font-size: 18px;
  font-weight: 800;
  opacity: .9;
}

/* === ウィジェットグリッド === */
.widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px,1fr));
  gap: 10px;
  padding: 12px;
}

/* === 汎用フォーム === */
input, select, button {
  background: #0a0a0a;
  color: var(--fg);
  border: 1px solid #262626;
  border-radius: 6px;
  padding: 8px 10px;
}
select {
  background: #0a0a0a;      /* 背景をダークに */
  color: var(--fg);         /* 文字色は通常の文字色 */
  border: 1px solid #262626;
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
}
/* 選択肢（ドロップダウン内） */
select option {
  background: #0b0f14;      /* 背景を統一 */
  color: var(--fg);         /* 文字色を通常色 */
}

/* 選択中や hover 時にアクセントカラーを反映 */
select:focus,
select option:checked,
select option:hover {
  background: var(--accent);
  color: #000;              /* ティール背景時は黒字でコントラスト確保 */
}
button { cursor: pointer; }

/* === ヒントテキスト === */
.hint {
  margin: 0 12px;
  font-size: 12px;
  opacity: .7;
}

/* === ヘッダー === */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 12px;
  border-bottom: 1px solid #1c1c1c;
  background: #000;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
}
.page-header .logo {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: #fff;
}
.page-header .nav-links {
  display: flex;
  gap: 1.5rem;
  font-size: 14px;
}
.nav-links a {
  color: var(--fg);
  text-decoration: none;
  padding: 4px 0;
  position: relative;
  transition: color 0.2s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

/* === ユーザーメニュー === */
.user-menu { display: flex; align-items: center; gap: 10px; }
.user-menu img { width: 28px; height: 28px; border-radius: 50%; }
#logoutBtn {
  padding: 4px 10px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: transparent;
  color: var(--accent);
  font-weight: bold;
  transition: all 0.2s ease-in-out;
}
#logoutBtn:hover {
  background: var(--accent);
  color: #000;
}

/* === ログインページ === */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 85vh;
  background: radial-gradient(circle at top, #111923 0%, #0b0f14 80%);
}
.login-card {
  padding: 50px 40px;
  text-align: center;
  max-width: 400px;
  width: 100%;
  animation: fadeIn 0.8s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.login-card h2 {
  margin-bottom: 15px;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}
.login-card .login-desc {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 13px;
}
.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 2px solid var(--accent);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  color: var(--accent);
  background: transparent;
  transition: all 0.2s ease;
  transform: scale(1);
}
.login-btn img { width: 22px; height: 22px; }
.login-btn:hover {
  background: var(--accent);
  color: #000;
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(45, 212, 191, 0.45);
}
/* クリック時：軽く縮む */
.login-btn:active {
  transform: scale(0.97);
}

/* === Earnings テーブル === */
.tblwrap { overflow-x: auto; }
.tblwrap table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tblwrap th, .tblwrap td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
}
.tblwrap tbody tr:hover { background: rgba(255,255,255,.03); }
.tblwrap tbody tr::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 2px;
  background-color: transparent;
  transition: background-color 0.2s ease-in-out;
}
.tblwrap tbody tr:hover::after { background-color: var(--accent); }

/* === アニメーション === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* JPカードの株価エリアとチャートの間の境界線を消す */
.mini .title {
  border-bottom: none !important;   /* 👈 下線を消す */
  box-shadow: none !important;      /* 👈 影も消す */
  margin-bottom: 0 !important;      /* 👈 スペース調整 */
}

/* チャート側も余計な線を消す */
.mini .chart {
  border-top: none !important;      /* 👈 上線を消す */
}

.login-btn.apple {
  background-color: #000;
  color: #fff;
  font-weight: 500;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
}

.login-btn.apple img {
  width: 18px;
  height: 18px;
  filter: invert(100%); /* 白化 */
}
.login-btn.google {
  background-color: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 4px;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  gap: 12px;
  cursor: pointer;
}

.login-btn.google img {
  width: 18px;
  height: 18px;
}

#logoutBtn,
header .logout-btn {
  text-decoration: none !important;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.page-footer {
  text-align: center;
  padding: 16px;
  background: #0b0f14;
  color: #888;
  font-size: 13px;
  border-top: 1px solid #222;
}


