* {
  box-sizing: border-box;
}

:root {
  --bg: #f7f8f5;
  --surface: #ffffff;
  --surface-soft: #fbfcfa;
  --text: #18211c;
  --muted: #69746f;
  --line: #e1e6e1;
  --accent: #0f6a43;
  --accent-soft: #e8f3ed;
  --accent-dark: #0b3f29;
  --warning: #7a5816;
  --shadow: 0 18px 46px rgba(31, 43, 37, 0.11);
}

html {
  width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  min-width: 0;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Segoe UI", sans-serif;
  font-size: 16px;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.app {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 0 18px calc(32px + env(safe-area-inset-bottom));
}

.hero {
  position: relative;
  height: 460px;
  min-height: 420px;
  margin: 0 -18px 18px;
  padding: calc(24px + env(safe-area-inset-top)) 24px 28px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  color: #ffffff;
  background: #0d2018;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 27, 18, 0.72), rgba(10, 27, 18, 0.34) 48%, rgba(10, 27, 18, 0.16));
}

.image-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: #eef0ed;
}

.image-frame picture,
.image-frame img {
  display: block;
  width: 100%;
  height: 100%;
}

.image-frame img {
  object-fit: cover;
}

.image-frame.is-missing::before {
  content: attr(data-fallback);
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  background: #eef0ed;
  color: #5f6863;
  font-size: 16px;
  font-weight: 900;
}

.image-frame.is-missing img,
.image-frame.is-missing picture {
  visibility: hidden;
}

.hero .hero-media {
  position: absolute;
  inset: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero h1 span {
  display: block;
  white-space: nowrap;
}

.hero-brand {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-align: center;
}

.hero-maker {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
}

h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.hero p {
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.55;
}

.hero-kicker,
.section-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .hero-kicker {
  color: rgba(255, 255, 255, 0.86);
}

.shipping-badge {
  display: inline-block;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  padding: 9px 16px;
  backdrop-filter: blur(12px);
}

.shipping-badge small {
  display: inline;
  margin-left: 6px;
  font-size: 13px;
  font-weight: 800;
}

.hero-button {
  min-height: 58px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  padding: 0 28px;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(11, 63, 41, 0.28);
}

.hero-button {
  width: 100%;
  max-width: 300px;
  background: #ffffff;
  color: var(--accent-dark);
}

.case-section {
  margin: 0 0 18px;
}

.compact-head {
  margin-bottom: 10px;
}

.case-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 72%);
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.case-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  scroll-snap-align: start;
}

.case-image {
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.case-card strong {
  color: var(--text);
  font-size: 17px;
  line-height: 1.3;
}

.product-section {
  padding: 20px;
}

.product-head {
  display: grid;
  gap: 8px;
}

.product-head h2 {
  display: grid;
  gap: 2px;
  color: var(--accent-dark);
}

.product-head h2 span:first-child {
  color: var(--muted);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.product-head h2 span:last-child {
  font-size: 25px;
}

.product-head p:not(.section-kicker) {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.65;
}

.product-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 16px;
}

.product-specs span {
  border: 1px solid #cde0d4;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.product-purchase-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
}

.product-purchase-points p {
  display: grid;
  gap: 5px;
  margin: 0;
  border-top: 1px solid var(--line);
  padding: 12px 2px 0;
}

.product-purchase-points strong {
  color: var(--text);
  font-size: 15px;
}

.product-purchase-points span,
.installation-note,
.single-use-copy p,
.sku-delivery-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.installation-note {
  margin: 12px 0 0;
  border-left: 2px solid var(--text);
  padding-left: 11px;
}

.product-text-details {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.product-text-details summary {
  position: relative;
  list-style: none;
  padding: 13px 34px 13px 2px;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.product-text-details summary::-webkit-details-marker { display: none; }
.product-text-details summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  font-size: 19px;
  line-height: 1;
}
.product-text-details[open] summary::after { content: "−"; }

.product-text-content {
  display: grid;
  gap: 14px;
  padding: 0 0 15px;
}

.single-use-copy h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.single-use-copy p,
.sku-delivery-note { margin: 0; }

.sku-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
}

.sku-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  background: #fff;
  font-size: 12px;
}

.sku-table caption {
  padding: 9px 10px;
  color: var(--text);
  font-weight: 900;
  text-align: left;
}

