:root {
  --font-ko: "Pretendard Variable", "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --font-en: "acumin-pro-condensed", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-sans: var(--font-ko);
  --color-bg: #ffffff;
  --color-surface: #fff;
  --color-surface-alt: #fbfbfb;
  --color-surface-muted: #fafafa;
  --color-surface-placeholder: #f5f5f5;
  --color-text: #111;
  --color-text-strong: #333;
  --color-text-sub: #666;
  --color-text-muted: #444;
  --color-text-meta: #555;
  --color-border: #000;
  --color-border-soft: #000;
  --color-border-faint: #ddd;
  --color-border-hover: #ddd;
  --color-border-weak: #d9dde3;
  --color-border-placeholder: #cfcfcf;
  --color-primary: #0d6efd;
  --color-accent: #111;
  --color-disabled: #999;
  --color-preview-bg: #f3f3f3;
  --color-info-bg: #f6f9ff;
  --color-chip-bg: #f3f6fb;
  --color-tip-bg: #f7f9fb;
  --color-tip-border: #e6ebf0;
  --color-row-bg: #fbfcfd;
  --color-row-border: #e6ebf0;
  --color-note-text: #2c3e50;
  --color-error: #c0392b;
  --color-error-bg: #fff5f3;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 14px;
  --radius-btn: 9999px;
  --shadow-card: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-card-hover: 0 10px 26px rgba(0, 0, 0, 0.08);
  --shadow-panel: 0 8px 24px rgba(0, 0, 0, 0.04);
  --shadow-panel-hover: 0 10px 28px rgba(0, 0, 0, 0.08);
  --title-font-size: clamp(32px, 3vw, 48px);
  --title-sub-font-size: clamp(28px, 2.5vw, 34px);
}

html.wf-loading body { visibility: hidden; }
html.wf-active body { visibility: visible; }

body, h1, h2, h3, h4, h5, h6, p, span {
  font-family: var(--font-ko);
  font-weight: 400;
  word-break: keep-all;
  overflow-wrap: break-word;
  color: var(--color-text);
}

strong,
b {
  font-family: var(--font-ko);
  font-weight: 600;
}

h1[lang="en"], h2[lang="en"], h3[lang="en"], h4[lang="en"], h5[lang="en"], h6[lang="en"],
p[lang="en"], span[lang="en"] {
  font-family: var(--font-en);
}

strong[lang="en"],
b[lang="en"],
[lang="en"] strong,
[lang="en"] b {
  font-family: var(--font-en);
  font-weight: 600;
}

.container {
  max-width: 1440px;
  margin: auto;
  background: var(--color-surface);
  padding: 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.page-header {
  margin-bottom: 24px;
}

.page-discription {
  margin-bottom: 24px;
}

.title-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.title-main {
  margin: 0;
  font-size: var(--title-font-size);
  color: var(--color-text);
}

.title-sub {
  margin: 0;
  font-size: var(--title-sub-font-size);
  color: var(--color-text-sub);
}

.title-discription {
  margin: 0;
  font-size: 22px;
  line-height: 1.4;
  color: var(--color-text);
}

.header-divider {
  margin-top: 12px;
  height: 1px;
  background: var(--color-border);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.main-grid.single-column {
  grid-template-columns: 1fr;
}

.steps-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.order-complete {
  grid-column: 1 / -1;
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.landing-card {
  display: flex;
  gap: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 14px;
  background: var(--color-surface);
  text-decoration: none;
  color: var(--color-text);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-direction: column
}

.landing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.landing-thumb {
  width: 100%;
  height: auto;
  display: block; 
  aspect-ratio: 4/2; 
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(135deg, #f3f3f3 0%, #dcdcdc 100%);
  flex-shrink: 0;
}

.landing-thumb.wood {
  background: linear-gradient(135deg, #f3d9b1 0%, #c89b5e 100%);
}

.landing-thumb.top {
  background: linear-gradient(135deg, #cde0ff 0%, #87a8ff 100%);
}

.landing-body h3 {
  margin: 0 0 6px;
}

.landing-body p {
  margin: 0;
  color: var(--color-text-muted);
}

.summary-card {
  position: sticky;
  top: 24px;
  height: fit-content;
}

h1 {
  margin-bottom: 30px;
}

section {
  margin-bottom: 0;
}

.steps-main section:last-child {
  margin-bottom: 0;
}

.step-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 20px;
  background: var(--color-surface-alt);
  box-shadow: var(--shadow-panel);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.step-card:hover {
  box-shadow: var(--shadow-panel-hover);
  transform: translateY(-2px);
}

.step-card h2 {
  margin: 4px 0 20px;
}

.material-tabs {
  display: flex;
  gap: 8px;
  margin: 10px 0 24px;
  flex-wrap: wrap;
}

.material-category-desc {
  margin: 0 0 8px;
  color: var(--color-text-muted);
  font-size: 13px;
}

.material-category-header {
  margin-bottom: 8px;
}

.material-category-title {
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 4px;
}

.material-tab {
  padding: 8px 14px;
  border: 1px solid var(--color-border-soft);
  background: var(--color-disabled);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  color: #fff;
}

.material-tab.active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.form-row {
  display: flex;
  margin-bottom: 12px;
  align-items: center;
  gap: 10px;
}

.form-row label {
  width: 140px;
  font-weight: 600;
  padding-top: 0;
}

.form-row .material-grid {
  flex: 1;
}

.field-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

input[type="number"] {
  padding: 8px;
  width: 100%;
  appearance: auto;
}

.form-row input[type="number"],
.form-row input[type="text"],
.form-row input[type="tel"],
.form-row input[type="email"],
.form-row textarea,
.form-row select {
  border: none;
  border-bottom: 1px solid var(--color-border-faint);
  border-radius: 0;
  background: transparent;
}

.form-row input[type="number"]:focus,
.form-row input[type="text"]:focus,
.form-row input[type="tel"]:focus,
.form-row input[type="email"]:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-bottom-color: var(--color-accent);
}

.form-row input[type="number"],
.form-row select {
  width: 100%;
  max-width: 240px;
  box-sizing: border-box;
  padding: 8px 6px 8px 4px;
}

#thicknessSelect {
  max-width: 180px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%23111' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-position: calc(100% - 10px) center;
  background-size: 12px 8px;
  background-repeat: no-repeat;
}

/* 서비스 모달 select를 thicknessSelect와 동일한 캐럿 스타일로 통일 */
select.service-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%23111' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-position: calc(100% - 6px) center;
  background-size: 12px 8px;
  background-repeat: no-repeat;
}

#thicknessSelect option {
  padding-left: 0;
  text-indent: 0;
}

#kitchenShape {
  max-width: 180px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%23111' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-position: calc(100% - 10px) center;
  background-size: 12px 8px;
  background-repeat: no-repeat;
}


#step5 input[type="text"],
#step5 input[type="tel"],
#step5 input[type="email"] {
  padding: 8px 6px 8px 4px;
}

