*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --bg: #f5f7f6;
  --surface: #fff;
  --surface-hover: #f7faf8;
  --accent: #0f8a6e;
  --accent-hover: #0b6b55;
  --accent-light: #e6f5f0;
  --grad-from: #1a6b5a;
  --grad-to: #1b4f6e;
  --text: #1a1a2e;
  --text2: #4a5568;
  --text3: #94a3b8;
  --border: #e2e8e5;
  --border-light: #f1f3f2;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
}
body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP",
    "Hiragino Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== NAV BAR ===== */
.navbar {
  background: linear-gradient(
    135deg,
    rgba(10, 60, 48, 0.95) 0%,
    rgba(27, 94, 110, 0.88) 35%,
    rgba(27, 94, 110, 0.88) 65%,
    rgba(8, 38, 62, 0.95) 100%
  );
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(26, 107, 90, 0.15);
}
.navbar-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  height: 58px;
}
.logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity 0.2s;
}
.logo:hover {
  opacity: 0.85;
}
.logo-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-icon svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}
.logo .gx {
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}
.logo .news {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}
.search-wrap {
  flex: 1;
  max-width: 420px;
  position: relative;
  margin-left: auto;
}
.search-input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 38px;
  border: none;
  border-radius: 22px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  outline: none;
  transition: all 0.25s;
}
.search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}
.search-input:focus {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}
.search-input:focus::placeholder {
  color: var(--text3);
}
.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
  transition: color 0.25s;
}
.search-input:focus ~ .search-icon,
.search-wrap:focus-within .search-icon {
  color: var(--text3);
}
.search-btn {
  height: 40px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 22px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}
.search-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ===== TABS ===== */
.tabs-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs-bar::-webkit-scrollbar {
  display: none;
}
.tabs-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 24px 10px;
  display: flex;
  gap: 6px;
}
.tab {
  padding: 7px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text2);
  white-space: nowrap;
  cursor: pointer;
  border-radius: 20px;
  border: 1.5px solid transparent;
  transition: all 0.2s;
  user-select: none;
  background: transparent;
}
.tab:hover {
  background: var(--accent-light);
  color: var(--accent);
}
.tab.active {
  background: linear-gradient(135deg, #1a6b5a, #1b5e6e);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(26, 107, 90, 0.25);
}

/* ===== CONTENT ===== */
.content {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 24px 48px;
}
.stats {
  font-size: 0.82rem;
  color: var(--text3);
  margin-bottom: 14px;
  min-height: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.stats strong {
  color: var(--text2);
}
.loading {
  text-align: center;
  padding: 80px 20px;
  color: var(--text3);
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--grad-from);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== NEWS LIST ===== */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.news-item {
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
  cursor: default;
  animation: fadeUp 0.35s ease both;
}
.news-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Thumbnail */
.item-thumb {
  flex-shrink: 0;
  width: 96px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.item-thumb img.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.item-thumb img.thumb-favicon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Text */
.item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.item-title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.item-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s;
}
.item-title a:hover {
  color: var(--accent);
}
.item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text3);
}
.meta-favicon {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}
.meta-source {
  font-weight: 600;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.meta-dot {
  color: var(--border);
  font-size: 0.6rem;
}
.meta-date {
  white-space: nowrap;
}

/* ===== EMPTY / ERROR ===== */
.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text3);
}
.empty .icon {
  font-size: 2.8rem;
  margin-bottom: 16px;
}
.empty h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--text);
}
.empty p {
  font-size: 0.88rem;
}
.error-bar {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 14px;
  font-size: 0.85rem;
}

/* ===== LOAD MORE ===== */
.load-more-wrap {
  text-align: center;
  padding: 28px 0;
}
.load-more-btn {
  height: 44px;
  padding: 0 36px;
  background: var(--surface);
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: 22px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}
.load-more-btn:hover {
  background: linear-gradient(135deg, #1a6b5a, #1b5e6e);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(26, 107, 90, 0.25);
  transform: translateY(-1px);
}
.load-more-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow);
}

/* ===== AD ===== */
.ad-wrap {
  margin-top: 8px;
}
.ad-wrap ins {
  border-radius: var(--radius);
  overflow: hidden;
}

