/* 宅地まどかの不動産営業ノート：トップページ
   色はヘッダー画像（クリーム地＋茶色）に合わせ、宅建アプリだけ問題集の緑にする */
:root {
  --cream: #FEFDF7;      /* ヘッダー画像の地の色 */
  --paper: #F4ECDF;      /* 真ん中の帯 */
  --ink: #66321C;        /* ヘッダーの文字の茶色 */
  --text: #4A3426;
  --muted: #8A715E;
  --line: #E4D6C3;
  --teal: #2F6F62;
  --teal-soft: #E5F0EB;
  --brown: #7A3B22;
  --mustard: #E0AE52;
  --latte: #B48E6E;
  --chip: #F3EBDF;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--cream); color: var(--text);
  font-family: "Noto Sans JP", "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.wrap { max-width: 1480px; margin: 0 auto; padding: 0 32px; }  /* 帯は横いっぱい、中身は最大1480px（2026-11-01 案B） */

/* ---------- ヘッダー ---------- */
.site-header { text-align: center; }
.site-header h1 { max-width: 980px; margin: 0 auto; padding-top: 8px; }  /* 画像の上下の余白を切り、幅は980pxまで（2026-11-01 もう少し低く） */
.site-header h1 img { width: 100%; height: auto; }

.nav { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 10px 0 8px; flex-wrap: wrap; }
.nav > a, .nav > span {
  display: flex; align-items: center; gap: 10px; padding: 11px 26px; border-radius: 12px;
  font-weight: 700; font-size: 18px; color: var(--text);
}
.nav a:hover { background: var(--chip); }
.nav img { width: 28px; height: 28px; }
.nav .soon { color: var(--muted); cursor: default; }
/* X はメニューの右に、大きめの丸いボタンで（2026-11-01。メニューの中の X と右上の X はやめた） */
.nav > a.x-btn {
  margin-left: 56px; padding: 11px 28px 11px 18px; gap: 12px;  /* ほかのメニューから少し右に離す */
  background: #fff; border: 2px solid #C9AE90; border-radius: 999px; font-size: 20px;
  transition: background .15s, transform .15s;
}
.nav > a.x-btn:hover { background: var(--chip); transform: translateY(-1px); }
.nav > a.x-btn img { width: 34px; height: 34px; }
.nav > a.x-btn .handle { font-size: 16px; font-weight: 400; color: var(--muted); }
@media (max-width: 1500px) {  /* ノートPCの幅でも X が1行に収まるよう、少し詰める */
  .nav > a, .nav > span { padding: 10px 16px; font-size: 16px; }
  .nav img { width: 24px; height: 24px; }
  .nav > a.x-btn { margin-left: 28px; padding: 8px 20px 8px 14px; font-size: 17px; }
  .nav > a.x-btn img { width: 28px; height: 28px; }
  .nav > a.x-btn .handle { font-size: 14px; }
}

/* ---------- 真ん中の帯 ---------- */
.main { background: var(--paper); border-top: 1px solid var(--line); padding: 24px 0 18px; }
.lead { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.lead h2 { display: flex; align-items: center; gap: 10px; font-size: 19px; color: var(--text); }
.lead h2 img { width: 22px; height: 22px; }
.lead p { font-size: 14px; color: var(--muted); }

/* 今日の1問（カードの上の横長の帯。2026-11-01） */
.today {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 18px; align-items: center;
  background: #FDF8EE; border: 2.5px solid #5A3420; border-radius: 16px; padding: 8px 22px; margin-bottom: 18px;
}
.today[hidden] { display: none; }
.today-madoka { width: 44px; height: auto; align-self: end; }
.today-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.today-badge { background: #5A3420; color: #fff; font-weight: 700; font-size: 14px; padding: 3px 14px; border-radius: 999px; }
.today-meta { font-size: 13px; color: var(--muted); }
.today-pr { font-size: 13px; color: var(--muted); margin-top: 6px; }
.today-pr:empty { display: none; }
.today-q { font-size: 18px; font-weight: 700; line-height: 1.5; margin-top: 2px; color: var(--text); }
.today-btns { display: flex; gap: 10px; }
.today-btns button {
  width: 56px; height: 56px; border-radius: 50%; border: 2.5px solid #5A3420; background: #fff;
  font-size: 28px; font-weight: 700; color: #5A3420; cursor: pointer; font-family: inherit; transition: transform .15s, background .15s;
}
.today-btns button:hover:not(:disabled) { background: var(--chip); transform: translateY(-2px); }
.today-btns button:disabled { cursor: default; opacity: .45; }
.today-btns button.picked { opacity: 1; background: #5A3420; color: #fff; }
/* 答えたあと：正解と解説を1行に、根拠を小さく。「もっと解いてみる」は ○× の下（2026-11-01 高さが広がりすぎないように） */
.today-result { margin-top: 4px; padding-top: 4px; border-top: 1.5px dashed #D8C6B0; line-height: 1.5; }
.today-judge { font-size: 16px; font-weight: 700; margin-right: 12px; }
.today.ok .today-judge { color: var(--teal); }
.today.ng .today-judge { color: #B4532A; }
.today-e { font-size: 14px; }
.today-r { font-size: 12px; color: var(--muted); }
.today-side { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.today-more { font-size: 13px; font-weight: 700; color: var(--brown); text-decoration: underline; white-space: nowrap; }
.today-more[hidden] { display: none; }

.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 0 8px; border-radius: 4px; background: var(--chip); color: var(--muted); }

/* 3枚のカード */
.cards { display: grid; grid-template-columns: 300px 1fr 1fr; gap: 24px; }  /* 宅建クイズは細め、動画とnoteを広く（2026-11-01） */
.card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 28px 24px 18px; display: flex; flex-direction: column;
}
.card::before { /* 上の色の帯 */
  content: ""; position: absolute; top: -1px; left: 30px; right: 30px; height: 5px; border-radius: 0 0 4px 4px; background: var(--bar);
}
.card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card .kicker { font-size: 13px; color: var(--muted); }
.card h3 { font-size: 24px; line-height: 1.4; color: var(--text); margin-top: 2px; }
.card .top img { width: 76px; height: 76px; flex: none; }
.card .desc { font-size: 15px; margin: 18px 0 14px; }
.card .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.card .btn { margin-top: auto; }
.card .note { text-align: center; font-size: 12px; color: var(--muted); margin-top: 8px; }

.card.app { --bar: var(--teal); background: var(--teal-soft); border-color: #CFE2DA; }
.card.app h3 { color: var(--teal); }
.card.app .tag { background: #fff; color: var(--teal); }
/* 宅建クイズ：アイコンと同じ色と線（クリーム・こげ茶の太線・緑のしおり）。カード全体がリンク（2026-10-31 案D） */
.card.quiz {
  background: #FDF8EE; border: 2.5px solid #5A3420; border-radius: 22px;
  align-items: center; text-align: center; padding: 18px 22px 14px;
}
.card.quiz::before { display: none; }
.card.quiz .quiz-tab {
  position: absolute; top: -3px; right: 42px; width: 26px; height: 38px; background: #8DAA6E;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
}
.card.quiz .quiz-nb { width: 140px; height: auto; transition: transform .15s; }
.card.quiz:hover .quiz-nb { transform: rotate(-3deg) scale(1.04); }
.card.quiz h3 { font-size: 23px; color: #5A3420; margin-top: 4px; }
.card.quiz .quiz-desc { font-size: 14px; margin: 6px 0 12px; }
.card.quiz .quiz-btn {
  display: block; width: 100%; margin-top: auto; background: #5A3420; color: #fff; font-weight: 700;
  padding: 11px 0; border-radius: 999px; font-size: 15px; transition: filter .15s;
}
.card.quiz:hover .quiz-btn { filter: brightness(1.15); }
/* 左の列：宅建クイズ（上）と LINEスタンプ（下）を縦に半分ずつ（2026-11-01） */
.col-left { display: grid; grid-template-rows: 1fr 1fr; gap: 16px; }
.card.quiz .quiz-nb { width: 96px; }
.card.quiz h3 { font-size: 21px; }
.card.quiz .quiz-desc { margin: 2px 0 8px; font-size: 13px; }
.card.quiz .quiz-btn { padding: 8px 0; font-size: 14px; }
.card.quiz .note { margin-top: 4px; }
.card.line { flex-direction: row; align-items: center; gap: 14px; padding: 18px 18px; border: 1.5px dashed #BFD89A; background: #F1F8E4; }  /* 薄い黄緑（2026-11-01） */
.card.line::before { display: none; }
.card.line .line-madoka { width: 64px; height: auto; flex: none; }
.card.line .body { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card.line h3 { font-size: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.card.line p { font-size: 13px; color: var(--muted); }
.card.line .badge { font-size: 12px; font-weight: 700; padding: 0 8px; border-radius: 4px; background: var(--chip); color: var(--muted); }
.card.line .btn { margin-top: 4px; }
.card.video { --bar: var(--mustard); }
/* ショート動画（公開済みの新しい順に4本・縦長サムネイルつき。中身は 公開サイト_動画リンクを更新.py が書く。2026-11-01） */
/* 縦長サムネイルを横に4本並べ、タイトルはその下（2026-11-01 サムネと文字を大きく） */
.video-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 16px 0 18px; align-items: start; }
.video-item { display: flex; flex-direction: column; gap: 6px; }
.video-item img { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.video-item .t { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; font-weight: 700; line-height: 1.5; }
.video-item .d { font-size: 12px; color: var(--muted); }
.video-item:hover .t { color: var(--brown); text-decoration: underline; }
.card.note-card { --bar: var(--latte); }
/* note の記事（上から4本・サムネイルつき。中身は 公開サイト_note記事を更新.py が書く。2026-10-31 案B） */
.note-list { display: flex; flex-direction: column; gap: 14px; margin: 16px 0 18px; }
.note-item { display: grid; grid-template-columns: 170px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: start; }
.note-item img { grid-row: 1 / 3; width: 170px; height: auto; aspect-ratio: 1.91 / 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.note-item .t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 16px; font-weight: 700; line-height: 1.5; }
.note-item .d { font-size: 12px; color: var(--muted); }
.note-item:hover .t { color: var(--brown); text-decoration: underline; }
.card.note-card .btn { margin-top: auto; }
.card.note-card .note { color: var(--teal); }

/* ボタン（デザインはこれから調整） */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  height: 46px; border-radius: 8px; font-weight: 700; font-size: 15px; transition: filter .15s, transform .15s;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn .arrow { font-size: 20px; line-height: 1; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-brown { background: var(--brown); color: #fff; }
.btn-outline { background: #fff; color: var(--brown); border: 1.5px solid #C9AE90; }
.btn-small { height: 42px; padding: 0 16px; font-size: 14px; }
.btn-wait { border: 1.5px dashed #CDB59A; color: var(--muted); background: transparent; cursor: default; }
.btn-wait:hover { filter: none; transform: none; }

/* 下の2枚（Substack・X） */
.sub { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 20px; }
.box { display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: 16px; }
.box > img { width: 54px; height: 54px; flex: none; }
.box .body { flex: 1; }
.box h3 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.box p { font-size: 14px; }
.box.soon { border: 1.5px dashed #D8C6B0; }
.box.x { background: #FFFDF9; border: 1px solid var(--line); }
.box .badge { font-size: 12px; font-weight: 700; padding: 0 8px; border-radius: 4px; background: var(--chip); color: var(--muted); }
.box .handle { font-size: 12px; font-weight: 400; padding: 0 8px; border-radius: 4px; background: var(--chip); color: var(--muted); }
.fine { text-align: right; font-size: 12px; color: var(--muted); margin-top: 12px; }
.houses { width: 240px; margin: 20px auto 0; opacity: .7; }

/* ---------- フッター ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 14px 0; font-size: 13px; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-footer span { display: flex; align-items: center; gap: 8px; }
.site-footer img { width: 16px; height: 16px; }

/* ---------- 画面がせまいとき（スマホなど）は縦に並べる ---------- */
@media (max-width: 1200px) {
  .cards { grid-template-columns: 260px 1fr 1fr; }
  .note-item { grid-template-columns: 120px 1fr; }
  .note-item img { width: 120px; }
  .note-item .t { font-size: 14px; }
}
@media (max-width: 900px) {
  .wrap { padding: 0 20px; }
  .cards, .sub { grid-template-columns: 1fr; }
  .today { grid-template-columns: 48px 1fr; padding: 14px 16px; gap: 12px; }
  .today-madoka { width: 48px; }
  .today-q { font-size: 16px; }
  .today-side { grid-column: 1 / -1; }
  .today-btns button { width: 64px; height: 64px; font-size: 30px; }
  /* スマホでは 問題集 → 動画 → note → LINEスタンプ（準備中は下へ。2026-11-01） */
  .col-left { display: contents; }
  .card.quiz { order: 1; }
  .card.video { order: 2; }
  .card.note-card { order: 3; }
  .card.line { order: 4; }
  .nav > a, .nav > span { padding: 6px 12px; font-size: 14px; }
  .lead p, .fine { text-align: left; }
}
@media (max-width: 520px) {
  .nav > a.x-btn { margin-left: 0; padding: 6px 14px 6px 10px; font-size: 14px; border-width: 1.5px; }
  .nav > a.x-btn img { width: 22px; height: 22px; }
  .nav > a.x-btn .handle { font-size: 13px; }
  .video-list { grid-template-columns: repeat(2, 1fr); }
  .note-item { grid-template-columns: 110px 1fr; }
  .note-item img { width: 110px; }
  .box { flex-wrap: wrap; gap: 14px; padding: 18px; }
  .box .btn { width: 100%; }
}

/* ---------- まどかについて（about/。2026-11-01） ---------- */
.nav a.here { background: var(--chip); }
.about { max-width: 1100px; }
.about-hero { display: flex; align-items: center; gap: 40px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px 40px; }
.about-madoka { width: 150px; height: auto; flex: none; }
.about-hero .kicker { font-size: 14px; color: var(--muted); }
.about-hero h2 { font-size: 34px; line-height: 1.4; color: var(--ink); margin: 4px 0 12px; }
.about-hero .lead-text { font-size: 16px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.about-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px 28px; }
.about-card h3 { font-size: 20px; color: var(--ink); margin-bottom: 12px; }
.about-card .sub-h { font-size: 16px; margin: 18px 0 10px; color: var(--muted); }
.about-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.about-list li { display: flex; flex-direction: column; padding-left: 16px; border-left: 4px solid var(--mustard); }
.about-list b { font-size: 16px; }
.about-list span { font-size: 14px; color: var(--muted); }
.about-why { margin-top: 20px; }
.about-why p { font-size: 15px; margin-top: 8px; }
.about-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 24px; }
.about-links .btn { padding: 0 12px; }
@media (max-width: 900px) {
  .about-hero { flex-direction: column; text-align: center; padding: 24px 20px; gap: 16px; }
  .about-madoka { width: 110px; }
  .about-hero h2 { font-size: 26px; }
  .about-hero .lead-text { text-align: left; }
  .about-hero .lead-text br { display: none; }
  .about-grid, .about-links { grid-template-columns: 1fr; }
}