#step5 textarea {
  padding: 8px 6px 8px 4px;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
  margin: 0;
}

#previewBox {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin: 18px 0 6px;
  background: var(--color-surface-muted);
}

#previewText {
  font-weight: 700;
  color: var(--color-text-strong);
}

#topPreviewBox {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin: 18px 0 6px;
  background: var(--color-surface-muted);
}

#topPreviewText {
  font-weight: 700;
  color: var(--color-text-strong);
}

#topPreviewBox .preview-frame {
  position: relative;
  height: 220px;
  border: 1px dashed var(--color-border-faint);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-preview-bg);
  overflow: hidden;
}

#topPreviewColor {
  width: 120px;
  height: 120px;
  border-radius: 0;
  background: var(--color-border-faint);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
  min-width: 40px;
  min-height: 40px;
  transition: width 0.2s ease, height 0.2s ease;
}
.l-shape-preview {
  position: relative;
  box-shadow: none !important;
}
.l-shape-preview .preview-leg {
  position: absolute;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
  transition: width 0.2s ease, height 0.2s ease, left 0.2s ease, top 0.2s ease;
}

.preview-frame {
  position: relative;
  height: 220px;
  border: 1px dashed var(--color-border-faint);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-preview-bg);
  overflow: hidden;
}

#previewColor {
  width: 120px;
  height: 120px;
  border-radius: 0;
  background: var(--color-border-faint);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
  min-width: 40px;
  min-height: 40px;
  transition: width 0.2s ease, height 0.2s ease;
  position: relative;
}

.hole-dot {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: #8b5a2b;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hole-dot.handle-hole {
  background: #2f5fb8;
}

#itemPriceDisplay {
  margin: 15px 0;
  font-weight: bold;
  font-size: 18px;
}

.item-price-display {
  margin: 15px 0;
  font-weight: bold;
  font-size: 18px;
}

:is(button, .next-page-btn, .prev-page-btn, .secondary-btn, .send-btn, .ghost-btn, .service-detail-btn) {
  --btn-bg: var(--color-accent);
  --btn-color: #fff;
  --btn-border: none;
  --btn-padding: 12px 16px;
  --btn-radius: var(--radius-btn);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: var(--btn-padding);
  border-radius: var(--btn-radius);
  border: var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-color);
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

:is(button, .next-page-btn, .prev-page-btn, .secondary-btn, .send-btn, .ghost-btn, .service-detail-btn):hover {
  opacity: 0.9;
}

:is(button, .next-page-btn, .prev-page-btn, .secondary-btn, .send-btn, .ghost-btn, .service-detail-btn):active {
  transform: translateY(1px);
}