.sku-table th,
.sku-table td {
  border-top: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.sku-table th { color: var(--muted); }
.sku-table td:first-child { font-weight: 800; }
.sku-table small { display: block; color: var(--muted); font-size: 10px; }

.sku-table tr[id] {
  scroll-margin-top: 20px;
}

.sku-table tr[id]:target td {
  background: var(--accent-soft);
}

.product-gallery {
  display: grid;
  gap: 18px;
  margin-top: 16px;
}

.product-image-group {
  display: grid;
  gap: 10px;
}

.delivery-image-group {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.product-image-group-head {
  display: grid;
  gap: 3px;
}

.product-image-group-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.35;
}

.product-image-group-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.product-featured-grid,
.product-more-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.product-featured-grid.product-installation-grid,
.product-featured-grid.product-delivery-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-card {
  border-radius: 18px;
}

.product-card .case-image {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  background: #f6f8f5;
  box-shadow: none;
}

.product-card .case-image img {
  object-fit: contain;
}

.product-card strong {
  padding: 0 2px;
  font-size: 13px;
}

.product-card > small {
  display: block;
  padding: 0 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
}

.official-feature-card.installation-card .case-image img {
  object-fit: cover;
}

.complete-panel-note {
  display: grid;
  gap: 3px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 2px;
}

.complete-panel-note strong {
  color: var(--text);
  font-size: 15px;
}

.complete-panel-note span,
.official-installation-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.official-installation-note {
  margin: 0;
  border-left: 2px solid var(--text);
  padding-left: 11px;
}

.official-part-card .case-image {
  aspect-ratio: 1;
}

.product-more {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  overflow: hidden;
}

.product-more summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.product-more summary::after {
  content: "+";
  font-size: 20px;
}

.product-more[open] summary::after {
  content: "−";
}

.product-more-grid {
  padding: 0 12px 12px;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  margin: 16px 0 0;
}

.total-card,
.metric-card,
.card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.total-card {
  padding: 28px 22px 30px;
  border-color: #97cfb1;
  background: linear-gradient(180deg, #ffffff, #e6f4ec);
  text-align: center;
}

.total-card span,
.metric-card span {
  display: block;
  color: var(--muted);
  font-weight: 900;
}

.total-card span {
  font-size: 18px;
}

.total-card strong {
  display: block;
  margin-top: 8px;
  color: var(--accent-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 54px;
  line-height: 0.98;
  letter-spacing: 0;
  word-break: keep-all;
}

.metric-card {
  min-width: 0;
  padding: 12px 10px;
}

.metric-card span {
  font-size: 12px;
  line-height: 1.25;
}

.metric-card strong {
  display: block;
  margin-top: 7px;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.card {
  margin-top: 22px;
  padding: 22px;
}

.order-flow-card {
  padding: 16px 16px 14px;
}

.order-flow-head {
  margin-bottom: 10px;
}

.order-flow-head h2 {
  font-size: 21px;
}

.order-flow-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.order-flow-list li {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 9px 8px;
}

.order-flow-list span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.order-flow-list strong {
  display: block;
  margin-top: 7px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
}

.order-flow-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
}

.section-head {
  margin-bottom: 14px;
}

.shape-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

.shape-picker legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.shape-button {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 60px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  padding: 8px 12px;
  text-align: left;
  box-shadow: none;
}

.shape-button strong {
  font-size: 16px;
  line-height: 1.2;
}

.shape-button.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
  box-shadow: inset 0 0 0 1px rgba(22, 122, 74, 0.18);
}

.shape-icon {
  width: 30px;
  height: 22px;
  display: block;
  color: currentColor;
}

.shape-line {
  border-bottom: 4px solid currentColor;
}

.shape-l {
  border-left: 4px solid currentColor;
  border-bottom: 4px solid currentColor;
}

.shape-u {
  border-left: 4px solid currentColor;
  border-right: 4px solid currentColor;
  border-bottom: 4px solid currentColor;
}

.shape-box {
  border: 4px solid currentColor;
}

.quantity-list,
.segment-inputs {
  display: grid;
  gap: 8px;
}

.segment-nav {
  display: grid;
  place-items: center;
  min-height: 108px;
  margin: 10px 0 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcfa;
}

.segment-nav svg {
  display: block;
  width: min(100%, 360px);
  height: 112px;
}

.segment-nav-item {
  cursor: pointer;
  outline: none;
}

.segment-nav-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4px;
  vector-effect: non-scaling-stroke;
}

.segment-nav-line.is-empty {
  stroke: #b8c0bb;
  stroke-dasharray: 7 6;
}

.segment-nav-line.is-complete {
  stroke: #6aa27d;
}

.segment-nav-line.is-selected {
  stroke: var(--accent-dark);
  stroke-width: 7px;
  stroke-dasharray: none;
}

.segment-nav-hit {
  fill: none;
  stroke: rgba(0, 0, 0, 0.01);
  stroke-linecap: round;
  stroke-width: 28px;
  vector-effect: non-scaling-stroke;
}

.segment-nav-label {
  fill: #6f7973;
  font-size: 16px;
  font-weight: 900;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

.segment-nav-label.is-selected {
  fill: var(--accent-dark);
}

.segment-nav-item:focus-visible .segment-nav-line {
  stroke: var(--accent-dark);
  stroke-width: 7px;
}

.segment-apply {
  display: grid;
  gap: 6px;
  margin: 0 0 8px;
}

.segment-apply:empty {
  display: none;
}

.segment-apply-button {
  min-height: 46px;
  border: 1px solid rgba(14, 110, 68, 0.25);
  border-radius: 14px;
  background: #ffffff;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 900;
}

.segment-apply-button:active {
  transform: translateY(1px);
}

.segment-apply-status {
  margin: 0;
  border-radius: 12px;
  background: var(--accent-soft);
  padding: 9px 12px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.segment-input-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
  padding: 0;
  overflow: hidden;
}

.segment-input-card.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: none;
}

.segment-input-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 10px;
  width: 100%;
  min-height: 56px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
  text-align: left;
}

