﻿.studio-drawer-toggle,
.studio-drawer-backdrop,
.studio-drawer-close { display: none; }

.studio-with-gef .app { display: block; }
.studio-with-gef .studio-drawer-toggle {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid rgba(163,255,94,.38);
  border-radius: 12px;
  color: #ecf7e7;
  background: rgba(18,20,26,.94);
  box-shadow: 0 12px 30px rgba(0,0,0,.3);
  font: 800 14px/1 Pretendard,-apple-system,BlinkMacSystemFont,sans-serif;
  cursor: pointer;
}
.studio-with-gef .studio-drawer-toggle span { color: #a3ff5e; font-size: 19px; }
.studio-with-gef .studio-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1150;
  display: block;
  border: 0;
  opacity: 0;
  visibility: hidden;
  background: rgba(2,5,9,.64);
  backdrop-filter: blur(3px);
  transition: opacity .22s ease,visibility .22s ease;
}
.studio-with-gef .sidebar,
.studio-with-gef.design-b .sidebar,
.studio-with-gef.design-c .sidebar {
  position: fixed;
  top: 0;
  right: 0;
  left: auto;
  z-index: 1200;
  width: min(380px,92vw);
  height: 100vh;
  min-height: 0;
  margin: 0;
  padding: 24px 20px;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 8px;
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0;
  background: rgba(14,17,23,.985);
  box-shadow: -28px 0 70px rgba(0,0,0,.5);
  backdrop-filter: blur(20px);
  transform: translateX(100%);
  transition: transform .24s ease;
}
.studio-with-gef:not(.gef-embedded) .studio-drawer-toggle { top: 93px; }
.studio-with-gef:not(.gef-embedded) .sidebar,
.studio-with-gef:not(.gef-embedded).design-b .sidebar,
.studio-with-gef:not(.gef-embedded).design-c .sidebar {
  top: 77px;
  height: calc(100vh - 77px);
}
.studio-with-gef.drawer-open .sidebar { transform: translateX(0); }
.studio-with-gef.drawer-open .studio-drawer-backdrop { opacity: 1; visibility: visible; }
.studio-with-gef .studio-drawer-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  background: var(--bg-hover);
  font-size: 25px;
  cursor: pointer;
}
.studio-with-gef .logo,
.studio-with-gef.design-b .logo,
.studio-with-gef.design-c .logo {
  width: 100%;
  margin: 0 0 14px;
  padding: 2px 50px 20px 2px;
  border-right: 0;
  border-bottom: 1px solid var(--border);
}
.studio-with-gef .nav-section { display: block; padding-inline: 4px; }
.studio-with-gef .nav-item,
.studio-with-gef.design-b .nav-item,
.studio-with-gef.design-c .nav-item {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border-radius: 12px;
}
.studio-with-gef .nav-icon { width: 28px; height: 28px; }
.studio-with-gef .sidebar-footer,
.studio-with-gef.design-b .sidebar-footer,
.studio-with-gef.design-c .sidebar-footer {
  width: 100%;
  margin: auto 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.studio-with-gef .sidebar-footer > * { width: 100%; min-width: 0; }
.studio-with-gef .main,
.studio-with-gef.design-b .main,
.studio-with-gef.design-c .main { width: 100%; padding: 82px 40px 44px; }

@media (max-width: 680px) {
  .studio-with-gef .studio-drawer-toggle { top: 12px; right: 12px; min-height: 42px; padding-inline: 14px; }
  .studio-with-gef .sidebar,
  .studio-with-gef.design-b .sidebar,
  .studio-with-gef.design-c .sidebar { width: min(360px,94vw); height: 100dvh; padding: 20px 16px; }
  .studio-with-gef .main,
  .studio-with-gef.design-b .main,
  .studio-with-gef.design-c .main { padding: 72px 18px 36px; }
  .studio-with-gef:not(.gef-embedded) .studio-drawer-toggle { top: 80px; }
  .studio-with-gef:not(.gef-embedded) .sidebar,
  .studio-with-gef:not(.gef-embedded).design-b .sidebar,
  .studio-with-gef:not(.gef-embedded).design-c .sidebar {
    top: 68px;
    height: calc(100dvh - 68px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .studio-with-gef .sidebar,
  .studio-with-gef .studio-drawer-backdrop { transition: none; }
}

/* ===== V2 임베드 진입 시 온보딩 안내 =====
   V2 모집페이지에서 로그인한 사용자가 들어오므로 스튜디오 자체 로그인 버튼은 감춘다.
   대신 가장 먼저 해야 하는 "계정 연결 설정"을 상단 카드로 강조한다. */

.gef-embedded #landingLoginBtn { display: none !important; }

.setup-guide { display: none; }

.gef-embedded .setup-guide {
  display: block;
  margin-bottom: 12px;
  padding: 14px 15px;
  border: 1px solid rgba(34, 201, 147, .38);
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(18, 184, 134, .16), rgba(18, 184, 134, .05));
  text-decoration: none;
  transition: border-color .16s ease, transform .16s ease;
}

.gef-embedded .setup-guide:hover {
  border-color: rgba(34, 201, 147, .7);
  transform: translateY(-1px);
}

.gef-embedded .setup-guide.done {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .04);
}

.setup-guide-step {
  display: block;
  color: #22c993;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .1em;
}

.setup-guide.done .setup-guide-step { color: rgba(255, 255, 255, .45); }

.setup-guide-title {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.setup-guide-desc {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
  line-height: 1.55;
}

.setup-guide-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 11px;
  padding: 7px 12px;
  border-radius: 9px;
  background: linear-gradient(135deg, #22c993, #12b886);
  color: #04150e;
  font-size: 12px;
  font-weight: 800;
}

.setup-guide-cta::after { content: "→"; }

.setup-guide.done .setup-guide-cta {
  background: rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .82);
}

/* 안내 카드가 뜬 동안에는 하단 작은 칩이 중복이라 숨긴다 */
.gef-embedded .setup-guide:not(.done) ~ .settings-chip { display: none; }

/* ===== 발행 계정 연결 안내 모달 ===== */
.account-link-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100010;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 10, 8, .62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.account-link-backdrop.open { display: flex; }

.account-link-modal {
  width: 100%;
  max-width: 420px;
  padding: 28px 26px 22px;
  border: 1px solid rgba(34, 201, 147, .3);
  border-radius: 20px;
  background: #10171c;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .5);
  text-align: center;
  animation: account-link-rise .26s cubic-bezier(.16, 1, .3, 1);
}

@keyframes account-link-rise {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
}

.account-link-badge {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(34, 201, 147, .22), rgba(18, 184, 134, .12));
  color: #22c993;
}

