@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Roboto:wght@400;500;700&display=swap');
/* ==========================================================================
   Base Theme Tokens
   ========================================================================== */
:root { --bg: #ffffff; --text: #0f172a; --muted: #64748b; --accent: #2563eb; --ring: rgba(37, 99, 235, 0.35); --overlay: rgba(2, 6, 23, 0.5); --panel: #0b1220; --panel-text: #e5e7eb; --panel-muted: #a3aed0; --main-color: #2B2B2B; --primary: #0099EB; --primaryRgb: 0, 153, 235; --secondary: #38ABE0; --thirdly: #51CCE8; --background: #E8E8E8; --background2: #f5f5f5; --category-background: #F0EFEF; --line: #E0E0E0; --line-rgb: 224, 224, 224; --text-sub-color: #C3C3C3; --text-sub-color-2: #888888; --border: rgba(15, 23, 42, 0.08); }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: 'Noto Sans JP', system-ui, -apple-system, Segoe UI, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji'; color: var(--main-color); background: var(--bg); letter-spacing: .02em; line-height: 1.6; font-weight: 400; width: 100%; padding-top: 56px; }
@media (min-width:1024px) { body { padding-top: 72px; } }
a { text-decoration: none; color: inherit; }
.heading, h1, h2, h3, h4, h5, h6 { font-weight: 700; }
.num { font-family: 'Roboto', 'Noto Sans JP', sans-serif; font-feature-settings: 'lnum' 1, 'tnum' 1; font-weight: 500; }
.section { max-width: 1080px; margin: 0 auto; padding: 16px; }
.center { text-align: center; }
.hidden { display: none !important; }
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.display { font-weight: 700; font-size: clamp(28px, 6vw, 44px); line-height: 1.2; }
.w-100 { width: 100%; }
.mt-4 { margin-top: 4px; }
.mt-12 { margin-top: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border); background: #fff; color: var(--text); text-decoration: none; cursor: pointer; font-weight: 700; font-size: 14px; line-height: 1; transition: transform .08s ease, filter .18s ease; }
.btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.btn:hover { filter: brightness(0.99); }
.btn:active { transform: translateY(1px); }
.btn--primary { border-color: #0099EB; color: #0099EB; background: #fff; }
.btn--primary:hover { background: #0099EB; color: #fff; }
.btn-outline { border-color: #cbd5e1; background: #fff; color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.btn-primary { position: relative; width: 285px; height: 60px; border-radius: 30px; font-size: 16px; line-height: 24px; letter-spacing: .08em; border: 1px solid var(--primary); color: var(--primary); background-image: linear-gradient(90deg, var(--primary), var(--primary)); background-position: left; background-size: 0% 100%; background-repeat: no-repeat; background-color: #fff; transition: background-size .35s ease, transform .08s ease; }
.btn-primary:active { transform: translateY(1px); }
@media (min-width:1025px) { .btn-primary { width: 248px; } .btn-primary:hover { background-size: 100% 100%; color: #fff; } }
.spinner { --sz: 40px; inline-size: var(--sz); block-size: var(--sz); border-radius: 999px; border: 3px solid rgba(15, 23, 42, .12); border-top-color: #0099EB; animation: spin 1s linear infinite; margin-inline: auto; }
.spinner.lg { --sz: 54px; border-width: 4px; }
.sr-only { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
html.opening-off .op { display: none !important; }
.op { position: fixed; inset: 0; z-index: 99; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; animation: overlay-hide 0s 2.1s forwards; }
.op img { animation: img-fade-up 0.8s ease forwards 0.7s; }
.op::before, .op::after { content: ""; position: absolute; inset: 0; }
.op::before { background: #fff; z-index: -1; animation: white-fade 0.6s ease forwards 1.2s; }
.op::after { background: linear-gradient(var(--primary), var(--thirdly)); z-index: -2; animation: grad-slide-up 0.6s ease-in-out forwards 1.5s; }
@keyframes img-fade-up { to { transform: translateY(-100px); opacity: 0; } }
@keyframes white-fade { to { opacity: 0; } }
@keyframes grad-slide-up { 99% { transform: translateY(-100%); opacity: 1; } 100% { opacity: 0; } }
@keyframes overlay-hide { to { z-index: 0; visibility: hidden; pointer-events: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
#loading-overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(6px); z-index: 90; }
#loading-overlay[hidden] { display: none; }
.loading-overlay__panel { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 32px; border-radius: 16px; background: rgba(255, 255, 255, 0.9); color: var(--main-color); box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12); }
.loading-overlay__spinner { width: 44px; height: 44px; border-radius: 999px; border: 4px solid rgba(15, 23, 42, 0.14); border-top-color: var(--primary); animation: spin 0.9s linear infinite; }
.loading-overlay__message { margin: 0; font-size: 16px; font-weight: 500; letter-spacing: .05em; }
/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
  will-change: transform;
  transition: transform .28s ease;
}
.site-header.header-hidden { transform: translateY(-100%); }
body.is-locked .site-header { transform: translateY(0); }
.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.header-row { height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-logo { width: auto; height: 26px; display: block; }
.nav-inline { display: none; align-items: center; gap: 20px; }
.header-actions { display: inline-flex; align-items: center; gap: 10px; }
.account-wrapper { position: relative; }
.account-menu { position: absolute; top: calc(100% + 10px); right: 0; min-width: 220px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 30px rgba(15, 23, 42, .14); padding: 12px; z-index: 60; }
.account-menu__head { display: grid; gap: 4px; margin-bottom: 10px; }
.account-name { margin: 0; font-weight: 700; color: var(--text); }
.account-email { margin: 0; font-size: 12px; color: var(--text-sub-color-2); word-break: break-all; }
.account-class { margin: 0; font-size: 12px; color: var(--text-sub-color-2); }
.account-menu__actions { display: grid; gap: 8px; }
.account-action { display: inline-flex; align-items: center; justify-content: center; padding: 8px 10px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--text); font-weight: 600; text-decoration: none; cursor: pointer; }
.account-action:hover { border-color: #0099EB; color: #0099EB; }
.account-links { display: grid; gap: 4px; margin-top: 6px; }
.account-link { font-size: 12px; color: #0ea5e9; text-decoration: none; }
.account-link:hover { text-decoration: underline; }
.account-link.account-delete { color: #b42318; font-weight: 600; }
@media (min-width:1024px) { .account-menu { top: calc(100% + 20px); } }


.nav-inline a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; cursor: pointer; user-select: none; }
.nav-inline a:hover, .nav-inline a:focus { color: var(--text); }
.push { display: none; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.push button { border: 1px solid var(--border); background: transparent; border-radius: 999px; padding: 6px 10px; cursor: pointer; }
.push button[aria-pressed="true"] { background: #eef2ff; color: #0099EB; border-color: #0099EB; }
.user-avatar { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; overflow: hidden; border: 1px solid var(--border); background: #fff; padding: 0; cursor: pointer; }
.user-avatar img { width: 40px; height: 40px; display: block; object-fit: cover; object-position: center; }
.menu-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: #fff; cursor: pointer; user-select: none; }
.menu-toggle:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.menu-toggle .bars { position: relative; width: 18px; height: 14px; }
.menu-toggle .bars::before, .menu-toggle .bars::after, .menu-toggle .bars span { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.menu-toggle .bars::before { top: 0; }
.menu-toggle .bars span { top: 6px; }
.menu-toggle .bars::after { bottom: 0; }
.menu-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars span { opacity: 0; }
.menu-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }
.menu-icon { font-weight: 600; font-size: 14px; color: var(--muted); }
.offcanvas-root { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.offcanvas-overlay { position: absolute; inset: 0; background: var(--overlay); opacity: 0; transition: opacity .3s ease; }
.offcanvas-panel { position: absolute; inset-block: 0; inset-inline-end: 0; width: min(92vw, 420px); background: linear-gradient(135deg, rgb(0, 153, 235) 0%, rgb(56, 171, 224) 52.22%, rgb(81, 204, 232) 100%); color: #fff; display: grid; grid-template-rows: auto 1fr auto; gap: 12px; transform: translateX(100%); transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
.offcanvas-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid rgba(255, 255, 255, .25); }
.offcanvas-title { font-weight: 700; letter-spacing: .2px; display: flex; align-items: center; gap: 8px; }
.menu-avatar { display: inline-block; width: 36px; height: 36px; border-radius: 999px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .6); }
.menu-avatar img { width: 36px; height: 36px; display: block; object-fit: cover; }
.close-btn { inline-size: 36px; block-size: 36px; border-radius: 999px; border: none; cursor: pointer; background: rgba(255, 255, 255, .25); color: #fff; display: inline-grid; place-items: center; }
.close-btn:focus-visible { outline: 2px solid rgba(255, 255, 255, .6); outline-offset: 2px; }
.offcanvas-content { padding: 12px 16px 24px; overflow: auto; }
.menu-list { list-style: none; margin: 0; padding: 8px 0; display: grid; gap: 6px; }
.menu-list a { display: block; text-decoration: none; color: #fff; padding: 14px 12px; border-radius: 12px; font-weight: 700; font-size: 18px; letter-spacing: .2px; background: transparent; transition: background .2s ease, transform .08s ease; cursor: pointer; user-select: none; }
.menu-list a[role="button"] { cursor: pointer; }
.menu-list a:hover { background: rgba(255, 255, 255, .15); }
.menu-list a:active { transform: translateY(1px); }
.offcanvas-footer { padding: 16px 18px 20px; border-top: 1px solid rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .95); font-size: 13px; }
.socials { display: flex; gap: 10px; margin-top: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: #fff; border: 1px solid rgba(255, 255, 255, .6); border-radius: 999px; padding: 6px 10px; font-size: 13px; background: transparent; cursor: pointer; transition: background-color .2s ease, border-color .2s ease; }
.pill:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .9); }
.pill[aria-pressed="true"] { background: rgba(255, 255, 255, .28); border-color: rgba(255, 255, 255, .95); color: #fff; }
.offcanvas-root[data-open="true"] { pointer-events: auto; }
.offcanvas-root[data-open="true"] .offcanvas-overlay { opacity: 1; }
.offcanvas-root[data-open="true"] .offcanvas-panel { transform: translateX(0%); }
@media (prefers-reduced-motion:reduce) {
  .site-header { transition: none; }
  .offcanvas-overlay, .offcanvas-panel, .menu-toggle .bars::before, .menu-toggle .bars::after, .menu-toggle .bars span { transition: none; }
}
@media (min-width:1024px) { .brand-logo { height: 43.4px; } .header-row { height: 72px; } .nav-inline, .push { display: flex; } .push button { display: none; } .user-avatar { display: inline-flex; } }
body.is-locked { overflow: hidden; }
body.community-active { overflow: hidden; height: 100dvh; padding-bottom: 0; }
body.community-active #app { height: 100%; }

/* ==========================================================================
   Index Page
   ==========================================================================
 */
.posts { display: grid; gap: 20px; }
.article-link { display: block; color: inherit; }
.article { display: grid; gap: 12px; padding: 16px 0 36px; border-bottom: 1px solid var(--line); cursor: pointer; }
.article-inner { display: grid; gap: 16px; }
.thumb { width: 100%; aspect-ratio: 16/9; background: var(--background2); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.thumb img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
.meta { display: flex; align-items: center; gap: 10px; }
.badge { display: none; padding: 2px 8px; border-radius: 999px; background: #e5f2ff; color: var(--accent); font-size: 12px; font-weight: 700; }
.article.is-unread .badge { display: inline-block; }
.date { color: var(--text-sub-color-2); font-size: 14px; }
.title { font-size: clamp(16px, 2.4vw, 20px); line-height: 1.4; margin: 4px 0; color: var(--main-color); }
.subtitle { color: var(--main-color); font-size: 14px; }
.article-reactions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; min-height: 20px; }
.reaction-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: #f1f5f9; font-size: 13px; color: var(--main-color); }
.reaction-pill__emoji { font-size: 14px; }
.reaction-pill__count { font-weight: 700; font-size: 12px; }
.reaction-stats { font-size: 13px; }
.reaction-stats .reaction-counts { font-weight: 700; }
@media (min-width:768px) { .article-inner { grid-template-columns: 260px 1fr; align-items: start; } }
@media (max-width:767px) { .thumb:empty { display: none; } }
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 36px 0 36px; column-gap: 16px; }
.pagination__left { justify-self: end; }
.pagination__pages { justify-self: center; display: flex; align-items: center; gap: 10px; }
.pagination__right { justify-self: start; }
.section-title { font-size: 18px; font-weight: 700; color: var(--main-color); }
.section-note { font-size: 12px; color: var(--text-sub-color-2); }
.page-btn { width: 50px; height: 50px; border-radius: 999px; border: 2px solid var(--line); background: none; color: var(--main-color); display: grid; place-items: center; text-decoration: none; cursor: pointer; font-size: 16px; }
.page-nav { background: none; border: none; width: auto; height: auto; padding: 0 8px; color: var(--main-color); font-weight: 700; cursor: pointer; }
.page-btn .num { font-weight: 700; }
.page-btn[aria-current="page"], .page-btn.active { border-color: var(--primary); }
.page-btn:disabled { opacity: .45; cursor: not-allowed; }
.page-nav:disabled { opacity: .45; cursor: not-allowed; }
@media (min-width:1024px) { .page-btn { width: 60px; height: 60px; font-size: 18px; } }
/* ==========================================================================
   News Detail Page
   ========================================================================== */
#post-container .center { padding: 48px 0; }
@media (main-with:768px) { #post-container .center { padding: 64px 0; } }
.news-post { display: grid; gap: 24px; }
.news-post-header { display: grid; gap: 12px; }
.news-post-text { display: grid; gap: 8px; }
.news-post-date { color: var(--text-sub-color-2); font-size: 14px; }
.news-post-title { font-weight: 700; font-size: clamp(22px, 4vw, 32px); line-height: 1.3; margin: 0; color: var(--text); }
.news-post-subtitle { color: #475569; font-size: 16px; }
.news-post-body { font-size: 16px; line-height: 1.8; }
.news-post-hero { margin: 0; }
.news-post-hero img { width: 100%; max-width: 100%; height: auto; display: block; border: 1px solid var(--border); background: var(--bg); pointer-events: none; user-select: none; -webkit-touch-callout: none; }
.news-post-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.news-post-gallery { display: grid; gap: 24px; justify-items: center; }
.news-post-gallery-item { display: flex; justify-content: center; width: 100%; }
.news-post-gallery-item img { width: min(640px, 100%); height: auto; display: block; border: 1px solid var(--border); background: var(--bg); }
.news-post-gallery-item.is-square img { width: min(500px, 100%); }
.news-post-body a { color: #48c5f4; }
.news-reactions { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: #f8fafc; }
.news-reactions__list { display: flex; flex-wrap: wrap; gap: 10px; }
.reaction-button { border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; background: #fff; display: inline-flex; align-items: center; gap: 8px; font-size: 16px; cursor: pointer; transition: transform .08s ease, box-shadow .18s ease; }
.reaction-button[aria-pressed="true"], .reaction-button.is-active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 153, 235, 0.18); }
.reaction-button__emoji { font-size: 20px; line-height: 1; }
.reaction-button__count { font-weight: 700; font-size: 14px; color: var(--text-sub-color-2); }
/* =========================================================================
   PDF Viewer
   ========================================================================= */
.pdf-content { display: flex; flex-direction: column; gap: 18px; }
.pdf-image { width: 100%; height: auto; display: block; border: none; border-radius: 0; background: transparent; pointer-events: none; user-select: none; }
#pdf-page .pdf-content { align-items: center; }
#pdf-page .pdf-image { width: min(100%, 980px); }
#pdf-page .pdf-image[src$=".svg"] { width: min(100%, 1200px); }
.pdf-download { text-align: center; margin-top: 4px; }
.pdf-download__link { color: #48c5f4; font-weight: 700; }
.pdf-download__link:hover { text-decoration: underline; }
.pdf-error { max-width: 640px; margin: 0 auto; padding: 20px 16px; border-radius: 12px; background: #fef2f2; color: #991b1b; line-height: 1.6; }
.search-empty { margin: 12px 0 0; font-size: 14px; color: var(--text-sub-color-2); }




.btn--large {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: 30px;
}

.loading-placeholder {
  text-align: center;
  padding: 40px;
  color: var(--text-sub-color-2);
}

.announcement-card {
  margin-bottom: 24px;
  padding: 20px;
  cursor: default;
}

.announcement-header {
  margin-bottom: 14px;
}

.announcement-sender {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sender-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.sender-info {
  line-height: 1.3;
}

.sender-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.announcement-meta {
  font-size: 12px;
  color: var(--text-sub-color-2);
  display: flex;
  align-items: center;
  gap: 4px;
}

.announcement-body {
  margin-bottom: 16px;
}

.announcement-text {
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--main-color);
}

.announcement-text.is-collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 10em;
}

.btn-expand {
  display: block;
  width: 100%;
  padding: 8px 0;
  margin-top: 8px;
  border: none;
  background: none;
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  border-top: 1px dashed var(--line);
}

.announcement-materials {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0;
  padding: 12px;
  background: var(--background2);
  border-radius: 12px;
}

.material-item {
  display: block;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.1s ease;
}

.material-item:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.material-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--category-background);
}

.material-icon {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--category-background);
}

.material-title {
  display: block;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-footer {
  display: flex;
  justify-content: flex-end;
}

.btn--small {
  padding: 8px 16px;
  font-size: 12px;
  border-radius: 20px;
}
