:root {
  --ink: #2f241f;
  --muted: #8a776c;
  --paper: #fff;
  --canvas: #f7f2e8;
  --border: #e3d7c5;
  --border-soft: #eee5d8;
  --orange: #f34d2d;
  --orange-dark: #dc3d21;
  --orange-soft: #fff1ec;
  --sage: #e3ebd2;
  --sage-ink: #536244;
  --green: #06c755;
  --shadow: 0 12px 35px rgba(65, 44, 33, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  line-height: 1.65;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }

.simulator-app { min-height: 100vh; padding: 0 28px 72px; }
.page-header { max-width: 1320px; margin: 0 auto; padding: 36px 20px 30px; text-align: center; }
.page-header__eyebrow { margin: 0; color: var(--orange); font-size: .77rem; font-weight: 900; letter-spacing: .24em; }
.page-header h1 { margin: 8px 0 4px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(1.7rem, 3.5vw, 2.35rem); letter-spacing: .05em; }
.page-header h1 span { font-size: .58em; color: var(--muted); }
.page-header__lead { margin: 0; color: var(--muted); font-size: .88rem; }

.simulator-layout { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 24px; align-items: start; }
.input-card, .quote-sheet { background: var(--paper); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); }
.input-card { position: sticky; top: 18px; padding: 27px 24px 24px; }
.quote-sheet { padding: 42px 44px 36px; min-width: 0; }

