/* ========================================================================
   ??μ삦???쒓렇??layout ???ㅻ뜑 / ??컮 / ?щ씪?대뱶 / ?덉뼱濡?   ======================================================================== */

/* ===== ?곷떒 ?ㅻ뜑 ===== */
.s-header {
  background: var(--white);
  padding: 7px 20px;
  position: sticky; top: 0; z-index: 100;
  transition: transform .25s ease;
}
.s-header.is-hidden { transform: translateY(-100%); }
.s-header-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0;
}
.s-logo { display: flex; align-items: center; gap: 8px; }
.s-logo-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--violet);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-weight: 800; font-size: 11px;
  padding-left: 2px;
  line-height: 1;
}
.s-logo-tag {
  display: flex; align-items: center; gap: 6px;
  font-size: 16px; font-weight: 800; letter-spacing: -0.04em;
}
.s-logo-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: inherit; text-decoration: none;
}
.s-nav-toggle {
  display: flex; flex-direction: column; gap: 3px;
  width: 24px; margin-right: 8px;
  cursor: pointer;
}
.s-nav-toggle span {
  width: 20px; height: 2px;
  background: var(--gray-700); border-radius: 1px;
}
.s-logo-tag .shield {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--green);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 11px;
}
.s-logo-tag .lead { color: var(--violet); }

.s-header-right { display: flex; align-items: center; gap: 6px; }
.s-pill {
  padding: 6px 12px; border-radius: 20px; background: var(--gray-100);
  font-size: 12px; font-weight: 600; color: var(--gray-700);
}
.s-iconbtn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: var(--gray-700); position: relative;
}
.s-iconbtn .badge {
  position: absolute; top: 4px; right: 4px;
  min-width: 18px; height: 18px; border-radius: 9px;
  background: var(--coral); color: var(--white);
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px; border: 2px solid var(--white);
}

/* 蹂몄씤/媛議??좉? */
.s-toggle { display: flex; gap: 8px; padding-bottom: 14px; }
.s-toggle-btn {
  padding: 7px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 700;
  border: 1.5px solid transparent;
}
.s-toggle-btn.active { background: var(--violet); color: var(--white); }
.s-toggle-btn:not(.active) {
  background: var(--white); border-color: var(--gray-200); color: var(--gray-700);
  display: flex; align-items: center; gap: 4px;
}

/* ===== ?몄궗 ?덉뼱濡?===== */
.s-hero { padding: 20px 20px 24px; background: var(--white); }
.s-hero-greeting { font-size: 13px; color: var(--gray-500); font-weight: 500; margin-bottom: 6px; }
.s-hero-title { font-size: 26px; font-weight: 800; line-height: 1.3; letter-spacing: -0.04em; }
.s-hero-title em { position: relative; display: inline-block; }
.s-hero-title em::before {
  content: ''; position: absolute; left: -2px; right: -2px; bottom: 3px; height: 12px;
  background: var(--yellow); z-index: -1; border-radius: 2px;
}

/* ===== ?ㅻ뱶 ?뺣낫 (愿?щЪ嫄?珥앹븸) ===== */
.s-head-info { background: var(--white); padding: 0 20px 18px; }
.s-head-info .label {
  font-size: 12px; color: var(--gray-500); font-weight: 500;
  display: flex; align-items: center; gap: 6px; margin-bottom: 4px;
}
.s-head-info .link-tag {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--violet); font-weight: 600;
}
.s-head-info .amount {
  font-size: 28px; font-weight: 800; letter-spacing: -0.04em;
  display: flex; align-items: end; gap: 6px;
}
.s-head-info .amount .q {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--gray-200); color: var(--gray-500);
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 7px;
}
.s-head-info .amount-right {
  margin-left: auto; font-size: 13px; color: var(--gray-500); font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px; margin-bottom: 7px;
}
.s-head-info .alert {
  margin-top: 6px; font-size: 12px; color: var(--coral); font-weight: 500;
}

/* ===== ?섎떒 ??컮 ===== */
.s-tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--container-max); background: var(--white);
  display: flex; padding: 5px 0 calc(5px + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--shadow-tab); z-index: 100;
}
.s-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--gray-400); font-size: 12px; font-weight: 600; position: relative;
}
.s-tab.active { color: var(--violet); }
.s-tab .new-badge {
  position: absolute; top: -2px; left: 50%; transform: translateX(8px);
  background: var(--coral); color: var(--white);
  font-size: 9px; font-weight: 800;
  padding: 2px 5px; border-radius: 8px;
}
.s-tab svg { width: 24px; height: 24px; }

