        * {
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        /* [NEW] 전역 터치/선택 방지 유틸리티 */
        .no-system-touch {
            -webkit-touch-callout: none !important;
            -webkit-user-select: none !important;
            user-select: none !important;
            touch-action: manipulation !important;
        }

        img {
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            -khtml-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            -webkit-user-drag: none;
        }

        body {
            font-family: 'Pretendard', 'Inter', sans-serif;
            background-color: #f1f5f9;
            overflow-x: hidden;
            -webkit-tap-highlight-color: transparent;
            touch-action: pan-y;
            /* 세로 스크롤만 허용 */
            -webkit-text-size-adjust: 100%;
            /* iOS 텍스트 자동 확대 방지 */
        }

        /* login.html 전용 스타일 */
        .btn-primary {
            background-color: #3b82f6;
            color: white;
            transition: all 0.2s;
        }

        .btn-primary:active {
            transform: scale(0.98);
            background-color: #2563eb;
        }

        .btn-outline {
            background-color: white;
            border: 1px solid #e2e8f0;
            color: #64748b;
            transition: all 0.2s;
        }

        .btn-outline:active {
            transform: scale(0.98);
            background-color: #f8fafc;
        }

        .btn-google {
            background-color: #ffffff;
            border: 1px solid #e2e8f0;
        }

        .btn-apple {
            background-color: #000000;
            color: white;
        }

        .btn-kakao {
            background-color: #FEE500;
            color: #3C1E1E;
        }

        .btn-naver {
            background-color: #03C75A;
            color: white;
        }

        /* my.html 전용 스타일 적용 */
        .card {
            background: white;
            border-radius: 20px;
            padding: 10px;
            box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
            border: 1px solid #f1f5f9;
        }

        @keyframes flame-pulse {
            0% {
                transform: scale(1);
                filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.3));
            }

            50% {
                transform: scale(1.05);
                filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.5));
            }

            100% {
                transform: scale(1);
                filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.3));
            }
        }

        .animate-flame {
            animation: flame-pulse 2s infinite ease-in-out;
        }

        .streak-gradient {
            background: linear-gradient(135deg, #ff9d00 0%, #ff5e00 100%);
        }

        .timeline-container {
            position: relative;
        }

        .timeline-line {
            position: absolute;
            left: 17px;
            top: 10px;
            bottom: 0;
            width: 2px;
            background: linear-gradient(to bottom, #3b82f6 0%, #e2e8f0 30%, #f1f5f9 100%);
        }

        .day-circle {
            width: 34px;
            height: 34px;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            font-weight: 700;
            font-size: 12px;
            color: #ffffff;
            border: 1px dashed #3b82f6;
            /* 파란색 얇은 점선 */
            background-color: transparent;
            transition: all 0.2s ease;
        }

        .day-active {
            background-color: #ffffff;
            color: #ff5e00;
        }

        #history-view {
            background-color: #f8fafc;
        }

        .stat-badge {
            background-color: #f8fafc;
            border: 1px solid #f1f5f9;
            padding: 4px 8px;
            border-radius: 10px;
        }

        /* [NEW] Toggle Switch Style */
        .switch {
            position: relative;
            display: inline-block;
            width: 44px;
            height: 24px;
        }

        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #e2e8f0;
            transition: .4s;
            border-radius: 24px;
        }

        .slider:before {
            position: absolute;
            content: "";
            height: 18px;
            width: 18px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        input:checked+.slider {
            background-color: #3b82f6;
        }

        input:checked+.slider:before {
            transform: translateX(20px);
        }

        /* Syntax Highlighting Tags (Exactly match BFT4_admin.html) */
        .token {
            display: inline;
            margin-right: 5px;
            padding-bottom: 4px;
            transition: all 0.2s;
            position: relative;
        }

        .punctuation-token {
            display: inline;
            margin-right: 3px;
        }

        /* Word spacing controlled by regular space character + min margin */
        #detail-content .token {
            margin-right: 0px;
        }

        #detail-content .punctuation-token {
            margin-right: 0px;
        }

        /* Reduce font boldness for Article Detail Modal */
        #detail-content {
            font-weight: 700 !important;
            /* font-bold */
        }

        #detail-content .token {
            margin-right: 0px;
            font-weight: 500 !important;
        }


        .yellow-bg {
            background-color: #fef9c3;
        }

        /* [NEW] Monochrome Mode for Detail Popup */
        #detail-content.monochrome-mode .token {
            color: #1e293b !important;
            border-bottom-color: transparent !important;
        }

        /* [NEW] Colorful Palette Icon */
        .palette-btn {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .palette-btn svg {
            transition: transform 0.3s ease;
        }

        .palette-btn:hover svg {
            transform: rotate(15deg) scale(1.1);
        }

        .border-navy {
            background-color: #fef9c3;
        }

        /* Basic (MIX) Mode: S+V only */
        .role-s {
            color: #3b82f6;
            font-weight: 900;
        }

        /* Subject - Blue */
        .role-p-main {
            color: #ef4444;
            /* Main Verb Phrase - Red */
            font-weight: 900;
        }

        /* Advanced Mode: 5-color system (Temporarily disabled) */
        .advanced-mode .role-s {
            color: #3b82f6;
            font-weight: 900;
        }

        .advanced-mode .role-p-main {
            color: #ef4444;
            font-weight: 900;
        }

        .advanced-mode .role-p-sub {
            color: #f97316;
            font-weight: 900;
        }

        /* Sub Verb - Yellow/Amber */
        .advanced-mode .role-o {
            color: #3b82f6;
            font-weight: 900;
        }

        /* Modifier - Black/Default */
        .advanced-mode .role-m {
            color: #1e293b;
            font-weight: 900;
        }

        .advanced-mode .role-link {
            color: #1e293b;
            font-weight: 900;
        }

        .chunk-inline {
            display: inline;
            padding: 2px 0px;
            border-radius: 12px;
            transition: all 0.3s ease;
        }

        @keyframes highlight-draw {
            from {
                background-size: 0% 70%;
            }

            to {
                background-size: 100% 70%;
            }
        }

        .active-chunk-inline {
            /* 하단 70% 면적을 채우는 형광펜 효과 - 멀티라인에서 순차적으로 그려지도록 slice 방식 사용 */
            background-image: linear-gradient(rgba(254, 249, 195, 0.9), rgba(254, 249, 195, 0.9));
            background-repeat: no-repeat;
            background-size: 0% 70%;
            background-position: 0 100%;
            animation: highlight-draw 1s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;

            /* 줄바꿈을 따라 순차적으로 그려지도록 slice 설정 */
            -webkit-box-decoration-break: slice;
            box-decoration-break: slice;
            display: inline;
            padding: 2px 10px 2px 0;
        }


        .sentence-container {
            margin-bottom: 2.0rem;
            line-height: 2.0;
            padding: 0 4px;
            scroll-margin-top: 120px;
        }

        .past-sentence {
            opacity: 0.3;
            filter: blur(0.4px);
        }

        .floating-nav {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            align-items: center;
            gap: 12px;
            z-index: 100;
            width: 92%;
            max-width: 440px;
        }

        .nav-btn {
            width: 84px;
            height: 84px;
            border-radius: 28px;
            background: transparent;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            transition: transform 0.1s;
            transform: translateY(15px);
        }

        .nav-btn:active {
            transform: translateY(15px) scale(0.9);
        }

        .hint-btn {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            user-select: none;
        }

        /* Category Tab Style */
        .category-tab {
            padding: 10px 20px;
            background: #f1f5f9;
            color: #64748b;
            border-radius: 16px;
            font-size: 13px;
            font-weight: 800;
            white-space: nowrap;
            cursor: pointer;
            transition: all 0.2s;
        }

        .category-tab.active {
            background: #0f172a;
            color: white;
        }

        /* Passage Card Style */
        .passage-card {
            background: white;
            padding: 24px;
            border-radius: 16px;
            border: 1px solid #e2e8f0;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }

        .passage-card:active {
            transform: scale(0.97);
        }

        .passage-card:hover {
            border-color: #3b82f6;
            box-shadow: 0 10px 30px -10px rgba(59, 130, 246, 0.1);
        }

        /* Icon Button inside card */
        .card-icon-btn {
            width: 48px;
            height: 48px;
            border-radius: 18px;
            background: #f8fafc;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
            position: relative;
            z-index: 1;
            transition: all 0.2s;
            border: 1px solid #f1f5f9;
        }

        .passage-card:hover .card-icon-btn {
            background: #e3e3e2;
            color: white;
            transform: rotate(12deg) scale(1.1);
            border-color: #e3e3e2;
        }

        .quiz-chip {
            padding: 10px 18px;
            background: white;
            border: 2px solid #e2e8f0;
            border-radius: 16px;
            font-weight: 700;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.2s;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        }

        .quiz-chip.used {
            opacity: 0;
            pointer-events: none;
            transform: scale(0.8);
        }

        .persona-card {
            position: relative;
            padding: 20px 16px;
            border-radius: 24px;
            border: 2px solid #e2e8f0;
            background: white;
            text-align: center;
            transition: all 0.2s;
            cursor: pointer;
        }

        .persona-card.selected {
            border-color: #3b82f6;
            background: #eff6ff;
            transform: translateY(-4px);
            box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.1);
        }

        .play-test-btn {
            position: absolute;
            top: 10px;
            right: 10px;
            width: 32px;
            height: 32px;
            background: #f1f5f9;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #64748b;
            font-size: 0.8rem;
            transition: all 0.2s;
        }

        .selected .play-test-btn {
            background: #ef4444;
            color: white;
        }

        .option-btn {
            width: 100%;
            padding: 20px;
            margin-bottom: 12px;
            background: #ffffff;
            border: 2px solid #e2e8f0;
            border-radius: 12px;
            text-align: left;
            font-weight: 700;
            transition: all 0.2s;
        }

        .option-btn:active {
            background: #f1f5f9;
            transform: scale(0.98);
        }

        .option-btn.correct {
            background: #dcfce7;
            border-color: #22c55e;
            color: #166534;
        }

        .option-btn.wrong {
            background: #fee2e2;
            border-color: #ef4444;
            color: #991b1b;
        }

        .no-scrollbar::-webkit-scrollbar {
            display: none;
        }

        .timeline-item::before {
            content: '';
            position: absolute;
            left: -19px;
            top: 0;
            bottom: -32px;
            width: 2px;
            background: #e2e8f0;
        }

        .timeline-item:last-child::before {
            display: none;
        }

        .timeline-dot {
            position: absolute;
            left: -25px;
            top: 4px;
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background: #3b82f6;
            border: 3px solid white;
            box-shadow: 0 0 0 4px #eff6ff;
        }

        .badge-locked {
            filter: grayscale(1);
            opacity: 0.3;
        }

        .badge-card {
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            cursor: pointer;
        }

        .badge-card:active {
            transform: scale(0.9);
        }

        .role-legend {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            padding: 12px 16px;
            background: #f1f5f9;
            border-radius: 18px;
            margin-top: 20px;
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 10px;
            font-weight: 800;
            color: #64748b;
            text-transform: uppercase;
        }

        .dot {
            width: 8px;
            height: 8px;
            border-radius: 2px;
        }

        .note-card {
            background: #ffffff;
            padding: 24px;
            border-radius: 28px;
            border: 1px solid #e2e8f0;
            transition: all 0.2s ease;
            position: relative;
            cursor: pointer;
        }

        .note-card:active {
            transform: scale(0.98);
            background: #f8fafc;
        }

        .note-card.highlight {
            background: #eff6ff;
            border-color: #dbeafe;
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .animate-fade-in {
            animation: fadeInUp 0.4s ease forwards;
        }

        @keyframes pulse-new {

            0%,
            100% {
                transform: scale(1);
                box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
            }

            50% {
                transform: scale(1.05);
                box-shadow: 0 0 0 7px rgba(239, 68, 68, 0);
            }
        }

        .animate-pulse-new {
            animation: pulse-new 1.5s infinite;
        }

        @keyframes flow-chunks {
            from {
                transform: translateY(10px) scale(0.95);
                opacity: 0;
            }

            to {
                transform: translateY(0) scale(1);
                opacity: 1;
            }
        }

        .is-assembling .ko-chunk-item {
            /* [MODIFIED] Use a smoother, slower, and more dynamic animation */
            animation: flow-chunks 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
            opacity: 0;
            /* Start as invisible before animation begins */
        }

        @keyframes pop-in {
            0% {
                opacity: 0;
                transform: scale(0.8) translateY(10px);
            }

            100% {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        .animate-pop-in {
            animation: pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
        }

        /* [NEW] Floating animation for Assemble button */
        @keyframes pulse-float {

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

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

        .animate-pulse-float {
            animation: pulse-float 2.5s ease-in-out infinite;
        }

        @keyframes complete-pop {
            0% {
                opacity: 0;
                transform: scale(0.5);
                filter: blur(10px);
            }

            70% {
                opacity: 1;
                transform: scale(1.1);
                filter: blur(0);
            }

            100% {
                opacity: 1;
                transform: scale(1);
            }
        }

        .animate-complete-pop {
            animation: complete-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
        }

        /* [MODIFIED] Progress Bar Segments */
        .progress-segment {
            flex: 1;
            height: 6px;
            background-color: #e2e8f0;
            /* slate-200 */
            border-radius: 99px;
            transition: background-color 0.5s ease;
        }

        .progress-segment.completed {
            background-color: #3b82f6;
            /* blue-500 */
        }

        .progress-segment.current {
            background-color: #93c5fd;
            /* blue-300 */
        }

        /* [NEW] Article Completion UI */
        .completion-overlay {
            position: absolute;
            top: 10px;
            right: 10px;
            pointer-events: none;
            z-index: 5;
        }

        .completion-check {
            background: #22c55e;
            color: white;
            width: 32px;
            height: 32px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
        }

        /* [NEW] Floating Guide Button */
        .floating-guide-btn {
            position: fixed;
            bottom: 110px;
            left: calc(50% + 224px - 20px);
            transform: translateX(-100%);
            z-index: 9991;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 14px 12px 10px 12px;
            background: white;
            border-radius: 24px;
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
            border: 1px solid #f1f5f9;
            gap: 6px;
            transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            cursor: pointer;
            color: #1e293b;
            min-width: 56px;
        }

        @media (max-width: 448px) {
            .floating-guide-btn {
                left: auto;
                right: 20px;
                transform: none;
            }
        }

        .floating-guide-btn:active {
            transform: translateX(-100%) scale(0.95);
        }

        @media (max-width: 448px) {
            .floating-guide-btn:active {
                transform: scale(0.95);
            }
        }

        .guide-icon-box {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .guide-label {
            font-size: 12px;
            font-weight: 900;
            color: inherit;
            text-transform: uppercase;
            letter-spacing: 0.02em;
            line-height: 1;
        }

        /* [NEW] Integrated Odometer (Single Unit Feel) */
        .odometer-digit {
            display: inline-block;
            height: 1.2em;
            line-height: 1.2em;
            overflow: hidden;
            vertical-align: top;
            width: 0.62em;
            /* Tight spacing to feel like a single combined string */
            text-align: center;
        }

        .odometer-strip {
            display: flex;
            flex-direction: column;
            transition: transform 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .odometer-strip span {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 1.2em;
            text-align: center;
        }

        /* [NEW] Stabilize number transitions */
        #avg-wpm,
        #result-wpm,
        #total-passages,
        #total-studies,
        #total-notes {
            font-variant-numeric: tabular-nums;
            display: inline-block;
            min-width: 1ch;
            text-align: right;
        }

        /* [NEW] PWA Guide Styles (Full from pwa-guide.html) */
        :root {
            --2xr-primary: #005aff;
            --2xr-secondary: #00d1ff;
            --2xr-accent: #ff3b30;
            --bg: #ffffff;
            --card-bg: rgba(255, 255, 255, 0.9);
            --card-border: rgba(255, 255, 255, 0.5);
            --glass-blur: 24px;
            --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            --radius-btn: 14px;
            --radius-card: 24px;
        }

        .brand-gradient {
            background: linear-gradient(135deg, var(--2xr-primary), var(--2xr-secondary));
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .glass-card {
            background: var(--card-bg);
            backdrop-filter: blur(var(--glass-blur));
            -webkit-backdrop-filter: blur(var(--glass-blur));
            border: 1px solid var(--card-border);
            border-radius: var(--radius-card);
            box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.05);
            transition: var(--transition);
            opacity: 0.6;
            transform: scale(0.98);
        }

        .glass-card.active-step {
            opacity: 1;
            transform: scale(1);
            box-shadow: 0 20px 40px -10px rgba(0, 90, 255, 0.15);
            border-color: rgba(0, 90, 255, 0.2);
            background: white;
        }

        .step-num {
            width: 28px;
            height: 28px;
            background: #f1f5f9;
            color: #94a3b8;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            font-weight: 800;
            flex-shrink: 0;
            transition: var(--transition);
        }

        .active-step .step-num {
            background: var(--2xr-primary);
            color: white;
            box-shadow: 0 4px 12px rgba(0, 90, 255, 0.3);
        }

        @keyframes slideUp {
            from {
                transform: translateY(20px);
                opacity: 0;
            }

            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        .animate-slide-up {
            animation: slideUp 0.6s ease forwards;
        }

        .inapp-warning {
            display: none;
            position: fixed;
            top: 20px;
            left: 20px;
            right: 20px;
            z-index: 9999999;
            background: rgba(255, 59, 48, 0.95);
            color: white;
            padding: 16px;
            border-radius: 12px;
            box-shadow: 0 20px 40px rgba(255, 59, 48, 0.2);
            backdrop-filter: blur(10px);
            font-weight: 600;
            text-align: center;
        }

        .pulse {
            animation: pulse-animation 2s infinite;
        }

        @keyframes pulse-animation {
            0% {
                transform: scale(1);
                opacity: 1;
            }

            50% {
                transform: scale(1.1);
                opacity: 0.7;
            }

            100% {
                transform: scale(1);
                opacity: 1;
            }
        }

        .badge-pwa {
            background: linear-gradient(135deg, #FF9500, #FFCC00);
            color: white;
            padding: 4px 12px;
            border-radius: 8px;
            font-size: 10px;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.1em;
        }

        /* Rating Modal Styles */
        .rating-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            border-radius: 1.5rem;
            border: 2px solid #f1f5f9;
            /* Light gray border */
            background-color: transparent;
            transition: all 0.3s ease;
            position: relative;
        }

        .rating-btn.selected {
            border-color: #409f48;
            /* Green border when selected */
            /*background-color: #f0fdf4;*/
            /* Subtle green background */
        }

        .rating-btn:active {
            transform: scale(0.95);
        }

        .rating-btn .check-mark {
            position: absolute;
            top: 0.5rem;
            right: 0.5rem;
            opacity: 0;
            transform: scale(0.5);
            transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .rating-btn.selected .check-mark {
            opacity: 1;
            transform: scale(1);
        }

        .rating-btn-funny {
            color: #d97706;
        }

        .rating-btn-funny.selected {
            color: #f59e0b;
        }

        .rating-btn-exciting {
            color: #e11d48;
        }

        .rating-btn-exciting.selected {
            color: #f43f5e;
        }

        .rating-btn-boring {
            color: #475569;
        }

        .rating-btn-boring.selected {
            color: #64748b;
        }

        .rating-btn img {
            width: 4.8rem;
            height: 4.8rem;
            object-fit: contain;
            margin-bottom: 0.5rem;
            transition: transform 0.5s ease;
        }

        .rating-btn:hover img {
            transform: scale(1.15) rotate(5deg);
        }

        @keyframes floating {

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

            50% {
                transform: translateY(-10px);
            }
        }

        .animate-floating {
            animation: floating 3s ease-in-out infinite;
        }

        .speed-option-btn {
            transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .speed-option-btn:active {
            transform: scale(0.95);
        }

        .speed-option-btn.selected-speed {
            color: #2563eb;
        }