.segment-input-head h3 {
  margin: 0;
  color: var(--accent-dark);
  font-size: 18px;
  line-height: 1.2;
}

.segment-input-head span {
  grid-column: 2;
  justify-self: end;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.segment-input-head small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment-input-body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.segment-input-body[hidden] {
  display: none;
}

.quantity-row {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.quantity-label strong,
.quantity-label small {
  display: block;
}

.quantity-label strong {
  font-size: 18px;
  line-height: 1.3;
}

.quantity-label small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.stepper {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  gap: 8px;
  width: 100%;
}

.stepper button,
.stepper input {
  height: 54px;
  border-radius: 12px;
}

.stepper button {
  border: 0;
  background: var(--accent);
  color: #ffffff;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.stepper button:active,
.primary-button:active,
.ghost-button:active,
.shape-button:active {
  transform: translateY(1px);
}

.stepper input {
  min-width: 0;
  width: 100%;
  border: 2px solid var(--line);
  background: #ffffff;
  color: var(--text);
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 27px;
  font-weight: 900;
  appearance: textfield;
}

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.stepper input:focus,
.inquiry-button:focus,
.field-row input:focus,
.field-row select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(22, 122, 74, 0.16);
}

.field-row {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.field-row span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.field-row input,
.field-row select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text);
  padding: 8px 10px;
  font-weight: 900;
}

.proposal-grid,
.manual-grid,
.gate-grid {
  display: grid;
  gap: 8px;
}

.gate-controls {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 10px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.gate-custom-position.is-hidden {
  display: none;
}

.proposal-option {
  display: grid;
  grid-template-columns: auto 78px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 10px;
}

.proposal-option span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.proposal-option strong {
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.full-button,
.primary-button,
.ghost-button {
  width: 100%;
  min-height: 58px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 900;
}

.full-button {
  margin-top: 16px;
}

.ghost-button {
  border: 2px solid var(--line);
  background: #ffffff;
  color: var(--text);
}

.primary-button {
  border: 0;
  background: var(--accent);
  color: #ffffff;
}

.inquiry-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}

.inquiry-button[aria-disabled="true"] {
  opacity: 0.56;
  cursor: not-allowed;
}

.input-card {
  scroll-margin-top: 18px;
}

.shipping-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
}

.shipping-inline button {
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  padding: 0 4px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.shipping-inline .copy-status {
  flex-basis: 100%;
  margin: 0;
}

.shipping-inline .copy-status:empty {
  display: none;
}

.share-inline {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  font-size: 12px;
}

.share-inline button {
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.share-inline .copy-status {
  min-height: 0;
  margin: 0 0 0 6px;
  font-size: 12px;
}

.share-inline .copy-status:empty {
  display: none;
}

.sub-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.drawing-canvas {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #f7f9f6;
}

.drawing-canvas svg {
  display: block;
  width: 100%;
  height: auto;
}

.opposite-dimension-notice {
  margin-top: 10px;
}

.opposite-dimension-notice:empty {
  display: none;
}

.opposite-dimension-box {
  display: grid;
  gap: 6px;
  border: 1px solid #ead9a5;
  border-radius: 14px;
  background: #fff8df;
  padding: 12px;
  color: #5d4a19;
}

.opposite-dimension-box strong {
  font-size: 14px;
  line-height: 1.35;
}

.opposite-dimension-box p {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
}

.svg-paper {
  fill: #ffffff;
  stroke: #dfe5e1;
  stroke-width: 1;
}

.svg-post {
  fill: #ffffff;
  stroke: #1d2520;
}

.svg-post.is-selected {
  fill: #ffffff;
  stroke: var(--accent-dark);
}

.svg-panel {
  cursor: pointer;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5px;
  vector-effect: non-scaling-stroke;
}

.svg-panel-900 {
  stroke: #5a8f73;
}

.svg-panel-1500 {
  stroke: #2f6f88;
}

.svg-gate {
  cursor: pointer;
  fill: none;
  stroke: #c98b31;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5px;
  vector-effect: non-scaling-stroke;
}

.svg-panel.is-selected,
.svg-gate.is-selected {
  stroke-width: 6px;
}

.svg-placeholder-segment {
  cursor: pointer;
  fill: none;
  stroke: #a8b0aa;
  stroke-dasharray: 10 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2px;
  vector-effect: non-scaling-stroke;
}

.svg-placeholder-segment.is-selected {
  stroke: #59655e;
  stroke-width: 3px;
}

.svg-dimension-text,
.svg-empty {
  fill: var(--text);
  font-weight: 900;
  letter-spacing: 0;
}

.svg-dimension-text {
  cursor: pointer;
  font-size: 12px;
}

.svg-empty {
  fill: var(--muted);
  font-size: 13px;
}

.svg-dimension-line,
.svg-dimension-guide {
  cursor: pointer;
  fill: none;
  stroke: #66736c;
  stroke-linecap: round;
  stroke-width: 1.5px;
  vector-effect: non-scaling-stroke;
}

.svg-dimension-line {
  stroke-dasharray: 4 3;
}

.svg-segment-hit {
  cursor: pointer;
  pointer-events: stroke;
  stroke: rgba(0, 0, 0, 0.01);
  stroke-linecap: round;
  stroke-width: 28px;
  vector-effect: non-scaling-stroke;
}

.drawing-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.drawing-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.drawing-legend i {
  display: block;
  width: 18px;
  height: 8px;
  border-radius: 999px;
}

.legend-post {
  width: 10px !important;
  height: 10px !important;
  background: #4f5d55;
}

.legend-panel900 {
  background: #5a8f73;
}

.legend-panel1500 {
  background: #2f6f88;
}

.legend-gate {
  background: #c98b31;
}

.dimensions-list,
.selected-segment-detail {
  display: grid;
  gap: 10px;
}

.selected-segment-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  padding: 18px;
}

.selected-segment-card h3 {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 19px;
}

.selected-segment-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
}

.segment-warnings {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  border: 1px solid #e2bc68;
  border-radius: 16px;
  background: #fff8e6;
  padding: 10px;
}

.segment-warnings p {
  margin: 0;
  color: var(--warning);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.45;
}

.dimension-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 12px;
}