/* ===== DETAIL PANEL ===== */
.detail-btn {
  height: 36px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(4px);
}
.detail-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.45);
}
.detail-btn.open {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.5);
}
.detail-arrow {
  font-size: 9px;
  transition: transform 0.25s;
  display: inline-block;
}
.detail-btn.open .detail-arrow {
  transform: rotate(180deg);
}
.detail-panel {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}
.detail-panel.open {
  max-height: 500px;
}
.detail-panel-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 24px 16px;
}
.detail-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.detail-panel-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.detail-panel-actions {
  display: flex;
  gap: 10px;
}
.detail-action-btn {
  font-size: 0.72rem;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  padding: 0;
}
.detail-action-btn:hover {
  text-decoration: underline;
}
.site-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.site-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.site-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.site-chip.checked {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}
.site-chip input[type="checkbox"] {
  display: none;
}
.chip-check {
  font-size: 10px;
  display: none;
}
.site-chip.checked .chip-check {
  display: inline;
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 24px;
  color: var(--text3);
  font-size: 0.75rem;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .navbar-inner {
    gap: 10px;
    padding: 0 16px;
  }
  .logo {
    font-size: 1.1rem;
  }
  .logo-icon {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }
  .search-wrap {
    max-width: none;
  }
  .content {
    padding: 14px 16px 36px;
  }
  .tabs-inner {
    padding: 8px 16px;
  }
  .item-thumb {
    width: 76px;
    height: 56px;
  }
  .item-title {
    font-size: 0.84rem;
  }
  .news-item {
    padding: 12px 14px;
    gap: 12px;
  }
}

/* ===== SHARED PAGES ===== */
.search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}
a.tab {
  text-decoration: none;
  display: inline-block;
}
.hero {
  margin-bottom: 18px;
}
.hero h1 {
  font-size: 1.25rem;
  line-height: 1.5;
  margin-bottom: 6px;
}
.hero p {
  font-size: 0.88rem;
  color: var(--text2);
}
.updated {
  font-size: 0.75rem;
  color: var(--text3);
  margin-top: 6px;
}
.section {
  margin-top: 40px;
}
.section > h2 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  padding-left: 10px;
  border-left: 4px solid var(--accent);
}
.section-note {
  font-size: 0.78rem;
  color: var(--text3);
  margin-top: 10px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.card {
  display: block;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.card h3 {
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 4px;
}
.card p {
  font-size: 0.8rem;
  color: var(--text2);
}
.breadcrumb {
  font-size: 0.75rem;
  color: var(--text3);
  margin-bottom: 12px;
}
.breadcrumb a {
  color: var(--text2);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--accent);
}

/* 解説本文 */
.prose {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  font-size: 0.93rem;
  line-height: 1.9;
}
.prose h1 {
  font-size: 1.35rem;
  line-height: 1.5;
  margin-bottom: 12px;
}
.prose h2 {
  font-size: 1.08rem;
  margin: 32px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent-light);
}
.prose h3 {
  font-size: 0.97rem;
  margin: 22px 0 6px;
}
.prose p {
  margin: 10px 0;
}
.prose ul,
.prose ol {
  margin: 10px 0 10px 1.4em;
}
.prose li {
  margin: 4px 0;
}
.prose a {
  color: var(--accent);
}
.prose .lead {
  color: var(--text2);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.85rem;
}
.prose th,
.prose td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.prose th {
  background: var(--bg);
  white-space: nowrap;
}
.table-wrap {
  overflow-x: auto;
}
.keypoints {
  background: var(--accent-light);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 16px 0;
}
.keypoints strong {
  display: block;
  font-size: 0.85rem;
  color: var(--accent-hover);
  margin-bottom: 4px;
}
.keypoints ul {
  margin: 0 0 0 1.2em;
}
.prose dl dt {
  font-weight: 700;
  margin-top: 18px;
  scroll-margin-top: 70px;
}
.prose dl dd {
  margin: 4px 0 0;
  color: var(--text2);
}
.prose dd .rel {
  font-size: 0.8rem;
}
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}
.toc a {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  text-decoration: none;
}
.contact-frame {
  width: 100%;
  min-height: 1100px;
  border: 0;
  margin-top: 12px;
}

/* ===== FOOTER NAV ===== */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin-bottom: 10px;
}
.footer-nav a {
  color: var(--text2);
  text-decoration: none;
}
.footer-nav a:hover {
  color: var(--accent);
}

@media (max-width: 640px) {
  .search-btn {
    padding: 0 14px;
  }
  .prose {
    padding: 20px 18px;
  }
  .hero h1 {
    font-size: 1.1rem;
  }
}
.prose td {
  min-width: 4.5em;
}
@media (max-width: 420px) {
  .logo .news {
    display: none;
  }
  .navbar-inner {
    gap: 8px;
    padding: 0 12px;
  }
  .search-form {
    gap: 6px;
  }
  .search-btn,
  .detail-btn {
    padding: 0 10px;
  }
}
