/*
 * tips351/style.css  v1.0.0
 * 텔레그램 제휴 프로그램 Stars 수익 가이드
 * 테마: 골드/앰버 + 딥 다크 (수익·스타·리워드)
 * 그누보드5 완전 격리 | BEM | 모바일 퍼스트
 */

/* ─── 전체 리셋 ─── */
#tg-351-wrapper,
#tg-351-wrapper * {
    box-sizing: border-box; margin: 0; padding: 0; border: none;
    outline: none; text-decoration: none; list-style: none; background: none; font-style: normal;
}
#tg-351-wrapper h1, #tg-351-wrapper h2 { font-size: inherit; font-weight: inherit; color: inherit; line-height: 1.35; }
#tg-351-wrapper strong { font-weight: 700; color: inherit; }
#tg-351-wrapper p { margin-bottom: 14px !important; line-height: 1.85 !important; }
#tg-351-wrapper p:last-child { margin-bottom: 0 !important; }
#tg-351-wrapper button { cursor: pointer; }
#tg-351-wrapper a { color: inherit; }
#tg-351-wrapper ol, #tg-351-wrapper ul { list-style: none; }

/* ─── 디자인 토큰 ─── */
#tg-351-wrapper {
    --amb-100: #fffbeb;
    --amb-200: #fef3c7;
    --amb-300: #fcd34d;
    --amb-400: #fbbf24;
    --amb-500: #f59e0b;
    --amb-600: #d97706;
    --amb-700: #b45309;
    --amb-900: #78350f;
    --orn-400: #fb923c;
    --orn-500: #f97316;
    --yel-300: #fde047;
    --grn-400: #4ade80;
    --sky-300: #7dd3fc;
    --dk-base: #120900;
    --dk-card: #1e0f00;
    --sl-50:   #f8fafc;
    --sl-100:  #f1f5f9;
    --sl-200:  #e2e8f0;
    --sl-400:  #94a3b8;
    --sl-500:  #64748b;
    --sl-700:  #334155;
    --sl-800:  #1e293b;
    --sl-900:  #0f172a;
    --text-main: #1e293b;
    --text-sub:  #475569;
    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --shadow-sm:  0 4px 14px rgba(0,0,0,.06);
    --shadow-amb: 0 4px 20px rgba(245,158,11,.28);
    --fs-sm:   .9rem;
    --fs-base: 1rem;
    --fs-lg:   1.2rem;

    font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
    font-size: var(--fs-base); color: var(--text-main); line-height: 1.7;
    max-width: 1100px; margin: 0 auto; width: 100%;
}

/* Material Symbols */
#tg-351-wrapper .material-symbols-outlined {
    font-family: 'Material Symbols Outlined', sans-serif;
    font-weight: normal; font-style: normal; font-size: inherit;
    line-height: 1; display: inline-block; white-space: nowrap;
    direction: ltr; -webkit-font-smoothing: antialiased; vertical-align: middle;
}

/* 스크롤 등장 */
#tg-351-wrapper .tg-351-motion { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
#tg-351-wrapper .tg-351-motion.is-visible { opacity: 1; transform: translateY(0); }

