/* ====================================================================
   놀이광장 信 — styles.css (v6 손글씨 낙서장 리뉴얼, 2026-05-17)
   - 손글씨 낙서장 카탈로그(01-static) 기법 차용 → 놀이광장에 통합
   - 종이 질감 + 마스킹 테이프 + 살짝 회전된 스크랩 카드
   - 보라 글래스 → 종이+잉크 톤 전면 전환
   - 기능은 v5와 동일 (필터·즐겨찾기·이스터에그)
   ==================================================================== */

/* CSS 변수 — 디자인 토큰 */
:root {
    --paper: oklch(95% 0.012 85);
    --paper-2: oklch(92% 0.018 80);
    --paper-3: oklch(88% 0.025 80);
    --ink: oklch(22% 0.012 60);
    --ink-soft: oklch(38% 0.02 60);
    --red: oklch(56% 0.18 25);
    --red-deep: oklch(48% 0.2 25);
    --blue: oklch(48% 0.13 240);
    --yellow: oklch(92% 0.18 100);
    --note-yellow: oklch(94% 0.08 95);
    --note-pink: oklch(92% 0.06 20);
    --note-blue: oklch(91% 0.05 230);
    --note-green: oklch(91% 0.06 145);
    --tape: oklch(88% 0.08 95 / 0.75);
    --tape-2: oklch(82% 0.1 60 / 0.7);
    --tape-3: oklch(86% 0.08 230 / 0.7);
    --hot-color: var(--red);
    --new-color: oklch(55% 0.16 145);
    --max-width: 1180px;
    --text-primary: var(--ink);
    --text-secondary: var(--ink-soft);
    --primary: var(--red);
    --primary-dark: var(--red-deep);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    font-family: 'Gaegu', 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink);
    background: var(--paper);
    background-image:
        radial-gradient(circle at 20% 10%, oklch(88% 0.03 80 / 0.5), transparent 50%),
        radial-gradient(circle at 80% 90%, oklch(85% 0.04 50 / 0.3), transparent 60%),
        repeating-linear-gradient(0deg, transparent 0 31px, oklch(70% 0.05 240 / 0.13) 31px 32px);
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 18px;
    line-height: 1.55;
}

/* 종이 노이즈 오버레이 */
body::before {
    content: '';
    position: fixed; inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 0.2 0 0 0 0 0.15 0 0 0 0 0.1 0 0 0 0.05 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
    pointer-events: none;
    mix-blend-mode: multiply;
    opacity: 0.45;
    z-index: 1;
}

/* 종이 마진 라인 (왼쪽 빨간 줄) */
body::after {
    content: '';
    position: fixed; left: 88px; top: 0; bottom: 0;
    width: 1.5px;
    background: var(--red);
    opacity: 0.22;
    z-index: 0;
    pointer-events: none;
}

@media (max-width: 1023px) {
    body::after { display: none; }
}

/* ====================================================================
   페이지 코너 컬 (우상단 종이 모서리 접힘)
   ==================================================================== */
.corner-curl {
    position: fixed;
    top: 0; right: 0;
    width: 70px; height: 70px;
    background: linear-gradient(225deg, transparent 50%, oklch(85% 0.03 80) 50%, oklch(90% 0.02 80) 80%);
    box-shadow: -3px 3px 6px oklch(20% 0.02 60 / 0.12);
    z-index: 3;
    pointer-events: none;
}

@media (max-width: 479px) {
    .corner-curl { width: 50px; height: 50px; }
}

/* ====================================================================
   손그림 SVG 두들 (낙서) — 자유 배치
   ==================================================================== */
.doodle {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    opacity: 0.85;
}

.doodle svg { display: block; }

.doodle-1 { top: 78px; right: 4%; transform: rotate(-12deg); }
.doodle-2 { top: 28%; left: 2%; transform: rotate(8deg); }
.doodle-3 { top: 56%; right: 3%; transform: rotate(-4deg); }
.doodle-4 { top: 78%; left: 4%; transform: rotate(6deg); }
.doodle-5 { top: 42%; right: 50%; transform: rotate(-8deg); }

@media (max-width: 1023px) {
    .doodle-1 { top: 64px; right: 6%; }
    .doodle-2, .doodle-3, .doodle-4, .doodle-5 { display: none; }
}

