@charset "utf-8";

/* ============================================
   텔레그램 되돌리기 & 지우개 가이드
   접두사: tg-und- (기존 사이트 오염 방지)
   CSS 변수 접두사: --tgun-
   컬러 톤: 민트 그린(Mint) + 슬레이트(Slate)
============================================ */

:root {
    --tgun-mint: #10b981;
    --tgun-mint-dark: #059669;
    --tgun-mint-deep: #064e3b;
    --tgun-mint-light: #ecfdf5;
    --tgun-mint-border: #6ee7b7;
    --tgun-slate: #475569;
    --tgun-slate-dark: #334155;
    --tgun-slate-900: #0f172a;
    --tgun-slate-700: #334155;
    --tgun-slate-500: #64748b;
    --tgun-slate-300: #cbd5e1;
    --tgun-slate-200: #e2e8f0;
    --tgun-slate-100: #f1f5f9;
    --tgun-coral: #f43f5e;
    --tgun-coral-light: #fff1f2;
    --tgun-coral-border: #fda4af;
    --tgun-bg: #f7fdfb;
    --tgun-white: #ffffff;
    --tgun-radius: 14px;
}

/* ─── 래퍼 ─── */
.tg-und-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    color: var(--tgun-slate-500);
    background-color: var(--tgun-bg);
    box-sizing: border-box;
    line-height: 1.7;
    overflow: hidden;
    padding-bottom: 60px;
}

.tg-und-wrapper *,
.tg-und-wrapper *::before,
.tg-und-wrapper *::after {
    box-sizing: inherit;
    margin: 0;
    padding: 0;
}

.tg-und-wrapper strong {
    font-weight: 700;
    color: var(--tgun-slate-900);
}

.tg-und-wrapper mark {
    background: linear-gradient(120deg, var(--tgun-mint-light) 0%, #a7f3d0 100%);
    color: var(--tgun-mint-deep);
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

/* ─── 히어로 ─── */
.tg-und-hero {
    background: linear-gradient(145deg, #064e3b 0%, #065f46 30%, #059669 60%, #34d399 100%);
    color: var(--tgun-white);
    padding: 60px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tg-und-hero::before {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    border: 60px solid rgba(16, 185, 129, 0.06);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.tg-und-hero::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border: 40px solid rgba(110, 231, 183, 0.04);
    border-radius: 50%;
    bottom: -60px;
    left: -50px;
}

.tg-und-hero__floating {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
}

.tg-und-hero__float-icon {
    position: absolute;
    font-size: 28px;
    opacity: 0.18;
    animation: tg-und-float 6s ease-in-out infinite;
}

.tg-und-hero__float-icon i {
    color: rgba(255, 255, 255, 0.9);
}

.tg-und-hero__float-icon--1 {
    top: 14%;
    left: 8%;
    animation-delay: 0s;
}

.tg-und-hero__float-icon--2 {
    top: 20%;
    right: 12%;
    animation-delay: 1s;
    font-size: 24px;
}

.tg-und-hero__float-icon--3 {
    bottom: 22%;
    left: 15%;
    animation-delay: 2s;
}

.tg-und-hero__float-icon--4 {
    bottom: 16%;
    right: 8%;
    animation-delay: 3s;
    font-size: 22px;
}

.tg-und-hero__float-icon--5 {
    top: 55%;
    left: 4%;
    animation-delay: 4s;
    font-size: 20px;
}

.tg-und-hero__float-icon--6 {
    top: 10%;
    right: 30%;
    animation-delay: 5s;
    font-size: 18px;
}

@keyframes tg-und-float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-12px) rotate(8deg);
    }
}

.tg-und-hero__inner {
    position: relative;
    z-index: 1;
}

.tg-und-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--tgun-mint-border);
    font-size: 14px;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 100px;
    margin-bottom: 22px;
    border: 1px solid rgba(110, 231, 183, 0.2);
    backdrop-filter: blur(4px);
}

.tg-und-hero__badge i {
    font-size: 16px;
}

.tg-und-hero__title {
    font-size: 28px;
    font-weight: 900;
    line-height: 1.35;
    margin-bottom: 18px;
    color: var(--tgun-white);
}

.tg-und-hero__desc {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    max-width: 620px;
    margin: 0 auto;
}

