* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #0b111b;
  color: #e5edf7;
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans JP",
    "Microsoft JhengHei", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

a {
  color: #88e5cd;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
select {
  font: inherit;
}

a:focus-visible,
button:focus-visible,
select:focus-visible {
  outline: 2px solid #54d5bc;
  outline-offset: 3px;
}

#rakuen-app {
  min-height: 100vh;
}

#dash-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 240px;
  z-index: 30;
  padding: 28px 20px;
  background: #111c2a;
  border-right: 1px solid #29384c;
  display: flex;
  flex-direction: column;
}

.dash-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #e5edf7;
  font-weight: 700;
  font-size: 19px;
}

.dash-emblem {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #4a927e;
  border-radius: 8px;
  color: #a5ecd7;
  background: #1a3932;
}

.dash-eyebrow {
  color: #8298b1;
  font-size: 10px;
  letter-spacing: 1.5px;
}

#dash-nav {
  margin-top: 28px;
}

#dash-nav a {
  display: block;
  padding: 12px;
  margin-bottom: 5px;
  border-radius: 5px;
  color: #aebed1;
}

#dash-nav a:hover,
#dash-nav a[aria-current="page"] {
  background: #203b37;
  color: #b7f6e1;
  text-decoration: none;
}

#dash-admin-links {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #29384c;
}

.dash-sidebar-foot {
  margin-top: auto;
  padding-top: 30px;
  color: #88ab9f;
  font-size: 12px;
}

.dash-workspace {
  margin-left: 240px;
  min-width: 0;
}

.dash-header {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 74px;
  padding: 14px 28px;
  border-bottom: 1px solid #29384c;
  background: #101925;
}

#dash-menu {
  display: none;
}

.dash-language {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #9cafc6;
}

.dash-language select {
  min-height: 42px;
  padding: 8px;
  border: 1px solid #35465d;
  border-radius: 5px;
  color: #e5edf7;
  background: #142132;
}

#dashboard {
  max-width: 1220px;
  padding: 26px 28px;
  margin: auto;
}

.dash-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.dash-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 25px;
}

.dash-heading h1 {
  margin: 0;
  font-size: clamp(24px, 4vw, 32px);
}

.dash-muted {
  color: #91a3ba;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.dash-stat {
  padding: 20px;
  border: 1px solid #293b50;
  border-radius: 8px;
  background: #121e2d;
}

.dash-stat h2 {
  margin: 0 0 10px;
  font-size: 13px;
  color: #9eb0c7;
  font-weight: 500;
}

.dash-stat strong {
  font-size: 30px;
  font-weight: 650;
  color: #d0f2e7;
}

.dash-panel {
  padding: 24px;
  margin: 22px 0;
  border: 1px solid #293b50;
  border-radius: 9px;
  background: #121e2d;
}

.dash-section-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.dash-section-top h2 {
  margin: 0;
  font-size: 19px;
}

.dash-section-top a {
  font-size: 13px;
}

.dash-panel h3 {
  font-size: 21px;
  margin: 14px 0;
  overflow-wrap: anywhere;
}

.dash-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dash-badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 4px;
  background: #23473d;
  color: #b4e9d6;
  font-size: 12px;
}

.dash-badge[data-priority="important"] {
  color: #f3d28e;
  background: #463b24;
}

.dash-badge[data-priority="urgent"] {
  color: #ffc1c1;
  background: #542d35;
}

.dash-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.dash-goal {
  padding: 16px;
  border-left: 3px solid #54c6a6;
  border-radius: 4px;
  background: #162f2b;
  margin: 18px 0;
}

.dash-goal p {
  margin: 8px 0 0;
}

.dash-detail-link {
  display: inline-block;
  margin-top: 8px;
}

.dash-notices {
  display: grid;
  gap: 16px;
}

.dash-notice {
  padding: 18px 0;
  border-top: 1px solid #293b50;
}

.dash-notice:first-child {
  border-top: 0;
}

.dash-notice h3 {
  font-size: 18px;
}

#dash-status {
  white-space: pre-line;
}

footer {
  padding: 22px 0;
  color: #61768e;
  font-size: 10px;
  letter-spacing: 1.5px;
}

.dash-shade {
  position: fixed;
  inset: 0;
  z-index: 20;
  border: 0;
  background: #0009;
}

@media (max-width: 900px) {
  #dash-sidebar {
    transform: translateX(-100%);
    transition: transform .18s ease;
  }

  body.dash-menu-open #dash-sidebar {
    transform: translateX(0);
  }

  .dash-workspace {
    margin-left: 0;
  }

  #dash-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .dash-header {
    padding: 12px 16px;
  }

  #dashboard {
    padding: 22px 16px;
  }
}

@media (max-width: 560px) {
  .dash-header > .dash-eyebrow {
    display: none;
  }

  .dash-language > span {
    display: none;
  }

  .dash-stats {
    gap: 8px;
  }

  .dash-stat {
    padding: 14px 10px;
  }

  .dash-stat h2 {
    font-size: 11px;
  }

  .dash-stat strong {
    font-size: 26px;
  }

  .dash-panel {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #dash-sidebar {
    transition: none;
  }
}
/* 画面の高さ・表示倍率に合わせてメニューをスクロール */
#dash-sidebar {
  box-sizing: border-box;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}

/* メニュー項目が押し縮められるのを防止 */
#dash-sidebar > * {
  flex-shrink: 0;
}