/* 会員ページ (www.target-stocks.com)。色は Target US/JP の画面 (style.css) と揃える。 */
:root {
  --bg: #0e1116;
  --panel: #161a22;
  --panel2: #1c2230;
  --line: #232936;
  --text: #e6e8ec;
  --muted: #9aa3b2;
  --accent: #2964ff;
  --link: #7aa2ff;
  --jp: #b91c4a;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.7 -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 8px 0 16px; }
h2 { font-size: 16px; margin: 0 0 10px; display: flex; align-items: baseline; gap: 12px; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* --- header / nav --- */
.site-header { background: var(--panel); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.brand { color: var(--text); font-size: 20px; font-weight: 700; line-height: 1.2; }
.brand:hover { text-decoration: none; }
/* 呼称 = 「銘柄抽出チャートシステム Target」。前半を小さく上に積む (US/JP の見出しと同じ形)。 */
.brand-sub { display: block; font-size: .55em; font-weight: 500; color: var(--muted); letter-spacing: .04em; }
.head-targets { display: flex; gap: 8px; }
.btn-target {
  display: inline-block; padding: 6px 12px; border-radius: 8px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap;
}
.btn-target.jp { background: var(--jp); }
.btn-target:hover { text-decoration: none; filter: brightness(1.1); }
.site-nav { background: var(--panel); border-bottom: 1px solid var(--line); }
/* スマホでは横にスクロールする1行 (折り返して縦に伸びるより見通しがいい)。 */
.site-nav .wrap { display: flex; gap: 4px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.site-nav .wrap::-webkit-scrollbar { display: none; }
.site-nav a { color: var(--muted); padding: 10px 10px; border-bottom: 2px solid transparent; font-size: 14px; }
.site-nav a:hover { color: var(--text); text-decoration: none; }
.site-nav a.active { color: var(--text); border-bottom-color: var(--accent); }
.site-nav .nav-logout { margin-left: auto; }

/* --- page --- */
.page { padding-top: 20px; padding-bottom: 40px; min-height: 60vh; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 0 0 16px; }
.lead { color: var(--muted); margin-top: -6px; }
.hint { color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); }
.crumb { color: var(--muted); font-size: 13px; margin: 0; }
.date { color: var(--muted); font-size: 13px; }
.more { font-size: 13px; font-weight: 400; margin-left: auto; }
.body { line-height: 1.85; word-break: break-word; }

/* --- home --- */
.hero { margin-bottom: 16px; }
.period { display: flex; gap: 12px; align-items: baseline; margin-bottom: 12px; }
.period .k { color: var(--muted); font-size: 13px; }
.period .v { font-weight: 700; }
.target-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.big-target {
  display: flex; flex-direction: column; padding: 18px 20px; border-radius: 12px;
  background: linear-gradient(135deg, #1d3a8f, var(--accent)); color: #fff;
}
.big-target.jp { background: linear-gradient(135deg, #6d1030, var(--jp)); }
.big-target:hover { text-decoration: none; filter: brightness(1.08); }
.big-target .t { font-size: 22px; font-weight: 700; }
.big-target .s { font-size: 13px; opacity: .9; }

/* --- lists --- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list li > a { display: flex; align-items: center; gap: 10px; padding: 10px 2px; color: var(--text); }
.list li > a:hover { text-decoration: none; background: var(--panel2); }
.list .title { flex: 1 1 auto; min-width: 0; }
.list .date { flex: none; width: 84px; }
.list .play { color: var(--link); font-size: 12px; flex: none; }
.list .pdf { flex: none; font-size: 11px; font-weight: 700; color: #fff; background: #c2410c; border-radius: 4px; padding: 1px 6px; }
.list .pdf.xlsx { background: #217346; }
.list .size { flex: none; color: var(--muted); font-size: 12px; }
.list .desc { color: var(--muted); font-size: 13px; padding: 0 2px 10px 46px; }
.tag { flex: none; font-size: 11px; font-weight: 700; border-radius: 4px; padding: 1px 6px; background: #2a3140; color: #c8cfdb; }
.tag.new { background: #0f5132; color: #b4f1cf; }
.tag.pin { background: #7c2d12; color: #fed7aa; }
.tag.draft { background: #4a3b00; color: #fde68a; vertical-align: middle; }

/* --- video --- */
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; margin-bottom: 16px; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* --- faq --- */
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 12px 16px; font-weight: 600; list-style: none; }
.faq summary::before { content: "Q. "; color: var(--link); }
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq .body { padding: 12px 16px; }

/* --- forms --- */
.form { display: grid; gap: 12px; max-width: 560px; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
input[type=email], input[type=password], input[type=text], input[type=number], input[type=url],
input[type=datetime-local], select, textarea {
  background: var(--bg); border: 1px solid #2a3140; color: var(--text);
  border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 15px; width: 100%;
}
textarea { resize: vertical; }
button, .btn {
  background: var(--accent); color: #fff; border: 0; border-radius: 8px;
  padding: 10px 16px; font: inherit; font-weight: 700; cursor: pointer; justify-self: start;
}
button.danger, .btn.danger { background: #7f1d1d; }
button.sub, .btn.sub { background: #2a3140; }
.check { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: 14px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.kv dd.text { font-weight: 400; overflow-wrap: anywhere; }   /* お問い合わせの確認画面の本文 */

/* --- messages (US/JP と同じ色) --- */
.msg { padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.msg.err { background: #2a1218; color: #ffb4be; border: 1px solid #5a1f2a; }
.msg.ok  { background: #0f2a1c; color: #b4f1cf; border: 1px solid #1f5a3e; }
.msg.info { background: #16202e; color: #c7d2e3; border: 1px solid #2b3a52; }

/* --- footer --- */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; padding-top: 16px; padding-bottom: 24px; flex-wrap: wrap; }

/* --- auth (ログイン前の1枚もの) --- */
body.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(140deg, #0e1116, #1a2030); }
.auth-card { width: min(440px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 28px; }
.auth-card .brand { display: block; font-size: 24px; margin: 0 0 12px; }
.auth-card form { display: grid; gap: 12px; margin-top: 12px; }
.auth-card button { justify-self: stretch; }
.auth-links { margin-top: 16px; font-size: 14px; }
.page-title { font-size: 18px; }

/* --- admin --- */
table.admin { width: 100%; border-collapse: collapse; font-size: 14px; }
table.admin th, table.admin td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; }
table.admin th { color: var(--muted); font-weight: 500; }
.row-actions { display: flex; gap: 8px; }

@media (max-width: 600px) {
  .head-row { padding-top: 8px; padding-bottom: 8px; }
  .brand { font-size: 18px; }
  .target-buttons { grid-template-columns: 1fr; }
  .list .date { width: auto; }
  .list .desc { padding-left: 2px; }
  .card { padding: 14px; }
}
