/* ── S5 Layout ── */
#s5 {
  align-items: flex-start;
  padding-bottom: var(--sp-15);
}

.s5-layout {
  display: grid;
  grid-template-columns: 1fr 80px;
  gap: 16px;
  margin-top: var(--sp-6);
  align-items: start;
  width: 100%;
}

/* ── Display Widget ── */
.s5-disp {
  border: 0.5px solid var(--s-divider);
  border-left: 2px solid var(--s5-floor-color, var(--color-muted-amber));
  transition: border-left-color 0.4s ease;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.s5-dnum {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 700;
  color: var(--color-muted-amber);
  min-width: 44px;
  line-height: 1;
  transition: color 0.4s ease;
}

.s5-dnum.floor-1 { color: var(--color-muted-amber); }
.s5-dnum.floor-2 { color: #6aacf0; }
.s5-dnum.floor-3 { color: #4ade80; }

.s5-darrow {
  font-size: 18px;
  color: var(--color-muted-amber);
  transition: color 0.4s ease;
}
.s5-darrow.floor-1 { color: var(--color-muted-amber); }
.s5-darrow.floor-2 { color: #6aacf0; }
.s5-darrow.floor-3 { color: #4ade80; }

.s5-dlbl { margin-left: auto; text-align: right; }

.s5-dlbl-main {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 500;
  color: var(--s-text); margin-bottom: 2px;
}

.s5-dlbl-sub {
  font-family: var(--font-body);
  font-size: 9px; color: var(--s-dim); letter-spacing: 0.1em;
}

/* ── Floor Cards ── */
.s5-floor {
  border: 0.5px solid var(--s-divider);
  overflow: hidden;
  transition: opacity 0.4s;
  opacity: 0.3;
  margin-bottom: 10px;
}

.s5-floor.active { opacity: 1; }
.s5-floor.s5-f1.active { border-color: var(--color-muted-amber); }
.s5-floor.s5-f2.active { border-color: #3b82f6; }
.s5-floor.s5-f3.active { border-color: #22c55e; }

.s5-fhead {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  background: rgba(245, 240, 232, 0.04);
  border-bottom: 0.5px solid var(--s-divider);
  user-select: none;
}

.s5-fnum {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-body);
  font-size: 11px; font-weight: 500; flex-shrink: 0;
}

.s5-f1 .s5-fnum { background: rgba(196, 149,  58, 0.15); color: var(--color-muted-amber); }
.s5-f2 .s5-fnum { background: rgba( 59, 130, 246, 0.15); color: #6aacf0; }
.s5-f3 .s5-fnum { background: rgba( 34, 197,  94, 0.15); color: #4ade80; }

.s5-ftitle {
  font-family: var(--font-body);
  font-size: 13px; font-weight: 500;
  color: var(--s-text);
}

.s5-fsub {
  font-family: var(--font-body);
  font-size: 10px; color: var(--s-dim); margin-top: 1px;
}

.s5-fbadge {
  margin-left: auto;
  font-family: var(--font-body);
  font-size: 9px; letter-spacing: 0.14em;
  padding: 2px 8px; font-weight: 500; flex-shrink: 0;
}

.s5-b-now    { background: rgba(196, 149,  58, 0.15); color: var(--color-muted-amber); }
.s5-b-soon   { background: rgba( 59, 130, 246, 0.15); color: #6aacf0; }
.s5-b-future { background: rgba( 34, 197,  94, 0.15); color: #4ade80; }

.s5-fchev {
  font-size: 14px; color: var(--s-dim);
  transition: transform 0.3s; margin-left: 4px;
}
.s5-floor.open .s5-fchev { transform: rotate(180deg); }

.s5-fbody {
  max-height: 0; overflow: hidden;
  transition: max-height 0.5s var(--ease-calm);
}
.s5-floor.open .s5-fbody { max-height: 1800px; }

.s5-fcontent {
  padding: 14px 16px 18px;
  background: rgba(245, 240, 232, 0.02);
}

/* ── ABC Tabs ── */
.s5-abc-row { display: flex; gap: 8px; margin-bottom: 14px; }

.s5-abc-btn {
  flex: 1; padding: 10px 6px 8px;
  border: 1.5px solid var(--s-divider);
  background: rgba(245, 240, 232, 0.03);
  color: var(--s-dim); cursor: pointer;
  font-family: var(--font-body);
  display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  transition: all 0.22s;
}

.s5-abc-btn:hover {
  border-color: var(--color-muted-amber);
  background: rgba(196, 149, 58, 0.08);
}

.s5-abc-btn:hover .s5-abc-letter,
.s5-abc-btn:hover .s5-abc-sub { color: var(--color-muted-amber); }

.s5-abc-btn.on {
  background: var(--color-muted-amber);
  border-color: var(--color-muted-amber);
}

.s5-abc-btn.on .s5-abc-letter,
.s5-abc-btn.on .s5-abc-sub { color: #fff; }

.s5-abc-letter {
  font-family: var(--font-heading);
  font-size: 22px; font-weight: 700;
  line-height: 1; color: var(--s-dim);
  transition: color 0.22s;
}

.s5-abc-sub {
  font-family: var(--font-body);
  font-size: 9px; font-weight: 500;
  letter-spacing: 0.06em; color: var(--s-dim);
  transition: color 0.22s; text-align: center; line-height: 1.2;
}

/* ABC Panel */
.s5-abc-panel {
  display: none;
  border: 0.5px solid var(--s-divider);
  background: rgba(245, 240, 232, 0.02);
  margin-bottom: 2px;
}

.s5-abc-panel.show {
  display: block;
  animation: s5fadeSlide 0.25s ease;
}

@keyframes s5fadeSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.s5-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 0.5px solid var(--s-divider);
  background: rgba(245, 240, 232, 0.04);
}

.s5-panel-title {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 600; color: var(--s-text);
}

.s5-panel-desc {
  font-family: var(--font-body);
  font-size: 10px; color: var(--s-dim); margin-top: 1px;
}

.s5-panel-close {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(245, 240, 232, 0.1);
  color: var(--s-dim); font-size: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.15s; border: none;
}
.s5-panel-close:hover { background: var(--color-muted-amber); color: #fff; }

.s5-panel-body { padding: 12px 14px; }

/* ── Tables ── */
.s5-ct, .s5-wt {
  width: 100%; border-collapse: collapse;
  font-family: var(--font-body); font-size: 11px;
}

.s5-ct th, .s5-wt th {
  text-align: left; padding: 5px 7px;
  background: rgba(245, 240, 232, 0.06);
  color: var(--s-dim); font-weight: 500;
  font-size: 10px; letter-spacing: 0.05em;
  border-bottom: 0.5px solid var(--s-divider);
}

.s5-ct td, .s5-wt td {
  padding: 7px; border-bottom: 0.5px solid var(--s-divider);
  color: var(--s-dim); vertical-align: top; line-height: 1.4;
}

.s5-ct tr:last-child td,
.s5-wt tr:last-child td { border-bottom: none; }

.s5-ct td strong { color: var(--s-text); }
.s5-pct { font-weight: 700; color: var(--s-text); white-space: nowrap; }
.s5-wk  { font-weight: 700; color: var(--s-text); white-space: nowrap; }
.s5-th  { font-weight: 500; color: rgba(245, 240, 232, 0.75); }

/* ── Certification ── */
.s5-clist { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }

.s5-citem {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 9px;
  background: rgba(245, 240, 232, 0.03);
  border: 0.5px solid var(--s-divider);
}

.s5-ccode {
  font-family: var(--font-body);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; color: var(--color-muted-amber);
  width: 16px; flex-shrink: 0; margin-top: 1px;
}

.s5-ctext {
  font-family: var(--font-body);
  font-size: 11px; color: var(--s-dim); line-height: 1.4;
}

.s5-cdone {
  display: inline-block; font-size: 9px;
  padding: 1px 6px;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80; margin-left: 5px; font-weight: 500;
}

.s5-cert-video-wrap {
  margin: 12px 0;
  border: 0.5px solid var(--s-divider);
  background: #000;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
}

.s5-care-preview-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--color-warm-ivory);
  background: rgba(0, 0, 0, 0.55);
  padding: 6px 14px;
  border-bottom: 0.5px solid rgba(245, 240, 232, 0.15);
  flex-shrink: 0;
}

.s5-cert-video-wrap video {
  width: 100%;
  display: block;
  max-height: none;
  object-fit: contain;
}

.s5-cert-section-label {
  font-family: var(--font-body);
  font-size: 9px; letter-spacing: 0.12em;
  color: var(--s-dim); margin-bottom: 8px; padding-top: 4px;
}

.s5-cert-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.s5-cert-box {
  border: 0.5px solid var(--s-divider);
  overflow: hidden;
  background: rgba(245, 240, 232, 0.02);
}

.s5-cert-box img { width: 100%; display: block; }

.s5-cert-nm {
  font-family: var(--font-body);
  font-size: 10px; text-align: center;
  padding: 5px 4px; color: var(--s-dim); font-weight: 500;
  background: rgba(245, 240, 232, 0.04);
  border-top: 0.5px solid var(--s-divider);
}

/* ── Floor 2: App Demo Button ── */
.s5-app-demo-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; width: 100%; padding: 11px 16px; margin-bottom: 14px;
  background: rgba(196, 149, 58, 0.08);
  color: var(--color-muted-amber);
  border: 1px solid rgba(196, 149, 58, 0.35);
  font-family: var(--font-body);
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em;
  cursor: pointer; transition: all 0.22s;
}

.s5-app-demo-btn:hover {
  background: rgba(196, 149, 58, 0.18);
  border-color: var(--color-muted-amber);
}

.s5-plist { display: flex; flex-direction: column; gap: 7px; }

.s5-pitem {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 9px 11px;
  border: 0.5px solid var(--s-divider);
  background: rgba(245, 240, 232, 0.03);
}

.s5-pnum {
  width: 19px; height: 19px; border-radius: 50%;
  background: rgba(59, 130, 246, 0.15); color: #6aacf0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-body);
  font-size: 10px; font-weight: 600;
  flex-shrink: 0; margin-top: 1px;
}

.s5-ptitle {
  font-family: var(--font-body);
  font-size: 11px; font-weight: 500;
  color: var(--s-text); margin-bottom: 2px;
}

.s5-pdesc {
  font-family: var(--font-body);
  font-size: 10px; color: var(--s-dim); line-height: 1.4;
}

/* ── Floor 3: Global ── */
.s5-glist { display: flex; flex-direction: column; gap: 7px; }

.s5-gitem {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px;
  border: 0.5px solid var(--s-divider);
  background: rgba(245, 240, 232, 0.03);
}

.s5-gflag { font-size: 15px; flex-shrink: 0; }

.s5-gtext {
  font-family: var(--font-body);
  font-size: 11px; color: var(--s-dim); line-height: 1.4;
}

.s5-gtag {
  margin-left: auto; flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 9px; letter-spacing: 0.08em; padding: 2px 7px;
}

.s5-gtag-connected { background: rgba(34, 197,  94, 0.15); color: #4ade80; }
.s5-gtag-preparing { background: rgba(250, 204,  21, 0.10); color: #fcd34d; }
.s5-gtag-vision    { background: rgba(59,  130, 246, 0.15); color: #6aacf0; }

/* ── Elevator Panel (실물 엘리베이터 버튼 패널 — 의도적 메탈릭 대비) ── */
.s5-rcolumn {
  display: flex; flex-direction: column; align-items: center;
  position: sticky; top: 80px; gap: 10px;
}

.s5-rpanel {
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 8px;
  background: linear-gradient(160deg, #e0e0e0 0%, #f5f5f5 20%, #d8d8d8 50%, #b8b8b8 80%, #cecece 100%);
  border: 1px solid #aaa;
  box-shadow: 3px 3px 10px rgba(0,0,0,0.35), inset 0 1px 3px rgba(255,255,255,0.5), inset 0 -1px 3px rgba(0,0,0,0.15);
}

.s5-plabel {
  font-family: var(--font-body);
  font-size: 8px; letter-spacing: 0.16em;
  color: #555; margin-bottom: 8px; font-weight: 500;
}

.s5-btn-hint {
  font-family: var(--font-body);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-align: center;
  line-height: 1.7;
  animation: s5HintBlink 1.4s ease-in-out 5;
}

@keyframes s5HintBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.s5-inds { display: flex; gap: 4px; margin-bottom: 8px; }

.s5-ind {
  width: 6px; height: 6px; border-radius: 50%;
  background: #888; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
  transition: all 0.4s;
}

.s5-ind.on {
  background: var(--color-muted-amber);
  box-shadow: 0 0 5px rgba(196, 149, 58, 0.8);
}

.s5-ebtn {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: pointer; position: relative;
  margin-bottom: 8px; border: none;
  background: transparent; transition: all 0.15s;
}

.s5-ebtn:last-of-type { margin-bottom: 0; }

.s5-bouter {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 32% 25%, #f2f2f2 0%, #c0c0c0 40%, #7a7a7a 100%);
  box-shadow:
    0 5px 12px rgba(0,0,0,0.5),
    0 2px 4px rgba(0,0,0,0.4),
    inset 0 2px 4px rgba(255,255,255,0.65),
    inset 0 -2px 5px rgba(0,0,0,0.3);
  transition: all 0.15s; border: 2px solid #888;
}

.s5-ebtn.act    .s5-bouter {
  border-color: var(--color-muted-amber);
  box-shadow: 0 0 0 2px rgba(196,149,58,0.5), 0 4px 10px rgba(0,0,0,0.4),
              inset 0 2px 4px rgba(255,255,255,0.5), inset 0 -2px 4px rgba(0,0,0,0.25);
}
.s5-ebtn.s5-e2.act .s5-bouter {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.5), 0 4px 10px rgba(0,0,0,0.4),
              inset 0 2px 4px rgba(255,255,255,0.5), inset 0 -2px 4px rgba(0,0,0,0.25);
}
.s5-ebtn.s5-e3.act .s5-bouter {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34,197,94,0.5), 0 4px 10px rgba(0,0,0,0.4),
              inset 0 2px 4px rgba(255,255,255,0.5), inset 0 -2px 4px rgba(0,0,0,0.25);
}
.s5-ebtn:active .s5-bouter {
  box-shadow: 0 1px 3px rgba(0,0,0,0.5), inset 0 3px 7px rgba(0,0,0,0.4), inset 0 -1px 2px rgba(255,255,255,0.1);
  transform: scale(0.93);
}

.s5-binner {
  position: absolute; inset: 7px; border-radius: 50%;
  background: radial-gradient(circle at 32% 25%, #d8d8d8 0%, #989898 55%, #626262 100%);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.45), inset 0 -1px 2px rgba(255,255,255,0.2);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
}

.s5-bnum {
  font-family: var(--font-heading);
  font-size: 14px; font-weight: 700;
  color: #222; line-height: 1;
}

.s5-blbl {
  font-family: var(--font-body);
  font-size: 6px; letter-spacing: 0.08em; color: #555;
}

/* ── App Demo Modal ── */
.s5-demo-overlay {
  display: none; position: fixed; inset: 0; z-index: 600;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}

.s5-demo-overlay.show { display: flex; }

.s5-demo-modal {
  background: var(--color-deep-navy);
  width: min(92vw, 900px);
  height: min(88vh, 700px);
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 0.5px solid rgba(245, 240, 232, 0.12);
}

.s5-demo-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 0.5px solid rgba(245, 240, 232, 0.1);
  background: rgba(0, 0, 0, 0.2); flex-shrink: 0;
}

.s5-demo-title {
  font-family: var(--font-body);
  font-size: 13px; font-weight: 600;
  color: var(--color-warm-ivory);
}

.s5-demo-sub {
  font-family: var(--font-body);
  font-size: 10px; color: rgba(245, 240, 232, 0.5); margin-top: 1px;
}

.s5-demo-close {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(245, 240, 232, 0.1);
  color: rgba(245, 240, 232, 0.6); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; flex-shrink: 0; border: none;
}

.s5-demo-close:hover { background: var(--color-muted-amber); color: #fff; }

.s5-demo-body { flex: 1; overflow: hidden; }
.s5-demo-body iframe { width: 100%; height: 100%; border: none; }
