/* ── Reset & Variables ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --green:        #1D9E75;
  --green-light:  #E1F5EE;
  --green-dark:   #0F6E56;
  --red:          #E24B4A;
  --red-light:    #FCEBEB;
  --red-dark:     #A32D2D;
  --amber:        #BA7517;
  --amber-light:  #FAEEDA;
  --amber-dark:   #854F0B;
  --blue:         #378ADD;
  --blue-light:   #E6F1FB;
  --blue-dark:    #185FA5;
  --teal:         #0F6E56;
  --teal-light:   #E1F5EE;
  --teal-dark:    #085041;
  --purple:       #534AB7;
  --purple-light: #EEEDFE;
  --purple-dark:  #3C3489;
  --pink:         #993556;
  --pink-light:   #FBEAF0;
  --pink-dark:    #72243E;
  --gray-50:  #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --white:    #ffffff;
  --radius:    10px;
  --radius-sm:  8px;
  --radius-pill: 20px;
}

body {
  font-family: 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  font-size: 14px;
  color: var(--gray-800);
  background: var(--gray-100);
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
}

/* ── Topbar ─────────────────────────────────────────────────────────────── */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 14px 16px 12px;
  position: sticky; top: 0; z-index: 50;
}
.topbar-row { display: flex; align-items: center; justify-content: space-between; }
.topbar h1  { font-size: 17px; font-weight: 700; color: var(--gray-800); }
.topbar .sub { font-size: 11px; color: var(--gray-400); margin-top: 1px; }

.reg-btn {
  background: var(--green-light); color: var(--green-dark);
  border: none; border-radius: var(--radius-sm);
  padding: 7px 13px; font-size: 12px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; gap: 3px;
}

/* ── Search ─────────────────────────────────────────────────────────────── */
.search-wrap {
  padding: 10px 14px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: relative;
}
.search-autofill-trap {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; opacity: 0; pointer-events: none;
}
.search-rel { position: relative; }
.search-rel input {
  width: 100%; padding: 9px 12px 9px 36px;
  border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  background: var(--gray-50); color: var(--gray-800);
  font-size: 13px; outline: none;
}
.search-rel input:focus { border-color: var(--green); background: var(--white); }
.search-ico {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--gray-400); font-size: 15px; pointer-events: none;
}

/* ── Tabs ───────────────────────────────────────────────────────────────── */
.tabs {
  display: flex; overflow-x: auto;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 14px;
  -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  font-size: 12px; padding: 10px 13px;
  border-bottom: 2px solid transparent;
  color: var(--gray-500); cursor: pointer;
  white-space: nowrap; font-weight: 500;
}
.tab.on { color: var(--green); border-bottom-color: var(--green); font-weight: 600; }
.tab-count {
  margin-left: 3px;
  font-size: 10px;
  font-weight: 500;
  color: var(--gray-400);
}
.tab.on .tab-count { color: var(--green); opacity: 0.7; }

/* ── List ───────────────────────────────────────────────────────────────── */
.list-view { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }

.empty-state { text-align: center; padding: 32px 0; color: var(--gray-400); font-size: 14px; }

.card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 13px 14px;
  cursor: pointer; transition: background .1s;
}
.card:active { background: var(--gray-50); }
.card-meta   { font-size: 11px; color: var(--gray-400); margin-bottom: 3px; }
.card-title  { font-size: 14px; font-weight: 600; color: var(--gray-800); line-height: 1.35; margin-bottom: 4px; }
.card-desc   { font-size: 12px; color: var(--gray-500); line-height: 1.45; margin-bottom: 8px; }

