:root {
      --bg: #f4eadc;
      --paper: #fffaf0; 
      --paper-2: #fffdf7;
      --text: #202020;
      --muted: #6b6258;
      --line: #d8c9b8;
      --red: #c72026;
      --red-dark: #9f1519;
      --dark: #22211f;
    }
    * { box-sizing: border-box; }
    body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: var(--bg); color: var(--text); }
    .wrap { max-width: 1120px; margin: 0 auto; padding: 28px 16px 44px; }
    .top { display: grid; grid-template-columns: 1.4fr .6fr; gap: 18px; align-items: end; margin-bottom: 22px; }
    h1 { margin: 0; font-size: 38px; line-height: 1.05; letter-spacing: -.03em; }
    h2 { font-size: 22px; letter-spacing: -.02em; }
    .subtitle { margin: 12px 0 0; color: var(--muted); font-size: 16px; line-height: 1.45; max-width: 780px; }
    .badge { display: inline-block; background: var(--red); color: #fff; border-radius: 0; padding: 8px 14px; margin-bottom: 12px; font-size: 14px; font-weight: 700; letter-spacing: .02em; box-shadow: none; }
    .grid { display: grid; grid-template-columns: 1fr .85fr; gap: 18px; align-items: start; }
    .stack-column { display: grid; gap: 18px; align-content: start; }
    .card { background: var(--paper); border-radius: 18px; padding: 20px; border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(76, 54, 32, .08); }
    .card::before { content: ''; display: block; height: 3px; background: var(--red); border-radius: 999px; margin: -6px 0 18px; opacity: .9; }
    .dark { background: var(--dark); color: #fff; border-color: #3a3834; }
    .dark::before { background: var(--red); }
    .field { margin-bottom: 16px; }
    label { display: block; margin-bottom: 8px; font-weight: 700; font-size: 14px; }
    select, input { width: 100%; padding: 13px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper-2); color: var(--text); font-size: 15px; outline-color: var(--red); }
    select:focus, input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(199, 32, 38, .10); }
    .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
    .three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .option { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px; border-radius: 14px; background: var(--paper-2); border: 1px solid var(--line); cursor: pointer; user-select: none; }
    .option input { width: auto; accent-color: var(--red); }
    .muted { color: var(--muted); font-size: 13px; line-height: 1.45; }
    .dark .muted { color: #d8d0c5; }
    .line { display: flex; justify-content: space-between; gap: 15px; border-bottom: 1px solid rgba(255,255,255,.14); padding: 12px 0; }
    .line span:first-child { color: #e6ddd2; }
    .total { margin-top: 16px; background: var(--paper); color: var(--text); border-radius: 16px; padding: 16px; border-left: 5px solid var(--red); }
    .total .price { font-size: 32px; font-weight: 800; margin-top: 4px; color: var(--red); }
    .commission { background: rgba(199,32,38,.16); border: 1px solid rgba(199,32,38,.35); border-radius: 16px; padding: 16px; margin-top: 14px; }
    .btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
    button { border: 0; border-radius: 12px; padding: 13px 14px; font-weight: 700; cursor: pointer; font-size: 14px; }
    .primary { background: var(--red); color: #fff; }
    .primary:hover { background: var(--red-dark); }
    .secondary { background: #eadfce; color: var(--text); }
    .smallToggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .switch { background: var(--dark); color: #fff; }
    .kp { background: var(--paper-2); border-radius: 14px; padding: 14px; border: 1px solid #eadfce; font-size: 14px; line-height: 1.55; white-space: pre-line; }
    .media-img { width: 100%; max-height: 520px; object-fit: contain; border-radius: 14px; display: none; border: 1px solid var(--line); cursor: zoom-in; background: #fff; }
    .image-placeholder { display: none; min-height: 160px; align-items: center; justify-content: center; padding: 18px; border: 1px dashed rgba(199, 32, 38, .45); border-radius: 14px; background: rgba(199, 32, 38, .08); color: var(--red); font-size: 14px; line-height: 1.45; text-align: center; overflow-wrap: anywhere; }
    .modal { display: none; position: fixed; z-index: 9999; inset: 0; background: rgba(0,0,0,.88); padding: 20px; }
    .modal img { max-width: 100%; max-height: 90vh; display: block; margin: 40px auto 0; border-radius: 12px; touch-action: pinch-zoom; }
    .modal-close { position: fixed; top: 14px; right: 22px; color: #fff; font-size: 38px; line-height: 1; cursor: pointer; z-index: 10000; }
    .top .card { background: rgba(255,250,240,.82); }
    .print-subtitle { display: none; }
    @media (max-width: 850px) {
      .top, .grid, .two, .three, .btns { grid-template-columns: 1fr; }
      .grid { display: flex; flex-direction: column; align-items: stretch; gap: 18px; }
      .stack-column { display: contents; }
      .grid > .card, .grid .card { width: 100%; }
      .calculator-card { order: 1; }
      .summary-card { order: 2; }
      .kp-card { order: 3; }
      #landInfoCard { order: 4; }
      #renderCard { order: 5; }
      #planCard { order: 6; }
      .package-card { order: 7; }
      h1 { font-size: 30px; }
      .wrap { padding-top: 18px; }
    }
    @media print {
      @page { margin: 14mm; }
      :root { --paper: #fff; --paper-2: #fff; --line: #d9d9d9; --text: #111; --muted: #555; }
      body { background: #fff; color: #111; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
      .noPrint, .screen-only, .screen-subtitle, .modal { display: none !important; }
      .print-subtitle { display: block; }
      .wrap { max-width: none; padding: 0; }
      .top { display: block; margin-bottom: 14px; border-bottom: 2px solid var(--red); padding-bottom: 12px; }
      .grid, .stack-column { display: block; }
      h1 { font-size: 30px; letter-spacing: 0; }
      h2 { font-size: 18px; margin-bottom: 10px !important; }
      .badge { padding: 0; margin-bottom: 8px; background: transparent; color: var(--red); }
      .subtitle { max-width: none; margin-top: 6px; font-size: 13px; }
      .card { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; border-radius: 0; padding: 14px; margin-top: 12px !important; background: #fff; }
      .card::before { display: none; }
      .dark { color: #111; border-color: #ddd; }
      .dark .muted, .line span:first-child { color: #555; }
      .line { border-bottom: 1px solid #ddd; padding: 7px 0; }
      .total { border: 1px solid #ddd; border-left: 5px solid var(--red); border-radius: 0; padding: 10px; }
      .total .price { font-size: 26px; }
      .commission { display: none !important; }
      .kp { border: 0; padding: 0; font-size: 12.5px; line-height: 1.45; }
      .media-img { max-height: 235mm; object-fit: contain; border-radius: 0; }
      .image-section { break-inside: avoid; page-break-inside: avoid; }
    }
