@media (min-width: 768px) {
  .float-social {
    right: 12px;
    bottom: 16px;
    gap: 6px;
  }

  .float-social__channels {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    pointer-events: none;
  }

  .float-social.is-open .float-social__channels {
    grid-template-rows: 1fr;
    opacity: 1;
    pointer-events: auto;
  }

  .float-social__channels-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    overflow: hidden;
  }

  .float-social__link {
    width: 40px;
  }

  .float-social__toggle {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #162c4b;
    box-shadow: 0 6px 16px rgba(19, 35, 63, 0.16);
  }

  .float-social__toggle-label {
    font: 800 9px/1 Pretendard, sans-serif;
    letter-spacing: -0.04em;
  }

  .float-social__toggle-icon {
    position: relative;
    width: 16px;
    height: 16px;
  }

  .float-social__toggle-icon::before,
  .float-social__toggle-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    background: currentColor;
    transform: translate(-50%, -50%);
  }

  .float-social__toggle-icon::before { width: 16px; height: 2px; }
  .float-social__toggle-icon::after { width: 2px; height: 16px; }
  .float-social.is-open .float-social__toggle-icon::before { transform: translate(-50%, -50%) rotate(45deg); }
  .float-social.is-open .float-social__toggle-icon::after { transform: translate(-50%, -50%) rotate(-45deg); }

  .float-social__consult {
    width: 44px;
    min-height: 50px;
    font-size: 9px;
  }
}
/* 우측 하단 고정 소셜 배너 */

.float-social {
  position: fixed;
  right: 16px;
  bottom: 20px;
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  pointer-events: none;
}

.float-social__link {
  pointer-events: auto;
  display: block;
  width: 64px;
  aspect-ratio: 64 / 110;
  line-height: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: none;
  outline: none;
  transition: transform 0.16s ease;
}

.float-social__link:hover,
.float-social__link:focus-visible {
  transform: translateY(-2px);
  box-shadow: none;
  filter: none;
}

.float-social__link:focus-visible {
  outline: 2px solid #3c5daa;
  outline-offset: 2px;
}

.float-social__link img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  box-shadow: none;
  filter: none;
}

.float-social__channels,
.float-social__channels-inner {
  display: contents;
}

.float-social__toggle {
  display: none;
}

.float-social__consult {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  box-sizing: border-box;
  width: 64px;
  min-height: 72px;
  padding: 8px 4px 7px;
  border-radius: 14px;
  background: #fff;
  color: #ef7a1b;
  box-shadow: 0 6px 16px rgba(19, 35, 63, 0.16);
  text-decoration: none;
  font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.2;
  text-align: center;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.float-social__consult svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.float-social__consult:hover,
.float-social__consult:focus-visible {
  transform: translateY(-2px);
  background: #ef7a1b;
  color: #fff;
  box-shadow: 0 8px 18px rgba(239, 122, 27, 0.35);
}

.float-social__top {
  pointer-events: auto;
  width: 44px;
  min-height: 36px;
  border: 1px solid #d8e0eb;
  border-radius: 10px;
  background: #fff;
  color: #162c4b;
  font: 800 10px/1 Pretendard, sans-serif;
  box-shadow: 0 4px 12px rgba(19, 35, 63, 0.12);
}

.float-social__consult:focus-visible {
  outline: 2px solid #3c5daa;
  outline-offset: 2px;
}

/* 헤더 아래 교재 프로모 바 (문서 흐름, 고정 플로트 아님) */
.float-promo {
  position: relative;
  z-index: 8;
  width: 100%;
  flex: 0 0 auto;
  pointer-events: auto;
  border: 0;
  outline: none;
  background: #f4f6f9;
  box-shadow: none;
}

.float-promo.is-closed {
  display: none;
}

.float-promo__inner {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  width: min(var(--bidlab-content-max, 1180px), 100%);
  margin: 0 auto;
  padding: 10px 16px 12px;
  box-sizing: border-box;
  overflow: visible;
}

.float-promo__card {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  min-width: 0;
  overflow: visible;
  min-height: 88px;
  padding: 10px 16px 10px 10px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid #e4e8ef;
  border-radius: 16px;
  box-shadow: 0 1px 0 rgba(19, 35, 63, 0.04);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.float-promo__card:hover,
.float-promo__card:focus-visible {
  border-color: #c9d4e6;
  box-shadow: 0 8px 24px rgba(19, 35, 63, 0.08);
}

.float-promo__card:focus-visible {
  outline: 2px solid #3c5daa;
  outline-offset: 2px;
}

.float-promo__thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background-color: #162c4b;
  overflow: hidden;
}

.float-promo__copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.float-promo__kicker {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  color: #5b6b82;
}

.float-promo__title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  color: #162c4b;
}

