/* 夜の紺と白。揺れが観測されたときだけ、答えに薄い橙を敷く。 */
:root { --bg: #f5f6f8; --card: #fff; --ink: #1c2430; --muted: #536273; --line: #d5dde6; --line-strong: #7f8ea1; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; padding: 24px 16px 56px; background: var(--bg); color: var(--ink); font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", system-ui, sans-serif; line-height: 1.7; -webkit-text-size-adjust: 100%; }
.site-head, main, .site-foot { max-width: 680px; margin-inline: auto; }
.site-head { margin-bottom: 18px; }
.eyebrow { margin: 0; font-size: 12px; letter-spacing: .14em; color: var(--muted); font-weight: 700; }
h1 { margin: 0; font-size: 26px; }
.site-description { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 18px; box-shadow: 0 6px 20px #1c243008; }
.button { min-height: 48px; padding: 10px 18px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.button:hover { background: #e8eef5; }
.button--primary { background: var(--ink); color: white; border-color: var(--ink); }
.button--primary:hover { background: #344356; }
.button:disabled { opacity: .6; cursor: wait; }
:focus-visible { outline: 3px solid #0065b0; outline-offset: 3px; }
#check { width: 100%; min-height: 56px; margin-top: 18px; font-size: 18px; }
.button--wide { width: 100%; margin-top: 16px; }
/* 場所が未設定のあいだは、押すべきものを「市区町村から選ぶ」に入れ替える */
#app[data-place="none"] #check { display: block; width: auto; min-height: 44px; margin: 14px auto 0; padding: 8px 20px; font-size: 15px; background: var(--card); color: var(--ink); border-color: var(--line-strong); }
#app[data-place="none"] #check:hover { background: #e8eef5; }
#app[data-place="none"] .actions { flex-direction: column; align-items: stretch; }
#app[data-place="none"] #pick-place { order: -1; width: 100%; min-height: 56px; font-size: 18px; background: var(--ink); color: white; border-color: var(--ink); }
#app[data-place="none"] #pick-place:hover { background: #344356; }
#app[data-place="none"] #use-location { align-self: flex-start; }
/* 状態が変わっても下のボタンが動かないよう、答えのカードは最低の高さをそろえて中身を縦に中央へ */
.headline { display: flex; flex-direction: column; justify-content: center; min-height: 15em; padding: 18px; border-radius: 10px; background: #e8eef5; }
.headline[data-kind="shook"], .headline[data-kind="shook-pref"] { background: #fbe9d7; }
.headline--error { background: #f3e6e6; }
.error__title { margin: 0; font-size: clamp(30px, 7.9vw, 40px); line-height: 1.3; word-break: keep-all; overflow-wrap: anywhere; }
.headline--error p { margin: 10px 0 0; font-size: 15px; }
#answer { margin: 0; font-size: clamp(30px, 7.9vw, 40px); line-height: 1.3; word-break: keep-all; overflow-wrap: anywhere; }
#answer-sub { margin: 12px 0 0; font-size: 15px; word-break: keep-all; overflow-wrap: anywhere; }
.answer-note { margin: 10px 0 0; font-size: 14px; color: var(--muted); text-align: center; word-break: keep-all; overflow-wrap: anywhere; }
.place-hint { display: inline-block; align-self: flex-start; margin: 12px 0 0; padding: 6px 10px; border-radius: 6px; background: var(--card); border: 1px dashed var(--line-strong); font-size: 14px; font-weight: 700; color: var(--muted); }
#your-intensity { align-self: flex-start; }
/* ボタンを押したときの見出しだけ動かす。 */
#answer.appear { animation: rise .6s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.notice { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
#checked-at { text-align: center; }
.place-row { margin: 20px 0; }
#place-name { margin: 0 0 8px; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.today { border-top: 1px solid var(--line); padding-top: 16px; }
#today-label { margin: 0; font-size: 14px; font-weight: 500; }
.count { margin: 0 0 12px; }
#today-count { font-size: 22px; line-height: 1.2; font-variant-numeric: tabular-nums; }
#strip, #strip-axis { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; }
.strip-cell { display: flex; flex-direction: column; align-items: stretch; gap: 3px; }
.strip-cell__bar { display: block; height: 28px; border-radius: 3px; background: #e8eef5; }
.strip-cell__num { display: block; min-height: 14px; text-align: center; font-size: 11px; line-height: 14px; font-weight: 700; color: var(--ink); }
.strip-peak { margin: 8px 0 0; font-size: 14px; font-weight: 700; }
#strip-axis { font-size: 10px; color: var(--muted); margin-top: 4px; }
#strip-axis span { overflow: visible; white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.legend__label { margin-right: 2px; }
.legend__item { display: inline-flex; align-items: center; gap: 4px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.badge { display: inline-block; border: 1px solid #778697; padding: 3px 8px; border-radius: 5px; font-weight: 700; font-size: 12px; }
#your-intensity { font-size: 20px; padding: 6px 12px; margin: 12px 0 0; }
[data-intensity="1"] { background: #f2f2ff; color: #1c2430; box-shadow: inset 0 0 0 1px #778697; }
[data-intensity="2"] { background: #00aaff; color: #102030; }
[data-intensity="3"] { background: #0041ff; color: #fff; }
[data-intensity="4"] { background: #fae696; color: #1c2430; }
[data-intensity="5-"] { background: #ffe600; color: #1c2430; }
[data-intensity="5+"] { background: #ff9900; color: #1c2430; }
[data-intensity="6-"] { background: #ff2800; color: #1c2430; }
[data-intensity="6+"] { background: #a50021; color: #fff; }
[data-intensity="7"] { background: #b40068; color: #fff; }
#your-town { font-size: 14px; margin: 22px 0; }
details { margin-top: 20px; border-top: 1px solid var(--line); }
summary { min-height: 44px; padding: 10px 0; cursor: pointer; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
th, td { padding: 10px 4px; border-bottom: 1px solid var(--line); text-align: left; overflow-wrap: anywhere; }
th:first-child { width: 27%; } th:last-child { width: 22%; }
.result-share { margin: 20px 0 0; }
.dialog { width: min(420px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 14px; padding: 20px; color: var(--ink); background: var(--card); }
.dialog::backdrop { background: #1c243066; }
.dialog__title { margin: 0 0 14px; font-size: 18px; }
.dialog__label { display: block; margin: 10px 0 4px; font-size: 13px; color: var(--muted); }
.dialog__select { width: 100%; min-height: 48px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; }
.dialog__actions { display: flex; gap: 10px; margin-top: 18px; }
.dialog__actions .button { flex: 1; }
.site-foot { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.site-foot p { margin: 0 0 6px; }
.site-foot a { color: inherit; }
@media (prefers-reduced-motion: reduce) { #answer.appear { animation: none; } }