/* ─── 메인 ─── */
.tg-und-main {
    padding: 30px 20px 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* ─── 도입부 ─── */
.tg-und-intro {
    background-color: var(--tgun-white);
    padding: 28px 24px;
    border-radius: var(--tgun-radius);
    border-left: 4px solid var(--tgun-mint);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.tg-und-intro p {
    font-size: 16px;
    margin-bottom: 14px;
}

.tg-und-intro p:last-child {
    margin-bottom: 0;
}

/* ─── 섹션 공통 ─── */
.tg-und-section {
    background-color: var(--tgun-white);
    padding: 34px 24px;
    border-radius: var(--tgun-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--tgun-slate-200);
}

.tg-und-section--accent {
    background: linear-gradient(135deg, var(--tgun-mint-light) 0%, #a7f3d040 100%);
    border-color: var(--tgun-mint-border);
}

.tg-und-section--dark {
    background: linear-gradient(135deg, var(--tgun-slate-900) 0%, #1e293b 100%);
    border-color: var(--tgun-slate-700);
    color: var(--tgun-slate-300);
}

.tg-und-section--demo {
    background: linear-gradient(135deg, #f0fdf4 0%, var(--tgun-mint-light) 50%, #d1fae540 100%);
    border-color: var(--tgun-mint-border);
}

.tg-und-section__head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.tg-und-section__num {
    font-size: 38px;
    font-weight: 900;
    color: var(--tgun-mint);
    opacity: 0.2;
    line-height: 1;
    flex-shrink: 0;
}

.tg-und-section__num--accent {
    opacity: 0.25;
}

.tg-und-section__tip-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--tgun-coral) 0%, #fb7185 100%);
    color: var(--tgun-white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.tg-und-section__title {
    font-size: 20px;
    font-weight: 800;
    color: var(--tgun-slate-900);
    line-height: 1.35;
    padding-top: 6px;
}

.tg-und-section__title--light {
    color: var(--tgun-white);
}

.tg-und-section__desc {
    font-size: 16px;
    margin-bottom: 24px;
}

/* ─── 되돌리기 카드 ─── */
.tg-und-undo-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.tg-und-undo-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    border-radius: 12px;
    background-color: var(--tgun-white);
    border: 1px solid var(--tgun-mint-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tg-und-undo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.1);
}

.tg-und-undo-card__icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--tgun-mint) 0%, var(--tgun-mint-dark) 100%);
    color: var(--tgun-white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.tg-und-undo-card__title {
    font-size: 15px;
    font-weight: 800;
    color: var(--tgun-slate-900);
    margin-bottom: 4px;
}

.tg-und-undo-card__text {
    font-size: 14px;
    line-height: 1.6;
}

/* ─── 비교 카드 ─── */
.tg-und-compare-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

.tg-und-compare-card {
    padding: 22px;
    border-radius: 12px;
    background-color: var(--tgun-white);
    border: 1px solid var(--tgun-slate-200);
    transition: transform 0.3s ease;
}

.tg-und-compare-card:hover {
    transform: translateY(-2px);
}

.tg-und-compare-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.tg-und-compare-card__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.tg-und-compare-card--undo .tg-und-compare-card__icon {
    background: linear-gradient(135deg, var(--tgun-mint) 0%, var(--tgun-mint-dark) 100%);
    color: var(--tgun-white);
}

.tg-und-compare-card--undo {
    border-color: var(--tgun-mint-border);
}

.tg-und-compare-card--eraser .tg-und-compare-card__icon {
    background: linear-gradient(135deg, var(--tgun-slate) 0%, var(--tgun-slate-dark) 100%);
    color: var(--tgun-white);
}

.tg-und-compare-card--eraser {
    border-color: var(--tgun-slate-300);
}

.tg-und-compare-card__title {
    font-size: 16px;
    font-weight: 800;
    color: var(--tgun-slate-900);
    flex: 1;
}

.tg-und-compare-card__badge {
    font-size: 10px;
    font-weight: 800;
    color: var(--tgun-white);
    background: linear-gradient(135deg, var(--tgun-slate) 0%, var(--tgun-slate-dark) 100%);
    padding: 3px 10px;
    border-radius: 100px;
}

.tg-und-compare-card__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tg-und-compare-card__list li {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tg-und-compare-card__list i {
    color: var(--tgun-mint);
    font-size: 12px;
}

/* ─── 지우개 스텝 ─── */
.tg-und-eraser-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tg-und-eraser-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    background-color: var(--tgun-slate-100);
    border: 1px solid var(--tgun-slate-200);
}

.tg-und-eraser-step__num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--tgun-slate) 0%, var(--tgun-slate-dark) 100%);
    color: var(--tgun-white);
    font-weight: 900;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.tg-und-eraser-step__text {
    font-size: 14px;
}

/* ─── 데모 ─── */
.tg-und-demo {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tg-und-demo__canvas-area {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--tgun-mint-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background-color: #f0fdf4;
}

.tg-und-demo__canvas {
    display: block;
    width: 100%;
    height: auto;
    cursor: crosshair;
    touch-action: none;
}

.tg-und-demo__canvas-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 13px;
    color: var(--tgun-slate-300);
    pointer-events: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tg-und-demo__controls {
    background-color: var(--tgun-white);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--tgun-mint-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tg-und-demo__tools {
    display: flex;
    gap: 6px;
}

.tg-und-demo__tool-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--tgun-slate-200);
    border-radius: 8px;
    background-color: var(--tgun-white);
    color: var(--tgun-slate-500);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tg-und-demo__tool-btn:hover {
    border-color: var(--tgun-mint);
    color: var(--tgun-mint);
}

.tg-und-demo__tool-btn--active {
    background: linear-gradient(135deg, var(--tgun-mint) 0%, var(--tgun-mint-dark) 100%);
    color: var(--tgun-white);
    border-color: var(--tgun-mint);
}

/* 색상 */
.tg-und-demo__colors {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.tg-und-demo__color-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid var(--tgun-slate-200);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.tg-und-demo__color-btn:hover {
    transform: scale(1.2);
}

.tg-und-demo__color-btn--active {
    border-color: var(--tgun-slate-900);
    box-shadow: 0 0 0 2px var(--tgun-white), 0 0 0 4px var(--tgun-slate-900);
}

.tg-und-demo__color-btn[data-color="#ef4444"] {
    background-color: #ef4444;
}

.tg-und-demo__color-btn[data-color="#3b82f6"] {
    background-color: #3b82f6;
}

.tg-und-demo__color-btn[data-color="#22c55e"] {
    background-color: #22c55e;
}

.tg-und-demo__color-btn[data-color="#f59e0b"] {
    background-color: #f59e0b;
}

.tg-und-demo__color-btn[data-color="#8b5cf6"] {
    background-color: #8b5cf6;
}

/* 액션 */
.tg-und-demo__actions {
    display: flex;
    gap: 8px;
}

.tg-und-demo__undo-btn {
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, var(--tgun-mint) 0%, var(--tgun-mint-dark) 100%);
    color: var(--tgun-white);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tg-und-demo__undo-btn:hover {
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

.tg-und-demo__undo-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.25);
    font-size: 11px;
    font-weight: 800;
}

.tg-und-demo__clear-btn {
    padding: 12px 16px;
    background-color: var(--tgun-coral-light);
    color: var(--tgun-coral);
    border: 1px solid var(--tgun-coral-border);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tg-und-demo__clear-btn:hover {
    background-color: #ffe4e6;
}

/* 히스토리 시각화 */
.tg-und-demo__history {
    padding: 12px;
    background-color: var(--tgun-slate-100);
    border-radius: 8px;
    border: 1px solid var(--tgun-slate-200);
}

.tg-und-demo__history-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--tgun-slate-500);
    display: block;
    margin-bottom: 8px;
}

.tg-und-demo__history-label i {
    color: var(--tgun-mint);
    margin-right: 4px;
}

.tg-und-demo__history-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.tg-und-demo__history-dot {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    background-color: var(--tgun-mint-light);
    color: var(--tgun-mint-dark);
    border: 1px solid var(--tgun-mint-border);
}

.tg-und-demo__history-dot--base {
    background: linear-gradient(135deg, var(--tgun-mint) 0%, var(--tgun-mint-dark) 100%);
    color: var(--tgun-white);
    border-color: var(--tgun-mint);
}

.tg-und-demo__history-dot--current {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: var(--tgun-white);
    border-color: #f59e0b;
}

/* ─── 팁 ─── */
.tg-und-tips {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.tg-und-tip {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(110, 231, 183, 0.12);
    padding: 22px;
    border-radius: 10px;
    position: relative;
}

.tg-und-tip__number {
    position: absolute;
    top: -10px;
    left: 18px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--tgun-coral) 0%, #fb7185 100%);
    color: var(--tgun-white);
    font-weight: 900;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.tg-und-tip__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--tgun-white);
    margin-bottom: 8px;
    padding-top: 6px;
}

