* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
}

.app-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #111;
}

.bg-layer {
    position: absolute;
    inset: -10%;
    opacity: 1;
    transition: opacity 900ms ease;
    background-repeat: no-repeat;
    background-size: 140% 140%;
    background-position: 20% 20%;
    filter: saturate(1.15);
    animation: bgFloat 14s ease-in-out infinite alternate;
    transform: translateZ(0);
}

.bg-layer-b {
    opacity: 0;
}

@keyframes bgFloat {
    0% { background-position: 10% 15%; transform: scale(1.02); }
    50% { background-position: 70% 30%; transform: scale(1.05); }
    100% { background-position: 30% 80%; transform: scale(1.03); }
}

:root {
    /* Float_v2 RN palette */
    --accent: #E63A46;
    --accent-pressed: #D63340;
    --accent-soft: #FFE8EA;
    --accent-soft-bg: #FFF5F5;
    --surface: #FFFFFF;
    --surface-muted: #FAFAFA;
    --border: #E0E0E0;
    --text: #111111;
    --text-muted: #666666;
}

.container {
    display: flex;
    min-height: 100vh;
    position: relative;
    justify-content: flex-end;
    align-items: stretch;
    z-index: 1;
}

/* 좌측 소개 영역 */
.left-hero {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 48px 0 56px;
    min-width: 0;
    position: relative;
    padding-bottom: 44px;
}

.left-hero-inner {
    max-width: 640px;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: none;
}

.left-hero-title {
    margin: 0 0 12px;
    font-size: 48px;
    font-weight: 900;
    letter-spacing: -0.6px;
    line-height: 1.15;
}

.left-hero-desc {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82);
    letter-spacing: -0.2px;
}

.left-hero-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.left-hero-footer a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.left-hero-footer a:hover {
    text-decoration: underline;
}

/* 글자 줄(line)마다 배경 적용 */
.left-hero-hl {
    display: inline;
    background: rgba(0, 0, 0, 1);
    padding: 6px 10px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.typewriter {
    white-space: normal;
}

.typewriter-cursor {
    display: inline-block;
    width: 0.7ch;
    margin-left: 1px;
    animation: blink 900ms steps(1) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .typewriter-cursor { display: none; }
}

/* 타이핑 완료 후 설명문 스무스 등장 */
.has-typewriter .left-hero-desc {
    opacity: 0;
    transform: translateY(8px);
    transition: none;
    will-change: opacity, transform;
}

.has-typewriter.is-animate-desc .left-hero-desc {
    transition: opacity 700ms ease, transform 700ms ease;
}

.has-typewriter .left-hero-desc.is-shown {
    opacity: 1;
    transform: translateY(0);
}

/* 플로팅 앱 컨테이너 */
.app-container {
    display: flex;
    background-color: white;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    height: 100vh;
    position: relative;
    z-index: 10;
}

.content-wrapper {
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.content-section {
    display: none;
    flex: 1;
    overflow-y: auto;
    animation: fadeIn 0.5s ease;
}

.content-section.active {
    display: flex;
    flex-direction: column;
}

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

/* 메모 섹션 스타일 */
.memo-fixed {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.memo-editor {
    flex: 1;
    padding: 14px 16px 12px;
    overflow-y: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.memo-top-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-muted);
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0;
    line-height: 1;
    letter-spacing: -0.2px;
}

.memo-wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0;
    line-height: 1;
    white-space: nowrap;
}

.memo-top-logo {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    vertical-align: middle;
}

.memo-logo {
    width: 60px;
    height: 60px;
    display: block;
    object-fit: contain;
}

.memo-divider {
    height: 1px;
    background: #DADADA;
    margin: 12px 0 12px;
}

.memo-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 10px;
}

.memo-title--download {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.2px;
    margin: 12px 0 8px;
    color: var(--text);
}

.memo-content {
    margin-bottom: 10px;
    text-align: center;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 화면 높이가 작을 때는 가운데정렬 때문에 상단이 잘릴 수 있으므로 위에서부터 시작 */
@media (max-height: 720px) {
    .memo-content {
        justify-content: flex-start;
    }
    .memo-editor {
        padding-top: 10px;
    }
}

.memo-content p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 0px;
}