.dimension-row strong {
  color: var(--accent-dark);
  font-size: 17px;
}

.dimension-row span {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 18px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.dimension-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.parts-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.parts-card details {
  display: grid;
  gap: 12px;
}

.parts-card summary {
  min-height: 58px;
  list-style: none;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  color: var(--accent-dark);
  padding: 13px 44px 13px 14px;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
  cursor: pointer;
  position: relative;
}

.parts-card summary::-webkit-details-marker {
  display: none;
}

.parts-card summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
}

.parts-card details[open] summary::after {
  content: "-";
}

.part-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  padding: 14px;
}

.part-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.part-card-head {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.part-card-head img {
  width: 72px;
  height: 72px;
  border: 1px solid var(--line);
  background: #fff;
  object-fit: contain;
}

.single-purchase-badge {
  width: fit-content;
  margin: -2px 0 0;
  border: 1px solid var(--estimate-line, var(--line));
  padding: 4px 7px;
  color: var(--estimate-ink, var(--text));
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}

.parts-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.parts-gate-note {
  color: var(--accent-dark);
}

.part-values {
  display: grid;
  grid-template-columns: 0.68fr 1fr 1fr;
  gap: 8px;
}

.customer-part-values {
  grid-template-columns: minmax(64px, 0.55fr) repeat(3, minmax(0, 1fr));
}

.part-values span {
  display: grid;
  gap: 4px;
  min-width: 0;
  border-radius: 10px;
  background: #ffffff;
  padding: 9px 8px;
}

.part-values small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.part-values strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 17px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.part-values del {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  line-height: 1.15;
  overflow-wrap: anywhere;
  opacity: 0.78;
}

.sales-part-price strong {
  color: var(--estimate-ink, var(--text));
  font-weight: 900;
}

.sales-part-subtotal {
  border-left: 2px solid var(--estimate-ink, var(--text));
}

.sales-part-subtotal strong {
  color: var(--estimate-ink, var(--text));
  font-weight: 900;
}

.faq-card {
  padding-top: 20px;
  padding-bottom: 20px;
}

.faq-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.faq-list details { border-bottom: 1px solid var(--line); }

.faq-list summary {
  position: relative;
  list-style: none;
  padding: 13px 30px 13px 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.45;
  cursor: pointer;
}

.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  top: 12px;
  right: 2px;
  color: var(--muted);
  font-size: 18px;
}
.faq-list details[open] summary::after { content: "−"; }

