/*
 * tips328/style.css  v1.0.0
 * 텔레그램 프리미엄 스토리 링크 위젯 가이드 전용 스타일
 * 테마: 로얄 블루·코발트·골드 (프리미엄·신뢰·전문성)
 * 그누보드5 완전 격리 | BEM | 모바일 퍼스트
 */

/* ─────────────────────────────────────────
   전체 리셋
───────────────────────────────────────── */
#tg-328-wrapper,
#tg-328-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-328-wrapper h1,
#tg-328-wrapper h2,
#tg-328-wrapper h3 { font-size: inherit; font-weight: inherit; color: inherit; line-height: 1.35; }
#tg-328-wrapper strong { color: inherit; font-weight: 700; }
#tg-328-wrapper p { margin-bottom: 16px !important; line-height: 1.85 !important; }
#tg-328-wrapper p:last-child { margin-bottom: 0 !important; }
#tg-328-wrapper button { cursor: pointer; }
#tg-328-wrapper input, #tg-328-wrapper textarea { font-family: inherit; }
#tg-328-wrapper code {
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: .88em;
    background: rgba(0,0,0,.07);
    padding: 2px 7px;
    border-radius: 5px;
    color: #1d4ed8;
}

/* ─────────────────────────────────────────
   디자인 토큰
───────────────────────────────────────── */
#tg-328-wrapper {
    /* 블루 */
    --blue-300: #93c5fd;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;
    --blue-900: #1e3a8a;
    /* 스카이 */
    --sky-400: #38bdf8;
    --sky-500: #0ea5e9;
    /* 골드·앰버 */
    --gold-300: #fcd34d;
    --gold-400: #fbbf24;
    --gold-500: #f59e0b;
    --gold-600: #d97706;
    /* 슬레이트 */
    --slate-50:  #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    /* 의미론적 */
    --text-main: #1e293b;
    --text-sub:  #475569;
    /* 반경 */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    /* 그림자 */
    --shadow-sm: 0 2px 10px rgba(0,0,0,.08);
    --shadow-md: 0 8px 28px rgba(0,0,0,.13);
    /* 폰트 크기 (rules.md 표준) */
    --fs-xs:   .8rem;
    --fs-sm:   .9rem;
    --fs-base: 1rem;
    --fs-lg:   1.2rem;
    --fs-xl:   1.45rem;

    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%;
}

#tg-328-wrapper .material-symbols-outlined {
    font-size: inherit;
    vertical-align: middle;
    line-height: 1;
}

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

/* ═════════════════════════════════════════
   HERO
═════════════════════════════════════════ */
#tg-328-wrapper .tg-328-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    padding: 56px 32px 64px;
    background: linear-gradient(135deg, #030b1a 0%, #06122d 30%, #0c1f52 60%, #1338a0 100%);
    text-align: center;
    margin-bottom: 32px;
}

#tg-328-wrapper .tg-328-hero__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 45% at 25% 35%, rgba(37,99,235,.28) 0%, transparent 60%),
        radial-gradient(ellipse 45% 40% at 75% 65%, rgba(251,191,36,.15) 0%, transparent 55%),
        radial-gradient(ellipse 35% 30% at 55% 20%, rgba(56,189,248,.14) 0%, transparent 50%);
    pointer-events: none;
}

#tg-328-wrapper .tg-328-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

/* 위젯 플로팅 */
#tg-328-wrapper .tg-328-hero__widgets {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 28px;
}

#tg-328-wrapper .tg-328-widget-float {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    padding: 10px 14px;
    backdrop-filter: blur(8px);
    min-width: 90px;
}

#tg-328-wrapper .tg-328-widget-float .material-symbols-outlined {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

#tg-328-wrapper .tg-328-widget-float__bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,.25);
    width: 100%;
}

#tg-328-wrapper .tg-328-widget-float__bar--sm {
    width: 65%;
    background: rgba(255,255,255,.15);
}

#tg-328-wrapper .tg-328-widget-float--1 {
    color: var(--blue-300);
    animation: tg328Float1 3.5s ease infinite;
}
#tg-328-wrapper .tg-328-widget-float--2 {
    color: var(--gold-300);
    border-color: rgba(251,191,36,.25);
    transform: scale(1.08);
    animation: tg328Float2 3.5s ease infinite;
}
#tg-328-wrapper .tg-328-widget-float--3 {
    color: var(--sky-400);
    animation: tg328Float3 3.5s ease infinite;
}