.card-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.heading-icon { width: 39px; height: 39px; display: grid; place-items: center; color: #fff; background: var(--orange); border-radius: 50%; font-size: .7rem; font-weight: 900; }
.card-heading p, .card-heading h2 { margin: 0; }
.card-heading p { color: var(--orange); font-size: .62rem; font-weight: 900; letter-spacing: .18em; }
.card-heading h2 { font-size: 1.16rem; }

.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 7px; font-size: .84rem; font-weight: 800; }
.field label span { margin-left: 4px; color: var(--muted); font-size: .68rem; font-weight: 500; }
.field-note { margin: 6px 0 0; color: var(--muted); font-size: .69rem; }
.date-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.control { width: 100%; min-height: 48px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid var(--border); border-radius: 11px; transition: border-color .18s, box-shadow .18s; }
.control::placeholder { color: #b6a79e; }
.control:focus, .visits-select:focus, #catCount:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(243,77,45,.12); }
.error-message { margin: -8px 0 12px; color: #c73922; font-size: .72rem; font-weight: 700; }

.number-control { display: grid; grid-template-columns: 47px 1fr 47px; min-height: 49px; border: 1px solid var(--border); border-radius: 11px; overflow: hidden; }
.number-button { border: 0; color: var(--orange); background: #fff8f5; font-size: 1.25rem; font-weight: 700; cursor: pointer; }
.number-button:hover { background: var(--orange-soft); }
.number-value { display: flex; align-items: center; justify-content: center; gap: 5px; border-inline: 1px solid var(--border-soft); }
#catCount { width: 42px; border: 0; text-align: right; color: var(--ink); background: transparent; font-size: 1.05rem; font-weight: 800; appearance: textfield; }
#catCount::-webkit-inner-spin-button { appearance: none; }

.schedule-block { margin: 4px 0 18px; padding-top: 17px; border-top: 1px solid var(--border-soft); }
.mini-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.mini-heading h3 { margin: 0; font-size: .85rem; }
.mini-heading span { padding: 3px 7px; color: var(--orange-dark); background: var(--orange-soft); border-radius: 99px; font-size: .59rem; font-weight: 800; white-space: nowrap; }
.schedule-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 84px; color: var(--muted); background: #fcfaf6; border: 1px dashed var(--border); border-radius: 11px; }
.schedule-empty span { font-size: 1.3rem; }
.schedule-empty p { margin: 2px 0 0; font-size: .7rem; }
.schedule-list { max-height: 285px; display: grid; gap: 7px; overflow-y: auto; padding-right: 3px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.schedule-row { display: grid; grid-template-columns: minmax(84px, 1fr) 86px 70px; align-items: center; gap: 7px; padding: 8px 9px; background: #fcfaf6; border: 1px solid var(--border-soft); border-radius: 10px; }
.schedule-row.is-busy { background: #fff5f1; border-color: #f6c8ba; }
.schedule-date strong, .schedule-date small { display: block; }
.schedule-date strong { font-size: .76rem; }
.schedule-date small { color: var(--muted); font-size: .58rem; }
.visits-select { width: 100%; min-height: 34px; padding: 4px 5px; color: var(--ink); background: #fff; border: 1px solid var(--border); border-radius: 8px; font-size: .69rem; }
.busy-check { display: flex; align-items: center; justify-content: center; gap: 4px; cursor: pointer; font-size: .65rem; font-weight: 700; white-space: nowrap; }
.busy-check input { width: 16px; height: 16px; accent-color: var(--orange); }

.option-row { display: flex; align-items: flex-start; gap: 9px; margin: 16px 0 19px; padding: 13px; background: var(--orange-soft); border: 1px solid #f9d4c8; border-radius: 11px; cursor: pointer; }
.option-row input { position: absolute; opacity: 0; pointer-events: none; }
.option-check { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 1px; background: #fff; border: 1.5px solid #e5a997; border-radius: 5px; position: relative; }
.option-row input:checked + .option-check { background: var(--orange); border-color: var(--orange); }
.option-row input:checked + .option-check::after { content: "✓"; position: absolute; inset: -4px 0 0; color: #fff; text-align: center; font-weight: 900; }
.option-row input:focus-visible + .option-check { outline: 3px solid rgba(243,77,45,.2); }
.option-row strong, .option-row small { display: block; }
.option-row strong { font-size: .75rem; }
.option-row small { color: var(--muted); font-size: .64rem; }
.simulation-note { margin: 3px 0 0; padding: 11px 12px; color: var(--sage-ink); background: #f1f5e9; border-radius: 9px; font-size: .65rem; text-align: center; }

.quote-top { display: flex; justify-content: flex-end; align-items: flex-start; }
.estimate-badge { padding: 6px 11px; color: var(--orange-dark); background: var(--orange-soft); border: 1px solid #f6cdbf; border-radius: 99px; font-size: .65rem; font-weight: 800; white-space: nowrap; }
.result-heading { margin: 31px 0 26px; padding: 20px 16px; text-align: center; background: #fcfaf6; border-block: 1px solid var(--border); }
.result-heading p, .result-heading h2, .result-heading span { margin: 0; }
.result-heading p { color: var(--orange); font-size: .64rem; font-weight: 900; letter-spacing: .18em; }
.result-heading h2 { margin-top: 4px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 1.4rem; letter-spacing: .08em; }
.result-heading span { display: block; margin-top: 4px; color: var(--muted); font-size: .64rem; }
.quote-section { margin-top: 23px; }
.quote-section h3 { margin: 0 0 10px; padding-bottom: 7px; color: var(--orange); border-bottom: 1px solid var(--border); font-size: .82rem; }
.service-summary p { margin: 5px 0; font-size: .76rem; }

.grand-total { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 27px; padding: 17px 22px; color: #fff; background: var(--orange); border-radius: 12px; }
.grand-total > span { font-size: .77rem; font-weight: 800; }
.grand-total small { font-size: .6rem; font-weight: 500; }
.grand-total strong { display: flex; align-items: baseline; gap: 4px; font-size: 1rem; }
.grand-total b { font-size: clamp(1.85rem, 4vw, 2.4rem); line-height: 1; }

.breakdown-table { width: 100%; border-collapse: collapse; font-size: .76rem; }
.breakdown-table th, .breakdown-table td { padding: 10px 2px; border-bottom: 1px dashed var(--border); }
.breakdown-table th { text-align: left; font-weight: 500; }
.breakdown-table td { text-align: right; white-space: nowrap; }
.breakdown-table .discount-row { color: var(--orange); }
.breakdown-table .total-row th, .breakdown-table .total-row td { padding-top: 13px; border-top: 2px solid var(--ink); border-bottom: 0; font-size: .9rem; font-weight: 900; }
.urgent-notice { margin: 10px 0 0; padding: 8px 10px; color: #ad3b25; background: var(--orange-soft); border-radius: 7px; font-size: .65rem; }

.sage-box { padding: 13px 16px; color: var(--sage-ink); background: var(--sage); border-radius: 11px; }
.sage-box ul { margin: 0; padding-left: 1.2rem; font-size: .68rem; }
.sage-box li + li { margin-top: 3px; }
.plain-notes { font-size: .68rem; }
.plain-notes p { margin: 7px 0; }
.quote-notes p { margin: 0; color: var(--muted); font-size: .65rem; }
.quote-footer { display: flex; flex-direction: column; align-items: flex-end; margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--border); font-size: .64rem; }
.quote-footer strong { color: var(--orange); font-size: .8rem; }

.line-button { min-height: 52px; display: flex; justify-content: center; align-items: center; gap: 9px; margin-top: 24px; color: #fff; background: var(--green); border-radius: 11px; text-decoration: none; font-size: .8rem; font-weight: 900; }
.line-button span { width: 28px; height: 28px; display: grid; place-items: center; color: var(--green); background: #fff; border-radius: 50%; font-size: .48rem; }
.line-button:hover { filter: brightness(.96); }

@media (max-width: 980px) {
  .simulator-layout { grid-template-columns: 1fr; max-width: 760px; }
  .input-card { position: static; }
}

@media (max-width: 600px), (max-device-width: 600px) {
  body { font-size: 16px; line-height: 1.7; }
  .simulator-app { padding: 0 12px 48px; }
  .page-header { padding: 24px 5px 20px; }
  .page-header__eyebrow { font-size: .7rem; letter-spacing: .2em; }
  .page-header h1 { margin-top: 7px; font-size: 1.65rem; line-height: 1.35; letter-spacing: .02em; }
  .page-header h1 span { display: inline-block; font-size: .58em; }
  .page-header__lead { max-width: 330px; margin: 7px auto 0; font-size: .86rem; line-height: 1.65; }
  .simulator-layout { gap: 18px; }
  .input-card, .quote-sheet { border-radius: 16px; }
  .input-card { padding: 23px 18px; }
  .quote-sheet { padding: 24px 18px 28px; }
  .card-heading { margin-bottom: 25px; }
  .heading-icon { width: 42px; height: 42px; font-size: .78rem; }
  .card-heading p { font-size: .7rem; }
  .card-heading h2 { font-size: 1.25rem; }
  .field { margin-bottom: 21px; }
  .field label { margin-bottom: 8px; font-size: 1rem; }
  .field-note { margin-top: 7px; font-size: .8rem; }
  .date-fields { grid-template-columns: 1fr; gap: 0; }
  .control { min-height: 54px; padding: 12px 14px; border-radius: 12px; font-size: 16px; }
  .number-control { grid-template-columns: 58px 1fr 58px; min-height: 56px; border-radius: 12px; }
  .number-button { min-width: 58px; min-height: 56px; font-size: 1.65rem; }
  .number-value { font-size: 1rem; }
  #catCount { width: 48px; font-size: 1.2rem; }
  .error-message { font-size: .83rem; }
  .schedule-block { padding-top: 20px; }
  .mini-heading { align-items: flex-start; margin-bottom: 12px; }
  .mini-heading h3 { font-size: 1rem; }
  .mini-heading span { padding: 4px 8px; font-size: .68rem; }
  .schedule-empty { min-height: 108px; }
  .schedule-empty span { font-size: 1.7rem; }
  .schedule-empty p { font-size: .85rem; }
  .schedule-list { max-height: none; gap: 10px; padding-right: 0; overflow-y: visible; }
  .quote-top { display: flex; }
  .schedule-row { grid-template-columns: minmax(0, 1fr) 120px; gap: 10px; padding: 12px; }
  .schedule-date strong { font-size: .9rem; }
  .schedule-date small { font-size: .72rem; }
  .visits-select { min-height: 48px; padding: 8px 10px; font-size: 16px; }
  .busy-check { grid-column: 1 / -1; justify-content: flex-start; min-height: 38px; font-size: .85rem; }
  .busy-check input { width: 22px; height: 22px; }
  .option-row { gap: 12px; margin: 18px 0 20px; padding: 15px; }
  .option-check { width: 25px; height: 25px; }
  .option-row strong { font-size: .92rem; }
  .option-row small { margin-top: 2px; font-size: .78rem; }
  .simulation-note { padding: 12px 13px; font-size: .78rem; }
  .estimate-badge { padding: 7px 11px; font-size: .72rem; }
  .result-heading { margin: 20px 0 22px; padding: 22px 10px; }
  .result-heading p { font-size: .69rem; }
  .result-heading h2 { font-size: 1.35rem; line-height: 1.5; }
  .result-heading span { margin-top: 6px; font-size: .76rem; }
  .quote-section { margin-top: 25px; }
  .quote-section h3 { margin-bottom: 11px; font-size: 1rem; }
  .service-summary p { font-size: .88rem; }
  .grand-total { min-height: 82px; padding: 17px 16px; }
  .grand-total > span { max-width: 130px; font-size: .85rem; }
  .grand-total small { font-size: .68rem; }
  .grand-total b { font-size: 2.1rem; }
  .breakdown-table { font-size: .86rem; }
  .breakdown-table th, .breakdown-table td { padding: 12px 2px; }
  .breakdown-table th { padding-right: 12px; }
  .breakdown-table .total-row th, .breakdown-table .total-row td { font-size: .96rem; }
  .urgent-notice { padding: 10px 11px; font-size: .78rem; }
  .sage-box { padding: 15px 16px; }
  .sage-box ul { padding-left: 1.25rem; font-size: .82rem; }
  .sage-box li + li { margin-top: 7px; }
  .plain-notes { font-size: .82rem; }
  .plain-notes p { margin: 10px 0; }
  .quote-notes p { font-size: .8rem; }
  .quote-footer { align-items: flex-start; font-size: .76rem; }
  .quote-footer strong { font-size: .92rem; }
  .line-button { min-height: 58px; font-size: .92rem; }
  .line-button span { width: 32px; height: 32px; font-size: .53rem; }
}