.tg-und-tip__title i {
    color: var(--tgun-mint-border);
    margin-right: 4px;
}

.tg-und-tip__text {
    font-size: 14px;
    color: var(--tgun-slate-300);
}

.tg-und-tip__text strong {
    color: var(--tgun-white);
}

/* ─── 결론 ─── */
.tg-und-summary {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 50%, var(--tgun-mint-dark) 100%);
    color: var(--tgun-white);
    padding: 44px 28px;
    border-radius: var(--tgun-radius);
    text-align: center;
    box-shadow: 0 10px 30px rgba(6, 78, 59, 0.4);
}

.tg-und-summary__title {
    font-size: 24px;
    font-weight: 800;
    color: var(--tgun-white);
    margin-bottom: 20px;
}

.tg-und-summary__body p {
    font-size: 16px;
    margin-bottom: 14px;
    color: var(--tgun-mint-border);
}

.tg-und-summary strong {
    color: var(--tgun-white);
}

.tg-und-summary__highlights {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 24px 0;
}

.tg-und-summary__highlight {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(110, 231, 183, 0.12);
    border-radius: 10px;
}

.tg-und-summary__highlight-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--tgun-coral) 0%, #fb7185 100%);
    color: var(--tgun-white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.tg-und-summary__highlight strong {
    font-size: 13px;
    color: var(--tgun-white);
}

.tg-und-summary__highlight span {
    font-size: 11px;
    color: var(--tgun-mint-border);
    text-align: center;
}

.tg-und-summary__checklist {
    list-style: none;
    display: inline-block;
    text-align: left;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 24px 32px;
    border-radius: 12px;
    margin: 0 0 24px;
}

.tg-und-summary__checklist li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 10px;
    font-size: 15px;
    color: #6ee7b7;
}