@media (max-width: 479px) {
    .doodle-1 { transform: rotate(-12deg) scale(0.7); top: 56px; right: 4%; }
}

/* 기존 배경 레이어는 폐기 (사진 배경 → 종이 질감) */
.bg-layer { display: none !important; }

/* 信 한자 — 빨간 도장 톤 */
.hanja-shin {
    font-family: 'Zhi Mang Xing', cursive !important;
    font-size: 1.4em !important;
    font-weight: 400 !important;
    display: inline-block;
    margin: 0 0.05em;
    line-height: 1;
    vertical-align: baseline;
    color: var(--red);
    filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.12));
    position: relative;
    top: 0.08em;
    -webkit-text-fill-color: var(--red);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
}

/* ====================================================================
   콘텐츠 컨테이너 — z-index 위로
   ==================================================================== */
.header, .main-content, .footer {
    position: relative;
    z-index: 2;
}

/* ====================================================================
   헤더 — 종이 노트 톱
   ==================================================================== */
.header {
    background: var(--paper-2);
    border-bottom: 2px solid var(--ink);
    box-shadow: 0 4px 0 oklch(20% 0.02 60 / 0.08);
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 1.5rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 메인 백 버튼 — 손글씨 스티커 */
.header-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    background: var(--paper);
    color: var(--ink);
    text-decoration: none;
    border: 2px solid var(--ink);
    border-radius: 20px;
    font-family: 'Gaegu', cursive;
    font-size: 1rem;
    font-weight: 700;
    transform: rotate(-2deg);
    box-shadow: 3px 3px 0 var(--ink);
    transition: transform 0.15s, box-shadow 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.header-back-link:hover {
    transform: rotate(-2deg) translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--ink);
}

.header-back-link i { font-size: 0.95em; }

.back-link-short { display: none; }

.header-title-wrap {
    flex: 1;
    text-align: center;
    transform: rotate(-0.8deg);
}

.site-title-main {
    margin: 0;
    font-family: 'Nanum Pen Script', cursive;
    font-size: 3rem;
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.site-subtitle {
    margin: 0.15rem 0 0;
    font-family: 'Gaegu', cursive;
    font-size: 0.95rem;
    color: var(--ink-soft);
    font-weight: 400;
}

.subtitle-link {
    color: var(--red-deep);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1.5px solid var(--red-deep);
}

.subtitle-link:hover {
    background: oklch(92% 0.18 100 / 0.5);
}

/* ====================================================================
   메인 콘텐츠
   ==================================================================== */
.main-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.5rem 1rem 4rem;
}

/* 인트로 — 손글씨 메모지 */
.intro-section {
    background: var(--note-yellow);
    border: 2px solid var(--ink);
    border-radius: 4px;
    padding: 1.5rem 1.6rem 1.6rem;
    margin: 0.5rem 0 2.5rem;
    box-shadow: 4px 4px 0 var(--ink);
    position: relative;
    transform: rotate(-0.6deg);
}

/* 인트로 메모지에 테이프 */
.intro-section::before {
    content: '';
    position: absolute;
    top: -14px; left: 50%;
    transform: translateX(-50%) rotate(-3deg);
    width: 110px; height: 22px;
    background: var(--tape);
    box-shadow: 0 1px 2px oklch(20% 0.02 60 / 0.15);
    z-index: 1;
}

.intro-text {
    margin: 0;
    font-family: 'Gaegu', cursive;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--ink);
}

.intro-text strong {
    background: oklch(92% 0.18 100 / 0.7);
    padding: 0 4px;
    font-weight: 700;
}

.intro-link {
    color: var(--red-deep);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid var(--red-deep);
}

.intro-link:hover { background: oklch(92% 0.18 100 / 0.6); }

/* ====================================================================
   GNB — 노트 탭
   ==================================================================== */
.gnb-wrapper {
    background: var(--paper-2);
    border: 2px solid var(--ink);
    border-radius: 6px;
    padding: 0.55rem 0.8rem;
    margin-bottom: 2rem;
    box-shadow: 3px 3px 0 var(--ink);
}

