
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font, 'Pretendard Variable', Pretendard, sans-serif);
}

body {
    font-family: var(--font, 'Pretendard Variable', Pretendard, sans-serif);
    background: var(--canvas);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    max-height: 100vh;
    font-size: 1.6rem;
    overflow: hidden;
}

.window {
    position: relative;
    width: 100%;
    max-width: 100vw;
    height: calc(100vh - var(--nav-height, 5.6rem));
    max-height: calc(100vh - var(--nav-height, 5.6rem));
    background: var(--canvas);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 상단 헤더 — 흰 바 + 얇은 구분선 */
.title-bar {
    background: var(--panel);
    border-bottom: 1px solid var(--panel-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    padding: .8rem 1.6rem;
    min-height: 4.8rem;
}

.title-bar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.window-icon {
    width: 3rem;
    height: 3rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-sm, 4px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.window-icon img {
    width: 1.8rem;
}
:root[data-theme="dark"] .window-icon img {
    filter: brightness(6);
}

.window-icon:hover{
    background: var(--bg-hover);
    border-color: var(--border-tertiary);
}

.window-title {
    font-size: 1.4rem;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.window-controls {
    display: flex;
    gap: .8rem;
}

/* Figma식 필 버튼 */
.control-btn {
    min-width: 3.2rem;
    height: 3.2rem;
    padding: 0 1.4rem;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm, 4px);
    background: var(--bg-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
}

.control-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-tertiary);
}


/* Menu Bar — Figma 스타일 필터 칩 */
.menu-bar {
    background: transparent;
    border-bottom: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    flex-shrink: 0;
    margin-top: .5rem;
    margin-bottom: 1.8rem;
}

.menu-item {
    height: 3.2rem;
    padding: 0 1.4rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm, 4px);
    background: var(--panel);
    border: 1px solid var(--panel-border);
    margin-right: -1px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.menu-item.active {
    background: var(--accent-blue);
    color: #fff;
    border: 1px solid var(--accent-blue);
}

.menu-item img {
    width: 16px;
    margin-right: 8px;
}

.menu-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-tertiary);
}

.menu-item.active:hover {
    background: var(--accent-blue-hover);
    border-color: var(--accent-blue-hover);
    color: #fff;
}

/* Toolbar */
.toolbar {
    background: var(--toolbar-bg);
    border-bottom: 1px solid var(--panel-border);
    padding: 1.2rem 2rem;
    display: flex;
    gap: .8rem;
    align-items: center;
    flex-shrink: 0;
}

.toolbar input{
    border: 1px solid var(--panel-border);
    outline: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    height: 28px;
    width: 360px;
}

.toolbar-btn {
    padding: .6rem 1.2rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm, 4px);
    font-size: 1.2rem;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.toolbar-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent-blue);
}

.toolbar-separator {
    width: .1rem;
    height: 2rem;
    background: var(--panel-border);
    margin: 0 .4rem;
}

/* Content Area — 회색 캔버스 */
.content {
    background: var(--canvas);
    padding: 1.8rem 2.8rem 4rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
}

/* 콘텐츠 — 좌우 화면을 꽉 채운다 (폭 제한 없음) */
.content > * {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

/* Scrollbar Styles */
.content::-webkit-scrollbar {
    width: 1rem;
}

.content::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 0;
}

.content::-webkit-scrollbar-thumb {
    background: var(--border-tertiary);
    border-radius: 0;
    border: 2px solid var(--bg-tertiary);
}

.content::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* Firefox Scrollbar */
.content {
    scrollbar-width: thin;
    scrollbar-color: var(--border-tertiary) var(--bg-tertiary);
}

.content-header {
    margin-top: 1rem;
    margin-bottom: 1.8rem;
}

.content-header h1 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: .6rem;
}

.content-header p {
    font-size: 1.4rem;
    color: var(--text-secondary);
}

/* Tool Grid */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(24rem, 1fr));
    gap: 1.2rem;
}

.tool-card {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 0;
    padding: 1.6rem;
    cursor: pointer;
    transition: border-color .12s ease, background .12s ease;
}

.tool-icon {
    transition: background .15s ease;
}

.tool-card:hover {
    border-color: var(--accent-blue);
    background: var(--bg-tertiary-light);
}

.tool-icon {
    width: 4rem;
    height: 4rem;
    background: color-mix(in srgb, var(--accent-blue) 12%, transparent);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.tool-card:hover .tool-icon {
    background: color-mix(in srgb, var(--accent-blue) 18%, transparent);
}

.tool-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: .5rem;
}

.tool-description {
    font-size: 1.3rem;
    color: var(--text-secondary);
    line-height: 1.5rem;
}

