:root {
  --ink:#29362f;
  --muted:#68736b;
  --paper:#f6f5ee;
  --cream:#ecebe1;
  --line:#d5d9cf;
  --forest:#355848;
  --orange:#bd7353;
  --white:#fff;
  --serif:Georgia,'Yu Mincho','Hiragino Mincho ProN',serif;
}

* {
  box-sizing:border-box;
}

html {
  scroll-behavior:smooth;
}

body {
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:'Yu Gothic','Hiragino Kaku Gothic ProN',Meiryo,sans-serif;
  font-size:15px;
  line-height:1.8;
}

button,input,select {
  font:inherit;
}

button,.file-label {
  cursor:pointer;
}

button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,a:focus-visible {
  outline:3px solid #d48c5e;
  outline-offset:3px;
}

.wrap {
  max-width:1200px;
  margin:auto;
  padding-left:32px;
  padding-right:32px;
}

.header {
  height:88px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 5.2%;
  background:#fafaf5;
}

.brand {
  display:flex;
  gap:12px;
  align-items:center;
  color:inherit;
  text-decoration:none;
  font-size:12px;
  line-height:1.25;
  letter-spacing:.08em;
}

.brand b {
  font-size:15px;
}

.brand-mark {
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  background:var(--forest);
  color:white;
  font-family:var(--serif);
  font-size:20px;
}

.header-note {
  font-family:var(--serif);
  font-size:11px;
  color:var(--muted);
  line-height:1.5;
}

.hero {
  display:grid;
  grid-template-columns:1fr 1fr;
  min-height:590px;
}

