/* 플레바 사장 웹 — 토스 방식 화면(피그마 TDS 키트 '플레바 · 사장 웹 (토스 방식)' 실측값, 2026-11-14)
   글자·색은 TDS 값 그대로(사장 지시: 토스 방식). 간격은 피그마 좌표에서 잰 값. */
:root {
    --tw-ink: #191f28;        /* Grey 900 — 제목 */
    --tw-ink-2: #4e5968;      /* Grey 700 — 이름표 */
    --tw-ink-3: #6b7684;      /* Grey 600 — 부제·도움말 */
    --tw-line: #e5e8eb;
    --tw-field: #f9fafb;      /* 입력칸 바탕(피그마 Field 실측) */
    --tw-brand: #7c3aed;      /* 마이튠/플레바 색 모드 — 흰 글자 대비 5.7:1 */
    --tw-brand-press: #6d28d9;
    --tw-danger: #e42939;
}
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }   /* .tw-screen 의 display:flex 가 hidden 을 덮어 로딩 화면이 남던 문제(11/16) */
body.tw {
    margin: 0; background: #fff; color: var(--tw-ink);
    font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
    word-break: keep-all; text-wrap: pretty; -webkit-tap-highlight-color: transparent;
}
.tw-screen {
    max-width: 480px; margin: 0 auto; min-height: 100svh; box-sizing: border-box;
    display: flex; flex-direction: column;
    padding: env(safe-area-inset-top) 0 calc(16px + env(safe-area-inset-bottom));
}
.tw-topbar { height: 56px; flex: none; display: flex; align-items: center; padding-left: 8px; }
.tw-back { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; border-radius: 12px; cursor: pointer; }
.tw-back:focus-visible { outline: 2px solid var(--tw-brand); outline-offset: 2px; }
.tw-hero-icon { display: block; width: 64px; height: 64px; margin: 8px 24px 0; }
.tw-title { margin: 24px 24px 0; font-size: 28px; line-height: 37px; font-weight: 700; letter-spacing: -0.02em; }
.tw-sub { margin: 8px 24px 0; font-size: 17px; line-height: 1.5; font-weight: 500; color: var(--tw-ink-3); }