.faq-list p {
  margin: -2px 0 13px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 620px) {
  .product-purchase-points { grid-template-columns: 1fr; }
  .customer-part-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.notice {
  margin: 14px 2px 0;
  color: var(--warning);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.6;
}

.notice-list:empty + .notice {
  margin-top: 0;
}

.notice-card {
  padding: 0;
  overflow: hidden;
}

.notice-details summary {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}

.notice-details summary::-webkit-details-marker {
  display: none;
}

.notice-details summary::after {
  content: "+";
  margin-left: 12px;
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
}

.notice-details[open] summary::after {
  content: "−";
}

.notice-details-content {
  padding: 0 18px 18px;
}

.inquiry-note {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
}

.inquiry-button-secondary {
  margin-top: 10px;
}

.copy-status {
  min-height: 20px;
  margin: 9px 2px 0;
  color: var(--accent-dark);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.4;
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 30px;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.55;
}

.check-list li::before {
  content: "";
  position: absolute;
  top: 0.42em;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: inset 0 0 0 5px #ffffff;
  border: 2px solid var(--accent);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: end center;
  background: rgba(11, 20, 15, 0.48);
  padding: 18px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-panel {
  width: min(100%, 520px);
  border-radius: 26px;
  background: #ffffff;
  padding: 24px;
  box-shadow: 0 24px 70px rgba(8, 20, 14, 0.32);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  font-size: 26px;
  line-height: 1;
}

.modal-panel h2 {
  margin-bottom: 18px;
}

.line-paste-panel {
  padding-top: 30px;
}

.line-paste-message {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.75;
}

.modal-actions {
  display: grid;
  gap: 10px;
}

#openLineButton {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
}

.image-modal-backdrop {
  place-items: center;
}

.image-modal-panel {
  width: min(100%, 920px);
  padding: 18px;
}

.modal-image-frame {
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  background: #eef0ed;
}

.confirm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  margin-top: 20px;
  border-radius: 18px;
  background: var(--accent-soft);
  padding: 14px;
  color: var(--accent-dark);
  font-size: 16px;
  font-weight: 900;
}

.confirm-row input {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
}

.operator-section {
  margin-top: 22px;
  padding: 18px 4px 14px;
  border-top: 1px solid var(--line);
}

