:root {
  font-family: "Yu Gothic UI","Meiryo",system-ui,sans-serif;
  color: #1d2d4e;
  background: #f4f7fc;
  font-size: 16px;
  line-height: 1.7;
  font-synthesis: none;
  --blue: #285ad8;
  --navy: #17386f;
  --muted: #63718a;
  --line: #dce4f0;
  --soft: #edf3ff;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none!important;
}

body {
  margin: 0;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,input,select,textarea {
  font: inherit;
}

button,a,input,select,textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

:focus-visible {
  outline: 3px solid #698ef2;
  outline-offset: 3px;
}

h1,h2,h3,p {
  margin: 0;
}

h1 {
  font-size: 1.7rem;
  line-height: 1.5;
  letter-spacing: .01em;
}

h2 {
  font-size: 1.15rem;
}

h3 {
  font-size: 1.03rem;
}

p {
  overflow-wrap: anywhere;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  width: 100%;
  margin: 1rem 0;
}

textarea {
  width: 100%;
  resize: vertical;
}

input,select,textarea {
  color: inherit;
  border: 1px solid #cbd7e7;
  border-radius: 8px;
  background: white;
  padding: .65rem .85rem;
  max-width: 100%;
}

input[type=checkbox],input[type=radio] {
  accent-color: var(--blue);
}

input[type=file] {
  padding: .5rem;
  width: 100%;
}

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

table {
  border-collapse: collapse;
  font-size: .9rem;
}

th,td {
  border: 1px solid var(--line);
  padding: .5rem .7rem;
  text-align: left;
}

th {
  background: var(--soft);
}

.sidebar {
  width: 246px;
  position: fixed;
  inset: 0 auto 0 0;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 1.8rem 1rem;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: #20375b;
  padding: 0 .45rem 1.7rem;
}

.brand:hover {
  text-decoration: none;
}

.brand-symbol {
  display: grid;
  place-items: center;
  width: 42px;
  height: 44px;
  background: var(--blue);
  color: white;
  font-weight: 800;
  border-radius: 11px;
  flex: none;
}

.brand strong {
  font-size: 1.12rem;
  display: block;
}

.brand div>span {
  display: block;
  font-size: .72rem;
  color: var(--muted);
  margin-top: 1px;
  white-space: nowrap;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-height: 46px;
  padding: .55rem .85rem;
  border-radius: 9px;
  color: #586984;
  font-weight: 600;
  font-size: .93rem;
}

.nav-link:hover {
  background: #f3f6fc;
  text-decoration: none;
}

.nav-link.active {
  background: #eaf0ff;
  color: #2457d2;
}

.nav-icon {
  width: 22px;
  font-size: 1.15rem;
  text-align: center;
  line-height: 1;
}

.sidebar-foot {
  margin-top: auto;
  padding: 1.5rem .85rem 0;
  color: var(--muted);
  font-size: .8rem;
}

.sidebar-foot p {
  margin-top: .35rem;
  font-size: .75rem;
}

.connection-dot {
  display: inline-block;
  height: 7px;
  width: 7px;
  border-radius: 50%;
  background: #3f9f80;
  margin-right: 7px;
}

.workspace {
  margin-left: 246px;
}

.topbar {
  height: 74px;
  border-bottom: 1px solid var(--line);
  background: #ffffffdf;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  font-weight: 600;
}

.topbar-meta {
  font-size: .8rem;
  color: var(--muted);
  font-weight: 400;
}

.main-content {
  max-width: 1320px;
  margin: auto;
  padding: 2rem 2.5rem 3.5rem;
  outline: none;
}

.page-head {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-bottom: .3rem;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 1.5rem;
  box-shadow: 0 3px 12px #17386f03;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,260px),1fr));
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  align-items: start;
}

.actions {
  display: flex;
  gap: .7rem;
  flex-wrap: wrap;
  align-items: center;
}

.muted {
  color: var(--muted);
  font-size: .9rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: .18rem .6rem;
  border-radius: 6px;
  background: #edf2fa;
  color: #556c91;
  font-size: .8rem;
  white-space: nowrap;
  font-weight: 500;
}

.button,button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 42px;
  border: 1px solid #cbd8ed;
  border-radius: 8px;
  padding: .55rem 1rem;
  background: white;
  color: #365987;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  width: fit-content;
}

.button:hover {
  background: #f3f6ff;
  text-decoration: none;
}

.button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
  box-shadow: 0 3px 7px #285ad81a;
}

.button.primary:hover {
  background: #204cbb;
}

.button.secondary {
  background: #f7f9fe;
}

.button.danger {
  color: #ae394d;
  border-color: #e9b7c0;
}

.section-title {
  padding-bottom: .3rem;
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 2rem 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.notice {
  padding: 1rem 1.2rem;
  border: 1px solid #d6e2fa;
  border-radius: 9px;
  background: #f1f6ff;
  color: #3f5b87;
  font-size: .9rem;
}

.storage-warning {
  margin: 1rem 2.5rem 0;
  background: #fff8e9;
  border-color: #eedba9;
  color: #7d5d1a;
}

.storage-warning[hidden] {
  display: none;
}

.loading {
  max-width: 650px;
  margin: 4rem auto;
  padding: 2rem;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  padding: .6rem 1rem;
  background: white;
  z-index: 100;
}

.skip-link:focus {
  top: .6rem;
}

.welcome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 2rem 2.3rem;
  border: 1px solid #d7e3f9;
  background: linear-gradient(105deg,#eaf1ff 0%,#eff5ff 70%,#e1ebff 100%);
  border-radius: 16px;
}

.welcome h1 {
  font-size: 1.9rem;
  color: #17386f;
}

.welcome p {
  color: #526b90;
  font-size: .92rem;
  margin-top: .6rem;
}

.welcome .actions {
  margin-top: 1.4rem;
}

.welcome-mark {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 1px solid #cbdcf9;
  color: #4f79be;
  background: #ffffff55;
  box-shadow: 0 0 0 14px #ffffff38;
}

.welcome-mark span:first-child {
  font-size: 3.5rem;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: -.06em;
}

.progress-grid {
  grid-template-columns: repeat(3,1fr);
}

.progress-card {
  color: inherit;
  transition: transform .15s,box-shadow .15s;
}

.progress-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 5px 18px #17386f0d;
}

