/* /app/blueprints/home/static/css/home.css */

.home-ops-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.home-ops-card {
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    background: var(--color-surface);
    box-shadow: var(--box-shadow);
    padding: 0.9rem;
    aspect-ratio: 4 / 3; /* 4:3 비율 고정 */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.home-ops-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 40px;
    margin-bottom: 0.4rem;
}

.home-ops-head h2 {
    margin: 0;
    font-size: 1.02rem;
}

.home-ops-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.home-ops-actions select {
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--color-text);
    padding: 4px 8px;
    font-size: 0.8rem;
}

.home-ops-summary {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.home-ops-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    overflow: auto;
    min-height: 0;
}

.home-notice-content {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface-soft);
    padding: 0.7rem;
    line-height: 1.5;
    font-size: 0.86rem;
    color: var(--color-text);
    overflow: auto;
}

.home-notice-content h2,
.home-notice-content h3 {
    margin: 0 0 0.4rem;
    font-size: 0.92rem;
}

.home-notice-content p,
.home-notice-content ul {
    margin: 0.2rem 0;
}

.home-notice-content .home-md-code {
    margin: 0.45rem 0;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(125, 179, 255, 0.22);
    border-radius: 8px;
    background: #111722;
    color: #dce7f7;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.55;
    font-size: 0.82rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.home-notice-content .home-md-code code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    color: inherit;
}

.home-gallery-controls {
    display: inline-flex;
    gap: 0.25rem;
}

.home-gallery-wrap {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface-soft);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex: 1;
    min-height: 0;
    cursor: pointer;
    overflow: hidden;
}

.home-gallery-image {
    max-width: 100%;
    max-height: calc(100% - 24px); /* 캡션 공간 제외 */
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    background: transparent;
    flex: 1;
    min-height: 0;
}

/* 이미지 팝업 모달 스타일 */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.gallery-modal-content {
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.gallery-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.home-gallery-caption {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    height: 20px;
    line-height: 20px;
    flex-shrink: 0;
}

.ops-row {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface-soft);
    padding: 0.5rem 0.6rem;
}

.ops-clickable {
    cursor: pointer;
}

.ops-clickable:hover {
    border-color: #22b8cf;
}

.ops-row.is-selected {
    border-color: #22b8cf;
    box-shadow: 0 0 0 1px rgba(34, 184, 207, 0.35);
}

.ops-row-head {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: baseline;
    margin-bottom: 0.2rem;
    font-size: 0.86rem;
}

.ops-row-head strong {
    color: var(--color-text);
}

.ops-row-head span {
    color: var(--color-text-muted);
    font-size: 0.76rem;
}

.ops-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.ops-chip {
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 0 8px;
    line-height: 1.7;
    font-size: 0.72rem;
    color: var(--color-text);
    background: var(--color-surface);
}

.ops-dday {
    font-weight: 700;
    color: #0f766e;
}

.welcome-container {
    text-align: center;
    padding: 5rem 1rem;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
}

.welcome-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.5rem auto;
}

body.theme-dark .ops-clickable:hover {
    border-color: #22d3ee;
}

body.theme-dark .ops-row.is-selected {
    border-color: #22d3ee;
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.45);
}

body.theme-dark .ops-chip {
    background: #1f2937;
    border-color: #374151;
    color: #cbd5e1;
}

body.theme-dark .ops-dday {
    color: #5eead4;
}

@media (max-width: 960px) {
    .home-ops-grid {
        grid-template-columns: 1fr;
    }
}