.gnb-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.gnb-nav {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.gnb-link {
    padding: 0.4rem 0.85rem;
    background: transparent;
    color: var(--ink);
    text-decoration: none;
    font-family: 'Gaegu', cursive;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 4px;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.gnb-link:hover {
    background: oklch(92% 0.18 100 / 0.55);
    color: var(--red-deep);
}

.gnb-label-short { display: none; }

.gnb-filters {
    display: flex;
    gap: 0.3rem;
    flex-shrink: 0;
}

.filter-btn {
    padding: 0.35rem 0.7rem;
    background: var(--paper);
    border: 1.8px solid var(--ink);
    border-radius: 16px;
    font-family: 'Gaegu', cursive;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    box-shadow: 2px 2px 0 var(--ink);
}

.filter-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--ink);
}

.filter-btn.active {
    background: var(--ink);
    color: var(--paper);
    box-shadow: none;
    transform: translate(2px, 2px);
}

.filter-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

.hot-dot { background: var(--hot-color); }
.new-dot { background: var(--new-color); }

/* ====================================================================
   섹션 헤더 — 손글씨 라벨
   ==================================================================== */
.section-header {
    margin: 1.2rem 0 1.2rem;
    padding-left: 0.4rem;
    display: flex;
    align-items: center;
    gap: 14px;
}

.section-header::after {
    content: '';
    flex: 1;
    height: 1.5px;
    background: repeating-linear-gradient(90deg, var(--ink-soft) 0 6px, transparent 6px 12px);
    opacity: 0.5;
    margin-top: 6px;
}

.section-header h2 {
    margin: 0;
    font-family: 'Nanum Pen Script', cursive;
    font-size: 2.1rem;
    font-weight: 400;
    color: var(--ink);
    display: flex;
    align-items: center;
    line-height: 1;
    flex-shrink: 0;
}

.section-header h2 i {
    color: var(--red);
    font-size: 0.7em;
    margin-right: 0.5rem !important;
}

/* ====================================================================
   서비스 카드 그리드 — 스크랩 페이퍼
   ==================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.1rem 0.9rem;
    margin-bottom: 1.5rem;
    padding: 0.8rem 0.5rem 1.4rem;
}

.service-card {
    position: relative;
    background: var(--paper-2);
    border: 1.5px solid oklch(75% 0.02 60);
    border-radius: 4px;
    padding: 1.5rem 0.7rem 1.1rem;
    text-align: center;
    text-decoration: none;
    color: var(--ink);
    transition: transform 0.22s cubic-bezier(.2,.7,.3,1.4), box-shadow 0.22s;
    box-shadow:
        0 1px 0 oklch(80% 0.03 80),
        0 8px 18px oklch(20% 0.02 60 / 0.14),
        0 3px 6px oklch(20% 0.02 60 / 0.08);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 130px;
    transform: rotate(var(--r, -1deg));
}

/* 카드 변형 — 색지 (script.js의 변수로 분배) */
.service-card.note-yellow { background: var(--note-yellow); }
.service-card.note-pink { background: var(--note-pink); }
.service-card.note-blue { background: var(--note-blue); }
.service-card.note-green { background: var(--note-green); }
.service-card.note-plain { background: var(--paper-2); }

/* 카드 마스킹 테이프 — 위 중앙 */
.service-card::before {
    content: '';
    position: absolute;
    top: -9px; left: 50%;
    transform: translateX(-50%) rotate(-3deg);
    width: 64px; height: 18px;
    background: var(--tape);
    box-shadow: 0 1px 2px oklch(20% 0.02 60 / 0.15);
    z-index: 4;
    pointer-events: none;
}

.service-card.tape-r::before {
    transform: translateX(-50%) rotate(5deg);
    background: var(--tape-2);
}

.service-card.tape-b::before {
    background: var(--tape-3);
}

.service-card.no-tape::before { display: none; }

.service-card:hover {
    transform: rotate(calc(var(--r, -1deg) + 0.6deg)) translateY(-9px);
    box-shadow:
        0 1px 0 oklch(80% 0.03 80),
        0 20px 38px oklch(20% 0.02 60 / 0.26),
        0 10px 18px oklch(20% 0.02 60 / 0.14);
}

