:root {
  color-scheme: light dark;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-2: #edf2f4;
  --text: #16201f;
  --muted: #667372;
  --line: #d8e0df;
  --accent: #0f766e;
  --accent-2: #b45309;
  --focus: #2563eb;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111715;
    --surface: #18211f;
    --surface-2: #202c29;
    --text: #edf5f3;
    --muted: #9cafab;
    --line: #31413d;
    --accent: #4db6a9;
    --accent-2: #f2b36d;
    --focus: #7aa7ff;
    --shadow: none;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.eyebrow,
.date,
.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.3rem, 6vw, 4.8rem);
  line-height: 1.05;
}

h2 {
  font-size: 1.08rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

.toolbar,
.quick-panel,
.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 2fr;
  gap: 16px;
  padding: 16px;
  margin-bottom: 18px;
}

.search {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.search input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  padding: 0 12px;
}

.filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  padding: 0 12px;
}

.filter-button[aria-pressed="true"] {
  border-color: transparent;
  background: var(--accent);
  color: #ffffff;
}

.quick-panel,
.notice {
  padding: 18px;
}

.quick-panel {
  margin-bottom: 28px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.card-grid {
  display: grid;
  gap: 10px;
}

.card-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.link-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.card-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 14px;
}

.card-link:hover {
  background: var(--surface-2);
}

.icon {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  color: var(--accent);
  font-weight: 700;
}

.card-main {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.title,
.description {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.description,
.meta {
  color: var(--muted);
  font-size: 0.86rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding: 10px 14px;
}

.pill {
  border-radius: 999px;
  background: var(--surface-2);
  padding: 2px 8px;
}

.pill.source {
  color: var(--accent);
}

.pill.account {
  color: var(--accent-2);
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 18px;
}

.notice p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 920px) {
  .toolbar,
  .content-grid,
  .card-grid.compact {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  h1 {
    font-size: 2.4rem;
  }

  .status {
    width: 100%;
    justify-content: center;
  }
}
