:root {
    --primary-color: #0d6efd;
    --primary-hover: #0a58ca;
    --bg-color: #f4f7f9;
    --surface-color: #ffffff;
    --line-color: #dee2e6;
    --text-color: #212529;
    --muted-color: #6c757d;
    --radius: 6px;
}

body.notice-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 14px;
}

.notice-container {
    max-width: 780px;
    margin: 0 auto;
    background-color: var(--surface-color);
    border-radius: var(--radius);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.notice-header {
    border-bottom: 1px solid var(--line-color);
    padding: 16px 18px;
    background-color: #f8fafc;
}

.notice-header h1 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 700;
}

.notice-subtitle {
    margin: 6px 0 0;
    color: var(--muted-color);
    font-size: 0.9em;
}

.notice-controls {
    border-bottom: 1px solid var(--line-color);
    padding: 10px 18px;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    background-color: #fdfefe;
}

.notice-controls-left,
.notice-controls-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-link {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9em;
}

.toolbar-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.notice-controls label {
    color: var(--muted-color);
    font-size: 0.86em;
}

.notice-controls select,
.notice-controls input[type="search"] {
    border: 1px solid var(--line-color);
    border-radius: 4px;
    font-size: 0.88em;
    padding: 6px 8px;
    background-color: #fff;
}

.notice-controls input[type="search"] {
    width: 180px;
}

.notice-controls select:focus,
.notice-controls input[type="search"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
}

.notice-list {
    padding: 12px 18px;
}

.notice-item {
    border: 1px solid #ecf0f3;
    border-radius: 6px;
    background-color: #fff;
    padding: 12px;
    margin-bottom: 10px;
}

.notice-item:last-child {
    margin-bottom: 0;
}

.notice-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.notice-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.notice-title-toggle {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    width: 100%;
    text-align: left;
    font-size: 1.02em;
    font-weight: 700;
    line-height: 1.4;
    color: inherit;
    cursor: pointer;
}

.notice-title-toggle::before {
    content: '▸ ';
    color: #708090;
}

.notice-title-toggle[aria-expanded="true"]::before {
    content: '▾ ';
}

.notice-title-toggle:hover {
    color: var(--primary-color);
}

.notice-external-link {
    flex-shrink: 0;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.82em;
    border: 1px solid #cfe2ff;
    border-radius: 999px;
    padding: 2px 8px;
}

.notice-external-link:hover {
    color: #084298;
    border-color: #9ec5fe;
    text-decoration: none;
}

.notice-content {
    margin-top: 7px;
    font-size: 0.92em;
    line-height: 1.55;
    color: #4f5b66;
    white-space: pre-wrap;
    word-break: break-word;
}

.notice-content.is-collapsed {
    display: none;
}

.notice-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.notice-content a:hover {
    text-decoration: underline;
}

.notice-date {
    color: #8a94a0;
    font-size: 0.8em;
}

.label {
    display: inline-block;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.77em;
    font-weight: 700;
    line-height: 1.4;
    color: #fff;
    white-space: nowrap;
}

.label-default { background-color: #6c757d; }
.label-공지 { background-color: #198754; }
.label-안내 { background-color: #0d6efd; }
.label-기타 { background-color: #6c757d; }
.label-추가기능 { background-color: #fd7e14; }
.label-업데이트 { background-color: #dc3545; }

#loading-message,
.empty-message {
    text-align: center;
    color: var(--muted-color);
    padding: 26px 10px;
}

.error-message {
    color: #842029;
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 4px;
    padding: 12px;
    text-align: center;
}

/* --- Headline Ticker Styles (notice_headline.html compatibility) --- */
body.headline-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 12px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: transparent;
    color: #333;
}

.headline-container {
    background-color: transparent;
    padding: 8px 15px;
    overflow: hidden;
    width: 100%;
    display: flex;
    align-items: center;
    height: 1.2em;
    box-sizing: border-box;
    justify-content: center;
    position: relative;
}

.headline-text {
    font-size: 1em;
    font-weight: 500;
    line-height: 1.2;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.3s ease-in-out;
    opacity: 1;
}

.headline-text .label {
    margin-right: 6px;
    vertical-align: middle;
}

.view-all-link {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    flex-shrink: 0;
}

.view-all-link a {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    white-space: nowrap;
}

.view-all-link a:hover {
    text-decoration: underline;
}

.view-all-link .full-text {
    display: inline;
}

.view-all-link .short-text {
    display: none;
}

@media (max-width: 768px) {
    body.notice-page {
        padding: 8px;
    }

    .notice-container {
        border-radius: 0;
        box-shadow: none;
    }

    .notice-header,
    .notice-controls,
    .notice-list {
        padding-left: 10px;
        padding-right: 10px;
    }

    .notice-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .notice-controls-left,
    .notice-controls-right {
        width: 100%;
        flex-wrap: wrap;
    }

    .notice-controls input[type="search"] {
        width: 100%;
    }

    .headline-container {
        justify-content: space-between;
        padding: 8px 10px;
        position: static;
    }

    .headline-text {
        text-align: left;
        padding-right: 10px;
    }

    .view-all-link {
        position: static;
        transform: none;
    }

    .view-all-link .full-text {
        display: none;
    }

    .view-all-link .short-text {
        display: inline;
    }
}