/* 카드 stagger drop-in — 종이 노트 책상에 떨어지는 느낌 */
@keyframes card-drop {
    0%   { opacity: 0; transform: rotate(calc(var(--r, -1deg) + 4deg)) translateY(-18px) scale(0.92); }
    60%  { opacity: 1; transform: rotate(calc(var(--r, -1deg) - 1deg)) translateY(2px) scale(1.02); }
    100% { opacity: 1; transform: rotate(var(--r, -1deg)) translateY(0) scale(1); }
}

.service-card {
    animation: card-drop 0.55s cubic-bezier(0.2, 0.85, 0.3, 1.1) both;
    animation-delay: var(--delay, 0s);
}

@media (prefers-reduced-motion: reduce) {
    .service-card { animation: none; }
}

.service-card .service-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--ink);
}

.service-card .service-title {
    font-family: 'Gaegu', cursive;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: pre-line;
    color: var(--ink);
}

/* 카드 배지 — 손글씨 라벨 */
.service-card .badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-family: 'Gamja Flower', cursive;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 12px;
    background: var(--paper);
    border: 1.5px solid var(--ink);
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 3;
    box-shadow: 1.5px 1.5px 0 var(--ink);
}

.service-card .badge.hot {
    background: var(--hot-color);
    color: #fff;
    border-color: var(--red-deep);
}

.service-card .badge.new {
    background: var(--new-color);
    color: #fff;
    border-color: oklch(40% 0.15 145);
}

/* 즐겨찾기 별 — 손그림 톤 */
.service-card .fav-star {
    position: absolute;
    top: 8px;
    left: 8px;
    color: oklch(60% 0.02 60 / 0.45);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 3;
}

.service-card .fav-star:hover { transform: scale(1.15); }

.service-card .fav-star.active {
    color: oklch(78% 0.16 80);
    filter: drop-shadow(0 1px 2px oklch(60% 0.15 80 / 0.5));
}

/* ====================================================================
   트러스트 밴드 — 노트 카드
   ==================================================================== */
.trust-band {
    margin-top: 3rem;
    padding: 2rem 1.8rem;
    background: var(--paper-2);
    border: 2px solid var(--ink);
    border-radius: 6px;
    box-shadow: 4px 4px 0 var(--ink);
    position: relative;
    transform: rotate(-1.1deg);
}

.trust-band::before {
    content: '';
    position: absolute;
    top: -14px; left: 50%;
    transform: translateX(-50%) rotate(2deg);
    width: 130px; height: 24px;
    background: var(--tape-3);
    box-shadow: 0 1px 2px oklch(20% 0.02 60 / 0.15);
    z-index: 1;
}

.trust-band-title {
    font-family: 'Nanum Pen Script', cursive;
    font-size: 2.2rem;
    font-weight: 400;
    text-align: center;
    margin: 0 0 1.1rem;
    color: var(--ink);
    line-height: 1;
}

.trust-band-prose {
    font-family: 'Gaegu', cursive;
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--ink);
    margin: 0.7rem 0;
    text-align: left;
}

.trust-band-prose strong {
    background: oklch(92% 0.18 100 / 0.6);
    padding: 0 4px;
    font-weight: 700;
}

.trust-band-link {
    color: var(--red-deep);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid var(--red-deep);
}

.trust-band-link:hover {
    background: oklch(92% 0.18 100 / 0.6);
}

/* ====================================================================
   푸터 — 어두운 종이 + 손그림 점선 디바이더
   ==================================================================== */
.footer {
    margin-top: 4rem;
    padding: 2.5rem 1rem 2rem;
    background: oklch(28% 0.018 60);
    color: oklch(92% 0.018 80);
    border-top: 3px solid var(--ink);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 0;
    right: 0;
    height: 10px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 10' preserveAspectRatio='none'><path d='M0 5 Q 30 1, 60 5 T 120 5 T 180 5 T 240 5' stroke='%23c44' stroke-width='2' fill='none' stroke-linecap='round'/></svg>");
    background-size: 240px 10px;
    background-repeat: repeat-x;
    background-position: center top;
    pointer-events: none;
    transform: translateY(-50%);
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.footer-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.6rem;
    background: var(--paper);
    color: var(--ink);
    text-decoration: none;
    border-radius: 30px;
    border: 2.5px solid var(--ink);
    font-family: 'Gaegu', cursive;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 4px 4px 0 var(--red);
    transition: all 0.18s ease;
    margin-bottom: 1.5rem;
    transform: rotate(-1.5deg);
}