.operator-section h2 {
  margin-bottom: 8px;
  font-size: 18px;
}

.operator-section p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
}

.operator-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 6px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  padding: 6px 0 2px;
  text-align: center;
}

.site-footer a,
.legal-card a {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-page {
  padding-top: calc(20px + env(safe-area-inset-top));
}

.legal-card {
  margin-top: 0;
}

.legal-title {
  margin-bottom: 22px;
  color: var(--text);
  font-size: 28px;
  line-height: 1.25;
}

.legal-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.legal-item {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

.legal-item dt {
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 900;
}

.legal-item dd {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.75;
}

.legal-item small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.legal-back {
  margin: 22px 0 0;
  text-align: center;
}

.returns-guide-link {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.returns-guide-link a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.policy-lead {
  margin: -8px 0 24px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.8;
}

.policy-sections {
  border-bottom: 1px solid var(--line);
}

.policy-section {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.policy-section h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.45;
}

.policy-section p {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.8;
}

.policy-list {
  display: grid;
  gap: 7px;
  margin: 12px 0 0;
  padding-left: 1.3em;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.7;
}

.policy-note {
  padding: 12px 14px;
  background: var(--surface-soft);
  border-left: 3px solid var(--accent-dark);
}

.policy-contact-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.policy-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--text);
  color: var(--text) !important;
  font-size: 14px !important;
  text-align: center;
  text-decoration: none !important;
}

.policy-contact-line {
  border-color: #06c755;
  background: #06c755;
  color: #fff !important;
}

.policy-page-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  margin-top: 22px;
}

@media (max-width: 420px) {
  .policy-contact-links {
    grid-template-columns: 1fr;
  }
}

.seo-entry-card {
  margin: 18px 0;
  padding: 20px;
  border: 1px solid #dfe5e1;
  border-radius: 14px;
  background: #f7faf8;
}

.seo-entry-card h2 {
  margin: 2px 0 14px;
  font-size: 20px;
  line-height: 1.45;
}

.seo-entry-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.seo-entry-links a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cfd9d3;
  border-radius: 9px;
  background: #fff;
  color: #214c3a;
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 520px) {
  .seo-entry-card { padding: 17px; }
  .seo-entry-links { grid-template-columns: 1fr; }
}

@media (min-width: 760px) {
  .app {
    max-width: 1040px;
    padding-left: 28px;
    padding-right: 28px;
  }

  .hero {
    height: 700px;
    margin-left: -28px;
    margin-right: -28px;
    padding-left: 52px;
    padding-right: 52px;
  }

  h1 {
    font-size: 64px;
  }

  .total-card strong {
    font-size: 76px;
  }

  .case-scroller {
    grid-auto-columns: minmax(240px, 1fr);
    overflow-x: auto;
  }

  .product-section {
    padding: 28px;
  }

  .product-featured-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .product-more-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shape-picker {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

}

@media (max-width: 759px) {
  .hero {
    text-align: center;
    justify-content: center;
  }

  .hero-media::after {
    background: linear-gradient(180deg, rgba(10, 27, 18, 0.12), rgba(10, 27, 18, 0.74));
  }

  .hero-content {
    margin: 0 auto;
  }

  h1 {
    font-size: 31px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-button {
    margin: 0 auto;
  }
}

@media (max-width: 360px) {
  .app {
    padding-left: 12px;
    padding-right: 12px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .sub-metrics {
    grid-template-columns: 1fr;
  }

  .total-card strong {
    font-size: 44px;
  }

  .part-values {
    grid-template-columns: 1fr;
  }

  .customer-part-values {
    grid-template-columns: minmax(46px, 0.5fr) minmax(0, 1fr) minmax(0, 1fr);
  }

  .customer-part-values small {
    font-size: 10px;
  }

  .customer-part-values strong,
  .customer-part-values del {
    font-size: 13px;
  }

  .drawing-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dimension-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .dimension-row small {
    grid-column: 2;
  }
}

/* Estimate simulator: architectural material palette */
#estimateInput,
.drawing-card,
.dimensions-card,
.parts-card,
.summary-grid,
.shipping-inline,
.share-inline,
.inquiry-card {
  --estimate-ink: #1c1c1a;
  --estimate-muted: #77746e;
  --estimate-line: #d8d4cc;
  --estimate-soft: #f3f0e9;
  --estimate-paper: #fffdf8;
}

#estimateInput,
.drawing-card,
.dimensions-card,
.parts-card,
.inquiry-card {
  color: var(--estimate-ink);
}

#estimateInput {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-color: var(--estimate-line);
  border-radius: 4px;
  background: var(--estimate-paper);
  box-shadow: 0 14px 40px rgba(35, 33, 29, 0.07);
}

#estimateInput::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  width: 58%;
  height: 190px;
  background: url("images/products/american-fence/official/american-fence-panel-1500x900-product.jpg") center / cover no-repeat;
  filter: grayscale(1);
  opacity: 0.12;
}

#estimateInput::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(100deg, var(--estimate-paper) 0 38%, rgba(255, 253, 248, 0.86) 70%, rgba(255, 253, 248, 0.68));
  pointer-events: none;
}

