/* toss.css — 토스 앱 안(?app=toss) 모습만. [data-platform="toss"] 밖은 하나도 안 바꾼다 (설계_토스입점 4장 · T2 T4 T9).
   상단 바 높이는 --toss-nav-h 한 곳. 진짜 토스판에서는 토스가 바를 그리므로 이 높이를 0 으로. */
:root[data-platform="toss"] {
  --toss-nav-h: 52px;
  --toss-top: calc(var(--toss-nav-h) + env(safe-area-inset-top));
  --tz-ink: #191F28;
  --tz-sub: #6B7684;
  --tz-line: #E5E8EB;
  --tz-blue: #3182F6;
  --tz-bg: #FFFFFF;
  color-scheme: light only; /* T9 밝은 화면만 */
  touch-action: pan-x pan-y; /* T9 두 손가락 확대 끔 */
  -webkit-text-size-adjust: 100%;
}
:root[data-platform="toss"] body { padding-top: var(--toss-top); overflow-x: clip; }

/* ---- 가짜 토스 상단 바 ---- */
.tz-nav { display: none; }
:root[data-platform="toss"] .tz-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1300; height: var(--toss-top); padding-top: env(safe-area-inset-top);
  display: flex; align-items: center; gap: 2px; padding-left: 4px; padding-right: 4px;
  background: var(--tz-bg); color: var(--tz-ink); border-bottom: 1px solid var(--tz-line);
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", sans-serif;
}
.tz-ic { width: 44px; height: 44px; border: 0; background: none; color: inherit; font-size: 20px; display: grid; place-items: center; cursor: pointer; border-radius: 12px; flex: 0 0 auto; }
.tz-ic:focus-visible, .tz-btn:focus-visible, .tz-peek:focus-visible { outline: 3px solid var(--tz-blue); outline-offset: 2px; }
.tz-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 16px; }
.tz-title b { white-space: nowrap; }
.tz-logo { width: 26px; height: 26px; border-radius: 7px; background: #FFF3EC; display: grid; place-items: center; flex: 0 0 auto; }
.tz-tag { font-style: normal; font-size: 10.5px; color: var(--tz-sub); background: #F2F4F6; border-radius: 6px; padding: 2px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* ---- T2 우리 상단 띠·로고·뒤로가기 숨김 (뒤로가기 모양은 토스 바 하나뿐) ---- */
:root[data-platform="toss"] .mn-bar,
:root[data-platform="toss"] .skip,
:root[data-platform="toss"] header.top,
:root[data-platform="toss"] .rm-bar,
:root[data-platform="toss"] .stepbar .back,
:root[data-platform="toss"] .sms-tg,
:root[data-platform="toss"] #smsBox,
:root[data-platform="toss"] [data-tz-out] { display: none !important; }
:root[data-platform="toss"] .stepbar { justify-content: center; }

/* 겹창·편지 화면은 토스 바 아래에서 시작 (진짜 토스에서도 바 아래가 우리 화면) */
:root[data-platform="toss"] .modal,
:root[data-platform="toss"] .visit,
:root[data-platform="toss"] .arrive { top: var(--toss-top) !important; }
:root[data-platform="toss"] .mh-btabs { padding-bottom: calc(6px + env(safe-area-inset-bottom)); }

/* ---- T4 첫 화면: 마케팅 긴 화면 대신 소개 3줄 + 큰 버튼 하나. 소개 영상·겹창도 안 보임 (window.RB_NO_INTRO) ---- */
:root[data-platform="toss"] body.mn > :not(.tz-nav):not(.tz-home):not(.tz-sheet):not(.tz-toast):not(script):not(audio) { display: none !important; }
:root[data-platform="toss"] [data-intro-film], :root[data-platform="toss"] .intro-film { display: none !important; }
:root[data-platform="toss"] body.mn { background: #FFFBF6; }
.tz-home { max-width: 480px; margin: 0 auto; padding: 28px 20px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 18px; min-height: calc(100dvh - var(--toss-top, 52px)); color: var(--tz-ink); }
.tz-home h1 { margin: 8px 0 0; font-size: clamp(28px, 8vw, 34px); letter-spacing: -.04em; line-height: 1.25; font-weight: 800; }
.tz-intro { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tz-intro li { position: relative; padding-left: 18px; font-size: 17px; line-height: 1.55; color: #333D4B; word-break: keep-all; }
.tz-intro li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: #F6B38F; }
.tz-note { margin: 0; background: #FFF4E5; border-radius: 14px; padding: 12px 14px; font-weight: 700; font-size: 15px; }
.tz-peek { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--tz-line); border-radius: 18px; padding: 12px 14px; text-decoration: none; color: inherit; min-height: 72px; }
.tz-peek img { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; flex: 0 0 auto; }
.tz-peek span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tz-peek small { color: var(--tz-sub); font-size: 14px; }
.tz-peek i { font-style: normal; font-size: 22px; color: var(--tz-sub); }
.tz-cta { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.tz-fine { margin: 0; text-align: center; font-size: 13px; line-height: 1.6; color: var(--tz-sub); }
.tz-fine a { color: inherit; font-weight: 700; }

/* ---- 토스 모양 버튼·겹창 (TDS 비슷하게) ---- */
.tz-btn { display: flex; align-items: center; justify-content: center; min-height: 52px; border: 0; border-radius: 14px; background: var(--tz-blue); color: #fff; font: inherit; font-size: 17px; font-weight: 700; text-decoration: none; padding: 0 16px; cursor: pointer; width: 100%; }
.tz-btn.big { min-height: 56px; }
.tz-btn.line { background: #F2F4F6; color: var(--tz-ink); }
.tz-sheet { position: fixed; inset: var(--toss-top, 0) 0 0 0; z-index: 1100; background: rgba(0, 0, 0, .45); display: flex; align-items: flex-end; justify-content: center; }
.tz-sheet[hidden] { display: none; }
.tz-card { background: #fff; color: var(--tz-ink); width: 100%; max-width: 480px; border-radius: 22px 22px 0 0; padding: 22px 20px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; font-family: "Pretendard Variable", Pretendard, -apple-system, sans-serif; }
.tz-card h2 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.tz-card p { margin: 0; font-size: 15.5px; line-height: 1.6; color: #4E5968; }
.tz-cap { font-size: 12px !important; color: var(--tz-sub) !important; font-weight: 700; }
.tz-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tz-list li { padding: 12px 2px; border-bottom: 1px solid #F2F4F6; font-size: 16px; display: flex; flex-direction: column; }
.tz-list.plain li { display: block; font-size: 15px; line-height: 1.55; padding: 8px 2px; }
.tz-list small { color: var(--tz-sub); font-size: 13px; }
.tz-row { display: flex; gap: 8px; }
.tz-toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 1200; background: #191F28; color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 600; max-width: calc(100% - 32px); text-align: center; }
.tz-toast[hidden] { display: none; }

/* 토스 결제 자리 (관리 › 소식) */
.tz-pay { display: flex; flex-direction: column; gap: 8px; background: #F9FAFB; border: 1px solid var(--tz-line, #E5E8EB); border-radius: 16px; padding: 14px; }
.tz-pay b { font-size: 16px; }

/* T4 4-4 장식 효과 줄이기 */
:root[data-platform="toss"] .shine::after { display: none !important; }

/* «토스로 계속하기» 버튼 (토스 안 로그인은 이것 하나) */
.btn.social.toss { background: #3182F6; color: #fff; box-shadow: 0 6px 16px rgba(49, 130, 246, .25); }
.btn.social.toss .sicon rect { fill: #fff; }