.footer-cta-button:hover {
    transform: rotate(-1.5deg) translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--red);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

.footer-links a {
    color: oklch(88% 0.015 80);
    text-decoration: none;
    font-family: 'Gaegu', cursive;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.2s ease;
}

.footer-links a:hover { color: var(--paper); }

.footer-copyright {
    font-family: 'Gaegu', cursive;
    font-size: 0.88rem;
    color: oklch(70% 0.015 80);
    line-height: 1.6;
    margin: 0;
}

.footer-copyright .hanja-shin {
    color: oklch(70% 0.16 25);
    -webkit-text-fill-color: oklch(70% 0.16 25);
}

.copyright-link {
    color: oklch(88% 0.015 80);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ====================================================================
   차원 포털 (이스터에그) — 빨간 잉크 풍선
   ==================================================================== */
.dimension-portal {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 60px;
    height: 60px;
    background: var(--paper);
    border: 2.5px solid var(--ink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    cursor: pointer;
    box-shadow: 4px 4px 0 var(--red);
    transition: all 0.2s ease;
    z-index: 999;
    user-select: none;
    transform: rotate(-8deg);
    animation: portal-wiggle 4s ease-in-out infinite;
}

.dimension-portal:hover {
    transform: rotate(-8deg) translate(-2px, -2px) scale(1.05);
    box-shadow: 6px 6px 0 var(--red);
    animation-play-state: paused;
}

@keyframes portal-wiggle {
    0%, 100% { transform: rotate(-8deg); }
    50%      { transform: rotate(4deg); }
}

.dimension-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: oklch(20% 0.02 60 / 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.dimension-modal.active { display: flex; }

.dimension-content {
    background: var(--paper-2);
    border: 2.5px solid var(--ink);
    border-radius: 6px;
    padding: 2.2rem 1.8rem 1.8rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 8px 8px 0 var(--ink);
    transform: rotate(-1deg);
    position: relative;
}

.dimension-content::before {
    content: '';
    position: absolute;
    top: -14px; left: 50%;
    transform: translateX(-50%) rotate(-4deg);
    width: 130px; height: 24px;
    background: var(--tape);
    box-shadow: 0 1px 2px oklch(20% 0.02 60 / 0.15);
    z-index: 1;
}

.dimension-icon {
    font-size: 3rem;
    margin-bottom: 0.4rem;
    display: inline-block;
    animation: portal-wiggle 4s ease-in-out infinite;
}

.dimension-title {
    font-family: 'Nanum Pen Script', cursive;
    font-size: 1.9rem;
    font-weight: 400;
    margin: 0.4rem 0;
    color: var(--ink);
    line-height: 1.05;
}

.dimension-message {
    font-family: 'Gaegu', cursive;
    font-size: 1.1rem;
    color: var(--red-deep);
    font-weight: 700;
    margin: 0.5rem 0;
}

.dimension-submessage {
    font-family: 'Gaegu', cursive;
    font-size: 0.95rem;
    color: var(--ink-soft);
    margin: 0.8rem 0 1.3rem;
    line-height: 1.5;
}

.dimension-buttons {
    display: flex;
    gap: 0.7rem;
    justify-content: center;
    flex-wrap: wrap;
}

.dimension-btn {
    padding: 0.6rem 1.3rem;
    border: 2px solid var(--ink);
    border-radius: 18px;
    font-family: 'Gaegu', cursive;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 3px 3px 0 var(--ink);
}

.dimension-btn.cancel {
    background: var(--paper);
    color: var(--ink);
}

.dimension-btn.cancel:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--ink);
}

.dimension-btn.enter {
    background: var(--red);
    color: var(--paper);
}

.dimension-btn.enter:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--ink);
    background: var(--red-deep);
}

/* ====================================================================
   태블릿 (600~1023px)
   ==================================================================== */
@media (min-width: 600px) {
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1.3rem 1.1rem;
    }

    .header-container { padding: 1.1rem 2rem 1.2rem; }

    .site-title-main { font-size: 3.5rem; }

    .main-content { padding: 2rem 1.5rem 4rem; }
}

