:root {
  --ink: #111718;
  --text: #485250;
  --muted: #7e8884;
  --paper: #f7f5f0;
  --white: #ffffff;
  --mist: #e7ede9;
  --sage: #708278;
  --line: rgba(17, 23, 24, 0.12);
  --surface: rgba(255, 255, 255, 0.78);
  --shadow: 0 18px 60px rgba(17, 23, 24, 0.06);
  font-family:
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP",
    system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: 0; }
h1 { margin-bottom: 6px; font-size: clamp(34px, 4vw, 58px); line-height: 1.08; }
h2 { margin-bottom: 12px; font-size: clamp(25px, 2.8vw, 38px); line-height: 1.16; }
h3 { margin-bottom: 7px; font-size: 16px; line-height: 1.45; }
p { color: var(--text); font-size: 13px; line-height: 1.76; }

.app-shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(247, 245, 240, 0.84);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.brand small,
.label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav {
  display: grid;
  gap: 4px;
  margin-top: 38px;
}

.nav a {
  display: flex;
  align-items: center;
  min-height: 39px;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  font-weight: 760;
}

.nav a.active {
  background: var(--ink);
  color: var(--white);
}

.nav a.portal-link {
  min-height: 34px;
  margin-top: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.46);
  color: var(--muted);
  font-size: 12px;
}

.nav a.portal-link + a.portal-link {
  margin-top: 0;
}

.side-note,
.panel,
.card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.side-note {
  padding: 18px;
  box-shadow: none;
}

.main {
  padding: 22px clamp(20px, 3.4vw, 44px) 64px;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
}

.top-actions,
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.button.dark {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.48fr);
  gap: 16px;
  align-items: start;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.panel { padding: clamp(20px, 3vw, 30px); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.section-gap { margin-bottom: 16px; }
.section-top-gap { margin-top: 16px; }
.list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: inherit; text-align: left; }
button.row { width: 100%; cursor: pointer; }
.row:hover { background: rgba(231, 237, 233, 0.36); }
.check { width: 18px; height: 18px; border: 1px solid var(--line); border-radius: 999px; }
.check.done { border-color: var(--sage); background: var(--sage); }
.pill { color: var(--muted); font-size: 12px; font-weight: 850; white-space: nowrap; }
.metric { display: block; margin-top: 6px; font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 500; }
.muted-card { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(247, 245, 240, 0.68); }
.compact-select { max-width: 190px; }
.stack { display: grid; gap: 14px; }
.media-visual {
  width: 100%;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(247, 245, 240, 0.72);
}

.media-visual img {
  width: 100%;
  display: block;
}

.article-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.article-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(247, 245, 240, 0.68);
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.article-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  display: block;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.article-card-body {
  padding: 16px;
}

select,
input,
textarea {
  min-width: 0;
  max-width: 100%;
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(247, 245, 240, 0.74);
  color: var(--ink);
  font-size: 15px;
  font-weight: 760;
}

select,
input {
  min-height: 52px;
  padding: 0 16px;
}

input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  line-height: normal;
  text-align: left;
}

input[type="date"]::-webkit-date-and-time-value {
  min-width: 0;
  text-align: left;
}

textarea {
  min-height: 108px;
  padding: 15px 16px;
  resize: vertical;
  line-height: 1.7;
}

.map-frame {
  width: 100%;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--mist);
}

.map-frame iframe {
  width: 100%;
  min-height: 420px;
  display: block;
  border: 0;
  filter: saturate(0.72) contrast(0.94) brightness(1.03);
}

@media (max-width: 980px) {
  .app-shell,
  .grid-2,
  .grid-3,
  .topbar {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    z-index: 10;
    height: auto;
    padding: 18px 22px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav {
    grid-template-columns: repeat(4, max-content);
    overflow-x: auto;
    margin-top: 18px;
  }

  .side-note { display: none; }
}

@media (max-width: 640px) {
  .row { grid-template-columns: 1fr; }
  .calendar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .article-card-grid { grid-template-columns: 1fr; }
  .top-actions, .actions { flex-wrap: wrap; justify-content: flex-start; }
}