.active-row  { display: flex; align-items: center; gap: 5px; }
.active-dot  { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.active-txt  { font-size: 11px; color: var(--green-dark); font-weight: 600; }
.inactive-txt{ font-size: 11px; color: var(--gray-400); }

/* ── Detail ─────────────────────────────────────────────────────────────── */
.detail-view { display: none; flex-direction: column; }

.det-topbar {
  background: var(--white); border-bottom: 1px solid var(--gray-200);
  padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  position: sticky; top: 0; z-index: 50;
}
.det-topbar-title {
  display: none;
}
.det-topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.det-topbar .edit-btn,
.det-topbar .delete-btn { flex-shrink: 0; }

.back-btn {
  background: none; border: none; cursor: pointer;
  color: var(--green); font-size: 13px; padding: 0;
  display: inline-flex; align-items: center;
  font-weight: 600; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.back-btn:active { opacity: .75; }
.back-btn-label { line-height: 1.4; }
.edit-btn {
  background: none; border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); padding: 8px 12px;
  min-height: 36px;
  font-size: 12px; color: var(--gray-600); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.delete-btn {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  min-height: 36px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-400);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.delete-btn:hover {
  color: #dc2626;
  border-color: #fecaca;
  background: #fff5f5;
}
.delete-btn:active { opacity: .85; }

.det-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; }

.det-header {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 14px;
}
.det-brand  { font-size: 11px; color: var(--gray-400); margin-bottom: 3px; }
.det-title  { font-size: 17px; font-weight: 700; color: var(--gray-800); line-height: 1.3; margin-bottom: 3px; }
.det-sub    { font-size: 12px; color: var(--gray-400); margin-bottom: 8px; }
.det-active-wrap { margin-top: 4px; }
.det-active-summary {
  width: 100%; background: none; border: none; padding: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  cursor: pointer; text-align: left;
}
.det-active-summary-left { display: flex; align-items: center; gap: 5px; min-width: 0; }
.det-active-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.det-active-txt { font-size: 12px; color: var(--green-dark); font-weight: 600; }
.det-active-toggle {
  font-size: 11px; color: var(--gray-500); font-weight: 500; flex-shrink: 0;
}
.det-active-list {
  margin-top: 8px; padding: 10px 12px;
  background: var(--gray-50); border-radius: var(--radius-sm);
  border: 1px solid var(--gray-100);
}
.det-active-shop {
  font-size: 12px; color: var(--gray-700); line-height: 1.7;
  padding: 2px 0;
}

.sec { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 13px 14px; }
.sec-lbl {
  font-size: 10px; font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; color: var(--gray-400); margin-bottom: 9px;
}
.cause-txt { font-size: 13px; line-height: 1.7; color: var(--gray-800); white-space: pre-wrap; word-break: break-word; }

.warn-box {
  background: var(--amber-light); border: 1px solid #F0C070;
  border-radius: var(--radius-sm); padding: 11px 13px;
  display: flex; gap: 9px; align-items: flex-start;
}
.warn-ico { color: var(--amber-dark); font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.warn-txt { font-size: 12px; line-height: 1.6; color: var(--amber-dark); white-space: pre-wrap; word-break: break-word; }

/* Steps */
.step-item  { padding: 10px 0; border-bottom: 1px solid var(--gray-100); }
.step-item:last-child { border-bottom: none; padding-bottom: 0; }
.step-main  { display: flex; gap: 9px; }
.step-num   {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--green-light); color: var(--green-dark);
  font-size: 12px; font-weight: 700; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.step-txt   { font-size: 13px; line-height: 1.6; color: var(--gray-800); flex: 1; white-space: pre-wrap; word-break: break-word; }
.step-media { margin-top: 8px; margin-left: 31px; display: flex; gap: 6px; flex-wrap: wrap; }

.media-thumb {
  width: 58px; height: 58px;
  background: var(--gray-100); border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 2px; cursor: pointer; flex-shrink: 0;
  position: relative; overflow: hidden;
}
.media-thumb:active { opacity: .8; }
.media-thumb i     { font-size: 20px; color: var(--gray-500); }
.media-thumb small { font-size: 9px; color: var(--gray-400); text-align: center; padding: 0 2px; }
.media-thumb img   { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

.media-thumb-video {
  width: 100%;
  height: 100%;
  background: #1a1a2e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: absolute;
  inset: 0;
}
.media-thumb-video i {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.8);
}
.media-thumb-video span {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.5);
}

/* Parts */
.parts-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--gray-100);
}
.parts-row:last-child { border-bottom: none; padding-bottom: 0; }
.parts-name { font-size: 13px; color: var(--gray-800); }
.stock-pill { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: var(--radius-pill); }
.s-ok  { background: var(--green-light); color: var(--green-dark); }
.s-low { background: var(--amber-light); color: var(--amber-dark); }
.s-out { background: var(--red-light);   color: var(--red-dark);   }
.s-unknown { background: var(--gray-100); color: var(--gray-500); display: inline-flex; align-items: center; gap: 4px; }
.s-unknown i { font-size: 12px; }

.report-btn {
  width: 100%; border: 1px solid var(--gray-200); background: var(--white);
  color: var(--gray-800); border-radius: var(--radius);
  padding: 14px; font-size: 14px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px;
}
.report-btn:active { background: var(--gray-50); }