/* ====================================================================
   데스크탑 (1024px+)
   ==================================================================== */
@media (min-width: 1024px) {
    body {
        background-color: var(--paper);
    }

    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
        gap: 1.5rem 1.2rem;
    }

    .header-container { padding: 1.2rem 2.5rem 1.4rem; }

    .main-content { padding: 2.5rem 2rem 5rem; }

    .site-title-main { font-size: 4rem; }

    .site-subtitle { font-size: 1.05rem; }

    .gnb-link { font-size: 1.1rem; padding: 0.5rem 1rem; }

    .section-header h2 { font-size: 2.4rem; }

    .service-card .service-icon { font-size: 2.2rem; }

    .service-card .service-title { font-size: 1.05rem; }

    .service-card { min-height: 145px; }
}

/* ====================================================================
   극소 모바일 (320~479px)
   ==================================================================== */
@media (max-width: 479px) {
    body { font-size: 16px; }

    .header-container {
        padding: 0.7rem 1rem 0.8rem;
        gap: 0.6rem;
    }

    .back-link-full { display: none; }
    .back-link-short { display: inline; }

    .gnb-label-full { display: none; }
    .gnb-label-short { display: inline; }

    .site-title-main { font-size: 2.4rem; }
    .site-subtitle { font-size: 0.82rem; }

    .gnb-wrapper { padding: 0.45rem 0.65rem; }

    .gnb-link {
        padding: 0.4rem 0.65rem;
        font-size: 0.95rem;
    }

    .filter-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.82rem;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 0.9rem 0.7rem;
    }

    .service-card { padding: 1.2rem 0.5rem 0.9rem; min-height: 110px; }

    .service-card .service-icon { font-size: 1.7rem; }

    .service-card .service-title { font-size: 0.9rem; }

    .section-header h2 { font-size: 1.7rem; }

    .intro-section { padding: 1.1rem 1.1rem 1.2rem; }
    .intro-text { font-size: 0.95rem; }

    .footer-cta-button {
        font-size: 1rem;
        padding: 0.75rem 1.3rem;
    }

    .footer-links { gap: 1rem; }

    .footer-links a { font-size: 0.9rem; }
}

/* ============================================================
   🌌 무한공간 이스터에그 — 빛의 회오리 (컨셉 유지)
   ============================================================ */
#blackhole-easteregg {
    position: fixed;
    top: 6%;
    left: 5%;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    z-index: 9990;
    cursor: pointer;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(225, 240, 255, 0.85) 18%,
        rgba(180, 225, 245, 0.6) 38%,
        rgba(200, 170, 255, 0.35) 58%,
        rgba(255, 200, 235, 0.18) 78%,
        transparent 100%);
    box-shadow:
        0 0 26px 5px rgba(200, 230, 255, 0.55),
        0 0 60px 16px rgba(170, 200, 255, 0.32),
        0 0 100px 28px rgba(220, 180, 255, 0.18);
    animation:
        blackhole-corner-drift 110s ease-in-out infinite,
        blackhole-fade 24s ease-in-out infinite;
    will-change: top, left, opacity;
}

#blackhole-easteregg::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        rgba(255, 255, 255, 0) 0deg,
        rgba(180, 230, 255, 0.5) 70deg,
        rgba(220, 180, 255, 0.6) 140deg,
        rgba(255, 210, 240, 0.5) 210deg,
        rgba(190, 230, 250, 0.55) 280deg,
        rgba(255, 255, 255, 0) 360deg
    );
    filter: blur(6px);
    animation: blackhole-swirl 16s linear infinite;
    z-index: -1;
    pointer-events: none;
}

#blackhole-easteregg::after {
    content: '';
    position: absolute;
    inset: 38%;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 0.75) 45%,
        transparent 100%);
    box-shadow: 0 0 14px 3px rgba(255, 255, 255, 0.75);
    pointer-events: none;
}

@keyframes blackhole-corner-drift {
    0%,  20% { top: 12%; left: 4%; }
    27%, 47% { top: 13%; left: 92%; }
    54%, 74% { top: 88%; left: 92%; }
    81%, 97% { top: 88%; left: 4%; }
    100%     { top: 12%; left: 4%; }
}

