/* 部屋 */
.r-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; padding: 4px 0 20px; }
.r-bname { font-size: 16px; font-weight: 700; color: var(--ink-2); text-decoration: none; }
.r-bname:hover { text-decoration: underline; color: var(--ink); }
.r-title h1 { font-size: 34px; font-weight: 800; line-height: 1.35; }
.r-switch { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.r-from { background: var(--paper-2); border-radius: var(--r-m); padding: 10px 16px; font-size: 15px; margin: -8px 0 16px; }
@media (max-width: 640px) { .r-title h1 { font-size: 26px; } }

/* 絵と答え */
.r-hero { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); grid-template-areas: "view ans" "time ans"; gap: 0 28px; align-items: start; }
.r-viewer { grid-area: view; aspect-ratio: 16 / 10.5; }
.timebar { grid-area: time; padding-top: 14px; }
.answer { grid-area: ans; position: sticky; top: 84px; }
.v-state { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .95); border-radius: 999px; padding: 6px 14px; font-size: 15px; font-weight: 700; box-shadow: var(--sh-1); }
.v-state i { width: 12px; height: 12px; border-radius: 50%; background: var(--sun); }
.v-state.shade i { background: var(--shade); } .v-state.back i, .v-state.night i { background: var(--back); }
.v-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); margin: 0; font-size: 14px; color: #fff; background: rgba(31, 28, 25, .6); padding: 4px 12px; border-radius: 999px; pointer-events: none; transition: opacity .4s; white-space: nowrap; }
.v-hint.hide { opacity: 0; }
.tb-row { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.play { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.play svg { width: 22px; height: 22px; }
.tb-clock b { font-size: 28px; font-weight: 800; margin-right: 10px; }
.tb-clock span { font-size: 15px; color: var(--ink-2); }
.tb-range { position: relative; margin-top: 10px; }
.rng-bar { position: relative; height: 10px; border-radius: 5px; background: var(--night); overflow: hidden; margin: 0 9px; }
.rng-bar span { position: absolute; top: 0; bottom: 0; }
.rng-bar .sun { background: var(--sun); } .rng-bar .shade { background: var(--shade); } .rng-bar .back { background: var(--back); }
.tb-range input { margin: 2px 0 0; }

.ans-top { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: center; }
.ans-kicker { font-size: 15px; font-weight: 700; color: var(--ink-2); margin: 0; }
.ans-h { font-size: 24px; font-weight: 800; line-height: 1.45; margin: 0; }
.ans-when { font-size: 18px; font-weight: 700; margin: 16px 0 6px; line-height: 1.6; }
.ans-why { color: var(--ink-2); margin: 0 0 16px; }
.ans-seasons { list-style: none; padding: 0; margin: 0 0 20px; border-top: 1px solid var(--line); }
.ans-seasons li { display: grid; grid-template-columns: 4.5em minmax(0, 1fr); gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.as-n { font-weight: 700; }
.ans-act { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ans-act .btn { padding: 0 12px; }
@media (max-width: 1040px) {
  .r-hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "ans" "view" "time"; gap: 16px; }
  .answer { position: static; }
}
@media (max-width: 640px) {
  .r-viewer { aspect-ratio: 4 / 3.6; }
  .ans-top { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; }
  .ans-top .sun-ic { width: 52px; height: 52px; }
  .ans-h { font-size: 21px; }
  .ans-when { font-size: 17px; }
  .tb-clock b { font-size: 24px; }
  .tb-clock span { display: block; font-size: 14px; }
}

.r-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; margin-top: 24px; }
.r-side { position: sticky; top: 84px; display: grid; gap: 16px; padding-top: 32px; }
.side-card { background: var(--paper-2); border-radius: var(--r-l); padding: 20px; }
.sc-name { font-size: 15px; color: var(--ink-2); margin: 0; }
.sc-room { font-size: 19px; font-weight: 800; margin: 0 0 8px; }
.sc-g { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 0 0 12px; }
.sc-link { font-weight: 700; }
.sc-link .num { margin-left: 6px; }
.side-fac { border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px; }
.side-fac h2 { font-size: 15px; color: var(--ink-2); margin-bottom: 12px; }
.legend-g.mini { gap: 4px 10px; margin-top: 12px; }
@media (max-width: 1040px) { .r-grid { grid-template-columns: minmax(0, 1fr); gap: 0; } .r-side { position: static; padding-top: 0; } .side-card { display: none; } }

/* 季節ごとの1日 */
.days-list { display: grid; gap: 22px; margin-top: 8px; }
.day-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.day-h b { font-size: 18px; }
.day-h span { font-size: 14px; color: var(--ink-3); }
.day-h .day-t { font-size: 16px; color: var(--ink); font-weight: 600; margin-left: auto; }
.bar-wrap { position: relative; }
.bar { position: relative; height: 34px; border-radius: 8px; background: var(--night); overflow: hidden; cursor: pointer; }
.bar > span { position: absolute; top: 0; bottom: 0; }
.bar > span.sun { background: var(--sun); } .bar > span.shade { background: var(--shade); } .bar > span.back { background: var(--back); }
.bar > span.maybe { background: repeating-linear-gradient(135deg, var(--sun) 0 5px, var(--shade) 5px 10px); }
.bar-now { position: absolute; top: -6px; bottom: 22px; width: 0; border-left: 3px solid var(--focus); pointer-events: none; }
.bar-ticks { position: relative; height: 22px; margin-top: 4px; font-size: 14px; color: var(--ink-3); }
.bar-ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.day-why { font-size: 15px; color: var(--ink-2); margin: 4px 0 0; }
@media (max-width: 640px) { .day-h .day-t { margin-left: 0; width: 100%; font-size: 15px; } }

/* 暮らしの目安 */
.life { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.life-c { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; padding: 18px; border-radius: var(--r-l); background: var(--paper-2); }
.life-ic svg { width: 44px; height: 44px; }
.life-c h3 { font-size: 17px; margin-bottom: 4px; }
.life-c p { margin: 0; font-size: 15px; color: var(--ink-2); }
@media (max-width: 760px) { .life { grid-template-columns: minmax(0, 1fr); } }

.big-ans.safe { color: var(--ink); }
.big-ans.wet { color: #9B1C1C; }

/* 値段 */
.pc-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin: 8px 0 20px; }
.pc-f { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 700; }
.pc-f .in { position: relative; display: block; width: 180px; }
.pc-f .input { padding-right: 52px; }
.pc-f .u { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-2); font-weight: 400; }
.pc-out { background: var(--paper-2); border-radius: var(--r-l); padding: 20px 22px 16px; }
.pc-strip { position: relative; height: 48px; margin: 0 6px; }
.pc-strip i { position: absolute; bottom: 8px; width: 8px; height: 8px; border-radius: 50%; background: #B9B1A7; transform: translateX(-50%); }
.pc-strip b { position: absolute; bottom: 0; top: 0; width: 0; border-left: 3px solid var(--accent); }
.pc-strip b::after { content: attr(data-l); position: absolute; top: -4px; left: 6px; font-size: 14px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.pc-strip b.left::after { left: auto; right: 6px; }
.pc-axis { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-3); border-top: 1px solid var(--line-2); padding-top: 4px; margin: 0 6px; }
.pc-msg { font-size: 17px; font-weight: 700; margin: 12px 0 0; }

/* 内見 */
.visit { list-style: none; padding: 0; margin: 0; counter-reset: v; }
.visit li { counter-increment: v; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 4px 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.visit li::before { content: counter(v); grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.visit b { font-size: 17px; }
.visit p { margin: 0; color: var(--ink-2); }
.visit-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.next { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.next-c { border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.next-c .why { font-size: 14px; color: var(--ink-3); }
.next-c h3 { font-size: 17px; }
.next-c p { font-size: 15px; color: var(--ink-2); margin: 0 0 8px; }
@media (max-width: 760px) { .next { grid-template-columns: minmax(0, 1fr); } }

/* スマホの下の欄 */
.sp-dock { display: none; }
@media (max-width: 1040px) {
  .sp-dock { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(31, 28, 25, .08); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); align-items: center; justify-content: space-between; gap: 12px; transform: translateY(110%); transition: transform .25s; }
  .sp-dock.on { transform: none; }
  .dk-t { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .dk-t b { display: block; font-size: 16px; line-height: 1.3; }
  .dk-t small { font-size: 14px; color: var(--ink-2); }
  .sp-dock .btn { min-height: 48px; }
  .gf { padding-bottom: 72px; }
}

/* 答えの欄（第2版の2） */
.ans-day { font-size: 14px; font-weight: 700; color: var(--ink-2); margin: 18px 0 0; }
.ans-sum { font-size: 17px; font-weight: 700; line-height: 1.7; margin: 12px 0 4px; }
.ans-total { font-size: 15px; color: var(--ink-2); margin: 0 0 18px; }
.answer .db-legend { margin-top: 0; }
.day .daybar { cursor: pointer; }
.day .db-bar { cursor: pointer; }
.daybar .bar-now { position: absolute; top: 20px; height: 40px; width: 0; border-left: 3px solid var(--focus); pointer-events: none; }
.day-why { font-size: 15px; color: var(--ink); margin: 2px 0 0; }

/* 手直し（第2版の3） */
.answer { padding: 28px; border-radius: 20px; }
.ans-h { font-size: 26px; }
.ans-sum { font-size: 16px; font-weight: 400; line-height: 1.8; margin: 14px 0 4px; color: var(--ink); }
.ans-total { font-size: 15px; color: var(--ink-2); margin: 0 0 20px; }
.answer .daybar .db-bar { height: 28px; }
.r-hero .viewer { border-radius: 20px; }
.timebar { background: #fff; border-radius: 16px; padding: 14px 18px 8px; margin-top: 12px; }
/* 季節ごとの1日：左に季節、右に帯 */
.days-list { gap: 0; }
.day { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 24px; padding: 18px 0; border-top: 1px solid var(--line); }
.day:first-child { border-top: 0; padding-top: 4px; }
.day-h { display: flex; flex-direction: column; align-items: flex-start; gap: 0; margin: 0; padding-top: 22px; }
.day-h b { font-size: 20px; line-height: 1.3; }
.day-h span { font-size: 14px; color: var(--ink-3); }
.day-h .day-t { margin: 6px 0 0; font-size: 15px; font-weight: 700; color: var(--accent); }
.day-why { grid-column: 2; font-size: 15px; color: var(--ink-2) !important; margin: 0; line-height: 1.7; }
@media (max-width: 640px) {
  .day { grid-template-columns: minmax(0, 1fr); }
  .day-h { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; padding-top: 0; }
  .day-h .day-t { margin: 0 0 0 auto; width: auto; }
  .day-why { grid-column: 1; }
}
/* 住んだときの目安：3つを横に */
.life { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.life-c { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 20px; }
.life-c h3 { font-size: 17px; }
.life-c p { font-size: 15px; color: var(--ink) !important; }
@media (max-width: 900px) { .life { grid-template-columns: minmax(0, 1fr); } .life-c { grid-template-columns: 44px minmax(0, 1fr); } }
.r-side { padding-top: 20px; }
.side-card, .side-fac { background: #fff; border: 0; border-radius: 16px; box-shadow: 0 1px 2px rgba(31, 28, 25, .04); }
.day-h .day-t { display: flex; flex-direction: column; line-height: 1.4; font-size: 17px; }
.day-h .day-t small { font-size: 14px; color: var(--ink-2); font-weight: 400; }
@media (max-width: 640px) { .day-h .day-t { flex-direction: row; gap: 6px; align-items: baseline; font-size: 15px; } }

/* 日当たりの答え：時間を数字で（マークは使わない） */
.ans-len { font-size: 34px; font-weight: 800; line-height: 1.2; margin: 4px 0 0; color: var(--accent); }
.ans-when { font-size: 17px; font-weight: 700; margin: 2px 0 12px; }
/* 季節ごとの1日：3行の表 */
.seasons { width: 100%; border-collapse: collapse; margin-top: 4px; }
.seasons th, .seasons td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.seasons thead th { font-size: 14px; color: var(--ink-2); font-weight: 700; padding-top: 0; }
.seasons tbody th { font-size: 17px; font-weight: 800; white-space: nowrap; }
.seasons tbody th small { display: block; font-size: 13px; font-weight: 500; color: var(--ink-3); }
.seasons .len { font-size: 18px; font-weight: 800; white-space: nowrap; }
.seasons .len.none { color: var(--ink-3); font-weight: 500; }
.seasons .when { font-size: 15px; color: var(--ink-2); }
@media (max-width: 640px) { .ans-len { font-size: 30px; } .seasons th, .seasons td { padding: 11px 4px; } .seasons .when { font-size: 14px; } }