/* ── Media popup ────────────────────────────────────────────────────────── */
.media-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.75);
  display: none; align-items: center; justify-content: center;
  z-index: 200; padding: 20px;
}
.media-overlay.show { display: flex; }
.media-card { background: var(--white); border-radius: var(--radius); width: 100%; max-width: 380px; overflow: hidden; }
.media-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--gray-200);
}
.media-card-title{ font-size: 14px; font-weight: 600; color: var(--gray-800); }
.media-close { background: none; border: none; cursor: pointer; color: var(--gray-500); font-size: 18px; padding: 0; }
.media-img-area {
  width: 100%; aspect-ratio: 4/3;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 8px;
  position: relative; overflow: hidden;
}
.media-img-area img,
.media-img-area video { width: 100%; height: 100%; object-fit: contain; }
.media-img-placeholder { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.media-img-placeholder i    { font-size: 36px; color: var(--gray-400); }
.media-img-placeholder span { font-size: 12px; color: var(--gray-400); }
.media-footer { padding: 10px 14px; border-top: 1px solid var(--gray-200); }
.media-step-txt {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.5;
  padding: 8px 0 6px;
  border-bottom: 0.5px solid var(--gray-200);
  margin-bottom: 6px;
  white-space: pre-wrap;
  word-break: break-word;
}
.media-meta-row { display: flex; gap: 8px; align-items: center; padding: 3px 0; }
.media-meta-k { font-size: 11px; color: var(--gray-400); width: 52px; flex-shrink: 0; }
.media-meta-v { font-size: 12px; color: var(--gray-800); font-weight: 500; }
.media-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px 4px; border-top: 1px solid var(--gray-200);
}
.nav-btn {
  background: var(--gray-100); border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); padding: 5px 12px;
  font-size: 12px; color: var(--gray-600); cursor: pointer;
  display: flex; align-items: center; gap: 3px;
}
.nav-btn:disabled { opacity: .4; cursor: default; }
.nav-count { font-size: 12px; color: var(--gray-400); }

/* ── Report sheet ───────────────────────────────────────────────────────── */
.sheet-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: none; align-items: flex-end;
  z-index: 200;
}
.sheet-overlay.show { display: flex; }
.sheet {
  background: var(--white);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%; max-width: 480px; margin: 0 auto;
  overflow: hidden; max-height: 92vh; overflow-y: auto;
}
.sheet-handle { width: 36px; height: 4px; background: var(--gray-200); border-radius: 2px; margin: 12px auto 0; }
.sheet-head {
  padding: 14px 16px 12px; border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--white); z-index: 10;
}
.sheet-title { font-size: 15px; font-weight: 700; color: var(--gray-800); }
.sheet-close { background: none; border: none; cursor: pointer; color: var(--gray-500); font-size: 18px; padding: 0; }
.sheet-body  { padding: 16px; display: flex; flex-direction: column; gap: 12px; }

.form-row   { display: flex; flex-direction: column; gap: 6px; }
.form-lbl   { font-size: 12px; color: var(--gray-600); font-weight: 600; }
.form-lbl span { color: var(--red); }

.auto-field {
  padding: 10px 12px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--gray-500); background: var(--gray-50);
  display: flex; align-items: center; gap: 7px;
}
.auto-badge {
  background: var(--blue-light); color: var(--blue-dark);
  font-size: 11px; padding: 2px 8px; border-radius: var(--radius-pill); font-weight: 600;
}
.ac-wrap { position: relative; }
.ac-input {
  width: 100%; padding: 10px 12px 10px 34px;
  border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--gray-800); background: var(--white); outline: none;
}
.ac-input:focus { border-color: var(--green); }
.ac-ico {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--gray-400); font-size: 14px; pointer-events: none;
}
.ac-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); overflow: hidden;
  z-index: 50; display: none; box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.ac-item { padding: 10px 13px; font-size: 13px; color: var(--gray-800); cursor: pointer; border-bottom: 1px solid var(--gray-100); }
.ac-item:last-child { border-bottom: none; }
.ac-item:active { background: var(--gray-50); }

.form-select {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--gray-800); background: var(--white); outline: none;
}
.form-select:focus { border-color: var(--green); }

.followup-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 13px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
}
.toggle {
  width: 42px; height: 24px; background: #D1D5DB;
  border-radius: 12px; position: relative; cursor: pointer; flex-shrink: 0; transition: background .2s;
}
.toggle.on { background: var(--green); }
.toggle::after {
  content: ''; position: absolute;
  width: 18px; height: 18px; background: white;
  border-radius: 50%; top: 3px; left: 3px;
  transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle.on::after { left: 21px; }

.submit-btn {
  background: var(--green); color: white; border: none;
  border-radius: var(--radius); padding: 14px;
  font-size: 15px; font-weight: 700; cursor: pointer; width: 100%;
}
.submit-btn:active { opacity: .9; }

/* ── Admin ──────────────────────────────────────────────────────────────── */
.admin-view { display: none; flex-direction: column; width: 100%; }

.adm-topbar {
  background: var(--white); border-bottom: 1px solid var(--gray-200);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
  position: sticky; top: 0; z-index: 50;
}
.adm-tbt  { font-size: 15px; font-weight: 700; color: var(--gray-800); flex: 1; }
.save-btn {
  background: var(--green); color: white; border: none;
  border-radius: var(--radius-sm); padding: 7px 16px;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.adm-topbar .delete-btn {
  padding: 7px 14px;
  min-height: 0;
  font-size: 13px;
}

.adm-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.adm-sec  { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 13px 14px; }
.adm-sl   { font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--gray-400); margin-bottom: 10px; }
.adm-sec-desc {
  font-size: 12px; color: var(--gray-500); line-height: 1.5;
  margin: -4px 0 12px;
}
.adm-field-hint {
  font-size: 11px; color: var(--gray-400); line-height: 1.5; margin-top: 2px;
}
.error-map-editor { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.map-row {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.map-row-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.map-row-lbl { font-size: 11px; font-weight: 700; color: var(--gray-500); }
.adm-sec-toggle .adm-sl { margin-bottom: 0; }
.adm-toggle-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; cursor: pointer;
}
.adm-optional { font-weight: 400; color: var(--gray-400); }
#errorMappingToggle { font-size: 12px; color: var(--gray-500); flex-shrink: 0; }
.adm-fr   { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.adm-fr:last-child { margin-bottom: 0; }
.adm-fl   { font-size: 12px; color: var(--gray-600); font-weight: 600; }
.adm-fl span { color: var(--red); }
.adm-hint { font-size: 11px; color: var(--gray-400); font-weight: 400; }

.adm-input, .adm-sel {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--gray-800); background: var(--white); outline: none;
}
.adm-input:focus, .adm-sel:focus { border-color: var(--green); }

.adm-ta {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--gray-800); background: var(--white); outline: none;
  resize: none; font-family: inherit; line-height: 1.6; overflow: hidden; min-height: 44px;
}
.adm-ta:focus { border-color: var(--green); }

/* Brand chips */
.brand-sec {
  display: none; flex-direction: column; gap: 6px;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--gray-100);
}
.brand-sec.show { display: flex; }
.brand-chips    { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 13px; border-radius: var(--radius-pill);
  font-size: 12px; border: 1px solid var(--gray-200);
  color: var(--gray-600); cursor: pointer; background: var(--white);
  font-weight: 500; transition: all .1s;
}
.chip.on { background: var(--blue-light); color: var(--blue-dark); border-color: var(--blue); font-weight: 600; }