@keyframes blackhole-fade {
    0%, 100% { opacity: 0; pointer-events: none; }
    8%       { opacity: 0.45; pointer-events: auto; }
    16%      { opacity: 0.95; pointer-events: auto; }
    24%      { opacity: 0.55; pointer-events: auto; }
    32%      { opacity: 0;    pointer-events: none; }
    68%      { opacity: 0;    pointer-events: none; }
    76%      { opacity: 0.65; pointer-events: auto; }
    85%      { opacity: 0.85; pointer-events: auto; }
    93%      { opacity: 0.35; pointer-events: auto; }
}

@keyframes blackhole-swirl {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    #blackhole-easteregg {
        top: 6%;
        left: 4%;
        animation: blackhole-fade 24s ease-in-out infinite;
    }
    #blackhole-easteregg::before {
        animation: none;
    }
}

@media (max-width: 768px) {
    @keyframes blackhole-corner-drift {
        0%,  20% { top: 14%; left: 6%; }
        27%, 47% { top: 15%; left: 86%; }
        54%, 74% { top: 84%; left: 86%; }
        81%, 97% { top: 84%; left: 6%; }
        100%     { top: 14%; left: 6%; }
    }
}

/* 무한공간 접속 모달 — 다크 톤 유지 (우주감) */
.infinity-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.infinity-modal-backdrop.active {
    display: flex;
    opacity: 1;
}

.infinity-modal {
    background: radial-gradient(circle at 30% 20%, #1a0530 0%, #0a0118 60%, #000 100%);
    border: 1px solid rgba(180, 100, 220, 0.32);
    border-radius: 18px;
    padding: 44px 36px 36px;
    max-width: 440px;
    width: 90vw;
    text-align: center;
    color: #f4f1ea;
    box-shadow:
        0 0 80px 12px rgba(120, 50, 200, 0.35),
        0 30px 80px rgba(0, 0, 0, 0.85);
    font-family: "Noto Sans KR", "Pretendard", -apple-system, sans-serif;
    transform: scale(0.92) translateY(8px);
    transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.infinity-modal-backdrop.active .infinity-modal {
    transform: scale(1) translateY(0);
}

.infinity-modal-icon {
    font-size: 52px;
    margin-bottom: 18px;
    display: inline-block;
    filter: drop-shadow(0 0 14px rgba(180, 100, 220, 0.65));
    animation: infinity-icon-glow 3s ease-in-out infinite;
}

@keyframes infinity-icon-glow {
    0%, 100% { filter: drop-shadow(0 0 12px rgba(180, 100, 220, 0.55)); }
    50%      { filter: drop-shadow(0 0 22px rgba(220, 150, 255, 0.85)); }
}

.infinity-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
    color: #f4f1ea;
}

.infinity-modal-desc {
    font-size: 0.95rem;
    line-height: 1.75;
    color: #b8b3a8;
    margin-bottom: 30px;
}

.infinity-modal-desc strong {
    color: #d8b8f0;
    font-weight: 600;
}

.infinity-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.infinity-modal-btn {
    padding: 12px 28px;
    border: 1px solid rgba(180, 100, 220, 0.3);
    border-radius: 10px;
    background: transparent;
    color: #f4f1ea;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: -0.01em;
}

.infinity-modal-btn:hover {
    background: rgba(180, 100, 220, 0.15);
    border-color: rgba(180, 100, 220, 0.6);
}

.infinity-modal-btn-primary {
    background: linear-gradient(135deg, #6a1b9a 0%, #8e44ad 100%);
    border-color: transparent;
    font-weight: 600;
}

.infinity-modal-btn-primary:hover {
    background: linear-gradient(135deg, #7b1fa2 0%, #9b59b6 100%);
    box-shadow: 0 0 24px rgba(180, 100, 220, 0.55);
}

@media (max-width: 480px) {
    #blackhole-easteregg {
        width: 52px;
        height: 52px;
    }
    .infinity-modal {
        padding: 36px 24px 28px;
    }
    .infinity-modal-title { font-size: 1.1rem; }
    .infinity-modal-desc { font-size: 0.88rem; }
    .infinity-modal-btn { padding: 10px 22px; font-size: 0.88rem; }
}