:is(button, .next-page-btn, .prev-page-btn, .secondary-btn, .send-btn, .ghost-btn, .service-detail-btn):disabled {
  opacity: 0.45;
  cursor: not-allowed;
  --btn-bg: var(--color-disabled);
  --btn-border: none;
}

button {
  --btn-padding: 10px 15px;
  --btn-radius: var(--radius-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

#estimateTable {
  table-layout: fixed;
}

th, td {
  padding: 10px;
  border-bottom: 1px solid var(--color-border-faint);
  vertical-align: middle;
}

#estimateTable th:first-child,
#estimateTable td:first-child {
  width: 40%;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#estimateTable th:nth-child(2),
#estimateTable td:nth-child(2) {
  width: 50px;
  text-align: center;
}

#estimateTable th:nth-child(3),
#estimateTable td:nth-child(3) {
  width: 33%;
  text-align: right;
}

#estimateTable th:nth-child(4),
#estimateTable td:nth-child(4) {
  width: 60px;
  text-align: center;
}

#estimateTable .qty-input {
  width: 46px;
  text-align: center;
  padding: 4px 6px;
}

#estimateTable th:nth-child(3),
#estimateTable td:nth-child(3),
#estimateTable th:nth-child(4),
#estimateTable td:nth-child(4) {
  white-space: nowrap;
}

.summary p {
  font-size: 16px;
  margin: 6px 0;
  font-weight: 600;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}

.summary-subtext {
  font-size: 12px;
  color: var(--color-text-sub);
  font-weight: 400;
}

.hidden-step {
  display: none;
}

.next-page-btn,
.prev-page-btn {
  display: block;
  text-align: center;
  width: 100%;
}

.nav-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  width: 100%;
}

.nav-actions .next-page-btn,
.nav-actions .prev-page-btn {
  flex: 1;
}

.nav-actions .send-btn {
  flex: 1;
}

.send-btn {
  margin-top: 0;
  width: auto;
  --btn-bg: var(--color-primary);
}

.order-complete {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-info-bg);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  width: 100%;
}

.container .order-complete {
  max-width: 720px;
  margin: 14px auto 0;
}

.order-complete.hidden-step {
  display: none;
}

.order-complete .complete-message {
  margin: 0 0 10px;
  font-weight: 700;
  color: #0d6efd;
}

.order-complete .complete-details {
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-complete .complete-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.order-complete .complete-section h4 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--color-text);
}

.order-complete .complete-section p {
  margin: 2px 0;
  color: var(--color-text-strong);
  font-size: 13px;
}

.order-complete .item-line {
  margin: 2px 0;
  color: var(--color-text-strong);
  font-size: 13px;
}

.order-complete-visible #estimateTable,
.order-complete-visible .summary,
.order-complete-visible .nav-actions,
.order-complete-visible h2,
.order-complete-visible .empty-banner {
  display: none;
}

.addons-card {
  margin: 0;
  grid-column: 1 / 2;
  grid-row: 1;
}

.addons-desc {
  margin: 0 0 12px;
  color: var(--color-text-muted);
}

.addons-actions {
  display: flex;
  gap: 8px;
}

.secondary-btn {
  --btn-padding: 12px 18px;
  margin-bottom: 12px;
}

.empty-banner {
  text-align: center;
  padding: 12px;
  color: var(--color-text-sub);
  background: var(--color-surface-placeholder);
  border: 1px dashed var(--color-border-faint);
  border-radius: var(--radius-md);
  margin: 12px 0;
  display: none;
}

.material-picker {
  display: flex;
  align-items: center;
  gap: 12px;
}