.float-promo__desc {
  font-size: 13px;
  line-height: 1.4;
  color: #5b6b82;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.float-promo__cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  max-width: 100%;
  padding: 0 16px;
  border-radius: 999px;
  background: #162c4b;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.float-promo__close {
  flex: none;
  position: relative;
  top: auto;
  right: auto;
  z-index: 2;
  width: 28px;
  height: 28px;
  margin-top: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(13, 27, 42, 0.08);
  color: #162c4b;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.float-promo__close:hover,
.float-promo__close:focus-visible {
  background: rgba(13, 27, 42, 0.16);
  color: #162c4b;
}

.float-promo__close:focus-visible {
  outline: 2px solid #3c5daa;
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .float-social {
    right: 8px;
    bottom: calc(56px + 28px + env(safe-area-inset-bottom, 0px));
    z-index: 40;
    gap: 6px;
  }

  .float-social__channels {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    pointer-events: none;
    transition: grid-template-rows 0.28s ease, opacity 0.2s ease;
  }

  .float-social.is-open .float-social__channels {
    grid-template-rows: 1fr;
    opacity: 1;
    pointer-events: auto;
  }

  .float-social__channels-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    overflow: hidden;
    min-height: 0;
  }

  .float-social__link {
    width: 36px;
    transform: translateY(8px);
    transition: transform 0.22s ease, opacity 0.22s ease;
  }

  .float-social.is-open .float-social__link {
    transform: none;
  }

  .float-social.is-open .float-social__link:nth-child(1) {
    transition-delay: 0.02s;
  }

  .float-social.is-open .float-social__link:nth-child(2) {
    transition-delay: 0.07s;
  }

  .float-social.is-open .float-social__link:nth-child(3) {
    transition-delay: 0.12s;
  }

  .float-social__toggle {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #162c4b;
    box-shadow: 0 6px 16px rgba(19, 35, 63, 0.16);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
  }

  .float-social__toggle:hover,
  .float-social__toggle:focus-visible,
  .float-social.is-open .float-social__toggle {
    background: #162c4b;
    color: #fff;
  }

  .float-social__toggle:focus-visible {
    outline: 2px solid #3c5daa;
    outline-offset: 2px;
  }

  .float-social__toggle-icon {
    position: relative;
    display: block;
    width: 16px;
    height: 16px;
  }

  .float-social__toggle-icon::before,
  .float-social__toggle-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    background: currentColor;
    border-radius: 1px;
    transform: translate(-50%, -50%);
    transition: transform 0.22s ease;
  }

  .float-social__toggle-icon::before {
    width: 16px;
    height: 2px;
  }

  .float-social__toggle-icon::after {
    width: 2px;
    height: 16px;
  }

  .float-social.is-open .float-social__toggle-icon::before {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .float-social.is-open .float-social__toggle-icon::after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  .float-social__consult {
    display: none;
  }

  .float-social__consult svg {
    width: 16px;
    height: 16px;
  }

  .float-promo__inner {
    width: calc(100% - 24px);
    padding: 8px 0 10px;
  }

  .float-promo__card {
    flex-wrap: wrap;
    overflow: visible;
    gap: 10px;
    min-height: 0;
    padding: 8px 10px 8px 8px;
    border-radius: 12px;
  }

  .float-promo__thumb {
    flex-basis: 52px;
    width: 52px;
    height: 52px;
    border-radius: 10px;
  }

  .float-promo__title {
    font-size: 14px;
  }

  .float-promo__desc {
    display: none;
  }

  .float-promo__cta {
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
  }

  .float-promo__close {
    margin-top: 6px;
  }
}

@media (max-width: 480px) {
  .float-social {
    right: 6px;
    bottom: calc(56px + 28px + env(safe-area-inset-bottom, 0px));
    z-index: 40;
    gap: 5px;
  }

  .float-social__channels-inner {
    gap: 5px;
  }

  .float-social__link {
    width: 32px;
  }

  .float-social__toggle {
    width: 44px;
    height: 44px;
  }

  .float-social__toggle-icon {
    width: 14px;
    height: 14px;
  }

  .float-social__toggle-icon::before {
    width: 14px;
  }

  .float-social__toggle-icon::after {
    height: 14px;
  }

  .float-social__consult {
    width: 36px;
    min-height: 44px;
    font-size: 8px;
  }

  .float-social__consult svg {
    width: 14px;
    height: 14px;
  }
}

body.is-nav-open .float-social,
body.is-nav-open .float-promo {
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .float-social__channels,
  .float-social__link,
  .float-social__toggle,
  .float-social__toggle-icon::before,
  .float-social__toggle-icon::after {
    transition: none;
  }
}

@media (min-width: 768px) {
  .float-social .float-social__channels {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    pointer-events: none;
  }
  .float-social.is-open .float-social__channels {
    grid-template-rows: 1fr;
    opacity: 1;
    pointer-events: auto;
  }
  .float-social .float-social__channels-inner {
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow: hidden;
  }
  .float-social .float-social__link { width: 40px; }
  .float-social .float-social__toggle { display: flex; flex-direction: column; gap: 2px; }
  .float-social .float-social__toggle-label { font: 800 9px/1 Pretendard, sans-serif; }
  .float-social .float-social__consult { width: 44px; min-height: 50px; font-size: 9px; }
}
