@charset "utf-8";

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

html {font: 300 18px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; 
    font-optical-sizing: auto; font-style: normal; letter-spacing: -0.01em; color: #666; 
    background-color:#e8e8ed; overflow-x: hidden; scroll-behavior: smooth;}

body {cursor: default;}
li {list-style: none; }
a {text-decoration:none; color:inherit; }
img {width: 100%; user-select: none; pointer-events: none;}

.wrap {width: 90%; max-width: 1100px; margin: 0 auto;}

#nav {width: 100%; height: 3rem; position: fixed; top: 0; left: 0; z-index: 100; color: #999; font-weight: 400; font-size: 0.9rem; line-height: 3rem;}
#nav .wrap {display: flex; justify-content: space-between;}
#nav .nav01 {display: flex; align-items: center; height: 3rem;}
#nav .nav01 li.svg {width: 4.2rem; margin-top: 10px;}
#nav .nav02 {display: flex; align-items: center; height: 3rem;}
#nav .nav02 li {padding-left: 2rem; text-align: right;}
#nav .nav02 a.active {color: #fff; transition: ease 0.3s;}
#nav .nav02 a:hover {color: #fff; transition: ease 0.3s;}

#nav .nav01 li.svg:hover .i {fill: #fff!important; transition: ease 0.3s;}
#nav .nav01 li.svg:hover .sumn {fill: #fff!important; transition: ease 0.3s;}

footer {color: #aaa; font-size: 0.9rem; padding: 2.5rem 0;}
footer .wrap {display: flex; justify-content: space-between; align-items:center; flex-direction: row-reverse;}
footer .img {width: 4.2rem;}
footer .text {margin-top: 0.5rem;}

footer .aWrap {display: flex; flex-wrap: wrap; justify-content: space-between; width: 40%;}
footer .aWrap a {width: calc(28% - 0.5rem); height: 3rem; line-height: 3rem; text-align: center; outline: 2px solid #eee; background: #fff; color: #aaa; font-weight: 400; border-radius: 10px; padding: 0 1.25rem; box-sizing: border-box; overflow: hidden;}
footer .aWrap a:hover {background: #aaa; transition: ease 0.3s; color: #fafafa;}

footer .aWrap a.archive {position: relative; width: calc(44% - 0.5rem); min-width: 8rem; text-align: left; background: #aaa; color: #fafafa;}
footer .aWrap a.archive svg {width: 0.9rem; position: absolute; top: 50%; right: 1.5rem; transform: translate(0, -50%);}
footer .aWrap a.archive:hover svg {transform: translate(300%, -50%); transition: ease 0.5s;}

footer .aWrap a.archive span {display: inline-block; position: relative; left: 0;}
footer .aWrap a.archive:hover span {left: 50%; transform: translateX(-50%); transition: ease 0.3s;}

section {display: flex; align-items: center; justify-content: center; padding: 5rem 0 3rem;}
.finder {display: flex; flex-direction: column; height: 80vh; border-radius: 12px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,0.25);}

/* ── toolbar ── */
.toolbar {height: 52px; background: rgba(245,245,247,0.97); backdrop-filter: blur(20px); border-bottom: 1px solid #d2d2d7; display: flex; align-items: center; padding: 0 16px; gap: 12px; flex-shrink: 0;}
.traffic { display: flex; gap: 8px; }
.dot { width: 13px; height: 13px; border-radius: 50%; }
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }
.toolbar-title { flex: 1; text-align: center; font-size: 13px; font-weight: 500; color: #6e6e73; }
.toolbar-count { font-size: 12px; color: #6e6e73; white-space: nowrap; }

/* ── main layout ── */
.main { display: flex; flex: 1; overflow: hidden; background: #fff; }

/* ── sidebar ── */
.sidebar {width: 160px; background: #f5f5f7; border-right: 1px solid #d2d2d7; padding: 16px 0; flex-shrink: 0; overflow-y: auto;}
.sidebar-section { padding: 0 12px; margin-bottom: 16px; }
.sidebar-label {font-size: 11px; font-weight: 600; color: #6e6e73; text-transform: uppercase; letter-spacing: 0.04em; padding: 0 8px; margin-bottom: 6px;}
.sidebar-item {display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; font-size: 13px; color: #1d1d1f; cursor: pointer; transition: background 0.1s; user-select: none;}
.sidebar-item:hover  { background: rgba(0,0,0,0.06); }
.sidebar-item.active { background: #d4e5f7; color: #0071e3; }
.tag-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ── file area ── */
.file-area { flex: 1; overflow-y: auto; padding: 12px; min-width: 0; }
.file-area::-webkit-scrollbar { width: 6px; }
.file-area::-webkit-scrollbar-thumb { background: #d2d2d7; border-radius: 3px; }

.col-header {display: grid; grid-template-columns: 1fr 110px 70px; font-size: 12px; color: #6e6e73; padding: 4px 10px; border-bottom: 1px solid #d2d2d7; margin-bottom: 4px; user-select: none;}
.file-row {display: grid; grid-template-columns: 1fr 110px 70px; align-items: center; padding: 5px 8px; border-radius: 6px; cursor: pointer; transition: background 0.1s; gap: 4px;}
.file-row:hover    { background: rgba(0,0,0,0.04); }
.file-row.selected { background: #d4e5f7; }
.file-name { display: flex; align-items: center; gap: 8px; font-size: 13px; overflow: hidden; }
.file-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-icon { width: 20px; height: 20px; flex-shrink: 0; border-radius: 3px; overflow: hidden; }
.file-icon img { width: 100%; height: 100%; object-fit: cover; }
.file-date { font-size: 12px; color: #6e6e73; }
.file-size { font-size: 12px; color: #6e6e73; text-align: right; }
.no-results {padding: 40px 0; text-align: center; font-size: 13px; color: #6e6e73; display: none;}

    /* ── preview panel ── */
.preview {width: 50%; border-left: 1px solid #d2d2d7; background: #f5f5f7; display: flex; flex-direction: column; overflow: hidden; transition: width 0.25s ease; flex-shrink: 0;}
.preview.hidden { width: 0; border: none; }

.preview-top {height: 52px; background: rgba(245,245,247,0.97); border-bottom: 1px solid #d2d2d7; display: flex; align-items: center; padding: 0 12px; gap: 8px; flex-shrink: 0;}
.icon-btn {width: 28px; height: 28px; border-radius: 6px; border: 1px solid #d2d2d7; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #6e6e73; font-size: 16px; line-height: 1; transition: background 0.1s; flex-shrink: 0;}
.icon-btn:hover:not(:disabled) { background: rgba(0,0,0,0.06); }
.icon-btn:disabled { opacity: 0.3; cursor: default; }
.preview-filename {flex: 1; font-size: 13px; font-weight: 500; color: #1d1d1f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;}
.nav-group { display: flex; gap: 4px; }

.preview-body {flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; overflow-y: auto;}
.preview-img {width: 100%; max-height: 55vh; object-fit: contain; border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,0.12); animation: fadeIn 0.2s ease;}
.preview-meta { margin-top: 20px; width: 100%; }
.meta-row {display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid #d2d2d7; font-size: 12px;}
.meta-row:last-child { border-bottom: none; }
.meta-label { color: #6e6e73; }
.meta-val   { font-weight: 500; }
.meta-tags  { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.tag-pill {font-size: 11px; padding: 2px 8px; border-radius: 99px; background: #e4e4e9; color: #3a3a3c;}
.preview-empty {display: flex; flex-direction: column; align-items: center; gap: 12px; color: #6e6e73;}
.preview-empty svg { width: 48px; height: 48px; opacity: 0.25; }
.preview-empty p   { font-size: 13px; }

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}

    /* ── mobile tag bar ── */
.tag-bar {display: none; padding: 8px 12px; gap: 6px; overflow-x: auto; border-bottom: 1px solid #d2d2d7; background: #f5f5f7; flex-shrink: 0;}
.tag-bar::-webkit-scrollbar { display: none; }
.tag-bar-pill {display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 4px 12px; border-radius: 99px; border: 1px solid #d2d2d7; background: transparent; color: #3a3a3c; cursor: pointer; white-space: nowrap; transition: all 0.15s; user-select: none; flex-shrink: 0;}
.tag-bar-pill.active { background: #1d1d1f; color: #fff; border-color: #1d1d1f; }



@media (min-width: 2500px) {
    html {font-size: 20px;}
}

@media (max-width: 1200px) {
    html {font-size: 17px;}

    footer .imgWrap {display: flex; flex-direction: row-reverse; justify-content: space-between;}
    footer .wrap {display: block;}
    footer .aWrap {width: 100%; margin-bottom: 2rem;}
}


@media (max-width: 1000px) {
section { align-items: flex-start;}
.finder { max-width: 100%; height: 85vh; min-height: 600px;}
.sidebar { display: none; }
.tag-bar { display: flex; }
.col-header, .file-row { grid-template-columns: 1fr 90px; }
.file-size, .file-date { display: none; }
.Mnone { display: none; }

/* preview becomes bottom sheet */
.main { flex-direction: column; }
.preview {
width: 100% !important;
height: 0;
border-left: none;
border-top: 1px solid #d2d2d7;
transition: height 0.3s ease;
}

.preview.hidden { height: 0; border-top: none; }
.preview.open   { height: 55vh; }
.preview-img    { max-height: 35vh; }
}


@media (max-width: 767px) {
    html {font-size: 16px;}

    footer .imgWrap {display: block;}
}


@media (max-width: 480px) {
    html {font-size: 15px;}

    .col-header, .file-row { grid-template-columns: 1fr; }
    .file-date { display: none; }
    .preview.open { height: 62vh; }
}
