﻿:root {
  --bg: #0f172a;
  --bg-soft: #111b31;
  --card: rgba(255, 255, 255, 0.9);
  --ink: #0f172a;
  --muted: #475569;
  --line: #dbe2ef;
  --brand: #0e7490;
  --brand-2: #2563eb;
  --radius: 16px;
  --shadow: 0 18px 46px rgba(15, 23, 42, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  background: linear-gradient(165deg, var(--bg), var(--bg-soft));
  min-height: 100vh;
  position: relative;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(10px);
  pointer-events: none;
}

.orb-a {
  width: 340px;
  height: 340px;
  left: -80px;
  top: 18px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.3), rgba(56, 189, 248, 0));
}

.orb-b {
  width: 420px;
  height: 420px;
  right: -130px;
  top: 210px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.25), rgba(37, 99, 235, 0));
}

.page {
  max-width: 1380px;
  margin: 0 auto;
  padding: 28px 16px 56px;
  display: grid;
  gap: 16px;
}

.hero {
  color: #e2e8f0;
  padding: 4px 4px 12px;
}

.kicker {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  opacity: 0.85;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5.5vw, 3.2rem);
  line-height: 1.05;
}

.subtitle {
  margin: 10px 0 0;
  font-size: 0.98rem;
  opacity: 0.9;
}

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  padding: 18px;
}

.app-shell {
  display: grid;
  gap: 12px;
  position: relative;
}

.top-nav {
  position: fixed;
  top: 68px;
  left: 14px;
  z-index: 70;
  width: min(330px, calc(100vw - 28px));
  max-height: calc(100vh - 82px);
  overflow-y: auto;
  display: grid;
  gap: 10px;
  align-content: start;
  transform: translateX(calc(-100% - 18px));
  transition: transform 0.22s ease;
  pointer-events: none;
}

.app-shell.nav-open .top-nav {
  transform: translateX(0);
  pointer-events: auto;
}

.menu-toggle-button {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 80;
  background: linear-gradient(135deg, #0f172a, #334155);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-email {
  margin: 0;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.86rem;
  color: var(--muted);
  min-width: 0;
  word-break: break-all;
}

.auth-actions {
  display: grid;
  gap: 8px;
}

.auth-actions button {
  width: 100%;
  text-align: left;
}

.remember-name-setting {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  font-weight: 400;
  font-size: 0.88rem;
  color: var(--muted);
}

.remember-name-setting input {
  width: auto;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  accent-color: #2563eb;
}

.remember-name-setting input[type="checkbox"] {
  inline-size: 16px;
  block-size: 16px;
}

.theme-toggle {
  background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
}

.content-card {
  min-height: 740px;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.hint {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.small-hint {
  margin: 8px 0 0;
  font-size: 0.82rem;
}

.stack {
  display: grid;
  gap: 10px;
}

.course-filter-controls {
  margin-top: 10px;
}

.course-filter-controls button {
  width: 100%;
}

.course-pagination {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.course-pagination .hint {
  margin: 0;
  text-align: center;
}

.course-pagination button {
  padding: 8px 10px;
}

label {
  font-weight: 700;
  font-size: 0.93rem;
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #bfd0e8;
  border-radius: 10px;
  background: #ffffff;
}

button {
  border: none;
  border-radius: 10px;
  padding: 11px 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  filter: brightness(0.96);
}

button.secondary {
  background: linear-gradient(135deg, #64748b, #475569);
}

.tab-button.active {
  outline: 2px solid rgba(59, 130, 246, 0.38);
}

.top-nav .tab-button,
.top-nav #themeToggleButton {
  width: 100%;
  text-align: left;
}

.hidden {
  display: none;
}

form[aria-disabled="true"] {
  opacity: 0.64;
}

form[aria-disabled="true"] button {
  cursor: not-allowed;
}

.link {
  color: #1d4ed8;
  font-weight: 700;
}

.list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 10px;
}

.compact-list {
  margin-top: 8px;
  gap: 8px;
}

.compact-list .list-item {
  padding: 8px 10px;
}

.compact-list .list-item p {
  margin: 4px 0 0;
}

.list-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #ffffff;
}

.list-item p {
  margin: 6px 0;
}

.courses-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 12px;
}

.course-list-pane,
.course-detail-pane {
  border: 1px solid #d3d0c7;
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px;
}

.course-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: 580px;
  overflow: auto;
}

.course-item button {
  width: 100%;
  text-align: left;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #d7d4c9;
  padding: 10px;
  border-radius: 10px;
}

.course-item button.active {
  border: 2px solid #2563eb;
  background: #eff6ff;
}

.course-meta {
  margin: 6px 0 12px;
  color: #475569;
  word-break: break-word;
  line-height: 1.5;
}

.course-year-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.course-year-switch .year-switch-button {
  width: auto;
  padding: 6px 10px;
}

.course-year-switch .year-switch-button.active {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #ffffff;
  cursor: default;
}

.course-year-switch .year-switch-button:disabled {
  filter: none;
  opacity: 1;
}

.detail-block {
  border: 1px solid #dbe2ef;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px;
  margin-top: 10px;
}

.detail-block h4 {
  margin: 0 0 8px;
}
.article-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.article-card h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
}

.article-card p {
  margin: 0;
}