/* Step editor */
.step-edit     { display: flex; flex-direction: column; gap: 7px; }
.se-row        { background: var(--gray-50); border-radius: var(--radius-sm); border: 1px solid var(--gray-200); overflow: hidden; }
.se-top        { display: flex; align-items: flex-start; gap: 7px; padding: 9px 11px; }
.se-num        {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--green-light); color: var(--green-dark);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px;
}
.se-ta {
  flex: 1; border: none; background: transparent;
  font-size: 13px; color: var(--gray-800); outline: none;
  resize: none; font-family: inherit; line-height: 1.6; min-height: 44px; overflow: hidden;
}
.se-del { background: none; border: none; cursor: pointer; color: var(--gray-400); padding: 0; flex-shrink: 0; margin-top: 3px; font-size: 16px; }
.se-pt-row { display: flex; align-items: center; gap: 6px; margin: 6px 0 0 30px; }
.se-pt-lbl { font-size: 11px; color: var(--gray-400); width: 32px; flex-shrink: 0; }
.se-pt-cancel-btn {
  border: none;
  background: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}
.se-pt-cancel-btn:active { color: var(--gray-600); }
.se-pt-toggle-btn {
  display: inline-flex; align-items: center; gap: 4px;
  margin: 6px 0 0 30px; padding: 4px 10px;
  border: 1px dashed var(--gray-300); border-radius: var(--radius-sm);
  background: transparent; font-size: 12px; color: var(--gray-500); cursor: pointer;
}
.se-pt-toggle-btn:active { background: var(--gray-50); }
.se-pt-fields { margin-top: 2px; }
.se-part, .se-tools {
  flex: 1;
  font-size: 12px;
  padding: 5px 8px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--gray-800);
}
.se-part:focus, .se-tools:focus { outline: none; border-color: var(--green); }
.se-media-row  { border-top: 1px solid var(--gray-200); padding: 8px 11px; display: flex; align-items: center; gap: 7px; }
.se-media-lbl  { font-size: 11px; color: var(--gray-400); flex: 1; }
.se-thumbs     { display: flex; gap: 5px; }
.se-th {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}
.se-th img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.se-th i       { font-size: 16px; color: var(--gray-500); }
.se-th-del {
  position: absolute; top: 2px; right: 2px;
  width: 16px; height: 16px; padding: 0;
  border: none; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff;
  font-size: 10px; line-height: 16px;
  cursor: pointer; z-index: 1;
  opacity: 0; transition: opacity .15s;
}
.se-th:hover .se-th-del { opacity: 1; }
.se-th-preview {
  position: absolute; inset: 0;
  cursor: pointer;
}
.se-add-th     { width: 36px; height: 36px; border: 1px dashed var(--green); background: var(--green-light); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }

.add-step-btn {
  border: 1px dashed var(--green); background: var(--green-light);
  color: var(--green-dark); border-radius: var(--radius-sm);
  padding: 10px; font-size: 13px; font-weight: 600;
  cursor: pointer; width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 4px;
}

.api-note {
  font-size: 11px; color: var(--gray-500);
  background: var(--gray-50); border-radius: var(--radius-sm);
  padding: 9px 11px; border: 1px solid var(--gray-200);
  display: flex; align-items: flex-start; gap: 7px; line-height: 1.6;
}