.account-link-badge svg { width: 26px; height: 26px; }

.account-link-modal h3 {
  margin: 16px 0 0;
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.account-link-lead {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, .66);
  font-size: 13.5px;
  line-height: 1.7;
}

.account-link-steps {
  margin: 18px 0 0;
  padding: 14px 16px 14px 34px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .74);
  font-size: 13px;
  line-height: 1.9;
  text-align: left;
}

.account-link-steps b { color: #22c993; }

.account-link-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.account-link-actions button {
  flex: 1;
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.account-link-later {
  border: 1px solid rgba(255, 255, 255, .18) !important;
  background: transparent;
  color: rgba(255, 255, 255, .72);
}

.account-link-later:hover { background: rgba(255, 255, 255, .06); }

.account-link-go {
  background: linear-gradient(135deg, #22c993, #12b886);
  color: #04150e;
}

.account-link-go:hover { filter: brightness(1.05); }

.account-link-foot {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, .4);
  font-size: 11.5px;
}

/* 연결 전 잠긴 버튼과 사유 안내 */
.is-account-locked {
  opacity: .45;
  cursor: not-allowed !important;
  filter: grayscale(.5);
}

.account-gate-notice {
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 196, 0, .3);
  border-radius: 10px;
  background: rgba(255, 196, 0, .08);
  color: #ffd76a;
  font-size: 11.5px;
  line-height: 1.6;
}

.account-gate-notice button {
  display: block;
  margin-top: 5px;
  padding: 0;
  border: 0;
  background: none;
  color: #22c993;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

/* ===== 상단 포인트 카드 ===== */
.point-card {
  display: block;
  width: 100%;
  margin: 4px 0 16px;
  padding: 15px 16px;
  border: 1px solid rgba(34, 201, 147, .34);
  border-radius: 15px;
  background: linear-gradient(140deg, rgba(18, 184, 134, .2), rgba(18, 184, 134, .06));
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, transform .16s ease;
}

.point-card:hover {
  border-color: rgba(34, 201, 147, .75);
  transform: translateY(-1px);
}

.point-card.is-empty {
  border-color: rgba(255, 196, 0, .4);
  background: linear-gradient(140deg, rgba(255, 196, 0, .16), rgba(255, 196, 0, .04));
}

.point-card-label {
  display: block;
  color: rgba(255, 255, 255, .62);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
}

.point-card-value {
  display: block;
  margin: 5px 0 4px;
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}

.point-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #22c993;
  font-size: 11.5px;
  font-weight: 700;
}

.point-card-meta::after { content: "›"; font-size: 14px; }
.point-card.is-empty .point-card-meta { color: #ffd76a; }

/* ===== 포인트 내역 레이어 ===== */
.point-history-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100012;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 10, 8, .62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.point-history-backdrop.open { display: flex; }

.point-history-modal {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 460px;
  max-height: min(78vh, 620px);
  padding: 24px 22px 18px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 20px;
  background: #10171c;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .5);
}

.point-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.point-history-kicker {
  color: #22c993;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .16em;
}

.point-history-modal h3 {
  margin: 6px 0 0;
  color: #fff;
  font-size: 19px;
  font-weight: 800;
}

.point-history-head button {
  flex: none;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, .5);
  font-size: 15px;
  cursor: pointer;
}

.point-history-head button:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.point-history-balance {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 16px;
  padding: 13px 15px;
  border-radius: 13px;
  background: rgba(34, 201, 147, .12);
}

.point-history-balance span {
  color: rgba(255, 255, 255, .66);
  font-size: 12.5px;
  font-weight: 700;
}

.point-history-balance strong {
  color: #22c993;
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.point-history-list {
  flex: 1;
  min-height: 0;
  margin-top: 14px;
  overflow-y: auto;
}

.point-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 11px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.point-row-kind {
  display: inline-grid;
  place-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  font-weight: 800;
}

.point-row-kind[data-kind="grant"],
.point-row-kind[data-kind="purchase"] { background: rgba(34, 201, 147, .18); color: #4fe0b0; }
.point-row-kind[data-kind="refund"] { background: rgba(107, 168, 255, .18); color: #8ec0ff; }

.point-row-body { min-width: 0; display: grid; gap: 2px; }
.point-row-body b { color: rgba(255, 255, 255, .9); font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.point-row-body small { color: rgba(255, 255, 255, .42); font-size: 11px; }

.point-row-delta {
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.point-row-delta.plus { color: #4fe0b0; }
.point-row-delta.minus { color: rgba(255, 255, 255, .62); }

.point-history-empty {
  margin: 26px 0;
  color: rgba(255, 255, 255, .5);
  font-size: 13px;
  text-align: center;
}

.point-history-foot {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, .4);
  font-size: 11.5px;
  line-height: 1.6;
}
