/* ============================================================
   マイポータル スタイル
   カラースキーム：Claude（Anthropic）風
     - 背景：温かみのあるアイボリー
     - アクセント：コーラル（テラコッタ）
     - 文字：落ち着いたウォームグレー
   スマホ→タブレット→PC でカードの列数が自動で変わります。
   ============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* --- Claude カラースキーム（ここを変えると全体の色が変わります） --- */
  --bg: #f0eee6;          /* 背景：アイボリー */
  --surface: #fbfaf7;     /* カード背景：ほぼ白の温かみのある色 */
  --border: #e6e2d6;      /* 枠線：ウォームベージュ */
  --text: #1f1e1c;        /* 文字（濃い）：ウォームブラック */
  --text-sub: #6f6c61;    /* 文字（中）：ウォームグレー */
  --text-muted: #a6a293;  /* 文字（薄い）：日付など */
  --accent: #d97757;      /* アクセント：Claude コーラル */
  --accent-strong: #c15f3c; /* 濃いコーラル */
  --accent-soft: #f6e6df; /* 薄いコーラル（タグ背景など） */
  /* セマンティックカラーも温かめに調整 */
  --good: #6f8a5a;        /* 取得・勝ち（落ち着いたグリーン） */
  --good-soft: #ecefe4;
  --warn: #b07f3f;        /* 譲渡（落ち着いたアンバー） */
  --warn-soft: #f4ebda;
  --cool: #7c8a96;        /* 最低気温（ミュートブルーグレー） */
  --up: #6f8a5a;          /* 株価：上昇（ウォームグリーン） */
  --down: #b5443a;        /* 株価：下落（ウォームレッド） */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 16px 44px;
}

/* ---- 最上部バー（ロゴ + 日付/時刻 + AIリンク） ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
/* ロゴ：かっこよくグラデーション + 字間 */
.brand {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
/* 日付 + 現在時刻（コンパクト） */
.clock {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}
.clock-date {
  font-size: 0.78rem;
  color: var(--text-sub);
}
.clock-time {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
/* AIリンクボタン */
.quick-links {
  display: flex;
  gap: 6px;
}
/* AIサービスのロゴリンク（アイコンボタン） */
.ai-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.ai-link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}
.ai-link img,
.ai-link svg {
  width: 30px;
  height: 30px;
  display: block;
}

/* ---- 株価バー（最上部・横スクロール対応） ---- */
.ticker {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(31, 30, 28, 0.04);
  -webkit-overflow-scrolling: touch;
}
.ticker-item {
  flex: 0 0 auto;
  min-width: 116px;
  padding: 4px 14px;
  border-right: 1px solid var(--border);
}
.ticker-item:last-child {
  border-right: none;
}
.ticker-name {
  font-size: 0.72rem;
  color: var(--text-sub);
  white-space: nowrap;
}
.ticker-price {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.ticker-change {
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}
.ticker-change.up {
  color: var(--up);
}
.ticker-change.down {
  color: var(--down);
}
.ticker-change.flat {
  color: var(--text-muted);
}

/* ---- 天気予報（簡易表示 + 都道府県ダイヤル） ---- */
.weather-strip {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(31, 30, 28, 0.04);
}
/* 左側：天気の中身 */
.wx-now {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.wx-current {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wx-cur-emoji {
  font-size: 2.1rem;
  line-height: 1;
}
.wx-cur-temp {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}
.wx-cur-cond {
  font-size: 0.76rem;
  color: var(--text-sub);
}
/* 今日/明日/明後日のミニ予報 */
.wx-mini {
  display: flex;
  gap: 14px;
}
.wx-mini-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.wx-mini-label {
  font-size: 0.68rem;
  color: var(--text-sub);
}
.wx-mini-emoji {
  font-size: 1.1rem;
}
.wx-mini-temp {
  font-size: 0.72rem;
  color: var(--cool);
}
.wx-mini-temp b {
  color: var(--accent-strong);
}
/* 右側：都道府県セレクト（ダイヤル） */
.wx-control {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wx-pref-label {
  font-size: 0.72rem;
  color: var(--text-sub);
}
.wx-pref {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
}
.wx-pref:focus {
  outline: none;
  border-color: var(--accent);
}
.strip-updated {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* 読み込み中・エラー時の文言 */
.strip-loading {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 6px 8px;
}

@media (max-width: 560px) {
  .weather-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .wx-control {
    justify-content: flex-end;
  }
}

/* ---- カードを並べるグリッド（自動で 1→2→3 列） ---- */
.grid {
  margin-top: 24px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ---- カード共通 ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(31, 30, 28, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.card-header h2 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.card-header .icon {
  font-size: 1.1rem;
}
.card-body {
  padding: 12px 16px;
  font-size: 0.875rem;
  color: var(--text-sub);
  flex: 1;
}

/* ---- プレスリリース（1行ごとのリスト形式） ---- */
.news {
  margin-top: 24px;
}
.news-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.news-head h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.news-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
/* 1行＝1リリース */
.news-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-top: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: background 0.12s;
}
.news-row:first-child {
  border-top: none;
}
.news-row:hover {
  background: var(--accent-soft);
}
.news-row-date {
  flex: 0 0 auto;
  width: 44px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.news-row-company {
  flex: 0 0 auto;
  width: 76px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.news-row-title {
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 480px) {
  .news-row {
    flex-wrap: wrap;
    gap: 4px 10px;
  }
  .news-row-title {
    flex: 1 0 100%;
    white-space: normal;
  }
}

/* ---- 共通：日付付きリスト（プレスリリース） ---- */
.list-divided {
  list-style: none;
}
.list-divided li {
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.list-divided li:first-child {
  border-top: none;
  padding-top: 0;
}
.row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.tag {
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.date {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.title-line {
  margin-top: 4px;
  color: var(--text);
}

/* ---- 5. 開示（REIT） ---- */
.disclosure-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tag-acquire {
  background: var(--good-soft);
  color: var(--good);
  font-weight: 600;
}
.tag-transfer {
  background: var(--warn-soft);
  color: var(--warn);
  font-weight: 600;
}
.sub-line {
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--text-sub);
}

/* ---- 6. ドジャース ---- */
.dodgers-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 12px;
}
.dodgers-record {
  font-weight: 700;
  color: var(--accent-strong);
}
.dodgers-rank {
  font-size: 0.75rem;
  color: var(--accent-strong);
}
.game-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.game-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.result-badge {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.result-win {
  background: var(--good);
}
.result-lose {
  background: var(--text-muted);
}
.game-score {
  font-weight: 600;
  color: var(--text);
}
.game-date {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ---- フッター ---- */
.page-footer {
  margin-top: 32px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---- スマホ向けの微調整 ---- */
@media (max-width: 480px) {
  .container {
    padding: 18px 12px 32px;
  }
  .page-header h1 {
    font-size: 1.35rem;
  }
}