.selected-material-card {
  flex: 1;
  min-height: 100px;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  padding: 12px;
  background: var(--color-surface-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.selected-material-card .placeholder {
  color: #777;
  font-size: 14px;
}

.selected-material {
  font-weight: 600;
  color: var(--color-text-strong);
}

.selected-material-card .material-visual {
  width: 160px;
  height: 80px;
  border-radius: 10px;
  background: var(--color-border-faint);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
}

.selected-material-card .material-visual.placeholder-visual {
  background: var(--color-surface-placeholder);
  border: 1px dashed var(--color-border-placeholder);
}

.selected-material-card .info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.selected-material-card .info .name {
  font-weight: 700;
}

.selected-material-card .info .meta {
  color: var(--color-text-meta);
  font-size: 13px;
}

.selected-toptype-card {
  flex: 1;
  min-height: 100px;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  padding: 12px;
  background: var(--color-surface-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.selected-toptype-card .placeholder {
  color: #777;
  font-size: 14px;
}

.selected-toptype-card .material-visual {
  width: 160px;
  height: 80px;
  border-radius: 10px;
  background: var(--color-border-faint);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
}

.selected-toptype-card .material-visual.placeholder-visual {
  background: var(--color-surface-placeholder);
  border: 1px dashed var(--color-border-placeholder);
}

.selected-toptype-card .info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.selected-toptype-card .info .name {
  font-weight: 700;
}

.selected-toptype-card .info .meta {
  color: var(--color-text-meta);
  font-size: 13px;
}

.addon-card-display {
  min-height: 80px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.addon-card-display .material-visual {
  width: 60px;
  height: 60px;
}

.addon-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
}

.addon-chip .name {
  font-weight: 700;
  color: #222;
}

.addon-chip .meta {
  color: var(--color-text-meta);
  font-size: 12px;
}


/* material cards */
.material-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.service-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.material-card {
  display: block;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  padding: 10px;
  background: var(--color-surface-muted);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.material-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.material-card .material-visual {
  width: 100%;
  height: 120px;
  border-radius: var(--radius-md);
  background: var(--color-border-faint);
  margin-bottom: 10px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
}

.material-card .name {
  font-weight: 700;
  margin-bottom: 4px;
}

.material-card .price {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}

.material-card .size {
  color: var(--color-text-meta);
  font-size: 13px;
}

.material-card .description {
  color: var(--color-text-sub);
  font-size: 13px;
  margin-top: 4px;
}

/* Modal */
.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.modal-content {
  display: flex;
  flex-direction: column;
  position: relative;
  max-width: 720px;
  margin: 60px auto;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
  max-height: 80vh;
  min-height: 80vh;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.modal-close {
  background: #eee;
  color: var(--color-text);
  padding: 6px 10px;
  border-radius: 8px;
}

#infoModal .modal-content {
  max-width: 480px;
  min-height: 2vw;
}

.modal-footer {
  position: sticky;
  bottom: 0;
  background: var(--color-surface);
  padding-top: 10px;
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

#serviceModal .modal-footer,
#topServiceModal .modal-footer {
  gap: 10px;
  align-items: center;
}

#serviceModal .modal-footer .secondary-btn,
#topServiceModal .modal-footer .secondary-btn {
  margin-bottom: 0;
}

#saveServiceModal,
#saveTopServiceModal {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-accent);
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 700;
  min-width: 110px;
}
.modal-body {
  flex: 1;
  overflow: auto;
  scrollbar-width: none; /* Firefox */
}

.modal-body::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.info-message {
  font-size: 14px;
  color: var(--color-text-strong);
  line-height: 1.5;
}

.modal-content::-webkit-scrollbar {
  display: none; /* Chrome/Safari: hide scrollbar */
}

.material-card:hover {
  border-color: var(--color-border-hover);
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.material-card.selected {
  border-color: var(--color-accent);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  background: var(--color-surface);
}

.service-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.service-detail-btn {
  --btn-padding: 9px 14px;
  --btn-border: 1px solid var(--color-accent);
  font-size: 13px;
}

.service-detail-chip {
  flex: 1;
  padding: 6px 10px;
  background: var(--color-chip-bg);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--color-note-text);
}

.service-option-tip {
  margin: 0 0 12px;
  color: var(--color-text-muted);
  font-size: 13px;
  background: var(--color-tip-bg);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-tip-border);
}

.service-row {
  border: 1px solid var(--color-row-border);
  border-radius: var(--radius-lg);
  padding: 12px;
  margin-bottom: 10px;
  background: var(--color-row-bg);
}

.service-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 700;
}

.service-field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: flex-start;
}

.service-field-grid > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.service-field-grid label {
  margin: 0;
  font-weight: 600;
  color: var(--color-text);
}

.ghost-btn {
  --btn-border: 1px solid var(--color-accent);
  --btn-padding: 9px 12px;
  font-size: 13px;
}

.service-textarea,
.service-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 4px 8px 0;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--color-border-weak);
  background: transparent;
}

.service-textarea {
  min-height: 70px;
  resize: vertical;
}

.service-textarea:focus,
.service-input:focus {
  outline: none;
  border-bottom-color: var(--color-accent);
}

.addon-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 14px;
}

.selected-addons {
  flex: 1;
  min-height: 44px;
  border: 1px dashed var(--color-border-faint);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: var(--color-surface-muted);
  color: var(--color-text-strong);
  display: flex;
  align-items: center;
}

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

.detail-row .sub-detail {
  font-size: 12px;
  color: var(--color-text-sub);
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.error-msg {
  color: var(--color-text-meta);
  font-size: 12px;
  line-height: 1.4;
}

.error-msg.error {
  color: var(--color-error);
}

.input-error {
  border: 1px solid var(--color-error) !important;
  background: var(--color-error-bg);
}

@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr;
  }

  .summary-card {
    position: relative;
    top: 0;
  }

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

@media (max-width: 540px) {
  .material-grid,
  .service-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}