/* Tool Category */
.tool-category {
    margin-top: 3.6rem;
    margin-bottom: 1.6rem;
    padding: .2rem 0 .2rem 1.2rem;
    border-left: .4rem solid var(--accent-blue);
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.tool-category:first-of-type {
    margin-top: .8rem;
}

.tool-category .cat-name {
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.02em;
    color: var(--text-primary);
}

.tool-category .cat-desc {
    font-size: 1.25rem;
    line-height: 1.2;
    color: var(--text-secondary);
}

/* Status Bar */
.status-bar {
    background: var(--panel);
    border-top: 1px solid var(--panel-border);
    color: var(--text-tertiary);
    padding: .5rem 1.6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.status-left, .status-right {
    display: flex;
    gap: 1.6rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: .6rem;
}


    :where(html[data-layout="mobile"]) body{
        padding: 0;
        font-size: 1.4rem;
    }
    
    :where(html[data-layout="mobile"]) .window{
        height: auto;
        max-height: calc(100vh - var(--nav-height, 5.6rem) - 2rem);
        min-height: auto;
    }
    
    :where(html[data-layout="mobile"]) .content::-webkit-scrollbar{
        width: 0.8rem;
    }
    
    :where(html[data-layout="mobile"]) .title-bar{
        padding: 0.8rem 1rem;
    }
    
    :where(html[data-layout="mobile"]) .window-icon{
        width: 2.4rem;
        height: 2.4rem;
        font-size: 1.4rem;
    }
    
    :where(html[data-layout="mobile"]) .window-icon img{
        width: 2.2rem;
    }
    
    :where(html[data-layout="mobile"]) .window-title{
        font-size: 1.3rem;
    }
    
    :where(html[data-layout="mobile"]) .control-btn{
        width: 2.4rem;
        height: 2.4rem;
        font-size: 1.2rem;
    }
    
    
    :where(html[data-layout="mobile"]) .toolbar{
        display: none;
        padding: 1.2rem;
        gap: 0.6rem;
        white-space: nowrap;
    }
    
    :where(html[data-layout="mobile"]) .toolbar input{
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    
    :where(html[data-layout="mobile"]) .toolbar-btn{
        padding: 0.5rem 1rem;
        font-size: 1.1rem;
        flex: 0 1 auto;
    }
    
    :where(html[data-layout="mobile"]) .menu-bar{
        overflow-x: auto;
        padding: 0.5rem 1rem;
    }
    
    :where(html[data-layout="mobile"]) .menu-item{
        padding: 0.5rem 1.2rem;
        font-size: 1.4rem;
        white-space: nowrap;

    }
    
    :where(html[data-layout="mobile"]) .content{
        padding: 1.6rem;
    }
    
    :where(html[data-layout="mobile"]) .content-header h1{
        font-size: 2rem;
    }
    
    :where(html[data-layout="mobile"]) .content-header p{
        font-size: 1.3rem;
    }
    
    :where(html[data-layout="mobile"]) .tool-grid{
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    
    :where(html[data-layout="mobile"]) .tool-card{
        padding: 1.6rem;
    }
    
    :where(html[data-layout="mobile"]) .tool-icon{
        width: 4rem;
        height: 4rem;
        font-size: 2rem;
    }
    
    :where(html[data-layout="mobile"]) .tool-name{
        font-size: 1.4rem;
    }
    
    :where(html[data-layout="mobile"]) .tool-description{
        font-size: 1.2rem;
    }
    
    :where(html[data-layout="mobile"]) .status-bar{
        padding: 0.5rem 1rem;
        font-size: 1.1rem;
    }
    
    :where(html[data-layout="mobile"]) .status-left, :where(html[data-layout="mobile"]) .status-right{
        gap: 1rem;
    }


@media (max-width: 480px) {
    body {
        padding: 0;
    }
    
    .window {
        height: auto;
        max-height: calc(100vh - var(--nav-height, 5.6rem) - 1rem);
        min-height: auto;
    }
    
    .title-bar {
        padding: 0.6rem 0.8rem;
    }
    
    .window-title {
        font-size: 1.2rem;
    }
    
    
    .toolbar {
        padding: 0.8rem;
        gap: 0.5rem;
    }
    
    .toolbar-btn {
        padding: 0.4rem 0.8rem;
        font-size: 1rem;
        flex: 0 1 auto;
    }
    
    .toolbar input {
        min-width: 0;
    }
    
    .content {
        padding: 1.2rem;
    }
    
    .content-header h1 {
        font-size: 1.8rem;
    }
    
    .status-bar {
        padding: 0.4rem 0.8rem;
        font-size: 1rem;
        flex-wrap: wrap;
    }
}