/* ── 공통 모달 ───────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15, 23, 42, .45);
  align-items: flex-start; justify-content: center;
  padding: 16px;
  padding-top: 5vh;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-overlay.show { display: flex; }

.modal-card {
  width: 100%; max-width: 420px; max-height: min(90vh, 90dvh);
  background: var(--white); border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
  display: flex; flex-direction: column; overflow: hidden;
  flex-shrink: 0;
}
.modal-card-md { max-width: 480px; }

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--gray-200);
  flex-shrink: 0;
}
.modal-title { font-size: 15px; font-weight: 700; color: var(--gray-800); margin: 0; }
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--gray-500); font-size: 18px; padding: 4px;
  display: flex; align-items: center; justify-content: center;
}

.modal-body { padding: 16px; overflow-y: auto; flex: 1; min-height: 0; }
.modal-desc { font-size: 13px; color: var(--gray-600); line-height: 1.55; margin: 0 0 14px; }

.modal-field { margin-bottom: 12px; }
.modal-label { display: block; font-size: 12px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.modal-label span { color: var(--red); }

.modal-input {
  width: 100%; height: 38px; padding: 0 12px;
  border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--gray-800); background: var(--white); outline: none;
  box-sizing: border-box;
}
.modal-input:focus { border-color: var(--green); }

.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 16px; border-top: 1px solid var(--gray-200);
  flex-shrink: 0;
}

.modal-btn {
  min-height: 38px; padding: 0 16px;
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent;
}
.modal-btn-primary { background: var(--gray-900); color: #fff; border-color: var(--gray-900); }
.modal-btn-primary:active { opacity: .9; }
.modal-btn-ghost { background: var(--white); color: var(--gray-700); border-color: var(--gray-200); }
.modal-btn-danger { background: #fff; color: #dc2626; border-color: #fecaca; }
.modal-btn-danger:disabled { opacity: .55; cursor: not-allowed; }

.modal-error {
  font-size: 12px; color: #dc2626; background: #fff5f5;
  border: 1px solid #fecaca; border-radius: var(--radius-sm);
  padding: 8px 10px; margin-top: 4px;
}
.modal-success {
  font-size: 12px; color: var(--green-dark); background: var(--green-light);
  border-radius: var(--radius-sm); padding: 8px 10px; margin-top: 4px;
}
.modal-msg { font-size: 12px; color: #dc2626; margin-top: 8px; min-height: 16px; }

/* 옵션 관리 모달 */
.adm-fl-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.opt-gear-btn {
  background: none; border: none; cursor: pointer;
  color: var(--gray-400); font-size: 15px; padding: 2px 4px;
  display: flex; align-items: center; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.opt-gear-btn:active { color: var(--gray-600); }

.opt-mgr-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; max-height: 40vh; overflow-y: auto; }
.opt-mgr-row { display: flex; align-items: center; gap: 8px; }
.opt-mgr-item-input { flex: 1; background: var(--gray-50); }
.opt-mgr-del-btn {
  flex-shrink: 0; height: 38px; padding: 0 12px;
  border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  background: var(--white); color: var(--gray-600); font-size: 12px; cursor: pointer;
}
.opt-mgr-add-row { display: flex; gap: 8px; }
.opt-mgr-add-row .modal-input { flex: 1; }
.opt-mgr-empty { font-size: 12px; color: var(--gray-400); text-align: center; padding: 16px 0; }

/* 삭제 모달 정보 */
.delete-info-box {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 14px;
}
.delete-info-row { display: flex; gap: 8px; font-size: 12px; line-height: 1.6; }
.delete-info-row + .delete-info-row { margin-top: 4px; }
.delete-info-k { color: var(--gray-500); min-width: 72px; flex-shrink: 0; }
.delete-info-v { color: var(--gray-800); font-weight: 600; word-break: break-all; }

