/* yosou.microfund.co.jp（2択の予想・遊びの円）。1ファイルだけ。外への取得なし（字は端末の字）。
   決まり: 一番小さい字 12px・押す所は 44px 以上・スマホの幅（360・390px）で横にはみ出さない。
   「はい」と「いいえ」のボタンは、同じ色・同じ大きさ（どちらも勧めない）。得は緑・損は赤（数字の色だけ） */
:root { --bg: #f5f7fb; --panel: #fff; --text: #1c2430; --muted: #566174; --border: #d5dbe6; --link: #1257b5;
        --pos: #17713f; --neg: #b3261e; --warn-bg: #fffbe8; --warn-bd: #e6d58a; --stop: #9b2c2c; --stop-bg: #fdecec; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.7;
       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", "Noto Sans SC", "PingFang SC", Meiryo, sans-serif; }
a { color: var(--link); }
[hidden] { display: none !important; }
.top { display: flex; align-items: center; padding: 2px 12px; background: var(--panel); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 15px; line-height: 1.3; }
.brand img { display: block; border-radius: 6px; flex: 0 0 28px; }
.main { max-width: 640px; margin: 0 auto; padding: 8px 12px 24px; }
h1 { font-size: 21px; line-height: 1.4; margin: 10px 0 6px; overflow-wrap: anywhere; }
h2 { font-size: 16px; line-height: 1.5; margin: 16px 0 4px; }
p { margin: 0 0 10px; }
ul, ol { margin: 0 0 10px; padding-left: 22px; }
li { margin-bottom: 6px; overflow-wrap: anywhere; }
.small, .help { font-size: 13px; color: var(--muted); }
.help { margin: 2px 0 10px; }
.note-top { display: block; min-height: 44px; padding: 6px 10px; background: var(--warn-bg); border: 1px solid var(--warn-bd); border-radius: 10px;
            color: var(--text); font-size: 12px; line-height: 1.55; text-decoration: none; }
.note-top-more { color: var(--link); text-decoration: underline; white-space: nowrap; }
.note { margin-top: 14px; padding: 4px 12px 8px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; font-size: 14px; }
.note p { margin: 8px 0; }
.msg { margin: 10px 0; padding: 8px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--border); font-size: 15px; }
.msg-done { border-color: #9cc9ad; background: #eef8f1; }
.msg-err { border-color: #e2a6a6; background: var(--stop-bg); color: var(--stop); }
.bal { margin: 4px 0 10px; font-size: 15px; }
.bal-label { color: var(--muted); font-size: 13px; }
[data-tone="pos"] { color: var(--pos); }
[data-tone="neg"] { color: var(--neg); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 16px; border-radius: 12px; border: 2px solid var(--link);
       background: var(--link); color: #fff; font: inherit; font-weight: 700; font-size: 15px; line-height: 1.4; text-decoration: none; text-align: center; cursor: pointer; }
.btn-sub { background: var(--panel); color: var(--link); }
.btn-act { width: 100%; min-height: 48px; }
.btn-danger { background: var(--neg); border-color: var(--neg); }
.btn[disabled] { background: #c4cad6; border-color: #c4cad6; cursor: not-allowed; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 10px; }
.kv { margin: 0 0 10px; padding: 0; }
.kv div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.form label { display: block; font-weight: 700; font-size: 15px; margin-top: 8px; }
.form input[type=number], .form select { width: 100%; min-height: 48px; padding: 6px 10px; border: 1px solid #8b93a3; border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; font-size: 17px; }
.tag { display: inline-block; padding: 0 8px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; font-weight: 400; color: var(--muted); }
.hist { list-style: none; padding: 0; }
.hist-head { margin: 6px 0 2px; }
.hist-time { color: var(--muted); font-size: 13px; }
.nav { margin-top: 26px; padding-top: 6px; border-top: 1px solid var(--border); }
.nav-title { font-size: 14px; color: var(--muted); font-weight: 400; margin: 6px 0; }
.nav ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.nav li { margin: 0; }
.src .url { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.foot { max-width: 640px; margin: 0 auto; padding: 12px 12px 32px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.foot .region { font-size: 12px; line-height: 1.6; }
.foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0 14px; }
.foot li { margin: 0; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-lang { display: flex; flex-wrap: wrap; gap: 0 14px; }
.footer-lang a.on { color: var(--text); font-weight: 700; text-decoration: none; }
/* 下の欄の、アプリ横丁へのボタン（2026-10-07 夜 社長「各画面のフッターには、アプリ横丁へのボタンリンクを」。slot・english と同じ形＝枠 1px・角 10px・高さ 46px・塗りなし。
   templates/base.html の .app-row（下の欄の断りのすぐ下）。外す: main.py の APP_BUTTON_ENABLED = False → 再起動） */
.foot .app-row { margin: 4px 0 0; }
.foot a.app-btn { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 46px; max-width: 100%; margin: 4px 0 6px; padding: 8px 20px; border: 1px solid var(--muted); border-radius: 10px; background: var(--panel); color: var(--text); font-size: 15px; font-weight: 700; line-height: 1.4; text-decoration: none; text-align: center; overflow-wrap: anywhere; }
h3 { font-size: 15px; line-height: 1.5; margin: 12px 0 4px; }
.qs, .cards { list-style: none; padding: 0; margin: 0 0 10px; }
.qs li { margin: 0 0 8px; }
.q { display: block; padding: 8px 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none; }
.q-title { display: block; font-weight: 700; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.q-row { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, .7fr) minmax(0, 1.2fr); gap: 6px; margin-top: 4px; }
.px { text-align: right; }
.px small { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; }
.px b { font-size: 17px; font-variant-numeric: tabular-nums; }
.px-wide b { font-size: 15px; font-weight: 400; }
.cards li { margin: 0 0 10px; padding: 4px 12px 6px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.card-title { margin: 6px 0 2px; font-weight: 700; }
.card-title a { display: inline-block; min-height: 44px; padding-top: 8px; }
.kv-s div { padding: 3px 0; }
.kv-s dt { font-size: 13px; }
.kv small { font-size: 12px; color: var(--muted); }
.amount-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.amount input[type=number] { min-width: 0; }
.quote-title { color: var(--muted); font-weight: 400; }
.quote { align-items: start; }
.side { margin: 0; padding: 4px 10px 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.side-name { margin: 6px 0 2px; font-weight: 700; font-size: 17px; display: flex; justify-content: space-between; }
.side-name b { font-variant-numeric: tabular-nums; }
.small-list { font-size: 13px; color: var(--muted); padding-left: 20px; }
.links { padding-left: 20px; }
.links a { display: inline-block; min-height: 44px; padding-top: 8px; }
.url { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; word-break: break-all; }
.hist-head { margin: 6px 0 2px; }
.hist-time { color: var(--muted); font-size: 13px; }
@media (max-width: 380px) { .side { padding: 4px 8px 10px; } .btn-act { padding: 6px 6px; font-size: 14px; } }
.src a { display: inline-block; min-height: 44px; padding-top: 8px; }

/* ---- 2026-10-07 夜: 画面の並びを、予想の市場でよく使われている形に寄せた（社長の指示）。色は、yosou の色のまま。
   「はい」「いいえ」は、同じ大きさ・同じ太さ（青と、濃い灰。赤と緑は使わない）。値段は数字のまま。JavaScript なし ---- */
:root { --yes: #0f4a9c; --yes-bg: #e9f1fd; --no: #36404f; --no-bg: #eceff4; }
.main-wide { max-width: 1120px; }
.main-mid { max-width: 880px; }
.head-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 14px; }
.head-row h1, .head-row h2 { margin-bottom: 2px; }
.head-row .bal { margin: 4px 0; }
.chips, .quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.chip { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 64px; padding: 4px 16px; border: 1px solid #8b93a3; border-radius: 22px;
        background: var(--panel); color: var(--text); font-size: 15px; font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; }
.chip.on { background: var(--text); border-color: var(--text); color: #fff; }
.qs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.qs-grid li.qc { margin: 0; display: flex; flex-direction: column; padding: 6px 12px 8px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.qc-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 8px; font-size: 13px; color: var(--muted); }
.qc-close { font-variant-numeric: tabular-nums; }
.qc-title { display: block; flex: 1 0 auto; min-height: 44px; padding: 2px 0; color: var(--text); font-weight: 700; font-size: 16px; line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; }
.qc-title:hover { text-decoration: underline; }
.yn-row { margin: 2px 0 0; gap: 8px; }
.yn { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 44px; padding: 3px 12px; border: 2px solid; border-radius: 10px;
      font-weight: 700; font-size: 15px; line-height: 1.3; text-decoration: none; }
.yn b { font-size: 17px; font-variant-numeric: tabular-nums; }
.yn-yes { color: var(--yes); border-color: var(--yes); background: var(--yes-bg); }
.yn-no { color: var(--no); border-color: var(--no); background: var(--no-bg); }
.buy .yn { background: var(--panel); }
.buy .yn-yes.on { background: var(--yes); color: #fff; }
.buy .yn-no.on { background: var(--no); color: #fff; }
.buy .yn.on span::before { content: "\2713\00a0"; }
.buy { margin: 6px 0 14px; padding: 6px 12px 8px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; }
.buy h2 { margin-top: 4px; font-size: 17px; }
.buy-label { margin: 4px 0 2px; font-weight: 700; font-size: 15px; }
.buy .form label { margin-top: 10px; }
.buy .amount-row { grid-template-columns: minmax(7.5em, 1fr) minmax(0, auto); }
.buy .amount-row .btn { padding: 4px 10px; }
.buy .quick { margin: 8px 0 6px; }
.buy .quick .chip { flex: 1 1 0; padding: 4px 8px; }
.buy-form { margin: 0; }
.buy .quote-title { margin: 8px 0 2px; }
.pick { margin: 10px 0; padding: 8px 10px; border: 1px dashed #8b93a3; border-radius: 10px; font-size: 14px; color: var(--muted); }
.q-head h1 { margin-top: 4px; }
.q-head .qc-meta { justify-content: flex-start; margin-top: 8px; }
@media (min-width: 900px) {
  .qpage { display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: auto 1fr; column-gap: 28px; align-items: start; }
  .q-head { grid-column: 1; grid-row: 1; }
  .q-body { grid-column: 1; grid-row: 2; }
  .buy { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 12px; margin-top: 10px; }
}
.tbl { width: 100%; border-collapse: collapse; margin: 0 0 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; font-size: 15px; }
.tbl th { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; font-size: 13px; font-weight: 400; color: var(--muted); line-height: 1.4; vertical-align: bottom; }
.tbl td { padding: 6px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; overflow-wrap: anywhere; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td.num { white-space: nowrap; }
.tbl .tag { white-space: nowrap; }
.tbl td small { font-size: 12px; color: var(--muted); white-space: normal; }
.tbl-q a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
@media (max-width: 719px) {
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; }
  .tbl { border: 0; background: none; }
  .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tbl tr { margin: 0 0 10px; padding: 4px 12px 6px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
  .tbl td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; text-align: right; }
  .tbl td.tbl-q { text-align: left; }
  .tbl td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: 13px; text-align: left; white-space: normal; }
  .tbl tr td:last-child { border-bottom: 0; }
}
@media (max-width: 380px) { .yn { padding: 4px 8px; } .buy { padding: 6px 10px 8px; } }