@keyframes tg328Float1 { 0%, 100% { transform: translateY(0);  opacity: .7; } 50% { transform: translateY(-6px); opacity: 1; } }
@keyframes tg328Float2 { 0%, 100% { transform: scale(1.08) translateY(0);  opacity: 1; box-shadow: 0 0 30px rgba(251,191,36,.2); } 50% { transform: scale(1.08) translateY(-8px); box-shadow: 0 0 50px rgba(251,191,36,.38); } }
@keyframes tg328Float3 { 0%, 100% { transform: translateY(0);  opacity: .7; } 50% { transform: translateY(-4px); opacity: 1; } }

/* 배지 */
#tg-328-wrapper .tg-328-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(245,158,11,.2), rgba(251,191,36,.12));
    border: 1px solid rgba(251,191,36,.4);
    color: var(--gold-300);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .08em;
    padding: 6px 16px;
    border-radius: 999px;
    margin-bottom: 20px;
}

#tg-328-wrapper .tg-328-hero__badge .material-symbols-outlined { font-size: 1rem; }

#tg-328-wrapper .tg-328-hero__title {
    font-size: clamp(1.6rem, 4.5vw, 2.25rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.3;
    letter-spacing: -.02em;
    margin-bottom: 18px;
}

#tg-328-wrapper .tg-328-hero__subtitle {
    font-size: clamp(.93rem, 2.2vw, 1.05rem);
    color: rgba(255,255,255,.68);
    line-height: 1.8;
    margin-bottom: 28px !important;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

#tg-328-wrapper .tg-328-hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

#tg-328-wrapper .tg-328-hero__tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(37,99,235,.18);
    border: 1px solid rgba(37,99,235,.35);
    color: var(--blue-300);
    font-size: .85rem;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: 999px;
    transition: background .2s, transform .2s;
}

#tg-328-wrapper .tg-328-hero__tag:hover {
    background: rgba(37,99,235,.3);
    transform: scale(1.05);
}

#tg-328-wrapper .tg-328-hero__tag .material-symbols-outlined { font-size: 1rem; }

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

/* 도입부 */
#tg-328-wrapper .tg-328-intro {
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 36px 28px;
    text-align: center;
}

#tg-328-wrapper .tg-328-intro__icon {
    font-size: 2.2rem;
    color: var(--blue-600);
    margin-bottom: 14px;
}
#tg-328-wrapper .tg-328-intro__icon .material-symbols-outlined { font-size: 2.2rem; }

#tg-328-wrapper .tg-328-intro__heading {
    font-size: clamp(1.1rem, 2.6vw, 1.3rem);
    font-weight: 800;
    color: var(--slate-800);
    letter-spacing: -.01em;
    margin-bottom: 14px;
    line-height: 1.45;
}

#tg-328-wrapper .tg-328-intro p {
    font-size: var(--fs-base);
    color: var(--text-sub);
    max-width: 660px;
    margin-left: auto;
    margin-right: auto;
}

#tg-328-wrapper .tg-328-intro__premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(245,158,11,.1), rgba(251,191,36,.06));
    border: 1px solid rgba(245,158,11,.3);
    color: var(--gold-600);
    font-size: var(--fs-sm);
    font-weight: 700;
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    margin-top: 16px;
}

#tg-328-wrapper .tg-328-intro__premium-badge .material-symbols-outlined {
    font-size: 1.2rem;
    color: var(--gold-500);
}

/* 공통 섹션 */
#tg-328-wrapper .tg-328-section {
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 40px 32px;
    box-shadow: var(--shadow-sm);
    text-align: left;
}

/* 레이블 */
#tg-328-wrapper .tg-328-section__label {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--slate-100);
    border: 1px solid var(--slate-200);
    color: var(--slate-700);
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: .02em;
    padding: 8px 20px;
    border-radius: 999px;
    margin-bottom: 20px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

#tg-328-wrapper .tg-328-section__label--sim {
    background: rgba(37,99,235,.08);
    border-color: rgba(37,99,235,.25);
    color: var(--blue-700);
}

#tg-328-wrapper .tg-328-section__label--guide {
    background: rgba(14,165,233,.08);
    border-color: rgba(14,165,233,.25);
    color: #0369a1;
}

#tg-328-wrapper .tg-328-section__label--tips {
    background: rgba(245,158,11,.1);
    border-color: rgba(245,158,11,.3);
    color: var(--gold-600);
}