/* ═════════════════════════════════════════
   히어로
═════════════════════════════════════════ */
#tg-351-wrapper .tg-351-hero {
    position: relative; background: var(--dk-base);
    border-radius: var(--radius-lg); padding: 64px 28px 72px;
    text-align: center; overflow: hidden;
}
#tg-351-wrapper .tg-351-hero__bg {
    position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 65% 52% at 28% 35%, rgba(245,158,11,.22) 0%, transparent 56%),
        radial-gradient(ellipse 52% 44% at 80% 70%, rgba(249,115,22,.14) 0%, transparent 52%);
}
#tg-351-wrapper .tg-351-hero__floats { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
#tg-351-wrapper .tg-351-float {
    position: absolute; font-size: 1.7rem; opacity: 0;
    animation: tg351Float ease-in-out infinite;
}
#tg-351-wrapper .tg-351-float--1 { top: 14%; left:4%;    animation-duration: 5.5s; animation-delay: 0s; }
#tg-351-wrapper .tg-351-float--2 { top: 22%; right:5%;   animation-duration: 4.5s; animation-delay: -2s; }
#tg-351-wrapper .tg-351-float--3 { bottom:28%; left:6%;  animation-duration: 6s;   animation-delay: -1s; font-size: 1.3rem; }
#tg-351-wrapper .tg-351-float--4 { bottom:20%; right:7%; animation-duration: 5s;   animation-delay: -1.8s; }
@keyframes tg351Float {
    0%,100% { opacity: 0; transform: translateY(0) scale(.9); }
    50%      { opacity: .52; transform: translateY(-14px) scale(1.12); }
}
#tg-351-wrapper .tg-351-hero__inner { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
#tg-351-wrapper .tg-351-hero__badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(245,158,11,.15); border: 1px solid rgba(245,158,11,.35);
    color: var(--amb-300); font-size: .85rem; font-weight: 700;
    padding: 6px 18px; border-radius: 999px; margin-bottom: 22px !important;
}
#tg-351-wrapper .tg-351-hero__badge .material-symbols-outlined { font-size: 1.1rem; }
#tg-351-wrapper .tg-351-hero__title {
    font-size: clamp(1.6rem, 4.2vw, 2.3rem); font-weight: 900;
    color: #fff; line-height: 1.3; letter-spacing: -.02em; margin-bottom: 16px;
}
#tg-351-wrapper .tg-351-hero__title em {
    font-style: normal; color: var(--amb-300);
    text-shadow: 0 0 28px rgba(245,158,11,.55);
}
#tg-351-wrapper .tg-351-hero__subtitle { color: rgba(255,255,255,.68); line-height: 1.8; max-width: 560px; margin: 0 auto 28px !important; }

/* 히어로 통계 */
#tg-351-wrapper .tg-351-hero__stats {
    display: flex; align-items: center; flex-wrap: wrap; gap: 12px; justify-content: center;
    background: rgba(0,0,0,.2); border: 1px solid rgba(245,158,11,.15);
    padding: 16px 24px; border-radius: 14px; width: fit-content; margin: 0 auto;
}
#tg-351-wrapper .tg-351-hero__stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
#tg-351-wrapper .tg-351-hero__stat-value { font-size: 1.25rem; font-weight: 900; color: var(--amb-300); line-height: 1; }
#tg-351-wrapper .tg-351-hero__stat-label { font-size: .7rem; color: rgba(255,255,255,.5); font-weight: 600; }
#tg-351-wrapper .tg-351-hero__stat-div { width: 1px; height: 32px; background: rgba(255,255,255,.12); }

/* ─── 레이아웃 ─── */
#tg-351-wrapper .tg-351-main { display: flex; flex-direction: column; gap: 28px; }

/* 도입부 */
#tg-351-wrapper .tg-351-intro {
    background: #fff; border: 1px solid var(--sl-200); border-top: 4px solid var(--amb-500);
    border-radius: var(--radius-md); padding: 36px 28px; text-align: center; box-shadow: var(--shadow-sm);
}
#tg-351-wrapper .tg-351-intro__icon { font-size: 2.4rem; color: var(--amb-600); margin-bottom: 14px; }
#tg-351-wrapper .tg-351-intro__icon .material-symbols-outlined { font-size: 2.4rem; }
#tg-351-wrapper .tg-351-intro__title { font-size: clamp(1.05rem, 2.8vw, 1.32rem); font-weight: 800; color: var(--sl-900); margin-bottom: 14px; letter-spacing: -.01em; }
#tg-351-wrapper .tg-351-intro p { color: var(--text-sub); max-width: 700px; margin-left: auto; margin-right: auto; }

/* 흐름 */
#tg-351-wrapper .tg-351-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 22px; }
#tg-351-wrapper .tg-351-flow__step {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    background: var(--sl-50); border: 1px solid var(--sl-200); border-radius: var(--radius-sm);
    padding: 14px 20px; min-width: 90px;
}
#tg-351-wrapper .tg-351-flow__step--mid { border-color: rgba(245,158,11,.22); background: rgba(245,158,11,.04); }
#tg-351-wrapper .tg-351-flow__step--end { border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.08); }
#tg-351-wrapper .tg-351-flow__icon { font-size: 1.7rem; line-height: 1; }
#tg-351-wrapper .tg-351-flow__label { font-size: .78rem; font-weight: 800; color: var(--sl-700); margin-bottom: 0 !important; }
#tg-351-wrapper .tg-351-flow__arrow { font-size: 1.3rem; color: var(--amb-400); font-weight: 900; line-height: 1; }

