﻿:root {
    --bg: #f5f6f8;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --shadow: 0 10px 30px rgba(0,0,0,.06);
    --radius: 16px;
    --accent: #ff4d6d;
}

body {
    font-family: "Pretendard","Noto Sans KR","Malgun Gothic",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
    background: var(--bg);
    color: var(--text);
}

.wrap {
    max-width: 1120px;
    margin: 22px auto;
    padding: 0 16px 28px;
}

.titlebar {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
}

.title {
    font-weight: 900;
    font-size: 18px;
}

.nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    font-weight: 800;
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
}

    .nav-link.active {
        background: var(--accent);
        border-color: var(--accent);
        color: #fff;
    }

.top {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 14px;
}

.grid-card, .list-card, .detail {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.grid-card {
    padding: 14px;
}

.grid-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.grid-title {
    font-weight: 900;
}

.muted {
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
}

.grid-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
}

    .grid-scroll table {
        min-width: 860px;
    }

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 10px;
}

th, td {
    text-align: center;
    padding: 0;
}

th {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfbfc;
    padding: 12px 10px;
    font-weight: 900;
    color: var(--muted);
}

    th.rowhead {
        width: 110px;
    }

    th.colhead {
        width: 120px;
    }

/* 셀 버튼 */
.cell-btn {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    padding: 14px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .06s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

    .cell-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 22px rgba(0,0,0,.06);
    }

    .cell-btn:disabled {
        cursor: not-allowed;
        opacity: .55;
    }

.place-name {
    font-size: 12.5px;
    color: var(--muted);
    font-weight: 800;
    line-height: 1.25;
    padding: 0 6px;
}

.cell-btn.selected {
    border-color: rgba(255,77,109,.55);
    background: rgba(255,77,109,.06);
    box-shadow: 0 14px 26px rgba(255,77,109,.10);
    position: relative;
}

    .cell-btn.selected::after {
        content: "✓";
        position: absolute;
        top: 10px;
        right: 10px;
        width: 20px;
        height: 20px;
        border-radius: 999px;
        background: var(--accent);
        color: #fff;
        font-weight: 900;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
    }

.hint {
    margin-top: 10px;
    font-size: 12.5px;
    color: var(--muted);
    font-weight: 700;
}

.list-card {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 340px;
}

.list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.pill {
    font-size: 12px;
    font-weight: 900;
    color: var(--accent);
    background: rgba(255,77,109,.10);
    border: 1px solid rgba(255,77,109,.18);
    padding: 5px 10px;
    border-radius: 999px;
}

/* list toggle checkbox 숨기고 아이콘만 */
.list-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-weight: 900;
}

    .list-toggle input {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
        pointer-events: none;
    }

.toggle-icon {
    width: 16px;
    height: 16px;
    border-radius: 6px;
    border: 1.5px solid var(--line);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.list-toggle input:checked + .toggle-icon {
    background: var(--accent);
    border-color: var(--accent);
}

    .list-toggle input:checked + .toggle-icon::before {
        content: "✓";
        color: #fff;
        font-size: 12px;
        font-weight: 900;
    }

.toggle-text {
    color: var(--text);
}

.list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: auto;
}

.item {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 12px;
    background: #fff;
    cursor: pointer;
    transition: transform .06s ease, border-color .15s ease, box-shadow .15s ease;
}

    .item:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 22px rgba(0,0,0,.06);
    }

    .item.active {
        border-color: rgba(255,77,109,.45);
        box-shadow: 0 14px 26px rgba(255,77,109,.10);
    }

    .item .meta {
        font-size: 12px;
        color: var(--muted);
        font-weight: 800;
        margin-bottom: 4px;
    }

    .item .name {
        font-size: 14px;
        font-weight: 900;
        color: var(--text);
    }

.empty {
    color: var(--muted);
    font-weight: 800;
    line-height: 1.5;
    padding: 10px 2px;
}

.detail {
    margin-top: 14px;
    padding: 14px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 14px;
}

.box {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    padding: 14px;
    min-height: 140px;
}

h3 {
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--text);
    font-weight: 900;
}

.mt {
    margin-top: 14px;
}

.stat-row {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.stat {
    flex: 1;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 12px;
    background: #fbfbfc;
}

.stat-label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 900;
}

.stat-value {
    margin-top: 4px;
    font-size: 18px;
    font-weight: 900;
}

.star-input {
    display: flex;
    gap: 6px;
}

    .star-input button {
        border: 0;
        background: transparent;
        cursor: pointer;
        font-size: 22px;
        line-height: 1;
        opacity: .35;
    }

        .star-input button.on {
            opacity: 1;
        }

.stars {
    font-size: 18px;
    margin-top: 8px;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--muted);
}

/* 댓글 UI */
.comment-list {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px;
    background: #fbfbfc;
    max-height: 220px;
    overflow: auto;
}

.comment {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 10px;
    margin-bottom: 8px;
}

    .comment:last-child {
        margin-bottom: 0;
    }

.comment-head {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}

    .comment-head .left {
        display: flex;
        gap: 8px;
        align-items: center;
    }

.comment-body {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.comment-write {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

    .comment-write input, .comment-write textarea {
        border: 1px solid var(--line);
        border-radius: 14px;
        padding: 10px 12px;
        outline: none;
    }

    .comment-write textarea {
        min-height: 84px;
        resize: vertical;
    }

    .comment-write button {
        border: 1px solid var(--line);
        border-radius: 14px;
        padding: 10px 12px;
        background: #fff;
        font-weight: 900;
        cursor: pointer;
    }

        .comment-write button:hover {
            transform: translateY(-1px);
        }

@media (max-width: 920px) {
    .top {
        grid-template-columns: 1fr;
    }

    .detail {
        grid-template-columns: 1fr;
    }
}