.article-card .hint {
  margin-top: 8px;
}
.my-page-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.my-page-layout h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
}

.my-page-points {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 800;
  color: #1d4ed8;
}

.about-layout {
  display: grid;
  gap: 10px;
}

.about-layout .detail-block {
  line-height: 1.7;
}

.about-layout h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
}

.about-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 10px;
}

.about-list li {
  margin: 0;
}
.review-stars {
  font-weight: 700;
  color: #b45309;
}

.board-layout {
  display: grid;
  gap: 12px;
  grid-template-columns: 320px 1fr;
  grid-template-areas:
    "create main"
    "threads main";
}

.board-block {
  border: 1px solid #d3d0c7;
  border-radius: 12px;
  background: #f7f3e9;
  padding: 12px;
}

.board-block h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.thread-create {
  grid-area: create;
}

.thread-sidebar {
  grid-area: threads;
}

.thread-main {
  grid-area: main;
  background: #fdfcf8;
}

.thread-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.thread-item button {
  width: 100%;
  text-align: left;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #d7d4c9;
  padding: 10px;
  border-radius: 10px;
}

.thread-item button.active {
  border: 2px solid #2563eb;
  background: #eff6ff;
}

.thread-meta {
  margin-top: 5px;
  font-size: 0.83rem;
  color: #4b5563;
}

.board-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: "BIZ UDPGothic", "MS PGothic", monospace;
  font-size: 0.95rem;
  border: 1px solid #d3d0c7;
  border-radius: 10px;
  overflow: hidden;
  background: #fdfcf8;
}

.board-item {
  padding: 10px 12px;
  border-bottom: 1px dashed #c9c3b5;
}

.board-item:last-child {
  border-bottom: none;
}

.board-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.board-no {
  color: #be123c;
  font-weight: 700;
}

.board-name {
  font-weight: 700;
}

.board-name.member-name {
  color: #166534;
}

.board-name.guest-name {
  color: #8b4513;
}

.board-title {
  color: #1d4ed8;
  font-weight: 700;
}

.board-date,
.board-id {
  color: #475569;
  font-size: 0.84rem;
}

.board-body {
  margin-top: 6px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
}

.board-quote {
  color: #15803d;
}

.reply-form {
  margin-top: 12px;
}

.market-layout {
  display: grid;
  gap: 12px;
}

.market-form-card h3 {
  margin: 0 0 8px;
}

.market-columns {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.market-list-block h4 {
  margin: 0;
}

.market-suggest-list {
  margin-top: 0;
  max-height: 220px;
  overflow: auto;
}

.market-suggest-list .list-item {
  padding: 0;
}

.market-suggest-list button {
  width: 100%;
  text-align: left;
  border-radius: 0;
  background: #ffffff;
  color: #0f172a;
  border: none;
  padding: 10px;
}

.market-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.market-item-head strong {
  font-size: 1rem;
}

.market-item-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  word-break: break-word;
}

.market-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.market-item-actions button {
  width: auto;
  padding: 8px 10px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

.status-listing {
  background: #dcfce7;
  color: #166534;
}

.status-pending {
  background: #fef9c3;
  color: #854d0e;
}

.status-sold {
  background: #dbeafe;
  color: #1e3a8a;
}

.dm-layout {
  display: grid;
  gap: 12px;
  grid-template-columns: 320px 1fr;
}

.dm-room-item button {
  width: 100%;
  text-align: left;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #d7d4c9;
  padding: 10px;
  border-radius: 10px;
}

.dm-room-item button.active {
  border: 2px solid #2563eb;
  background: #eff6ff;
}

.dm-message-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #ffffff;
}

.dm-message-item.me {
  border-color: #93c5fd;
  background: #eff6ff;
}

.dm-message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #475569;
  font-size: 0.8rem;
}

.dm-message-body {
  margin-top: 4px;
  white-space: pre-wrap;
  word-break: break-word;
}
body[data-theme="light"] {
  --bg: #e8eefb;
  --bg-soft: #f4f8ff;
  --card: rgba(255, 255, 255, 0.92);
  --ink: #0f172a;
  --muted: #475569;
  --line: #dbe2ef;
}

body[data-theme="light"] .hero {
  color: #0f172a;
}

body[data-theme="light"] .kicker,
body[data-theme="light"] .subtitle {
  opacity: 0.75;
}

body[data-theme="light"] .card {
  border: 1px solid rgba(148, 163, 184, 0.35);
}

body[data-theme="light"] .user-email,
body[data-theme="light"] .course-list-pane,
body[data-theme="light"] .course-detail-pane,
body[data-theme="light"] .board-block {
  background: #ffffff;
}

body[data-theme="light"] .thread-main,
body[data-theme="light"] .board-list {
  background: #ffffff;
}

body[data-theme="light"] .orb-a {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0));
}

body[data-theme="light"] .orb-b {
  background: radial-gradient(circle, rgba(14, 165, 233, 0.18), rgba(14, 165, 233, 0));
}

@media (max-width: 1120px) {
  .dm-layout {
    grid-template-columns: 1fr;
  }

  .courses-layout {
    grid-template-columns: 1fr;
  }

  .board-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "create"
      "threads"
      "main";
  }
}

@media (max-width: 760px) {
  .user-email {
    min-width: 0;
  }
}