/* 공통 섹션 */
#tg-351-wrapper .tg-351-section {
    background: #fff; border: 1px solid var(--sl-200); border-radius: var(--radius-md);
    padding: 44px 32px; box-shadow: var(--shadow-sm); text-align: center;
}
#tg-351-wrapper .tg-351-section--dark { background: var(--dk-base); border-color: rgba(245,158,11,.15); }
#tg-351-wrapper .tg-351-section__label {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--sl-100); color: var(--sl-700);
    font-size: .88rem; font-weight: 700; letter-spacing: .03em;
    padding: 7px 20px; border-radius: 999px; margin-bottom: 22px;
}
#tg-351-wrapper .tg-351-section__label--dark { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.32); }
#tg-351-wrapper .tg-351-section__label--gold { background: rgba(245,158,11,.08); color: var(--amb-700); }
#tg-351-wrapper .tg-351-section__label .material-symbols-outlined { font-size: 1.1rem; }
#tg-351-wrapper .tg-351-section__title {
    font-size: clamp(1.2rem, 3vw, 1.5rem); font-weight: 900; color: var(--sl-900);
    letter-spacing: -.02em; margin-bottom: 16px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
#tg-351-wrapper .tg-351-section__title--light { color: #fff !important; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
#tg-351-wrapper .tg-351-section__title .material-symbols-outlined { font-size: 1.5rem; color: var(--amb-500); }
#tg-351-wrapper .tg-351-section > p, #tg-351-wrapper .tg-351-section__desc--light { max-width: 680px; margin-left: auto; margin-right: auto; }
#tg-351-wrapper .tg-351-section > p { color: var(--text-sub); }
#tg-351-wrapper .tg-351-section__desc--light { color: rgba(255,255,255,.88) !important; margin-bottom: 32px !important; }

/* ═════════════════════════════════════════
   데모: 프로그램 목록 + 상세
═════════════════════════════════════════ */
#tg-351-wrapper .tg-351-demo { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }

/* ─ 목록 패널 ─ */
#tg-351-wrapper .tg-351-list-panel {
    background: #1a0f00; border: 1px solid rgba(245,158,11,.2);
    border-radius: 16px; overflow: hidden;
}
#tg-351-wrapper .tg-351-list-panel__header {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    background: #0e0700; padding: 12px 14px;
    border-bottom: 1px solid rgba(245,158,11,.12);
}
#tg-351-wrapper .tg-351-list-panel__header .material-symbols-outlined { font-size: 1.1rem; color: var(--amb-400); }
#tg-351-wrapper .tg-351-list-panel__title { font-size: .88rem; font-weight: 900; color: #fff; flex: 1; }
#tg-351-wrapper .tg-351-sort-btns { display: flex; gap: 4px; }
#tg-351-wrapper .tg-351-sort-btn {
    padding: 4px 10px; border-radius: 6px;
    font-size: .66rem; font-weight: 700; color: rgba(255,255,255,.38);
    border: 1px solid rgba(255,255,255,.1); transition: all .2s;
}
#tg-351-wrapper .tg-351-sort-btn--active { background: rgba(245,158,11,.2); border-color: rgba(245,158,11,.35); color: var(--amb-300); }

/* 프로그램 리스트 */
#tg-351-wrapper .tg-351-prog-list { display: flex; flex-direction: column; }
#tg-351-wrapper .tg-351-prog-item {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 12px 14px; text-align: left;
    border-bottom: 1px solid rgba(255,255,255,.04); transition: background .2s;
}
#tg-351-wrapper .tg-351-prog-item:last-child { border-bottom: none; }
#tg-351-wrapper .tg-351-prog-item:hover { background: rgba(255,255,255,.04); }
#tg-351-wrapper .tg-351-prog-item--active { background: rgba(245,158,11,.1); border-left: 3px solid var(--amb-400); }
#tg-351-wrapper .tg-351-prog-item__icon { font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
#tg-351-wrapper .tg-351-prog-item__info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
#tg-351-wrapper .tg-351-prog-item__name { font-size: .84rem; font-weight: 800; color: rgba(255,255,255,.85); }
#tg-351-wrapper .tg-351-prog-item__sub  { font-size: .68rem; color: rgba(255,255,255,.4); }
#tg-351-wrapper .tg-351-prog-item__rate {
    font-size: .82rem; font-weight: 900; color: var(--amb-400);
    background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.22);
    padding: 3px 9px; border-radius: 999px;
}
#tg-351-wrapper .tg-351-prog-item__rate--hot { background: rgba(245,158,11,.2); border-color: rgba(245,158,11,.4); color: var(--amb-300); }