#tg-328-wrapper .tg-328-section__label .material-symbols-outlined { font-size: 1.15rem; }

/* 섹션 제목 */
#tg-328-wrapper .tg-328-section__title {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 900;
    color: var(--slate-800);
    letter-spacing: -.02em;
    line-height: 1.35;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
}

#tg-328-wrapper .tg-328-section__title .material-symbols-outlined {
    font-size: 1.5rem;
    color: var(--blue-600);
}

#tg-328-wrapper .tg-328-section > p {
    font-size: var(--fs-base);
    color: var(--text-sub);
    text-align: center;
    line-height: 1.85;
    margin-bottom: 28px !important;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

/* ═════════════════════════════════════════
   카드
═════════════════════════════════════════ */
#tg-328-wrapper .tg-328-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 10px;
}

#tg-328-wrapper .tg-328-card {
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: box-shadow .3s, transform .3s;
}

#tg-328-wrapper .tg-328-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

#tg-328-wrapper .tg-328-card__icon {
    width: 54px; height: 54px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-800));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.6rem;
}

#tg-328-wrapper .tg-328-card__icon--sky {
    background: linear-gradient(135deg, var(--sky-400), var(--sky-500));
}

#tg-328-wrapper .tg-328-card__icon--gold {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
}

#tg-328-wrapper .tg-328-card__title {
    font-size: var(--fs-lg);
    font-weight: 800;
    color: var(--slate-800);
    letter-spacing: -.015em;
}

#tg-328-wrapper .tg-328-card__desc {
    font-size: var(--fs-base);
    color: var(--text-sub);
    line-height: 1.8;
}

/* ═════════════════════════════════════════
   시뮬레이터
═════════════════════════════════════════ */
#tg-328-wrapper .tg-328-sim {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 10px;
}

/* 스토리 에디터 */
#tg-328-wrapper .tg-328-editor {
    position: relative;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 9/16;
    max-height: 480px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* 에디터 탑바 */
#tg-328-wrapper .tg-328-editor__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(0,0,0,.5);
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 5;
}

#tg-328-wrapper .tg-328-editor__close-icon {
    font-size: 1.4rem;
    color: rgba(255,255,255,.6);
}

#tg-328-wrapper .tg-328-editor__title-text {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: rgba(255,255,255,.8);
}

#tg-328-wrapper .tg-328-editor__next-text {
    font-size: var(--fs-sm);
    font-weight: 800;
    color: var(--blue-400);
}

/* 에디터 미디어 */
#tg-328-wrapper .tg-328-editor__media {
    flex: 1;
    position: relative;
    margin-top: 48px;
    margin-bottom: 60px;
}

#tg-328-wrapper .tg-328-editor__slides {
    position: absolute; inset: 0;
}

/* 슬라이드 */
#tg-328-wrapper .tg-328-story-bg {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity .4s ease;
}

#tg-328-wrapper .tg-328-story-bg.is-active { opacity: 1; }
#tg-328-wrapper .tg-328-story-bg__emoji { font-size: 4rem; line-height: 1; }
#tg-328-wrapper .tg-328-story-bg__label {
    font-size: var(--fs-sm);
    color: rgba(255,255,255,.5);
    font-weight: 600;
}

/* 빈 상태 */
#tg-328-wrapper .tg-328-editor__empty {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 12px;
    font-size: var(--fs-sm);
    color: rgba(255,255,255,.28);
    text-align: center;
    padding: 0 24px;
    line-height: 1.6;
}

#tg-328-wrapper .tg-328-editor__empty .material-symbols-outlined { font-size: 2.2rem; }

/* ── 링크 위젯 (스토리 위에 올라가는 카드) ── */
#tg-328-wrapper .tg-328-link-widget {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 8;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    min-width: 160px;
    max-width: calc(100% - 32px);
    cursor: pointer;
    transition: transform .15s, box-shadow .2s;
    animation: tg328WidgetIn .3s ease;
}

#tg-328-wrapper .tg-328-link-widget:hover {
    transform: translate(-50%, -50%) scale(1.04);
}