/* ===== ?쒓렇??v3 GNB (?곷떒 媛濡?硫붾돱) ===== */
.s-gnb {
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  position: sticky; top: 52px; z-index: 99;
  transition: transform .25s ease;
}
.s-gnb.is-hidden { transform: translateY(-130%); }

/* ===== 留??꾨줈 踰꾪듉 (?섎떒 以묒븰, ??컮 ?? ===== */
.s-totop {
  position: fixed;
  bottom: 90px; left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(15, 16, 35, 0.82);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  z-index: 99;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
.s-totop.is-visible {
  opacity: 1; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.s-totop:active { background: rgba(15, 16, 35, 0.95); }
.s-gnb::-webkit-scrollbar { display: none; }
.s-gnb-list {
  display: flex;
  list-style: none;
  padding: 0 8px;
  margin: 0;
  white-space: nowrap;
}
.s-gnb-list li {
  flex-shrink: 0;
  list-style: none;
}
.s-gnb-item {
  display: inline-flex;
  align-items: center;
  padding: 14px 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-700);
  position: relative;
  text-decoration: none;
}
.s-gnb-list li.on .s-gnb-item,
.s-gnb-item.on {
  color: var(--violet);
}
.s-gnb-list li.on .s-gnb-item::after,
.s-gnb-item.on::after {
  content: '';
  position: absolute;
  left: 12px; right: 12px;
  bottom: 0;
  height: 3px;
  background: var(--violet);
  border-radius: 2px;
}

/* ===== 醫뚯륫 ?щ씪?대뱶 硫붾돱 ===== */
.s-slide {
  position: fixed; top: 0; left: 0;
  width: 280px; height: 100vh;
  background: var(--white);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  z-index: 200; overflow-y: auto;
  padding: 20px;
}
.s-slide.open { transform: translateX(0); }
.s-slide-overlay {
  position: fixed; inset: 0; background: rgba(15,16,35,0.4);
  z-index: 150; opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.s-slide-overlay.open { opacity: 1; pointer-events: auto; }
.s-slide-head {
  padding-bottom: 16px; border-bottom: 1px solid var(--gray-200);
  margin-bottom: 16px;
}
.s-slide-list { display: flex; flex-direction: column; gap: 4px; }
.s-slide-item {
  padding: 14px 12px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; color: var(--gray-700);
  display: flex; align-items: center; gap: 12px;
}
.s-slide-item:hover { background: var(--gray-100); }
.s-slide-item.primary { background: var(--violet); color: var(--white); justify-content: center; }
.s-slide-item--mship { color: var(--violet); font-weight: 800; }
.s-slide-item--mship .s-ico { color: var(--violet); }
.s-slide-tag {
  margin-left: auto;
  display: inline-block;
  font-size: 9px; font-weight: 800;
  background: var(--violet); color: #fff;
  padding: 3px 7px; border-radius: 5px;
  letter-spacing: 0.04em;
}
.s-slide-section {
  padding: 16px 12px 6px;
  font-size: 11px; font-weight: 700; color: var(--gray-500);
  letter-spacing: 0.04em;
  border-top: 1px solid var(--gray-100);
  margin-top: 6px;
}
.s-slide-list > .s-slide-section:first-of-type { margin-top: 10px; }
.s-slide-item--logout {
  margin-top: 12px;
  border-top: 1px solid var(--gray-100);
  padding-top: 18px !important;
  color: var(--gray-500);
}

/* ===================================================
 * GNB 硫ㅻ쾭??媛뺤“ + LNB (2李?硫붾돱)
 * =================================================== */
.s-gnb-item.s-gnb-item--mship {
  color: var(--violet);
  font-weight: 800;
}
.s-gnb-item.s-gnb-item--mship::before {
  content: '★';
  font-size: 9px;
  margin-right: 3px;
  vertical-align: 1px;
  opacity: 0.9;
}

.s-lnb {
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  position: sticky; top: 96px; z-index: 98;
  transition: transform .25s ease;
}
.s-lnb::-webkit-scrollbar { display: none; }
.s-lnb.is-hidden { transform: translateY(-130%); }
.s-lnb-list {
  display: flex;
  list-style: none;
  padding: 0 8px;
  margin: 0;
  white-space: nowrap;
}
.s-lnb-list li {
  flex-shrink: 0;
  list-style: none;
}
.s-lnb-item {
  display: inline-flex;
  align-items: center;
  padding: 12px 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-700);
  position: relative;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.s-lnb-list li.on .s-lnb-item,
.s-lnb-item.on {
  color: var(--violet);
  background: transparent;
}
.s-lnb-list li.on .s-lnb-item::after,
.s-lnb-item.on::after {
  content: '';
  position: absolute;
  left: 12px; right: 12px;
  bottom: 0;
  height: 3px;
  background: var(--violet);
  border-radius: 2px;
}