/* ─ 상세 패널 ─ */
#tg-351-wrapper .tg-351-detail-panel {
    background: #1a0f00; border: 1px solid rgba(245,158,11,.18);
    border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 14px;
}
#tg-351-wrapper .tg-351-detail-header { display: flex; align-items: center; gap: 12px; }
#tg-351-wrapper .tg-351-detail-icon { font-size: 2rem; line-height: 1; flex-shrink: 0; }
#tg-351-wrapper .tg-351-detail-name { font-size: .95rem; font-weight: 900; color: #fff; margin-bottom: 3px; }
#tg-351-wrapper .tg-351-detail-sub  { font-size: .72rem; color: rgba(255,255,255,.45); margin-bottom: 0 !important; }
#tg-351-wrapper .tg-351-detail-badge {
    margin-left: auto; font-size: 1rem; font-weight: 900;
    background: linear-gradient(135deg, var(--amb-500), var(--amb-700));
    color: #fff; padding: 4px 12px; border-radius: 999px; flex-shrink: 0;
    box-shadow: var(--shadow-amb);
}

/* 통계 */
#tg-351-wrapper .tg-351-stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
#tg-351-wrapper .tg-351-stat-box {
    background: rgba(245,158,11,.07); border: 1px solid rgba(245,158,11,.15);
    border-radius: 9px; padding: 10px 6px; text-align: center;
    display: flex; flex-direction: column; gap: 4px;
}
#tg-351-wrapper .tg-351-stat-box__value { font-size: .88rem; font-weight: 900; color: var(--amb-300); line-height: 1.2; }
#tg-351-wrapper .tg-351-stat-box__label { font-size: .62rem; color: rgba(255,255,255,.4); }

/* 참여 버튼 */
#tg-351-wrapper .tg-351-join-btn {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
    background: linear-gradient(135deg, var(--amb-500), var(--amb-700));
    color: #fff; font-size: .9rem; font-weight: 800;
    padding: 13px; border-radius: 10px;
    box-shadow: var(--shadow-amb); transition: opacity .2s, transform .15s;
}
#tg-351-wrapper .tg-351-join-btn:hover { opacity: .87; transform: scale(.98); }
#tg-351-wrapper .tg-351-join-btn .material-symbols-outlined { font-size: 1.2rem; }

/* 링크 결과 */
#tg-351-wrapper .tg-351-link-result { display: flex; flex-direction: column; gap: 10px; animation: tg351FadeIn .3s ease; }
#tg-351-wrapper .tg-351-link-result__success {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    font-size: .82rem; font-weight: 800; color: var(--grn-400);
}
#tg-351-wrapper .tg-351-link-result__success .material-symbols-outlined { font-size: .95rem; }
#tg-351-wrapper .tg-351-link-box {
    display: flex; align-items: center; gap: 8px;
    background: rgba(0,0,0,.3); border: 1px solid rgba(245,158,11,.18);
    border-radius: 9px; padding: 10px 12px;
}
#tg-351-wrapper .tg-351-link-box__url {
    flex: 1; font-family: 'Consolas', monospace; font-size: .7rem;
    color: var(--amb-300); word-break: break-all; line-height: 1.5;
}
#tg-351-wrapper .tg-351-link-box__copy {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 7px; flex-shrink: 0;
    background: rgba(245,158,11,.15); color: var(--amb-400); transition: background .2s;
}
#tg-351-wrapper .tg-351-link-box__copy:hover { background: rgba(245,158,11,.28); }
#tg-351-wrapper .tg-351-link-box__copy .material-symbols-outlined { font-size: 1.1rem; }
#tg-351-wrapper .tg-351-link-result__tips {
    display: flex; align-items: flex-start; gap: 7px;
    font-size: .76rem; color: rgba(255,255,255,.55); line-height: 1.6;
    background: rgba(255,255,255,.04); border-radius: 8px; padding: 10px 12px;
}
#tg-351-wrapper .tg-351-link-result__tips .material-symbols-outlined { font-size: .9rem; color: var(--amb-400); flex-shrink: 0; margin-top: 2px; }