.tw-form { flex: 1; display: flex; flex-direction: column; }
.tw-field { display: flex; flex-direction: column; gap: 8px; padding: 40px 20px 0; }
.tw-label { padding: 0 4px; font-size: 13px; line-height: 1.35; font-weight: 500; color: var(--tw-ink-2); }
.tw-input {
    height: 54px; box-sizing: border-box; width: 100%; padding: 0 16px; border: 0; border-radius: 14px;
    background: var(--tw-field); color: var(--tw-ink); font: inherit; font-size: 17px; font-weight: 500;
    -webkit-appearance: none; appearance: none; line-height: 1.5;
}
.tw-input::placeholder { color: #6b7684; }   /* 4.5:1 이상(impeccable) */
.tw-input:focus { outline: 2px solid var(--tw-brand); outline-offset: 0; background: #fff; }
.tw-help { margin: 0; padding: 0 4px; font-size: 13px; line-height: 1.5; color: var(--tw-ink-3); }

.tw-grow { flex: 1; min-height: 24px; }
.tw-bottom { padding: 0 16px; display: flex; flex-direction: column; gap: 8px; }
.tw-error { margin: 0; padding: 0 4px; font-size: 13px; line-height: 1.5; color: var(--tw-danger); }
.tw-btn {
    height: 56px; width: 100%; border: 0; border-radius: 16px; background: var(--tw-brand); color: #fff;
    padding: 0; font: inherit; font-size: 17px; line-height: 1.5; font-weight: 600; cursor: pointer; touch-action: manipulation;
    transition: transform .1s ease, background-color .1s ease;
}
.tw-btn:active:not(:disabled) { transform: scale(0.98); background: var(--tw-brand-press); }
.tw-btn:disabled { background: #d1c4f5; cursor: default; }
.tw-btn[aria-busy="true"] { background: var(--tw-brand); opacity: .7; }
.tw-btn:focus-visible { outline: 2px solid var(--tw-ink); outline-offset: 2px; }
.tw-btn--weak { background: var(--tw-field); color: var(--tw-ink-2); }
.tw-btn--weak:active:not(:disabled) { background: var(--tw-line); }
@media (prefers-reduced-motion: reduce) { .tw-btn { transition: none; } }

/* 운영 화면 맨 위 크레딧 줄(피그마 B·C: ListRow, 왼쪽 아이콘 24) */
.tw-credit { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 4px; text-decoration: none; color: var(--tw-ink); font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif; }
.tw-credit__ico { flex: none; }
.tw-credit__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tw-credit__txt b { font-size: 16px; line-height: 1.5; font-weight: 600; }
.tw-credit__txt small { font-size: 13px; line-height: 1.5; color: var(--tw-ink-3); }
.tw-credit__end { flex: none; font-size: 16px; font-weight: 600; color: var(--tw-ink-2); font-variant-numeric: tabular-nums; }
.tw-credit__end.is-link { color: var(--tw-brand); }
.tw-credit:focus-visible { outline: 2px solid var(--tw-brand); outline-offset: 2px; border-radius: 12px; }
/* 0크레딧 전체 화면 */
.tw-cover { position: fixed; inset: 0; z-index: 1000; background: #fff; overflow-y: auto; font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif; color: var(--tw-ink); word-break: keep-all; }
.tw-btn--link { display: flex; align-items: center; justify-content: center; text-decoration: none; box-sizing: border-box; }

/* ── 결제 흐름(피그마 E·E2·4·5·6·7) ── */
.tw-list { margin: 16px 0 0; padding: 0; list-style: none; }
.tw-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 24px; box-sizing: border-box; width: 100%;
    border: 0; background: none; text-align: left; font: inherit; color: var(--tw-ink); text-decoration: none; cursor: pointer; }
button.tw-row:active, a.tw-row:active { background: #f2f4f6; }
.tw-row:focus-visible { outline: 2px solid var(--tw-brand); outline-offset: -2px; }
.tw-row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tw-row__title { font-size: 17px; line-height: 1.5; font-weight: 600; }
.tw-row__sub { font-size: 13px; line-height: 1.5; color: var(--tw-ink-3); font-variant-numeric: tabular-nums; }
.tw-row__end { flex: none; font-size: 15px; line-height: 1.5; color: var(--tw-ink-3); }
.tw-row--danger .tw-row__title { color: var(--tw-danger); }
.tw-check { flex: none; width: 28px; height: 28px; border-radius: 999px; border: 2px solid #d1d6db; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; }
.tw-row[aria-checked="true"] .tw-check { border-color: var(--tw-brand); background: var(--tw-brand); }
.tw-row[aria-checked="true"] .tw-check::after { content: ''; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.tw-note { margin: 0; padding: 0 4px 4px; font-size: 13px; line-height: 1.5; color: var(--tw-ink-3); }
.tw-history { margin: 0; padding: 0 24px 8px; list-style: none; }
.tw-history li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 13px; line-height: 1.5; color: var(--tw-ink-2); font-variant-numeric: tabular-nums; }
.tw-history a { color: var(--tw-brand); }

/* 소셜 버튼(피그마 '플레바 / 소셜 로그인 버튼' 부품) */
.tw-social { display: flex; flex-direction: column; gap: 8px; padding: 0 16px; }
.tw-sbtn { position: relative; height: 56px; width: 100%; border-radius: 16px; border: 0; font: inherit; font-size: 17px; line-height: 1.5; font-weight: 600; cursor: pointer; padding: 0; }
.tw-sbtn img { position: absolute; left: 20px; top: 18px; width: 20px; height: 20px; }
.tw-sbtn--kakao { background: #fee500; color: rgba(0,0,0,.85); }
.tw-sbtn--naver { background: #03c75a; color: #fff; }
.tw-sbtn--google { background: #fff; color: #191f28; box-shadow: inset 0 0 0 1px #dbdee3; }
.tw-sbtn:focus-visible { outline: 2px solid var(--tw-ink); outline-offset: 2px; }
.tw-sbtn:active { transform: scale(0.98); }
.tw-textlink { display: block; margin: 4px auto 0; min-height: 44px; padding: 0 16px; border: 0; background: none; font: inherit; font-size: 13px; line-height: 44px; color: var(--tw-ink-3); text-decoration: none; cursor: pointer; }

/* 아래에서 올라오는 시트(TDS Bottom Sheet) */
.tw-dim { position: fixed; inset: 0; z-index: 1100; background: rgba(0,0,0,.2); display: flex; align-items: flex-end; justify-content: center; }
.tw-dim[hidden] { display: none; }
.tw-sheet { width: 100%; max-width: 480px; background: #fff; border-radius: 24px 24px 0 0; padding: 8px 0 calc(16px + env(safe-area-inset-bottom)); box-sizing: border-box; }
.tw-sheet__handle { width: 40px; height: 4px; border-radius: 999px; background: #e5e8eb; margin: 0 auto 16px; }
.tw-sheet__title { margin: 0 24px 8px; font-size: 22px; line-height: 31px; font-weight: 700; }
.tw-pair { display: flex; gap: 8px; padding: 16px 16px 0; }
.tw-pair .tw-btn { flex: 1; }
/* 확인 창(TDS Dialog) — 왼쪽 버튼은 [닫기] */
.tw-dim--center { align-items: center; padding: 0 32px; }
.tw-dialog { width: 100%; max-width: 311px; background: #fff; border-radius: 20px; padding: 24px 20px 20px; box-sizing: border-box; }
.tw-dialog h2 { margin: 0 0 8px; font-size: 20px; line-height: 29px; font-weight: 700; }
.tw-dialog p { margin: 0; font-size: 15px; line-height: 22.5px; color: var(--tw-ink-2); }
.tw-dialog .tw-pair { padding: 20px 0 0; }
.tw-dialog .tw-btn { height: 48px; border-radius: 14px; font-size: 15px; }