/* 라이트 테마 (기본) */
#tg-328-wrapper .tg-328-link-widget--light {
    background: rgba(255,255,255,.92);
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
#tg-328-wrapper .tg-328-link-widget--light .tg-328-link-widget__favicon { color: var(--blue-600); background: rgba(37,99,235,.1); }
#tg-328-wrapper .tg-328-link-widget--light .tg-328-link-widget__name { color: var(--slate-800); }
#tg-328-wrapper .tg-328-link-widget--light .tg-328-link-widget__url { color: var(--slate-500); }
#tg-328-wrapper .tg-328-link-widget--light .tg-328-link-widget__arrow { color: var(--slate-400); }

/* 다크 테마 */
#tg-328-wrapper .tg-328-link-widget--dark {
    background: rgba(15,23,42,.88);
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 4px 20px rgba(0,0,0,.5);
}
#tg-328-wrapper .tg-328-link-widget--dark .tg-328-link-widget__favicon { color: var(--blue-400); background: rgba(37,99,235,.15); }
#tg-328-wrapper .tg-328-link-widget--dark .tg-328-link-widget__name { color: #fff; }
#tg-328-wrapper .tg-328-link-widget--dark .tg-328-link-widget__url { color: rgba(255,255,255,.4); }
#tg-328-wrapper .tg-328-link-widget--dark .tg-328-link-widget__arrow { color: rgba(255,255,255,.3); }

/* 투명(글래스) 테마 */
#tg-328-wrapper .tg-328-link-widget--glass {
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.3);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
#tg-328-wrapper .tg-328-link-widget--glass .tg-328-link-widget__favicon { color: #fff; background: rgba(255,255,255,.15); }
#tg-328-wrapper .tg-328-link-widget--glass .tg-328-link-widget__name { color: #fff; }
#tg-328-wrapper .tg-328-link-widget--glass .tg-328-link-widget__url { color: rgba(255,255,255,.55); }
#tg-328-wrapper .tg-328-link-widget--glass .tg-328-link-widget__arrow { color: rgba(255,255,255,.4); }

/* 골드 프리미엄 테마 */
#tg-328-wrapper .tg-328-link-widget--premium {
    background: linear-gradient(135deg, rgba(30,20,5,.92), rgba(70,40,0,.88));
    border: 1px solid rgba(251,191,36,.5);
    box-shadow: 0 4px 24px rgba(251,191,36,.3);
}
#tg-328-wrapper .tg-328-link-widget--premium .tg-328-link-widget__favicon { color: var(--gold-400); background: rgba(251,191,36,.15); }
#tg-328-wrapper .tg-328-link-widget--premium .tg-328-link-widget__name { color: var(--gold-300); }
#tg-328-wrapper .tg-328-link-widget--premium .tg-328-link-widget__url { color: rgba(251,191,36,.45); }
#tg-328-wrapper .tg-328-link-widget--premium .tg-328-link-widget__arrow { color: rgba(251,191,36,.35); }

#tg-328-wrapper .tg-328-link-widget__favicon {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

#tg-328-wrapper .tg-328-link-widget__content { flex: 1; min-width: 0; }

#tg-328-wrapper .tg-328-link-widget__name {
    font-size: .8rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    margin-bottom: 2px;
}

#tg-328-wrapper .tg-328-link-widget__url {
    font-size: .68rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#tg-328-wrapper .tg-328-link-widget__arrow { font-size: 1.1rem; flex-shrink: 0; }

@keyframes tg328WidgetIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(.8); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* 에디터 툴바 */
#tg-328-wrapper .tg-328-editor__toolbar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(8px);
    z-index: 5;
}

#tg-328-wrapper .tg-328-tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 1.4rem;
    color: rgba(255,255,255,.5);
    transition: color .2s, transform .15s;
}

#tg-328-wrapper .tg-328-tool-btn--active { color: var(--blue-400); transform: scale(1.12); }
#tg-328-wrapper .tg-328-tool-btn__label { font-size: .68rem; font-weight: 700; }
#tg-328-wrapper .tg-328-tool-btn:hover { color: rgba(255,255,255,.8); }

/* ── 빌더 패널 ── */
#tg-328-wrapper .tg-328-builder {
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#tg-328-wrapper .tg-328-builder__section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#tg-328-wrapper .tg-328-builder__label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--slate-700);
    letter-spacing: .03em;
}

#tg-328-wrapper .tg-328-builder__label .material-symbols-outlined { font-size: 1.05rem; color: var(--blue-600); }

/* URL 입력 래퍼 */
#tg-328-wrapper .tg-328-url-input-wrap {
    position: relative;
}