/* 카운터 */
#tg-351-wrapper .tg-351-counter { display: flex; justify-content: center; margin-top: 16px; }
#tg-351-wrapper .tg-351-counter__anim {
    display: flex; align-items: center; gap: 8px;
    background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.28);
    color: var(--amb-300); font-size: .85rem; font-weight: 800;
    padding: 10px 20px; border-radius: 999px;
    animation: tg351FadeIn .4s ease;
}
#tg-351-wrapper .tg-351-counter__anim .material-symbols-outlined { font-size: 1rem; animation: tg351Spin 2s linear infinite; }
@keyframes tg351Spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ═════════════════════════════════════════
   기기별 탭 가이드
═════════════════════════════════════════ */
#tg-351-wrapper .tg-351-tabs {
    display: flex; gap: 6px; background: var(--sl-100); border-radius: var(--radius-sm);
    padding: 5px; margin-bottom: 22px; flex-wrap: wrap;
}
#tg-351-wrapper .tg-351-tab-btn {
    flex: 1; min-width: 80px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 11px 12px; border-radius: 7px;
    font-size: var(--fs-sm); font-weight: 600; color: var(--sl-500);
    transition: background .2s, color .2s;
}
#tg-351-wrapper .tg-351-tab-btn .material-symbols-outlined { font-size: 1.1rem; }
#tg-351-wrapper .tg-351-tab-btn--active { background: #fff; color: var(--amb-700); box-shadow: 0 2px 8px rgba(0,0,0,.08); font-weight: 800; }
#tg-351-wrapper .tg-351-tab-panel { display: none; text-align: left; animation: tg351FadeIn .3s ease; }
#tg-351-wrapper .tg-351-tab-panel--active { display: block; }
#tg-351-wrapper .tg-351-tab-panel__head {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--sl-100);
}
#tg-351-wrapper .tg-351-tab-panel__icon {
    width: 50px; height: 50px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; color: #fff; flex-shrink: 0;
}
#tg-351-wrapper .tg-351-tab-panel__icon--pc      { background: linear-gradient(135deg, var(--amb-500), var(--amb-700)); }
#tg-351-wrapper .tg-351-tab-panel__icon--android { background: linear-gradient(135deg, #3ddc84, #00ac47); }
#tg-351-wrapper .tg-351-tab-panel__icon--ios      { background: linear-gradient(135deg, #555, #111); }
#tg-351-wrapper .tg-351-tab-panel__name { font-size: var(--fs-lg); font-weight: 800; color: var(--sl-900); margin-bottom: 4px; }
#tg-351-wrapper .tg-351-tab-panel__sub  { font-size: var(--fs-sm); color: var(--sl-500); margin-bottom: 0 !important; }
#tg-351-wrapper .tg-351-steps { display: flex; flex-direction: column; gap: 13px; counter-reset: tg351step; }
#tg-351-wrapper .tg-351-steps li {
    counter-increment: tg351step;
    display: flex; align-items: flex-start; gap: 13px;
    font-size: var(--fs-base); color: var(--text-sub); line-height: 1.75;
}
#tg-351-wrapper .tg-351-steps li::before {
    content: counter(tg351step); min-width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--amb-500), var(--amb-700));
    color: #fff; font-size: .8rem; font-weight: 900; border-radius: 50%; flex-shrink: 0; margin-top: 2px;
}
#tg-351-wrapper .tg-351-steps li strong { color: var(--sl-800); }
#tg-351-wrapper .tg-351-tip-box {
    display: flex; align-items: flex-start; gap: 12px;
    background: rgba(245,158,11,.06); border: 1px solid rgba(245,158,11,.18);
    border-radius: var(--radius-sm); padding: 16px 18px;
    margin-top: 18px; font-size: var(--fs-base); color: var(--text-sub); line-height: 1.75;
}
#tg-351-wrapper .tg-351-tip-box .material-symbols-outlined { font-size: 1.3rem; color: var(--amb-500); flex-shrink: 0; margin-top: 2px; }

@keyframes tg351FadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ═════════════════════════════════════════
   반응형
═════════════════════════════════════════ */
@media (min-width: 700px) { #tg-351-wrapper .tg-351-demo { flex-direction: row; align-items: flex-start; } }
@media (min-width: 900px) {
    #tg-351-wrapper .tg-351-hero { padding: 80px 56px 90px; }
    #tg-351-wrapper .tg-351-section, #tg-351-wrapper .tg-351-intro { padding: 52px 48px; }
    #tg-351-wrapper .tg-351-list-panel { flex: 1 0 240px; }
    #tg-351-wrapper .tg-351-detail-panel { flex: 1 1 320px; }
}