.memo-content p.memo-lead {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.2px;
    color: #444;
    margin-bottom: 0px;
}

.memo-content p.memo-lead b {
    color: var(--accent)
}

.memo-content p.memo-sub {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0px;
}

.memo-content a {
    color: #1d4ed8;
    text-decoration: underline;
    word-break: break-word;
}

.download-actions {
    margin: 8px 0 10px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    border-radius: 10px;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 120ms ease, opacity 120ms ease, box-shadow 120ms ease;
}

.download-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2.2;
}

a.download-btn--mac {
    background: #111111;
    color: #FFFFFF;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    text-decoration: none;
}

.download-soon {
    margin: 8px 0 0;
    font-size: 11px !important;
    color: #777 !important;
}

.download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.download-btn:active {
    transform: translateY(0);
    opacity: 0.95;
}

.download-note {
    margin: 6px 0 8px;
    color: var(--text-muted);
    font-size: 12px;
}

.memo-content p.highlighted {
    background-color: var(--accent-soft-bg);
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--accent-soft);
    border-left: 3px solid var(--accent);
}

.memo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0;
}

.memo-tags-bar {
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    background-color: var(--surface);
    flex: 0 0 auto;
}

.tag {
    background-color: var(--accent-soft);
    color: var(--accent);
    padding: 4px 8px;
    border-radius: 0;
    font-size: 11px;
    font-weight: 700;
}

.memo-bottom-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 0;
    border-top: 1px solid var(--border);
    background-color: var(--surface-muted);
    flex: 0 0 290px;
    height: 290px;
    min-height: 290px;
    max-height: 290px;
    overflow-y: auto;
}

.section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 5px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    padding: 8px 12px;
    
}

.memo-list-section, .tag-list-section {
    padding-right: 0;
    padding-left: 0;
}

/* 하단(메모/태그) 2개 영역 구분선 */
.memo-list-section {
    border-right: 1px solid var(--border);
}


.memo-list-item {
    padding: 10px 10px;
    border-bottom: 1px solid #e8e8e8;
}

.memo-list-item:last-child {
    border-bottom: none;
}

.memo-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.memo-item-header h4 {
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
}

.memo-time {
    font-size: 11px;
    color: #9a9a9a;
}

.memo-preview {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    line-height: 1.5;
}

.memo-item-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.small-tag {
    background-color: var(--accent-soft);
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 0;
    font-size: 10px;
    font-weight: 700;
}

.tag-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tag-list-rotator {
    display: grid;
}

.tag-list-rotator .tag-list {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 800ms ease, visibility 0s linear 800ms;
}

.tag-list-rotator .tag-list.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.tag-list-rotator .tag-list.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 800ms ease, visibility 0s linear 0s;
}

.tag-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #e8e8e8;
}

.tag-item:last-child {
    border-bottom: none;
}

.tag-name {
    font-size: 13px;
    color: #333;
}

.tag-count {
    font-size: 12px;
    color: #999;
}

/* 다른 섹션 스타일 */
.content-section h1 {
    font-size: 30px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    padding: 32px 28px 0;
}

.content-section .subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    padding: 0 28px;
}

.feature-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 20px;
    padding: 0 28px 32px;
}

.feature-card {
    background-color: #f8f9fa;
    padding: 24px;
    border-radius: 16px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
}

.feature-icon {
    width: 32px;
    height: 32px;
    color: var(--accent);
    margin-bottom: 0;
    flex: 0 0 auto;
}

.feature-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.feature-header h3 {
    margin: 0;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0;
}

