.ahc-studio {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-draft);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.ahc-st-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; background: var(--forest); color: var(--forest-ink);
  border-bottom: 1px solid var(--forest-2);
}
.ahc-st-tabs { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; }
.ahc-st-tab {
  border: 1px solid rgba(246,243,236,0.22); background: transparent; color: rgba(246,243,236,0.84);
  padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: all .15s ease;
}
.ahc-st-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.ahc-st-status {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 12px; color: var(--accent-light);
}
.ahc-st-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-light); }

.ahc-st-grid { display: grid; grid-template-columns: 1fr; }

/* Left Stage: Architectural Drafting Board with Corner Crop Marks */
.ahc-st-stage {
  padding: 16px; background: #101E19; color: var(--forest-ink);
  display: flex; flex-direction: column; gap: 13px;
}
.ahc-st-frame {
  position: relative; padding: 8px;
  border: 1px solid rgba(232, 177, 134, 0.22);
}
.ahc-crop {
  position: absolute; width: 12px; height: 12px; pointer-events: none; z-index: 8;
  border-color: var(--accent-light); border-style: solid; border-width: 0;
}
.ahc-crop-tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.ahc-crop-tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.ahc-crop-bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.ahc-crop-br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }

.ahc-st-viewport {
  position: relative; width: 100%; aspect-ratio: 4 / 3;
  overflow: hidden; background: #172B24;
}
.ahc-st-preview-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ahc-st-mask-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 6;
  cursor: crosshair; touch-action: none;
}

.ahc-st-stage-tools { display: flex; flex-direction: column; gap: 10px; }
.ahc-st-upload-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ahc-st-draft-btn {
  border: 1px solid rgba(246,243,236,0.28); background: transparent; color: var(--forest-ink);
  padding: 8px 12px; border-radius: var(--radius-draft);
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; cursor: pointer; text-decoration: none;
}
.ahc-st-draft-btn:hover { background: rgba(255,255,255,0.1); border-color: var(--accent-light); }
.ahc-st-draft-btn.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* One-Photo Multi-Style Thumbnail Strip (RemodelAI-inspired, unified in Atelier style) */
.ahc-thumb-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.ahc-thumb-btn {
  border: 1px solid rgba(246,243,236,0.2); background: #162922; padding: 3px;
  border-radius: var(--radius-draft); cursor: pointer; text-align: left; overflow: hidden;
  display: flex; flex-direction: column; gap: 4px; color: var(--forest-ink);
}
.ahc-thumb-btn img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.ahc-thumb-btn span {
  font-family: var(--font-mono); font-size: 12px; padding: 0 3px 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ahc-thumb-btn.is-active { border-color: var(--accent-light); background: var(--accent); color: #fff; }

.ahc-brush-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-draft);
  background: #233830; border: 1px solid var(--accent-light); font-size: 13px;
}

/* Right Workbench: Tactile Bespoke Controls (ZERO default <select>!) */
.ahc-st-controls {
  padding: 20px 16px 22px; display: flex; flex-direction: column; gap: 16px;
  background: var(--surface);
}
.ahc-field { display: flex; flex-direction: column; gap: 7px; }
.ahc-field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ahc-field-lbl {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3);
}
.ahc-field-val { font-family: var(--font-mono); font-size: 12px; color: var(--accent-hover); font-weight: 600; }

/* Tactile Architectural Chip Ribbon */
.ahc-chip-ribbon { display: flex; flex-wrap: wrap; gap: 6px; }
.ahc-chip {
  border: 1px solid var(--border-strong); background: var(--bg); color: var(--ink);
  padding: 7px 12px; border-radius: var(--radius-draft);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all .14s ease;
}
.ahc-chip:hover { border-color: var(--ink); }
.ahc-chip.is-active { background: var(--forest); color: var(--forest-ink); border-color: var(--forest); }

/* 3-Stop Tactile Structural Lock Dial */
.ahc-seg-3 {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border-strong); border-radius: var(--radius-draft); overflow: hidden;
  background: var(--bg);
}
.ahc-seg-btn {
  border: 0; border-right: 1px solid var(--border); background: transparent; color: var(--ink-2);
  padding: 9px 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 12.5px; font-weight: 600;
}
.ahc-seg-btn:last-child { border-right: 0; }
.ahc-seg-btn small { font-family: var(--font-mono); font-size: 12px; opacity: 0.75; }
.ahc-seg-btn.is-active { background: var(--forest); color: var(--forest-ink); }
.ahc-seg-btn.is-active small { color: var(--accent-light); opacity: 1; }