/* 토스트 */
.manual-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(12px);
  z-index: 300; background: var(--gray-900); color: #fff;
  font-size: 13px; font-weight: 600; padding: 10px 18px;
  border-radius: 999px; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  max-width: 90vw; text-align: center;
}
.manual-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 조치 난이도 */
.lv-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; border-radius: 8px; padding: 4px 10px; font-weight: 500; }
.det-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.lv-badge-sm { display: inline-flex; align-items: center; font-size: 11px; border-radius: 8px; padding: 3px 8px; font-weight: 500; }
.lv-remote { background: #E6F1FB; color: #0C447C; }
.lv-site   { background: #EAF3DE; color: #27500A; }
.lv-field  { background: #FAEEDA; color: #633806; }

.freq-sel-btn {
  padding: 8px 14px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  background: var(--white); font-size: 13px; color: var(--gray-700); cursor: pointer;
}
.freq-sel-btn.on[data-value="낮음"] { border-color: var(--gray-400); background: var(--gray-100); color: var(--gray-700); font-weight: 600; }
.freq-sel-btn.on[data-value="중간"] { border-color: var(--amber-dark); background: var(--amber-light); color: var(--amber-dark); font-weight: 600; }
.freq-sel-btn.on[data-value="높음"] { border-color: var(--red-dark); background: var(--red-light); color: var(--red-dark); font-weight: 600; }

.freq-badge-sm { display: inline-flex; align-items: center; font-size: 11px; border-radius: 8px; padding: 3px 8px; font-weight: 500; }
.freq-low  { background: var(--gray-100); color: var(--gray-600); }
.freq-mid  { background: var(--amber-light); color: var(--amber-dark); }
.freq-high { background: var(--red-light); color: var(--red-dark); }
.card-badges { display: flex; align-items: center; gap: 5px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }

.lv-btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.lv-sel-btn {
  padding: 8px 14px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  background: var(--white); font-size: 13px; color: var(--gray-700); cursor: pointer;
}
.lv-sel-btn.on { border-color: var(--green); background: var(--green-light); color: var(--green-dark); font-weight: 600; }

/* 건조기 단수 탭 */
.slot-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.slot-tab {
  padding: 6px 14px; border: 1px solid var(--gray-200); border-radius: 999px;
  background: var(--white); font-size: 12px; color: var(--gray-600); cursor: pointer;
}
.slot-tab.on { border-color: var(--green); background: var(--green-light); color: var(--green-dark); font-weight: 600; }

/* 전체 미디어 */
.media-bar { margin-bottom: 12px; }
.media-bar-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  background: var(--gray-50); font-size: 13px; color: var(--gray-800); cursor: pointer; width: 100%;
  justify-content: center;
}
.media-bar-count { font-size: 11px; color: var(--gray-500); font-weight: 400; }

/* 관리자: 이슈코드 자동완성 */
.adm-ac-wrap { position: relative; }
.adm-ac-ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--gray-400); font-size: 15px; pointer-events: none; }
.adm-ac-input { padding-left: 32px !important; }
.adm-ac-drop {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20;
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0,0,0,.08); max-height: 220px; overflow-y: auto;
}
.adm-ac-item { padding: 10px 12px; font-size: 13px; cursor: pointer; border-bottom: 1px solid var(--gray-100); }
.adm-ac-item:last-child { border-bottom: none; }
.adm-ac-item:active { background: var(--gray-50); }
.adm-ac-item small { display: block; font-size: 11px; color: var(--gray-500); margin-top: 2px; }
.adm-input-readonly { background: var(--gray-50) !important; color: var(--gray-600); cursor: default; }