.progress-label {
  font-weight: 700;
  color: #465f87;
  font-size: .92rem;
}

.progress-value {
  font-weight: 750;
  font-size: 2rem;
  color: #203d73;
  line-height: 1.5;
  margin: .4rem 0;
}

.progress-value span {
  font-size: 1rem;
  font-weight: 400;
  color: #8290a6;
}

progress {
  width: 100%;
  height: 7px;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  display: block;
  margin: .45rem 0 .85rem;
  background: #e7edf7;
}

progress::-webkit-progress-bar {
  background: #e7edf7;
}

progress::-webkit-progress-value {
  background: var(--blue);
  border-radius: 10px;
}

progress::-moz-progress-bar {
  background: var(--blue);
}

.dashboard-bottom {
  grid-template-columns: 1.2fr 1fr;
}

.learning-row {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .85rem 0;
  color: #2a4269;
  border-bottom: 1px solid #edf1f7;
}

.learning-row:last-child {
  border-bottom: 0;
}

.learning-row>div {
  flex: 1;
  min-width: 0;
}

.learning-row strong {
  font-size: .92rem;
}

.learning-row p {
  font-size: .8rem;
  margin-top: .2rem;
}

.learning-row:hover {
  text-decoration: none;
  color: var(--blue);
}

.row-icon {
  width: 36px;
  height: 36px;
  background: #edf3ff;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-weight: 650;
  color: var(--blue);
  flex: none;
}

.curriculum-note {
  color: #7c899d;
  font-size: .78rem;
  max-width: 900px;
}

@media(max-width:1050px) {
  .sidebar {
    width: 216px;
    padding-left: .6rem;
    padding-right: .6rem;
  }
  .workspace {
    margin-left: 216px;
  }
  .main-content {
    padding: 1.7rem;
  }
  .topbar {
    padding: 0 1.7rem;
  }
  .welcome {
    padding: 1.6rem;
  }
  .welcome-mark {
    width: 105px;
    height: 105px;
  }
  .welcome h1 {
    font-size: 1.65rem;
  }
  .panel {
    padding: 1.2rem;
  }
  .dashboard-bottom {
    grid-template-columns: 1fr;
  }
  .storage-warning {
    margin: 1rem 1.7rem 0;
  }
}

@media(max-width:720px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: .8rem 1rem .5rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    padding: 0 0 .7rem;
  }
  .brand-symbol {
    height: 34px;
    width: 34px;
    font-size: .9rem;
    border-radius: 8px;
  }
  .brand strong {
    font-size: 1rem;
  }
  .brand div>span {
    font-size: .65rem;
  }
  .sidebar nav {
    flex-direction: row;
    overflow-x: auto;
    gap: .3rem;
    padding-bottom: .3rem;
  }
  .nav-link {
    flex: none;
    min-height: 40px;
    padding: .4rem .7rem;
    font-size: .84rem;
    gap: .4rem;
  }
  .nav-icon {
    font-size: 1rem;
    width: 18px;
  }
  .sidebar-foot {
    display: none;
  }
  .workspace {
    margin: 0;
  }
  .topbar {
    height: 48px;
    padding: 0 1.1rem;
    font-size: .85rem;
  }
  .main-content {
    padding: 1.3rem 1rem 2rem;
  }
  .welcome {
    padding: 1.4rem;
    gap: 0;
  }
  .welcome-mark {
    display: none;
  }
  .welcome h1 {
    font-size: 1.55rem;
  }
  .welcome p {
    font-size: .88rem;
  }
  .welcome .actions {
    gap: .5rem;
  }
  .welcome .button {
    font-size: .83rem;
    padding: .6rem .7rem;
  }
  .progress-grid {
    gap: .6rem;
  }
  .progress-card {
    padding: .85rem .7rem;
  }
  .progress-label {
    font-size: .79rem;
  }
  .progress-value {
    font-size: 1.7rem;
  }
  .progress-value span {
    font-size: .8rem;
  }
  .progress-card .muted {
    font-size: .72rem;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .stack {
    gap: 1rem;
  }
  .panel {
    border-radius: 11px;
    padding: 1.1rem;
  }
  h1 {
    font-size: 1.45rem;
  }
  .storage-warning {
    margin: 1rem 1rem 0;
  }
  .learning-row {
    gap: .6rem;
  }
  .learning-row .badge {
    font-size: .72rem;
  }
  .button {
    min-height: 44px;
  }
  .loading {
    margin: 2rem 1rem;
  }
}

@media(max-width:420px) {
  .progress-grid {
    grid-template-columns: 1fr;
  }
  .progress-card {
    padding: 1.1rem;
  }
  .progress-label {
    font-size: .95rem;
  }
  .progress-value span,
  .progress-card .muted {
    font-size: .9rem;
  }
}

@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior: auto!important;
    transition: none!important;
  }
}

