/* お知らせ一覧・詳細 */

.news-main {
    padding-bottom: 8px;
}

.news-lead {
    margin: 0 0 1rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--frame-text-sub, #424752);
}

.news-loading,
.news-empty,
.news-error {
    margin: 1rem 0;
    font-size: 0.875rem;
    color: var(--frame-text-sub, #424752);
}

.news-error {
    color: #b91c1c;
}

/* ---------- スケルトンローディング ---------- */

.news-skeleton__sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.news-skeleton {
    position: relative;
    margin: 0.5rem 0 1rem;
}

@keyframes news-skeleton-shimmer {
    0% {
        background-position: 0% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.news-skeleton__bar {
    display: block;
    height: 10px;
    border-radius: 8px;
    background: linear-gradient(
        90deg,
        #f0e8e0 0%,
        #fff8f0 40%,
        #f3e8dd 80%,
        #f0e8e0 100%
    );
    background-size: 200% 100%;
    animation: news-skeleton-shimmer 1.15s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .news-skeleton__bar {
        animation: none;
        background: #f0ede9;
    }
}

.news-list-skeleton {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.news-list-skeleton__card {
    border-radius: 14px;
    border: 1px solid rgba(225, 119, 19, 0.12);
    background: #fcfcfb;
    padding: 14px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.news-skeleton__bar--meta {
    width: 34%;
    height: 9px;
    border-radius: 4px;
    margin-bottom: 2px;
}

.news-skeleton__bar--title {
    width: 88%;
    height: 15px;
    border-radius: 6px;
}

.news-skeleton__bar--preview {
    width: 100%;
    height: 11px;
    border-radius: 5px;
    opacity: 0.95;
}

.news-skeleton__bar--short {
    width: 72%;
}

.news-detail-skeleton {
    margin: 0.25rem 0 1rem;
}

.news-detail-skeleton__block {
    max-width: 100%;
}

.news-skeleton__bar--date {
    width: 40%;
    height: 10px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.news-skeleton__bar--author {
    width: 55%;
    height: 12px;
    border-radius: 5px;
    margin-bottom: 12px;
    opacity: 0.9;
}

.news-skeleton__bar--headline {
    width: 92%;
    height: 22px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.news-detail-skeleton__lines {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.news-skeleton__bar--body-line {
    width: 100%;
    height: 12px;
    border-radius: 5px;
}

.news-skeleton__bar--half {
    width: 55%;
}

.news-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.news-list__item {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(225, 119, 19, 0.15);
    transition: box-shadow 0.15s ease;
}

.news-list__item--unread {
    background: #fffdfb;
    border-color: rgba(225, 119, 19, 0.35);
    box-shadow: 0 2px 8px rgba(225, 119, 19, 0.08);
}

.news-list__item--read {
    background: #fafafa;
    opacity: 0.92;
}

.news-list__item--read .news-list__title,
.news-list__item--read .news-list__preview,
.news-list__item--read .news-list__meta {
    color: #6b7280;
}

.news-list__link {
    display: block;
    padding: 14px 14px 16px;
    text-decoration: none;
    color: inherit;
}

.news-list__link:focus-visible {
    outline: 2px solid var(--frame-main, #e17713);
    outline-offset: 2px;
}

.news-list__meta {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #9ca3af;
    margin-bottom: 6px;
}

.news-list__item--unread .news-list__meta {
    color: #e17713;
}

.news-list__title {
    display: block;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #191c21;
    line-height: 1.4;
    margin-bottom: 6px;
}

.news-list__badge {
    display: inline-block;
    margin-right: 6px;
    padding: 2px 6px;
    font-size: 0.625rem;
    font-weight: 800;
    vertical-align: 0.1em;
    color: #fff;
    background: #dc2626;
    border-radius: 4px;
}

.news-list__preview {
    display: block;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #424752;
}

.news-back-wrap {
    margin: 0 0 1rem;
}

.news-back {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--frame-main, #e17713);
    text-decoration: none;
}

.news-back:hover {
    text-decoration: underline;
}

.news-detail__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.news-detail__head-text {
    flex: 1;
    min-width: 0;
}

.news-detail__readers-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 44px;
    height: 44px;
    margin: 0;
    padding: 4px 6px 4px 10px;
    border: 1px solid rgba(225, 119, 19, 0.35);
    border-radius: 12px;
    background: #fffdfb;
    color: var(--frame-main, #e17713);
    font-size: 1.25rem;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.news-detail__readers-stack {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
}

.news-detail__readers-face {
    position: relative;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    margin-left: -10px;
    border-radius: 50%;
    border: 2px solid #fffdfb;
    box-shadow: 0 0 0 1px rgba(225, 119, 19, 0.2);
    overflow: hidden;
    background: #f3f4f6;
}

.news-detail__readers-stack .news-detail__readers-face:first-child {
    margin-left: 0;
}

.news-detail__readers-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-detail__readers-face--letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #e17713, #f59e0b);
}

.news-detail__readers-letter {
    font-size: 0.6875rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.news-detail__readers-more {
    position: relative;
    z-index: 8;
    flex-shrink: 0;
    margin-left: 2px;
    padding: 0 4px;
    font-size: 0.6875rem;
    font-weight: 800;
    color: #6b7280;
    line-height: 28px;
}

.news-detail__readers-fallback-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.news-detail__readers-fallback-icon[hidden] {
    display: none !important;
}

.news-detail__readers-btn:hover {
    background: #fff5eb;
    box-shadow: 0 2px 8px rgba(225, 119, 19, 0.12);
}

.news-detail__readers-btn:focus-visible {
    outline: 2px solid var(--frame-main, #e17713);
    outline-offset: 2px;
}

.news-detail__readers-btn[hidden] {
    display: none !important;
}

.news-detail__date {
    font-size: 0.75rem;
    font-weight: 700;
    color: #9ca3af;
    margin: 0 0 8px;
}

.news-detail__author {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6b7280;
    margin: -4px 0 10px;
}

.news-detail__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.45;
    color: #191c21;
}

.news-detail__body {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: #191c21;
}

.news-detail__attach {
    margin-top: 1.25rem;
}

.news-detail__attach a {
    font-weight: 700;
    color: var(--frame-main, #e17713);
}

/* 閲覧者モーダル */
.news-readers-modal .news-readers-modal__panel {
    max-width: 420px;
    max-height: min(80vh, 520px);
    display: flex;
    flex-direction: column;
}

.news-readers-modal__count {
    margin: 0 0 12px;
    font-size: 0.875rem;
    color: var(--frame-text-sub, #424752);
}

.news-readers-modal__count strong {
    font-size: 1.125rem;
    color: #191c21;
}

.news-readers-modal__error {
    margin: 0 0 8px;
    font-size: 0.8125rem;
    color: #b91c1c;
}

.news-readers-modal__empty {
    margin: 0 0 8px;
    font-size: 0.875rem;
    color: #6b7280;
}

.news-readers-modal__list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.news-readers-modal__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 12px;
    background: #fafafa;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.news-readers-modal__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.news-readers-modal__avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e17713, #f59e0b);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    flex-shrink: 0;
}

.news-readers-modal__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.news-readers-modal__name {
    font-size: 0.875rem;
    font-weight: 700;
    color: #191c21;
    word-break: break-word;
}

.news-readers-modal__time {
    font-size: 0.6875rem;
    color: #9ca3af;
}

/* --- ツールバー・投稿フォーム・管理者 --- */
.news-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1rem;
}

.news-toolbar__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
    color: var(--frame-text, #191c21);
}

.news-toolbar__btn--primary {
    background: var(--frame-main, #e17713);
    color: #fff;
    border-color: transparent;
}

.news-main--form {
    max-width: 560px;
    margin: 0 auto;
}

.news-form__field {
    margin-bottom: 1rem;
}

.news-form__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--frame-text);
}

.news-form__input,
.news-form__textarea,
.news-form__file {
    width: 100%;
    box-sizing: border-box;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    padding: 10px 12px;
    /* iOS Safari: 16px 未満だとフォーカス時に自動ズームする */
    font-size: 16px;
}

.news-form__textarea {
    resize: vertical;
    min-height: 140px;
}

.news-form__submit {
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    background: var(--frame-main, #e17713);
    color: #fff;
    cursor: pointer;
}

.news-form__submit--secondary {
    background: #f3f4f6;
    color: var(--frame-text);
}

.news-form__submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.news-form__actions {
    margin-top: 1.25rem;
}

.news-form__error {
    margin-top: 0.75rem !important;
}

.news-form__ok {
    font-size: 0.875rem;
    color: #15803d;
    margin: 0 0 0.75rem;
}

.news-detail__attach-title {
    font-size: 0.8125rem;
    font-weight: 700;
    margin: 0 0 6px;
}

.news-detail__attach-list {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.875rem;
}

.news-detail__attach-list a {
    color: var(--frame-main, #e17713);
}

.news-admin__section {
    margin-bottom: 2rem;
}

.news-admin__h {
    font-size: 1rem;
    margin: 0 0 0.5rem;
}

.news-admin__owner {
    font-weight: 700;
    margin: 0;
    word-break: break-all;
}

.news-admin__list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.news-admin__list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fafafa;
    border: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.875rem;
}

.news-admin__remove {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.news-admin__add-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.news-admin__add-row .news-form__input {
    flex: 1;
    min-width: 200px;
}