/* Architectural Style Swatch Grid */
.ahc-style-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.ahc-style-btn {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-radius: var(--radius-draft); border: 1px solid var(--border); background: var(--bg);
  color: var(--ink); font-size: 13px; font-weight: 600; text-align: left; cursor: pointer;
}
.ahc-style-btn:hover { border-color: var(--accent); }
.ahc-style-btn.is-active { background: var(--forest); color: var(--forest-ink); border-color: var(--forest); }
.ahc-swatch {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.2);
}

/* Dual-Tone Material Palette Cards */
.ahc-mat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ahc-mat-card {
  display: flex; align-items: center; gap: 9px; padding: 9px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-draft); background: var(--bg);
  text-align: left; cursor: pointer; color: var(--ink); font-size: 12.5px; font-weight: 600;
}
.ahc-mat-card:hover { border-color: var(--accent); }
.ahc-mat-card.is-active { border-color: var(--forest); background: var(--accent-soft); }
.ahc-dual-dot {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  border: 1px solid rgba(0,0,0,0.18); display: flex;
}
.ahc-dual-dot i { display: block; width: 50%; height: 100%; }

/* Drafting-Line Minimalist Material Notes Input */
.ahc-draft-input {
  width: 100%; padding: 10px 2px; border: 0; border-bottom: 1.5px solid var(--border-strong);
  background: transparent; color: var(--ink); font-family: var(--font-sans); font-size: 14.5px;
  outline: none; transition: border-color .16s ease;
}
.ahc-draft-input:focus { border-bottom-color: var(--accent); }

/* Tier Cards */
.ahc-tier-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ahc-tier-btn {
  padding: 10px 12px; border-radius: var(--radius-draft); border: 1px solid var(--border-strong);
  background: var(--bg); text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 2px;
}
.ahc-tier-btn b { font-size: 13.5px; color: var(--ink); }
.ahc-tier-btn span { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.ahc-tier-btn.is-active { border-color: var(--accent); background: var(--accent-soft); }

/* Progress & Architectural Material + Paint Spec Sheet */
.ahc-st-progress {
  padding: 14px; border-radius: var(--radius-draft); background: var(--surface-2); border: 1px solid var(--border);
}
.ahc-prog-track { height: 6px; background: var(--border); overflow: hidden; margin-top: 8px; }
.ahc-prog-fill { height: 100%; width: 14%; background: var(--accent); transition: width .35s ease; }

.ahc-spec-box {
  padding: 14px; border-radius: var(--radius-draft);
  background: var(--bg); border: 1px solid var(--border-strong); font-size: 13.5px;
}
.ahc-spec-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.ahc-spec-head b { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--forest); }
.ahc-paint-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.ahc-paint-chip {
  border: 1px solid var(--border); background: var(--surface); padding: 6px;
  display: flex; flex-direction: column; gap: 4px;
}
.ahc-paint-bar { height: 22px; border: 1px solid rgba(0,0,0,0.08); }
.ahc-paint-chip span { font-size: 12px; font-weight: 600; line-height: 1.2; color: var(--ink); }
.ahc-paint-chip small { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.ahc-spec-list { margin: 0; padding-left: 17px; color: var(--ink-2); display: grid; gap: 4px; }

.ahc-qr-box {
  padding: 14px; border-radius: var(--radius-draft); background: #fff; color: var(--ink);
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px;
}

@media (min-width: 960px) {
  .ahc-st-grid { grid-template-columns: 1.22fr 1fr; }
  .ahc-st-stage { padding: 22px; }
  .ahc-st-controls { padding: 22px 24px; border-left: 1px solid var(--border-strong); }
  .ahc-style-grid { grid-template-columns: repeat(3, 1fr); }
}

.ahc-st-stage .ahc-spec-box { background: #162922; border-color: rgba(232,177,134,0.28); color: var(--forest-ink); margin-top: auto; }
.ahc-st-stage .ahc-spec-head b { color: var(--accent-light); }
.ahc-st-stage .ahc-paint-chip { background: #101E19; border-color: rgba(246,243,236,0.16); }
.ahc-st-stage .ahc-paint-chip span { color: var(--forest-ink); }
.ahc-st-stage .ahc-paint-chip small { color: var(--accent-light); }
.ahc-st-stage .ahc-spec-list { color: rgba(246,243,236,0.84); }
.ahc-st-stage .ahc-btn-ghost { background: transparent; color: var(--forest-ink); border-color: rgba(246,243,236,0.3); }


/* v6 Studio Mobile Above-the-Fold Entry */
.ahc-st-stage > .ahc-st-upload-row { justify-content: space-between; }
@media (max-width: 719px) {
  .ahc-st-bar { padding: 9px 12px; gap: 6px; }
  .ahc-st-status { display: none; }
  .ahc-st-stage { padding: 12px; gap: 10px; }
  .ahc-st-frame { padding: 5px; }
  .ahc-st-stage > .ahc-st-upload-row #ahc-upload-btn { flex: 1; justify-content: space-between; }
}