.feature-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* 사이드바 스타일 (좌측) */
.sidebar {
    width: 68px;
    background-color: var(--accent);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    height: 100%;
    flex-shrink: 0;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 20px 0 0;
    gap: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* 사이드바 스크롤바 스타일 */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.menu-item {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    width: 100%;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 8px;
    flex-shrink: 0;
    margin-bottom: 0;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-item.active {
    background-color: var(--accent-pressed);
}

.menu-icon {
    width: 36px;
    height: 36px;
    border-radius: 18px;
    background-color: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 6px;
    transition: all 0.3s ease;
}

.menu-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.menu-label {
    color: white;
    font-size: 10px;
    font-weight: 500;
    text-align: center;
    margin-top: 2px;
    padding: 0 2px;
    width: 100%;
}

.menu-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    height: 14px;
    padding: 0 6px;
    border-radius: 999px;
    background-color: var(--accent-pressed);
    border: 1px solid rgba(255, 255, 255, 0.9);
    color: #FFFFFF;
    font-size: 9px;
    font-weight: 700;
    line-height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-footer {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 0 20px;
    background-color: transparent;
}

.add-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--accent-pressed);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.add-button svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

.add-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 오른쪽 콘텐츠 영역 */
.right-section {
    background-color: white;
    padding: 0;
    overflow-y: auto;
    height: 100%;
    flex: 1;
    min-width: 400px;
    scrollbar-gutter: stable;
}

/* 메뉴 전환 애니메이션 중 스크롤바 깜빡임 방지 */
.right-section.is-switching {
    overflow-y: hidden;
}

/* PC 화면 (기본) */
@media (min-width: 1025px) {
    .app-container {
        width: 30%;
        min-width: 500px;
    }
}

/* 태블릿 화면 */
@media (min-width: 768px) and (max-width: 1024px) {
    .app-container {
        width: 30%;
        min-width: 450px;
    }
    
    .memo-editor {
        padding: 14px 16px 12px;
    }
    
    .memo-bottom-section {
        padding: 0;
    }
    
    .content-section h1 {
        font-size: 32px;
        padding: 24px 20px 0;
    }
    
    .content-section .subtitle {
        padding: 0 20px;
    }
    
    .feature-content {
        grid-template-columns: 1fr;
        padding: 0 20px 28px;
    }
}

/* 모바일 화면 */
@media (max-width: 767px) {
    .left-hero {
        display: none;
    }
    .download-btn {
        padding: 12px 16px;
        font-size: 15px;
    }

    .download-soon {
        font-size: 11px;
    }
    .app-container {
        width: 100%;
        flex-direction: row;
    }
    
    .sidebar {
        width: 68px;
        height: 100%;
        flex-direction: column;
        padding: 0;
    }
    
    .sidebar-nav {
        flex-direction: column;
        flex: 1;
        justify-content: flex-start;
        padding: 16px 0 0;
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    .menu-item {
        min-width: auto;
        padding: 10px 0;
    }
    
    .menu-icon {
        width: 36px;
        height: 36px;
    }
    
    .menu-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .menu-label {
        font-size: 10px;
    }
    
    .menu-badge {
        top: 6px;
        right: 6px;
        height: 13px;
        padding: 0 5px;
        font-size: 8px;
    }
    
    .add-button {
        width: 44px;
        height: 44px;
    }
    
    .add-button svg {
        width: 18px;
        height: 18px;
    }
    
    .right-section {
        width: 100%;
        min-width: 0;
    }
    
    .memo-editor {
        padding: 14px 12px 10px;
    }
    
    .memo-bottom-section {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        padding: 0;
        height: 290px;
        min-height: 290px;
        max-height: 290px;
    }

    .memo-list-section {
        padding-right: 12px;
        border-right: 1px solid var(--border);
    }

    .tag-list-section {
        padding-left: 0;
    }

    /* 모바일에서 태그 컬럼(우측) 왼쪽 여백 제거 */
    .tag-list-section .section-title {
        padding-left: 8px;
    }

    .tag-list-section .tag-item {
        padding-left: 8px;
    }
    
    .memo-list-section, .tag-list-section {
        padding-right: 0;
    }
    
    .content-section h1 {
        font-size: 28px;
        padding: 20px 16px 0;
    }
    
    .content-section .subtitle {
        font-size: 16px;
        padding: 0 16px;
    }
    
    .feature-content {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 16px 22px;
    }
    
    .feature-card {
        padding: 18px;
    }
}

.logo-icon {width: 20px;}

.feature-card p a {color:#666; font-size:0.8em}