/* 입력 필드 */
#tg-328-wrapper .tg-328-url-input {
    width: 100%;
    padding: 11px 40px 11px 14px;
    border: 1.5px solid var(--slate-300);
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    color: var(--text-main);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}

#tg-328-wrapper .tg-328-url-input:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
    outline: none;
}

#tg-328-wrapper .tg-328-url-input::placeholder { color: var(--slate-400); }

#tg-328-wrapper .tg-328-url-clear {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--slate-400);
    transition: color .15s;
}

#tg-328-wrapper .tg-328-url-clear:hover { color: var(--slate-600); }

/* 위젯 생성 버튼 */
#tg-328-wrapper .tg-328-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-800));
    color: #fff;
    font-size: var(--fs-base);
    font-weight: 800;
    padding: 13px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 14px rgba(37,99,235,.35);
    transition: box-shadow .2s, transform .15s;
}

#tg-328-wrapper .tg-328-add-btn:hover {
    box-shadow: 0 6px 22px rgba(37,99,235,.55);
    transform: translateY(-2px);
}

#tg-328-wrapper .tg-328-add-btn .material-symbols-outlined { font-size: 1.1rem; }

/* 빠른 예시 버튼들 */
#tg-328-wrapper .tg-328-quick-urls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#tg-328-wrapper .tg-328-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff;
    border: 1.5px solid var(--slate-200);
    color: var(--slate-700);
    font-size: var(--fs-xs);
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 999px;
    transition: background .2s, border-color .2s, color .2s;
}

#tg-328-wrapper .tg-328-quick-btn:hover {
    background: rgba(37,99,235,.07);
    border-color: rgba(37,99,235,.3);
    color: var(--blue-700);
}

#tg-328-wrapper .tg-328-quick-btn .material-symbols-outlined { font-size: .95rem; }

/* 테마 버튼들 */
#tg-328-wrapper .tg-328-themes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

#tg-328-wrapper .tg-328-theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    font-weight: 700;
    border: 2px solid transparent;
    transition: border-color .2s, transform .15s;
}

#tg-328-wrapper .tg-328-theme-btn .material-symbols-outlined { font-size: 1rem; }
#tg-328-wrapper .tg-328-theme-btn:hover { transform: scale(1.04); }

#tg-328-wrapper .tg-328-theme-btn--light   { background: rgba(255,255,255,.9); color: var(--slate-700); border-color: var(--slate-300); }
#tg-328-wrapper .tg-328-theme-btn--dark    { background: #1e293b; color: #e2e8f0; border-color: #334155; }
#tg-328-wrapper .tg-328-theme-btn--glass   { background: rgba(255,255,255,.18); color: var(--slate-700); border-color: var(--slate-300); backdrop-filter: blur(4px); }
#tg-328-wrapper .tg-328-theme-btn--premium { background: linear-gradient(135deg, #1a0e03, #2d1a05); color: var(--gold-300); border-color: rgba(251,191,36,.3); }

#tg-328-wrapper .tg-328-theme-btn--active { border-color: var(--blue-500) !important; box-shadow: 0 0 0 3px rgba(37,99,235,.18); }
#tg-328-wrapper .tg-328-theme-btn--premium.tg-328-theme-btn--active { border-color: var(--gold-400) !important; box-shadow: 0 0 0 3px rgba(251,191,36,.22); }

#tg-328-wrapper .tg-328-theme-hint {
    font-size: var(--fs-xs);
    color: var(--slate-400);
    line-height: 1.6;
}

/* 성공 메시지 */
#tg-328-wrapper .tg-328-builder__success {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(37,99,235,.07);
    border: 1px solid rgba(37,99,235,.2);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    animation: tg328FadeIn .3s ease;
}

#tg-328-wrapper .tg-328-builder__success .material-symbols-outlined {
    font-size: 1.6rem;
    color: var(--blue-600);
    flex-shrink: 0;
}

#tg-328-wrapper .tg-328-builder__success-title {
    font-size: var(--fs-sm);
    font-weight: 800;
    color: var(--blue-700);
    margin-bottom: 2px;
}

#tg-328-wrapper .tg-328-builder__success-desc {
    font-size: var(--fs-xs);
    color: var(--slate-500);
}

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

/* ═════════════════════════════════════════
   탭
═════════════════════════════════════════ */
#tg-328-wrapper .tg-328-tab-group {
    display: flex; gap: 6px;
    background: var(--slate-100);
    border-radius: var(--radius-sm);
    padding: 5px;
    margin-bottom: 22px;
}