/* 관리자: 브랜드 칩 / 단수 / 공통 미디어 */
.map-brand-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.map-brand-chip {
  padding: 6px 10px; border: 1px solid var(--gray-200); border-radius: 999px;
  font-size: 12px; color: var(--gray-700); cursor: pointer; user-select: none;
}
.map-brand-chip.on { border-color: var(--green); background: var(--green-light); color: var(--green-dark); font-weight: 600; }
.adm-global-media { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--gray-100); }
.se-slot-wrap { display: flex; align-items: center; gap: 8px; margin: 0 0 8px 30px; }
.se-slot-sel { font-size: 12px; padding: 4px 8px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); }
.se-slot-badge { font-size: 11px; padding: 3px 8px; border-radius: 999px; font-weight: 600; }
.se-slot-badge.sb-c { background: var(--gray-100); color: var(--gray-600); }
.se-slot-badge.sb-1 { background: #E6F1FB; color: #0C447C; }
.se-slot-badge.sb-2 { background: #FAEEDA; color: #633806; }

/* ── 그룹 에디터 (admin) ─────────────────────────────────── */
.sg-group {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
}
.sg-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 8px 11px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
.sg-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sg-remedy-title {
  width: 100%;
  margin-top: 6px;
  padding: 6px 8px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--gray-800);
  background: var(--white);
}
.sg-remedy-title:focus {
  outline: none;
  border-color: var(--green);
}
.sg-badges { display: flex; align-items: center; gap: 5px; }
.sg-badge {
  font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 600;
}
.sg-badge-common { background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-200); }
.sg-badge-brand  { background: var(--green-light); color: var(--green-dark); }
.sg-badge-s1     { background: #E6F1FB; color: #0C447C; }
.sg-badge-s2     { background: #FAEEDA; color: #633806; }
.sg-badge-terminal { background: #FEF3C7; color: #92400E; }
.sg-badge-clickable { cursor: pointer; display: inline-flex; align-items: center; gap: 2px; }
.sg-badge-as { background: var(--gray-100); color: var(--gray-500); }
.sg-badge-cs { background: #FBEAF0; color: #72243E; }
.det-grp-cs  { background: #FBEAF0; color: #72243E; }
.det-grp-as  { background: var(--gray-100); color: var(--gray-500); }
.sg-del-btn {
  background: none; border: none; cursor: pointer;
  color: var(--gray-400); font-size: 15px; padding: 0; flex-shrink: 0;
}
.sg-body { padding: 10px 11px; display: flex; flex-direction: column; gap: 8px; }
.sg-media-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px;
  background: var(--gray-50);
  border: 1px dashed var(--gray-200);
  border-radius: var(--radius-sm);
}
.sg-media-left { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gray-500); }
.sg-media-left i { font-size: 14px; }
.sg-media-lbl { font-size: 12px; color: var(--gray-500); }
.sg-step-list { display: flex; flex-direction: column; gap: 7px; }
.sg-add-step-btn {
  padding: 8px 14px; border: 1px dashed var(--gray-300);
  border-radius: var(--radius-sm); background: transparent;
  font-size: 12px; color: var(--gray-500); cursor: pointer; text-align: center;
  flex-shrink: 0;
}
.sg-add-step-btn:active { background: var(--gray-50); }
.se-pt-input:focus { outline: none; border-color: var(--green); }
.se-th-spin { font-size: 16px; color: var(--gray-400); animation: se-th-spin-rot 0.8s linear infinite; }
@keyframes se-th-spin-rot { to { transform: rotate(360deg); } }
.se-th-loading { animation: se-th-pulse 1.2s ease-in-out infinite; }
@keyframes se-th-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* 기기 추가 picker */
.sg-picker-step {
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 500;
  margin-bottom: 10px;
}
.sg-picker-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 10px;
}
.sg-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.sg-chip {
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--gray-200); background: var(--white);
  font-size: 12px; color: var(--gray-600); cursor: pointer; user-select: none;
}
.sg-chip.on {
  border-color: var(--green); background: var(--green-light);
  color: var(--green-dark); font-weight: 600;
}
.sg-picker-confirm {
  width: 100%; margin-top: 12px; padding: 9px;
  border: none; border-radius: var(--radius-sm);
  background: var(--green); color: var(--white);
  font-size: 13px; font-weight: 500; cursor: pointer;
}
.sg-picker-confirm:active { opacity: .85; }

/* ── 그룹 카드 (detail) ──────────────────────────────────── */
.det-grp-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}
.det-grp-header {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
.det-grp-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.det-grp-badge {
  font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 600;
}
.det-grp-common   { background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-200); }
.det-grp-brand    { background: var(--green-light); color: var(--green-dark); }
.det-grp-terminal { background: #FEF3C7; color: #92400E; }
.det-grp-body { padding: 12px; }
.det-grp-body .media-bar { margin-bottom: 10px; }
.det-grp-title {
  font-size: 14px; font-weight: 700; color: var(--gray-900);
  flex: 1 1 12rem; min-width: 0;
}

/* ── PC 전용 기본 숨김 ───────────────────────────────────────────────────── */
.pc-cat-sidebar,
.pc-card-panel,
.pc-panel3-wrap { display: none; }

/* ── PC 레이아웃 (1024px+) ──────────────────────────────────────────────── */
@media (min-width: 1024px) {

  body { max-width: 100%; }

  #listView {
    min-width: 1060px;
    display: grid;
    grid-template-columns: 160px 400px 1fr;
    min-height: 100vh;
  }

  #listView > .topbar,
  #listView > .search-wrap,
  #listView > .tabs,
  #listView > .list-view { display: none !important; }

  .pc-cat-sidebar {
    display: flex;
    flex-direction: column;
    grid-column: 1;
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
  }

  .pc-cat-head {
    padding: 14px 14px 10px;
    border-bottom: 1px solid var(--gray-200);
  }

  .pc-cat-head h1 { font-size: 14px; font-weight: 700; color: var(--gray-800); }
  .pc-cat-head .sub { font-size: 10px; color: var(--gray-400); margin-top: 2px; }

  .pc-cat-search {
    padding: 8px 10px;
    border-bottom: 1px solid var(--gray-200);
  }

  .pc-cat-tabs {
    flex: 1;
    padding: 5px 0;
    overflow-y: auto;
  }

  .pc-cat-tab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    font-size: 12px;
    color: var(--gray-500);
    cursor: pointer;
    border-right: 2px solid transparent;
  }

  .pc-cat-tab:hover { background: var(--gray-50); }

  .pc-cat-tab.on {
    color: var(--green-dark);
    background: var(--green-light);
    border-right-color: var(--green);
    font-weight: 600;
  }

  .pc-cat-count {
    font-size: 10px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 1px 6px;
    color: var(--gray-400);
  }

  .pc-cat-tab.on .pc-cat-count {
    background: var(--green-light);
    color: var(--green-dark);
    border-color: var(--green);
  }

  .pc-card-panel {
    display: flex;
    flex-direction: column;
    grid-column: 2;
    background: var(--gray-50);
    border-right: 1px solid var(--gray-200);
    height: 100vh;
    position: sticky;
    top: 0;
    overflow: hidden;
  }

  .pc-card-topbar {
    padding: 12px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
  }

  .pc-card-topbar-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-800);
  }

  .pc-card-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .pc-card-list .card {
    padding: 12px 13px;
  }

  .pc-card-list .card-title {
    font-size: 13px;
    line-height: 1.4;
  }

  .pc-card-list .card-desc {
    font-size: 12px;
    line-height: 1.45;
  }

  .pc-card-list .card.active {
    border-color: var(--green);
    background: var(--green-light);
  }

  .pc-panel3-wrap {
    display: flex;
    flex-direction: column;
    grid-column: 3;
    height: 100vh;
    overflow: hidden;
  }

  /* PC 3단 편집: adminView가 panel3에 들어갔을 때 스크롤/폭 맞춤 */
  #pcPanel3 > #adminView {
    flex: 1;
    min-height: 0;
    overflow: auto;
    background: var(--gray-100);
  }
  #pcPanel3 > #adminView .adm-body {
    max-width: none;
    margin: 0;
  }
  #pcPanel3 > #adminView .adm-topbar {
    position: sticky;
    top: 0;
  }

  .pc-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--gray-400);
    font-size: 13px;
  }

  .pc-empty i { font-size: 32px; }

  .pc-p3-topbar {
    padding: 12px 20px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .pc-p3-title { font-size: 14px; font-weight: 700; color: var(--gray-800); }
  .pc-p3-actions { display: flex; gap: 8px; }

  .pc-p3-body {
    flex: 1;
    display: flex;
    overflow: hidden;
  }

  .pc-p3-main {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
  }

  .pc-p3-sidebar { display: none; }

  @media (min-width: 1100px) {
    .pc-p3-sidebar {
      display: flex;
      flex-direction: column;
      width: 260px;
      flex-shrink: 0;
      border-left: 1px solid var(--gray-200);
      background: var(--white);
      overflow-y: auto;
    }

    .pc-p3-main #sec-parts,
    .pc-p3-main #sec-errmap { display: none; }
  }

  .pc-sidebar-sec {
    padding: 14px;
    border-bottom: 1px solid var(--gray-200);
  }

  .pc-sidebar-lbl {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--gray-400);
    margin-bottom: 8px;
  }

  #adminView .adm-body {
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
  }
}