.hero-copy {
  padding:65px max(35px,10vw) 55px 10.4vw;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.eyebrow,.section-number {
  font-size:10px;
  font-weight:700;
  letter-spacing:.18em;
  color:var(--forest);
}

.eyebrow {
  display:flex;
  gap:35px;
}

.hero h1 {
  font-family:var(--serif);
  font-size:clamp(38px,4.2vw,64px);
  line-height:1.38;
  letter-spacing:.06em;
  font-weight:500;
  margin:31px 0 23px;
}

.hero h1 em {
  font-style:normal;
  color:var(--forest);
}

.hero-copy>p {
  color:#59675e;
  line-height:2.1;
}

.hero-actions {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:24px;
}

.primary,.secondary {
  border:1px solid var(--forest);
  padding:15px 21px;
  min-height:52px;
  transition:.2s;
  background:transparent;
  color:var(--forest);
  font-weight:700;
  font-size:13px;
}

.primary {
  background:var(--forest);
  color:white;
}

.primary span,.secondary span {
  margin-left:20px;
}

.primary:hover {
  background:#213f31;
}

.secondary:hover {
  background:#e3e9e2;
}

.hero-foot {
  font-size:10px;
  color:var(--muted);
  margin-top:32px;
  white-space:nowrap;
}

.hero-foot i {
  display:inline-block;
  width:3px;
  height:3px;
  background:var(--orange);
  border-radius:100%;
  vertical-align:middle;
  margin:0 10px;
}

.hero-art {
  position:relative;
  overflow:hidden;
  background:#c6d0be;
  min-height:430px;
}

.art-window {
  position:absolute;
  inset:9% 10% 19% 12%;
  background:#e7dfcd;
  border:13px solid #efe9db;
  box-shadow:0 0 0 2px #b5bdae;
}

.window-grid {
  position:absolute;
  z-index:2;
  left:50%;
  top:0;
  width:10px;
  height:100%;
  background:#f3eee2;
  box-shadow:0 0 3px #a5a89a;
}

.landscape {
  position:absolute;
  inset:0;
  background:linear-gradient(170deg,transparent 59%,#93a38b 60% 65%,transparent 66%),linear-gradient(15deg,#7e927c 0 25%,#b0bda4 26% 39%,#d6ddc9 40% 55%,#dfe6da 56%);
}

.art-floor {
  position:absolute;
  bottom:0;
  width:100%;
  height:23%;
  background:#b8aa92;
  transform:skewY(-3deg);
  transform-origin:left;
}

.sun {
  position:absolute;
  width:160px;
  height:160px;
  border-radius:50%;
  background:#eee8cd;
  top:17%;
  right:18%;
  opacity:.7;
}

.art-chair {
  position:absolute;
  bottom:12%;
  left:29%;
  width:150px;
  height:75px;
  background:#806e56;
  border-radius:60% 50% 10% 10%;
  transform:rotate(-6deg);
  box-shadow:10px 15px 0 #635642;
}

.art-chair:before,.art-chair:after {
  content:'';
  position:absolute;
  top:65px;
  width:6px;
  height:85px;
  background:#514b3f;
}

.art-chair:before {
  left:20px;
  transform:rotate(8deg);
}

.art-chair:after {
  right:20px;
  transform:rotate(-8deg);
}

.art-chair div {
  position:absolute;
  width:130px;
  height:65px;
  border:15px solid #806e56;
  border-bottom:0;
  border-radius:60% 60% 0 0;
  top:-50px;
  left:5px;
}

.art-caption {
  position:absolute;
  right:7%;
  bottom:5%;
  color:white;
  font:12px/1.3 Georgia;
  letter-spacing:.14em;
}

.art-caption span {
  color:#e7b194;
}

.art-label {
  position:absolute;
  top:7%;
  right:5%;
  font:13px/1.8 var(--serif);
  writing-mode:vertical-rl;
  color:#455c4a;
}

.intro {
  padding-top:100px;
  padding-bottom:100px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:30px 90px;
}

.intro h2,.section-heading h2,.result-head h2,.storage h2 {
  font:500 clamp(27px,3vw,38px)/1.6 var(--serif);
  letter-spacing:.04em;
  margin:15px 0;
}

.intro>p {
  max-width:480px;
  align-self:end;
  color:var(--muted);
}

.intro-steps {
  grid-column:1/-1;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  border-top:1px solid var(--line);
  margin-top:24px;
}

.intro-steps div {
  padding:24px 0;
  display:flex;
  gap:20px;
  border-bottom:1px solid var(--line);
}

.intro-steps b {
  color:var(--orange);
  font-family:Georgia;
}

.form-section {
  background:#e8ece4;
  padding:90px 0;
}

.section-heading,.result-head {
  display:flex;
  justify-content:space-between;
  gap:30px;
  align-items:end;
  margin-bottom:35px;
}

.section-heading p,.result-head p {
  color:var(--muted);
  font-size:13px;
}

.form-section form {
  background:#fbfcf8;
  padding:40px;
}

.form-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:32px;
}

fieldset {
  border:0;
  padding:0;
  margin:0;
  min-width:0;
}

fieldset.wide {
  grid-column:1/-1;
}

legend {
  font-weight:700;
  margin-bottom:13px;
}

legend span {
  font:italic 16px Georgia;
  color:var(--orange);
  margin-right:10px;
}

legend small {
  font-weight:400;
  color:var(--muted);
  margin-left:10px;
}

.choice-row,.wish-grid {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.choice input {
  position:absolute;
  opacity:0;
}

.choice span {
  display:block;
  padding:10px 18px;
  border:1px solid var(--line);
  background:white;
  cursor:pointer;
}

.choice input:checked+span {
  background:var(--forest);
  color:white;
  border-color:var(--forest);
}

.choice input:focus-visible+span {
  outline:3px solid #d48c5e;
  outline-offset:2px;
}

select,input[type=number] {
  width:100%;
  padding:11px 12px;
  border:1px solid #bdc9be;
  background:white;
  color:var(--ink);
  border-radius:0;
}

label {
  font-size:13px;
  font-weight:700;
}

label small {
  display:block;
  color:var(--muted);
  font-weight:400;
}

.hint,.disclaimer {
  font-size:11px;
  color:var(--muted);
}

.optional {
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  margin:30px 0;
}

summary {
  cursor:pointer;
  list-style:none;
  padding:18px 0;
  font-weight:700;
}

summary span {
  float:right;
}

.inputs-grid {
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:15px;
}

.optional .inputs-grid {
  padding:0 0 24px;
}

.submit {
  min-width:250px;
}

.results {
  padding-top:95px;
  padding-bottom:100px;
}

.result-actions {
  display:flex;
  gap:15px;
  flex-wrap:wrap;
}

.text-button {
  border:0;
  background:none;
  color:var(--forest);
  text-decoration:underline;
  padding:8px;
}

.notice {
  border-left:3px solid var(--orange);
  padding:15px 20px;
  background:#f1e9df;
  font-size:13px;
  margin-bottom:25px;
}

.plan-cards {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
}

.plan-card {
  background:white;
  padding:28px;
  border-top:5px solid #829889;
}

.plan-card:nth-child(2) {
  border-color:var(--orange);
}

.plan-card:nth-child(3) {
  border-color:#b4a77c;
}

.plan-card.selected {
  box-shadow:0 0 0 2px var(--forest);
}

.plan-card .number {
  font:italic 14px Georgia;
  color:var(--orange);
}

.plan-card h3 {
  font:500 25px var(--serif);
  margin:10px 0;
}

.plan-card p,.plan-card li {
  font-size:13px;
}

.plan-card ul {
  padding-left:20px;
}

.plan-card h4 {
  font-size:12px;
  margin-bottom:3px;
}

.plan-card button {
  width:100%;
  margin-top:15px;
}

.tag {
  display:inline-block;
  background:#edf1eb;
  color:var(--forest);
  padding:3px 9px;
  font-size:10px;
}

.comparison,.workbench,#details-output,.storage {
  margin-top:85px;
}

.subheading span {
  font-size:10px;
  letter-spacing:.15em;
  color:var(--forest);
}

h3 {
  font-family:var(--serif);
}

.table-scroll {
  overflow:auto;
}

table {
  border-collapse:collapse;
  width:100%;
  min-width:650px;
  background:white;
  font-size:13px;
}

th,td {
  text-align:left;
  padding:16px;
  border-bottom:1px solid var(--line);
  vertical-align:top;
}

th {
  background:#e7ece5;
}

td:first-child {
  font-weight:700;
}

.editor-layout {
  display:grid;
  grid-template-columns:1fr 1.5fr;
  gap:15px;
}

.panel {
  background:white;
  padding:30px;
}

.panel h3 {
  margin-top:0;
}

.panel label {
  display:block;
  margin-bottom:12px;
}

.panel select,.panel input {
  margin-top:5px;
}

.detail-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
}