#tg-328-wrapper .tg-328-tab-btn {
    flex: 1;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 11px 10px;
    border-radius: 7px;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--slate-500);
    transition: background .2s, color .2s, box-shadow .2s;
}

#tg-328-wrapper .tg-328-tab-btn .material-symbols-outlined { font-size: 1.1rem; }

#tg-328-wrapper .tg-328-tab-btn--active {
    background: #fff;
    color: var(--blue-700);
    box-shadow: 0 2px 10px rgba(0,0,0,.09);
    font-weight: 700;
}

#tg-328-wrapper .tg-328-tab-panel { display: none; animation: tg328FadeIn .3s ease; }
#tg-328-wrapper .tg-328-tab-panel--active { display: block; }

#tg-328-wrapper .tg-328-tab-panel__header {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 20px; padding-bottom: 16px;
    border-bottom: 1px solid var(--slate-100);
}

#tg-328-wrapper .tg-328-tab-panel__icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; color: #fff; flex-shrink: 0;
}

#tg-328-wrapper .tg-328-tab-panel__icon--ios     { background: linear-gradient(135deg, #888, #222); }
#tg-328-wrapper .tg-328-tab-panel__icon--android { background: linear-gradient(135deg, #3ddc84, #00ac47); }
#tg-328-wrapper .tg-328-tab-panel__icon--pc      { background: linear-gradient(135deg, var(--slate-700), var(--slate-900)); }

#tg-328-wrapper .tg-328-tab-panel__title {
    font-size: var(--fs-lg); font-weight: 800;
    color: var(--slate-800); letter-spacing: -.015em; margin-bottom: 4px;
}

#tg-328-wrapper .tg-328-tab-panel__sub {
    font-size: var(--fs-sm); color: var(--slate-400); margin-bottom: 0 !important;
}

/* 단계 리스트 */
#tg-328-wrapper .tg-328-steps {
    display: flex; flex-direction: column; gap: 14px;
    counter-reset: tg328step;
}

#tg-328-wrapper .tg-328-steps li {
    counter-increment: tg328step;
    display: flex; align-items: flex-start; gap: 14px;
    font-size: var(--fs-base); color: var(--text-sub); line-height: 1.75;
}

#tg-328-wrapper .tg-328-steps li::before {
    content: counter(tg328step);
    display: flex; align-items: center; justify-content: center;
    min-width: 30px; height: 30px;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-800));
    color: #fff; font-size: .82rem; font-weight: 900;
    border-radius: 50%; flex-shrink: 0; margin-top: 2px;
}

/* 팁 박스 */
#tg-328-wrapper .tg-328-tip-box {
    display: flex; align-items: flex-start; gap: 12px;
    background: rgba(37,99,235,.05);
    border: 1px solid rgba(37,99,235,.18);
    border-radius: var(--radius-sm);
    padding: 18px 20px; margin-top: 20px;
    font-size: var(--fs-base); color: var(--text-sub); line-height: 1.75;
}

#tg-328-wrapper .tg-328-tip-box .material-symbols-outlined {
    font-size: 1.4rem; color: var(--blue-600);
    flex-shrink: 0; margin-top: 2px;
}

/* ═════════════════════════════════════════
   아코디언
═════════════════════════════════════════ */
#tg-328-wrapper .tg-328-accordion { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }

#tg-328-wrapper .tg-328-accordion__item {
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm); overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}

#tg-328-wrapper .tg-328-accordion__item.is-open {
    border-color: var(--blue-400);
    box-shadow: 0 2px 16px rgba(37,99,235,.12);
}

#tg-328-wrapper .tg-328-accordion__header {
    display: flex; align-items: center; gap: 14px;
    width: 100%; padding: 20px; text-align: left;
    background: var(--slate-50); transition: background .2s;
}

#tg-328-wrapper .tg-328-accordion__header:hover { background: var(--slate-100); }

#tg-328-wrapper .tg-328-accordion__icon {
    width: 42px; height: 42px; min-width: 42px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-800));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; color: #fff;
}

#tg-328-wrapper .tg-328-accordion__title {
    flex: 1; font-size: var(--fs-base); font-weight: 700;
    color: var(--slate-800); line-height: 1.45;
}