.tg-und-summary__checklist li:last-child {
    margin-bottom: 0;
}

.tg-und-summary__checklist li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 13px;
    color: var(--tgun-coral-border);
}

.tg-und-summary__checklist strong {
    color: var(--tgun-white);
}

.tg-und-summary__footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
    color: var(--tgun-mint-border);
    line-height: 1.8;
}

.tg-und-summary__footer strong {
    color: var(--tgun-white);
}

/* ============================================
   반응형
============================================ */
@media (min-width: 768px) {
    .tg-und-hero {
        padding: 80px 40px;
    }

    .tg-und-hero__title {
        font-size: 38px;
    }

    .tg-und-main {
        padding: 40px 36px 0;
        gap: 40px;
    }

    .tg-und-intro {
        padding: 36px 32px;
    }

    .tg-und-section {
        padding: 40px 36px;
    }

    .tg-und-section__title {
        font-size: 24px;
    }

    .tg-und-section__num {
        font-size: 44px;
    }

    .tg-und-undo-cards {
        grid-template-columns: repeat(3, 1fr);
    }

    .tg-und-compare-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .tg-und-tips {
        grid-template-columns: repeat(3, 1fr);
    }

    .tg-und-summary__highlights {
        grid-template-columns: repeat(3, 1fr);
    }

    .tg-und-summary {
        padding: 56px 44px;
    }

    .tg-und-demo__controls {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .tg-und-demo__tools {
        flex: 0 0 auto;
    }

    .tg-und-demo__colors {
        flex: 0 0 auto;
    }

    .tg-und-demo__actions {
        flex: 1;
    }

    .tg-und-demo__history {
        flex: 0 0 100%;
    }
}

@media (min-width: 1024px) {
    .tg-und-hero__title {
        font-size: 44px;
    }

    .tg-und-main {
        gap: 46px;
    }
}

/* ============================================
   스크롤 등장 애니메이션
============================================ */
.tg-und-motion {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.tg-und-motion.is-visible {
    opacity: 1;
    transform: translateY(0);
}