#estimateInput > * {
  position: relative;
  z-index: 1;
}

#estimateInput .section-head {
  min-height: 76px;
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid var(--estimate-line);
  padding-bottom: 14px;
}

#estimateInput .section-head h2 {
  color: var(--estimate-ink);
  font-size: clamp(25px, 5vw, 34px);
  letter-spacing: 0.02em;
}

.shape-picker {
  gap: 0;
  margin-top: 22px;
  border: 1px solid var(--estimate-line);
}

.shape-picker legend {
  margin-bottom: 10px;
  color: var(--estimate-ink);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.shape-button {
  min-height: 52px;
  border: 0;
  border-right: 1px solid var(--estimate-line);
  border-bottom: 1px solid var(--estimate-line);
  border-radius: 0;
  background: rgba(255, 253, 248, 0.84);
  color: #5f5d58;
  padding: 8px 10px;
}

.shape-button:nth-of-type(2n) {
  border-right: 0;
}

.shape-button:nth-last-of-type(-n + 2) {
  border-bottom: 0;
}

.shape-button.is-active {
  border-color: transparent;
  background: var(--estimate-ink);
  color: #fffdf8;
  box-shadow: none;
}

.shape-icon {
  width: 27px;
  height: 19px;
}

.shape-line,
.shape-l,
.shape-u,
.shape-box {
  border-width: 2px;
}

.segment-nav {
  min-height: 96px;
  border: 0;
  border-bottom: 1px solid var(--estimate-line);
  border-radius: 0;
  background: transparent;
}

.segment-nav-line.is-empty {
  stroke: #bbb7af;
}

.segment-nav-line.is-complete {
  stroke: #817e77;
}

.segment-nav-line.is-selected,
.segment-nav-item:focus-visible .segment-nav-line {
  stroke: var(--estimate-ink);
}

.segment-nav-label,
.segment-nav-label.is-selected {
  fill: var(--estimate-ink);
}

.segment-apply-button {
  min-height: 42px;
  border-color: var(--estimate-line);
  border-radius: 2px;
  background: transparent;
  color: var(--estimate-ink);
}

.segment-apply-status {
  border-radius: 2px;
  background: #ece9e2;
  color: #494741;
}

.segment-input-card,
.segment-input-card.is-selected {
  border-color: var(--estimate-line);
  border-radius: 2px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: none;
}

.segment-input-card.is-selected {
  border-left: 3px solid var(--estimate-ink);
}

.segment-input-head {
  min-height: 52px;
  padding: 10px 12px;
}

.segment-input-head h3,
.selected-segment-card h3,
.dimension-row strong {
  color: var(--estimate-ink);
}

.segment-input-head span,
.segment-input-head small,
.field-row span,
.proposal-option span {
  color: var(--estimate-muted);
}

.field-row input,
.field-row select {
  min-height: 44px;
  border: 1px solid var(--estimate-line);
  border-radius: 2px;
  background: #fffefa;
}

.field-row input:focus,
.field-row select:focus {
  border-color: var(--estimate-ink);
  outline: 2px solid rgba(28, 28, 26, 0.1);
}

.gate-controls,
.proposal-option {
  border-color: var(--estimate-line);
  border-radius: 2px;
  background: #fffefa;
}

.toggle-row input,
.proposal-option input {
  accent-color: #282825;
}

#resetButton {
  min-height: 44px;
  border: 1px solid var(--estimate-line);
  border-radius: 2px;
  background: transparent;
  color: var(--estimate-ink);
  font-size: 14px;
}