#tg-328-wrapper .tg-328-accordion__arrow {
    font-size: 1.5rem; color: var(--slate-400);
    transition: transform .3s; flex-shrink: 0;
}

#tg-328-wrapper .tg-328-accordion__item.is-open .tg-328-accordion__arrow { transform: rotate(180deg); }

#tg-328-wrapper .tg-328-accordion__body {
    max-height: 0; overflow: hidden;
    transition: max-height .38s ease, padding .38s ease;
    padding: 0 20px; background: #fff;
}

#tg-328-wrapper .tg-328-accordion__item.is-open .tg-328-accordion__body {
    max-height: 320px; padding: 18px 20px;
}

#tg-328-wrapper .tg-328-accordion__body p {
    font-size: var(--fs-base); color: var(--text-sub);
    line-height: 1.85; margin-bottom: 0 !important;
}

/* ═════════════════════════════════════════
   결론 요약
═════════════════════════════════════════ */
#tg-328-wrapper .tg-328-summary {
    background: linear-gradient(135deg, #030b1a 0%, #06122d 30%, #0c1f52 60%, #1338a0 100%);
    border-radius: var(--radius-md);
    padding: 48px 36px; color: #fff;
}

#tg-328-wrapper .tg-328-summary__title {
    font-size: clamp(1.25rem, 3.5vw, 1.6rem);
    font-weight: 900; color: #fff; letter-spacing: -.02em;
    display: flex; align-items: center; justify-content: center;
    text-align: center; gap: 10px; margin-bottom: 16px;
}

#tg-328-wrapper .tg-328-summary__title .material-symbols-outlined {
    font-size: 1.6rem; color: var(--gold-400);
}

#tg-328-wrapper .tg-328-summary__desc {
    font-size: var(--fs-base); color: rgba(255,255,255,.7);
    text-align: center; line-height: 1.85;
    margin-bottom: 28px !important;
    max-width: 520px; margin-left: auto; margin-right: auto;
}

#tg-328-wrapper .tg-328-summary__checklist {
    display: flex; flex-direction: column; gap: 14px;
    margin-bottom: 36px;
    max-width: 480px; margin-left: auto; margin-right: auto;
}

#tg-328-wrapper .tg-328-summary__checklist li {
    display: flex; align-items: flex-start;
    justify-content: center; gap: 12px;
    font-size: var(--fs-base); color: rgba(255,255,255,.82); line-height: 1.7;
}

#tg-328-wrapper .tg-328-summary__checklist li .material-symbols-outlined {
    font-size: 1.1rem; color: var(--blue-400);
    margin-top: 3px; flex-shrink: 0;
}

#tg-328-wrapper .tg-328-summary__checklist li strong { color: #fff; }

#tg-328-wrapper .tg-328-footer {
    border-top: 1px solid rgba(255,255,255,.12);
    padding-top: 28px; text-align: center;
}

#tg-328-wrapper .tg-328-footer__btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    color: #fff; font-size: var(--fs-base); font-weight: 800;
    padding: 15px 32px; border-radius: 999px;
    box-shadow: 0 4px 24px rgba(245,158,11,.4);
    transition: box-shadow .28s, transform .22s;
    letter-spacing: -.01em;
}

#tg-328-wrapper .tg-328-footer__btn:hover {
    box-shadow: 0 8px 32px rgba(245,158,11,.6);
    transform: translateY(-3px);
}

#tg-328-wrapper .tg-328-footer__btn .material-symbols-outlined { font-size: 1.1rem; }

/* ═════════════════════════════════════════
   반응형
═════════════════════════════════════════ */
@media (min-width: 640px) {
    #tg-328-wrapper .tg-328-hero { padding: 72px 56px 80px; }
    #tg-328-wrapper .tg-328-cards { grid-template-columns: repeat(3, 1fr); }

    #tg-328-wrapper .tg-328-sim {
        flex-direction: row;
        align-items: flex-start;
    }

    #tg-328-wrapper .tg-328-editor {
        flex: 0 0 200px;
        max-height: 480px;
    }

    #tg-328-wrapper .tg-328-builder {
        flex: 1;
        min-height: 480px;
    }
}

@media (min-width: 900px) {
    #tg-328-wrapper .tg-328-section { padding: 48px 44px; }
    #tg-328-wrapper .tg-328-editor { flex: 0 0 240px; }
    #tg-328-wrapper .tg-328-summary { padding: 60px 56px; }
}
