/* Secured Craft Laboratory */
.clarity-lab-shell {
  margin: 1rem 0 1.5rem;
  padding: 1rem 1.1rem 1.15rem;
  border-radius: 16px;
  border: 2px solid rgba(10, 80, 100, 0.45);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(80, 200, 220, 0.12), transparent 50%),
    linear-gradient(165deg, rgba(8, 40, 48, 0.04), rgba(255,255,255,0.5));
  box-shadow: inset 0 0 0 1px rgba(212,180,90,0.2);
}
html[data-theme="dark"] .clarity-lab-shell {
  background:
    radial-gradient(ellipse at 100% 0%, rgba(40, 140, 160, 0.15), transparent 50%),
    linear-gradient(165deg, #0c1e24, #12262c);
  color: #e6f2f5;
}
.clarity-lab-shell.clab-pulse {
  box-shadow: 0 0 0 2px rgba(80, 200, 220, 0.55), inset 0 0 0 1px rgba(212,180,90,0.25);
}
.clab-head { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.75rem; }
.clab-badge {
  font-size: 0.65rem; font-weight: 800; letter-spacing: 0.14em;
  padding: 0.35rem 0.5rem; border-radius: 8px;
  background: #0a5064; color: #a8e6ff; border: 1px solid rgba(168,230,255,0.4);
}
.clab-title { margin: 0; font-size: 1.15rem; }
.clab-sub { margin: 0.2rem 0 0; font-size: 0.78rem; opacity: 0.85; }
.clab-dir-btn {
  margin-left: auto; font-size: 0.72rem; font-weight: 700;
  padding: 0.3rem 0.65rem; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(10,80,100,0.4); background: rgba(10,80,100,0.15); color: inherit;
}
.clab-stations {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.45rem; margin-bottom: 0.85rem;
}
.clab-station {
  text-align: left; font: inherit; color: inherit; cursor: pointer;
  padding: 0.55rem 0.6rem; border-radius: 12px;
  border: 1px solid rgba(10,80,100,0.25); background: rgba(255,255,255,0.55);
  display: flex; flex-direction: column; gap: 0.15rem;
}
html[data-theme="dark"] .clab-station { background: rgba(0,0,0,0.25); }
.clab-station:hover, .clab-station:focus {
  border-color: #2a9bb0; box-shadow: 0 0 0 1px rgba(42,155,176,0.35);
}
.clab-ico { font-size: 1.25rem; }
.clab-st-name { font-weight: 700; font-size: 0.82rem; }
.clab-station small { font-size: 0.68rem; opacity: 0.8; line-height: 1.3; }
.clab-workbench {
  border-radius: 12px; padding: 0.75rem 0.85rem;
  border: 1px dashed rgba(10,80,100,0.35); background: rgba(10,80,100,0.05); min-height: 4rem;
}
.clab-wb-head h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.clab-wb-head p { margin: 0 0 0.5rem; font-size: 0.84rem; opacity: 0.9; }
.clab-projects { display: flex; flex-direction: column; gap: 0.55rem; margin-top: 0.5rem; }
.clab-proj {
  padding: 0.55rem 0.65rem; border-radius: 10px;
  border: 1px solid rgba(13,79,60,0.18); background: rgba(255,255,255,0.5); font-size: 0.84rem;
}
html[data-theme="dark"] .clab-proj { background: rgba(0,0,0,0.2); }
.clab-proj.is-done { opacity: 0.85; border-color: rgba(26,107,82,0.45); }
.clab-proj h4 { margin: 0 0 0.25rem; font-size: 0.9rem; }
.clab-goal { margin: 0 0 0.35rem; font-size: 0.8rem; }
.clab-proj ol { margin: 0.25rem 0 0.45rem 1.1rem; padding: 0; }
.clab-complete {
  font-weight: 700; font-size: 0.78rem; padding: 0.35rem 0.7rem;
  border-radius: 999px; border: none; cursor: pointer;
  background: linear-gradient(155deg, #1a8aa0, #0d4f3c); color: #fff;
}
.clab-done { font-size: 0.75rem; font-weight: 700; color: #1a6b52; }
.clab-design-form {
  margin-top: 0.75rem; padding: 0.65rem; border-radius: 10px;
  border: 1px solid rgba(212,180,90,0.35); background: rgba(212,180,90,0.08);
}
.clab-design-form label { display: block; font-size: 0.78rem; margin: 0.35rem 0; font-weight: 600; }
.clab-design-form input, .clab-design-form textarea {
  display: block; width: 100%; margin-top: 0.2rem; box-sizing: border-box;
  font: inherit; padding: 0.35rem 0.45rem; border-radius: 8px;
  border: 1px solid rgba(13,79,60,0.25); background: #fff;
}
html[data-theme="dark"] .clab-design-form input,
html[data-theme="dark"] .clab-design-form textarea {
  background: #152019; color: #e7efe9; border-color: rgba(212,180,90,0.25);
}
.clab-portfolio { margin-top: 0.85rem; font-size: 0.82rem; }
.clab-portfolio h4 { margin: 0 0 0.35rem; font-size: 0.88rem; }
.clab-port-list { margin: 0; padding-left: 1.1rem; }
.clab-port-list li { margin: 0.35rem 0; }
.clab-port-empty, .clab-empty { font-size: 0.82rem; opacity: 0.75; margin: 0; }
.cnp-lab-btn {
  background: linear-gradient(155deg, rgba(10,80,100,0.9), rgba(212,180,90,0.3)) !important;
}
.clarity-lab-toast {
  position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%) translateY(16px);
  z-index: 99986; max-width: 92vw;
  background: rgba(8,40,48,0.95); color: #d4f0f8;
  padding: 0.5rem 0.9rem; border-radius: 999px; font-size: 0.78rem;
  border: 1px solid rgba(168,230,255,0.35);
  opacity: 0; pointer-events: none; transition: 0.35s ease;
}
.clarity-lab-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.clt-name { font-weight: 700; color: #a8e6ff; margin-right: 0.35rem; }

/* Mounted under banner in campus stage */
#campus-stage-body #clarity-lab-shell,
#clarity-campus-stage #clarity-lab-shell {
  display: block !important;
  visibility: visible !important;
  margin: 0.75rem 0 1.25rem;
  min-height: 12rem;
  position: relative;
  z-index: 6;
}
#clarity-lab-shell .clab-stations {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.65rem 0;
}
#clarity-lab-shell .clab-station {
  flex: 1 1 8.5rem;
  min-width: 7.5rem;
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(13,79,60,0.22);
  background: rgba(255,253,248,0.92);
  cursor: pointer;
}
html[data-theme="dark"] #clarity-lab-shell .clab-station {
  background: rgba(20,28,24,0.95);
  border-color: rgba(212,180,90,0.25);
  color: #e7efe9;
}
#clarity-lab-shell .clab-station small {
  display: block;
  opacity: 0.75;
  font-size: 0.72rem;
  margin-top: 0.2rem;
}