.detail-grid section {
  background:#fff;
  padding:24px;
}

.detail-grid li {
  font-size:13px;
  margin-bottom:7px;
}

.detail-grid ul {
  padding-left:20px;
}

.storage {
  display:grid;
  grid-template-columns:1fr 1.3fr;
  gap:20px;
}

.storage p {
  font-size:13px;
  color:var(--muted);
}

.storage-actions {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-content:start;
}

.storage-actions button,.file-label {
  font-size:12px;
  padding:12px;
}

.file-label input {
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
}

#storage-status,#diff {
  grid-column:1/-1;
}

.footer-inner {
  display:flex;
  justify-content:space-between;
  gap:30px;
  padding-top:45px;
  padding-bottom:45px;
}

footer {
  background:#2c4035;
  color:#e8ede6;
  font-size:12px;
}

footer p {
  opacity:.75;
}

.print-only {
  display:none;
}

@media(max-width:760px) {
  .header {
    height:72px;
  }
  .hero {
    grid-template-columns:1fr;
  }
  .hero-copy {
    padding:48px 24px;
  }
  .hero h1 {
    font-size:39px;
  }
  .hero-art {
    min-height:190px;
    grid-row:auto;
  }
  .hero-foot {
    white-space:normal;
  }
  .wrap {
    padding-left:20px;
    padding-right:20px;
  }
  .intro {
    padding-top:65px;
    padding-bottom:65px;
    grid-template-columns:1fr;
    gap:10px;
  }
  .intro-steps {
    grid-template-columns:1fr;
  }
  .intro-steps div {
    padding:12px 0;
  }
  .form-section {
    padding:65px 0;
  }
  .section-heading,.result-head {
    display:block;
  }
  .form-section form {
    padding:22px;
  }
  .form-grid,.editor-layout,.storage {
    grid-template-columns:1fr;
  }
  .form-grid fieldset.wide {
    grid-column:auto;
  }
  .plan-cards,.detail-grid {
    grid-template-columns:1fr;
  }
  .results {
    padding-top:65px;
  }
  .comparison,.workbench,#details-output,.storage {
    margin-top:60px;
  }
  .footer-inner {
    display:block;
  }
  .header-note {
    display:none;
  }
}