.drawing-card,
.dimensions-card,
.parts-card {
  border-color: var(--estimate-line);
  border-radius: 4px;
  background: var(--estimate-paper);
  box-shadow: 0 10px 30px rgba(35, 33, 29, 0.05);
}

.drawing-card .section-head,
.dimensions-card .section-head {
  border-bottom: 1px solid var(--estimate-line);
  padding-bottom: 10px;
}

.drawing-card .section-head h2,
#dimensionsTitle {
  color: var(--estimate-ink);
  font-size: 19px;
  letter-spacing: 0.06em;
}

.drawing-canvas {
  border: 0;
  border-radius: 0;
  background: var(--estimate-paper);
}

.svg-paper {
  fill: #fffdf8;
  stroke: transparent;
}

.svg-panel-900 {
  stroke: #252523;
}

.svg-panel-1500 {
  stroke: #8f8b83;
}

.svg-gate {
  stroke: #b49363;
}

.svg-post,
.svg-post.is-selected {
  fill: #fffdf8;
  stroke: #1c1c1a;
}

.svg-dimension-line,
.svg-dimension-guide {
  stroke: #77736c;
}

.drawing-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  border-top: 1px solid var(--estimate-line);
  padding-top: 10px;
  color: var(--estimate-muted);
  font-size: 11px;
}

.drawing-legend i {
  border-radius: 0;
}

.legend-post { background: #252523; }
.legend-panel900 { background: #252523; }
.legend-panel1500 { background: #8f8b83; }
.legend-gate { background: #b49363; }

.selected-segment-card,
.dimension-row,
.part-card {
  border-color: var(--estimate-line);
  border-radius: 2px;
  background: #fffefa;
}

.parts-card summary {
  min-height: 48px;
  border: 0;
  border-bottom: 1px solid var(--estimate-line);
  border-radius: 0;
  background: transparent;
  color: var(--estimate-ink);
}

.parts-card summary::after,
.notice-details summary::after {
  color: var(--estimate-ink);
}

.total-card {
  border: 0;
  border-top: 1px solid var(--estimate-ink);
  border-bottom: 1px solid var(--estimate-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 22px 8px 24px;
}

.total-card span {
  color: var(--estimate-muted);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.manufacturer-total {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.manufacturer-total span {
  display: inline;
  font-size: 11px;
  letter-spacing: 0.05em;
}

.manufacturer-total del {
  color: var(--estimate-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 16px;
  opacity: 0.75;
}

.total-card strong {
  color: var(--estimate-ink);
  font-size: clamp(46px, 13vw, 76px);
  letter-spacing: -0.04em;
}

.savings-total {
  display: inline-block;
  margin: 13px 0 0;
  padding: 5px 10px;
  color: var(--estimate-ink);
  border: 1px solid var(--estimate-line);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.shipping-inline,
.share-inline {
  color: var(--estimate-muted);
}

.shipping-inline button,
.share-inline button {
  color: var(--estimate-ink);
}

.inquiry-card .primary-button {
  border-radius: 2px;
  background: #222220;
  color: #fff;
}

.inquiry-card .ghost-button {
  border: 1px solid #393936;
  border-radius: 2px;
  color: #222220;
}

@media (min-width: 760px) {
  .shape-button {
    border-right: 1px solid var(--estimate-line);
    border-bottom: 0;
  }

  .shape-button:nth-of-type(2n) {
    border-right: 1px solid var(--estimate-line);
  }

  .shape-button:last-of-type {
    border-right: 0;
  }

  #estimateInput {
    padding: 32px;
  }

  #estimateInput::before {
    width: 48%;
    height: 220px;
  }
}

@media (max-width: 420px) {
  #estimateInput,
  .drawing-card,
  .dimensions-card,
  .parts-card {
    padding: 17px;
  }

  #estimateInput::before {
    width: 72%;
    height: 155px;
  }

  #estimateInput .section-head {
    min-height: 64px;
  }

  .shape-button {
    grid-template-columns: 26px 1fr;
    gap: 7px;
    min-height: 48px;
  }

  .shape-button strong {
    font-size: 14px;
  }

  .drawing-legend {
    display: flex;
    gap: 7px 12px;
  }
}