/* ── 오류코드 사이드바 ───────────────────────────────────────────────────── */
.em-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
}
.em-item:last-child { border-bottom: none; padding-bottom: 0; }
.em-code {
  font-size: 13px;
  font-family: monospace;
  font-weight: 700;
  color: var(--gray-800);
}
.em-desc {
  font-size: 12px;
  color: var(--gray-500);
  margin: 3px 0 5px;
  line-height: 1.4;
}
.em-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.em-tag {
  font-size: 11px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 2px 7px;
  color: var(--gray-500);
}

.pc-ref-group { margin-bottom: 14px; }
.pc-ref-group-title {
  font-size: 11px; font-weight: 700; color: var(--gray-400);
  padding: 6px 4px; text-transform: uppercase;
}
.pc-ref-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-bottom: 1px solid var(--gray-200);
  border-left: 3px solid transparent;
  cursor: pointer; font-size: 12px;
}
.pc-ref-row:hover { background: var(--gray-50); }
.pc-ref-row.active,
.pc-ref-row.active:hover {
  background: var(--green-light);
  border-left-color: var(--green);
}
.pc-ref-row.active .pc-ref-title { color: var(--green-dark); font-weight: 700; }
.pc-ref-tag {
  font-size: 11px;
  border-radius: 4px; padding: 1px 6px; white-space: nowrap;
}
.pc-ref-title { color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-ref-new-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 9px 0; margin-bottom: 8px;
  background: var(--green-light); color: var(--green-dark);
  border: none; border-radius: var(--radius); font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.pc-ref-new-btn:hover { background: var(--green); color: var(--white); }
.pc-ref-new-btn.active { background: var(--green); color: var(--white); cursor: default; }
.pc-ref-new-btn.active:hover { background: var(--green); }
.pc-ref-hint {
  font-size: 11px; color: var(--gray-400);
  padding: 4px 4px 10px;
}
.pc-ref-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.pc-ref-tag-blue   { background: var(--blue-light);   color: var(--blue-dark); }
.pc-ref-tag-amber  { background: var(--amber-light);  color: var(--amber-dark); }
.pc-ref-tag-teal   { background: var(--teal-light);   color: var(--teal-dark); }
.pc-ref-tag-purple { background: var(--purple-light); color: var(--purple-dark); }
.pc-ref-tag-pink   { background: var(--pink-light);   color: var(--pink-dark); }
.pc-ref-tag-gray   { background: var(--gray-100);     color: var(--gray-600); }

.errmap-row { padding: 8px 0; border-bottom: 1px solid var(--gray-200); }
.errmap-row:last-child { border-bottom: none; }
.errmap-label { font-size: 13px; color: var(--gray-800); }
.errmap-meta  { font-size: 11px; color: var(--gray-400); margin-top: 2px; }