@media print {
  .header,.hero,.intro,.form-section,.result-actions,.workbench,.storage-actions,footer,.plan-card button,.comparison {
    display:none!important;
  }
  body {
    background:white;
    font-size:10pt;
  }
  .results {
    padding:0;
  }
  .plan-cards {
    display:block;
  }
  .plan-card {
    display:none;
  }
  .plan-card.selected {
    display:block;
    box-shadow:none;
    border:1px solid #777;
    break-inside:avoid;
  }
  .notice {
    padding:8px;
  }
  .detail-grid {
    display:block;
  }
  .detail-grid section {
    padding:6px 0;
    break-inside:avoid;
  }
  #details-output,.storage {
    margin-top:12px;
  }
  .storage {
    display:block;
    padding:0;
  }
  .print-only {
    display:block;
  }
  @page {
    size:A4;
    margin:15mm;
  }
}

[hidden] { display: none !important; }
.header-note { color: var(--forest); font: 700 14px/1.5 'Yu Gothic', Meiryo, sans-serif; }
.hero-copy .eyebrow { font-size: 13px; color: var(--forest); letter-spacing: .06em; }
.hero-copy > p { max-width: 36ch; }
.art-window { overflow: hidden; }
.art-plant { position: absolute; right: 18%; bottom: 15%; width: 35px; height: 45px; background: #a65c43; border-radius: 2px 2px 10px 10px; }
.art-plant i { position: absolute; width: 20px; height: 36px; border-radius: 90% 5%; background: #405f49; top: -29px; left: 17px; transform: rotate(10deg); }
.art-plant i:nth-child(2) { top: -24px; left: 0; transform: rotate(-55deg); }
.art-plant i:nth-child(3) { top: -51px; left: 13px; transform: rotate(-25deg); background: #56735a; }
.reopen { display: flex; gap: .6em; align-items: center; flex-wrap: wrap; }
.reopen button, .reopen label { color: var(--forest); font-weight: 700; }
.file-label:focus-within, .table-scroll:focus-visible { outline: 3px solid #b75b31; outline-offset: 3px; }
#stage { display: block; margin-top: 8px; }
#quick-storage-status:empty, #storage-status:empty, #result-status:empty, #diff:empty { display: none; }
.plan-card h4 { color: var(--forest); }
.plan-card h3 { line-height: 1.3; }
.plan-card { display: flex; flex-direction: column; }
.plan-card button { margin-top: auto; }
.plan-card li { margin-bottom: 7px; }
.plan-card button[aria-pressed="true"] { background: var(--forest); color: white; }
.table-scroll th[scope="row"] { font-weight: 700; background: #f5f6f2; }
.comparison > p { margin: .1rem 0 1rem; }
.finance-group { border-top: 1px solid var(--line); margin-top: 24px; }
.finance-group legend { padding-right: .65rem; }
.inputs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cost-detail { margin-top: 20px; }
.cost-detail details { border-bottom: 1px solid var(--line); padding: 0 10px; }
.cost-detail summary::after { content: '＋'; float: right; }
.cost-detail details[open] summary::after { content: '−'; }
.cost-detail a { color: var(--forest); }
.next-step { display: flex; gap: 18px; align-items: center; justify-content: space-between; margin-top: 24px; padding: 16px 24px; background: #e8ece4; }
.next-step button { flex: 0 0 auto; }
.guide { padding-top: 65px; padding-bottom: 80px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 25px; }
.guide-grid article { border-top: 1px solid var(--line); }
.footer-inner details { max-width: 470px; }
.footer-inner summary { padding: 0; text-decoration: underline; }
.panel, .detail-grid section, .plan-card { min-width: 0; }
.hint, .disclaimer { font-size: 13px; }
@media (max-width: 760px) {
  .hero h1 { font-size: clamp(32px, 9.3vw, 45px); }
  .hero-art { grid-row: auto; min-height: clamp(180px, 56vw, 250px); }
  .hero-copy { padding: 25px 22px 28px; }
  .art-chair { scale: .66; transform-origin: bottom left; left: 27%; }
  .sun { width: 70px; height: 70px; }
  .header-note { display: block; font-size: 12px; }
  .guide-grid { grid-template-columns: 1fr; gap: 10px; }
  .next-step { display: block; padding-bottom: 22px; }
}
@media (max-width: 430px) {
  .submit { min-width: min(250px, 100%); }
  .storage { padding: 22px; }
  .inputs-grid { grid-template-columns: 1fr; }
  .hero-actions { gap: 8px; }
  .hero-actions button { padding: 10px; flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  button { transition: none; }
}
@media print {
  .guide, .storage, .next-step, #result-status, .result-head, .cost-detail summary::after { display: none !important; }
  html, body { width: auto; }
  #details-output, .cost-detail { margin-top: 8px; }
  .results, .wrap { max-width: none; padding: 0; }
  .detail-grid section { break-inside: auto; }
  .detail-grid li, .cost-detail li, h2, h3, h4 { break-inside: avoid; }
  h2, h3, h4, summary { break-after: avoid; }
  .plan-card { padding: 8px 12px; }
  .print-heading { margin: 0 0 14px; font: 700 18pt/1.35 var(--serif); }
}

@media print {
  #results > :not(#consultation) { display: none !important; }
  #consultation { display: block; color: #151d17; font-size: 9.6pt; line-height: 1.45; }
  .sheet-page h1 { margin: 0 0 10pt; font: 700 20pt/1.2 var(--serif); }
  .sheet-page h2 { margin: 13pt 0 5pt; font-size: 14pt; padding-bottom: 3pt; border-bottom: 1px solid #9caea1; }
  .sheet-page h3 { margin: 7pt 0 2pt; font-size: 10pt; }
  .sheet-page p, .sheet-page ul { margin: 3pt 0 6pt; }
  .sheet-page ul { padding-left: 13pt; }
  .sheet-page li { break-inside: avoid; }
  .sheet-mark { color: #355848; font-weight: 700; }
  .sheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15pt; }
  .sheet-budget { break-before: page; }
}

.next-summary{margin-top:28px;padding:26px 30px;background:#e5ece3;border-left:4px solid var(--forest);display:grid;grid-template-columns:1fr auto;gap:8px 30px}.next-summary h3{margin:0 0 8px}.next-summary p{margin:5px 0}.next-summary ul{margin:10px 0;padding-left:20px}.next-summary li{font-size:13px;margin:4px 0}.next-summary-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.next-summary>.hint{grid-column:1/-1}.plan-card [data-edit-jump]{width:100%;margin-top:4px}.plan-card h4{margin-bottom:4px}.plan-card li{margin-bottom:6px}@media(max-width:760px){.next-summary{grid-template-columns:1fr;padding:22px}.next-summary-actions>*{flex:1;min-width:180px}}@media print{.next-summary{display:none}}

.cost-guide{margin:65px 0;padding:30px;background:#fff}.cost-examples{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px}.cost-example{padding:20px;border:1px solid var(--line);background:#fafbf7}.cost-example h4{margin:4px 0}.cost-example p{font-size:13px}.cost-example .cost-range{font-size:21px;font-weight:700;color:var(--forest)}.cost-guide>ul{padding-left:20px}.optional>label{display:block;margin:0 0 20px}@media(max-width:760px){.cost-guide{padding:20px;margin:45px 0}}@media print{.cost-guide{display:none}}

.scope-control { margin: 20px 0; padding: 20px; border: 1px solid var(--line); }
.scope-floor { padding: 12px 0; border-top: 1px solid var(--line); }
.scope-options { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 10px 0 0; }
.scope-options label { display: inline-flex; align-items: center; gap: 5px; }
.scope-options input[type=text] { width: 10em; max-width: 100%; }
@media(max-width: 760px) { .scope-control { padding: 14px; } .scope-options { gap: 10px; } }
