#news [hidden], .news-admin [hidden] { display: none; }
#news-editor { margin-bottom: 20px; }
#news-posts details > summary { cursor: pointer; }
#news-posts time { margin-right: 12px; }
#news-posts .news-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 0 16px 18px;
  line-height: 1.9;
}
.news-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(100%, 400px);
  box-sizing: border-box;
  border: 1px solid #d4af3766;
  border-radius: 7px;
  padding: 9px 12px;
  background: #241738;
  color: #f5edf8;
  font-size: .86rem;
  line-height: 1.45;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.news-link-card:hover strong { text-decoration: underline; }
.news-link-card small { display: block; margin-top: 3px; color: #d3c1e2; }
.news-link-card > span:last-child { flex: none; color: #ebd690; }
#news-posts .news-link-card { width: min(calc(100% - 32px), 400px); margin: 0 16px 18px; }
#news-link-help { font-size: .85rem; margin: -8px 0 16px; }
#news-link-preview { margin-bottom: 16px; }
body:has(.news-admin) {
  margin: 0;
  background: #100822;
  color: #f5edf8;
  font: 1rem/1.7 'Noto Sans JP', system-ui, sans-serif;
  color-scheme: dark;
}
.news-admin { box-sizing: border-box; max-width: 780px; margin: auto; padding: 32px 20px 64px; }
.news-admin a { color: #ebd690; }
.news-admin section {
  border: 1px solid #6e5987;
  border-radius: 10px;
  background: #1c102d;
  padding: 20px;
  margin-top: 20px;
}
.news-admin h2 { margin-top: 0; }
.news-admin label { display: grid; gap: 5px; margin-bottom: 16px; }
.news-admin :is(input, textarea, select, button) {
  box-sizing: border-box;
  min-height: 44px;
  border: 1px solid #927bac;
  border-radius: 6px;
  padding: 8px 12px;
  background: #241738;
  color: inherit;
  font: inherit;
}
.news-admin textarea { width: 100%; resize: vertical; }
.news-admin button { cursor: pointer; }
.news-admin button:disabled { opacity: .55; cursor: wait; }
#news-publish { background: #ebd690; color: #1c102d; }
.news-admin #news-delete { color: #ffc4ca; border-color: #bf727e; }
.editor-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#editor-list { padding-left: 20px; }
#editor-list li { margin-block: 8px; }
#editor-list button { max-width: 100%; text-align: left; overflow-wrap: anywhere; }

#news-posts details > summary.newsrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 23px 14px;
}
#news-posts .news-title { font-size: 18px; min-width: 0; overflow-wrap: anywhere; flex: 1; }
#news-posts summary::after { content: '+'; color: #ebd690; }
#news-posts details[open] > summary::after { content: '−'; }
.news-thumbnail {
  width: 61px;
  height: 46px;
  object-fit: cover;
  border-radius: 4px;
  flex: none;
}
.news-expanded-photo {
  display: block;
  max-width: min(100%, 620px);
  max-height: 560px;
  object-fit: contain;
  border-radius: 6px;
  margin: 14px auto;
}
#photo-preview {
  display: block;
  max-width: 100%;
  max-height: 220px;
  border-radius: 6px;
  margin-bottom: 10px;
}
#photo-remove { margin-bottom: 16px; }
#photo-help { font-size: .85rem; margin-top: -8px; }
@media (max-width: 800px) {
  #news-posts details > summary.newsrow { flex-direction: row; padding-block: 19px; }
  #news-posts time { display: block; }
  .news-thumbnail { width: 51px; height: 38px; }
}

.news-admin + .profile-footer {
  border-top: 1px solid #ffffff26;
  padding: 20px 5%;
  text-align: center;
}

.news-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 20px 0;
}
.news-pagination button {
  min-height: 44px;
  padding: 6px 14px;
  border: 1px solid #d4af3759;
  border-radius: 4px;
  background: transparent;
  color: var(--gold-soft);
  font: inherit;
  cursor: pointer;
}
.news-pagination button:disabled { opacity: .5; cursor: default; }
