.study-main { max-width: 600px; flex: 0 0 auto; gap: 14px; }
.study-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.study-heading h1, .study-heading h2, .study-heading p { margin: 0; }
.study-heading h1 { font-size: clamp(1.4rem, 6vw, 2rem); line-height: 1.3; }
.study-heading p { color: #576b5d; font-size: .78rem; }
.study-status-heading { margin-bottom: 6px; }
.study-status-heading h2 { font-size: 1rem; }
.study-status-heading a { color: #356349; font-size: .72rem; text-underline-offset: 3px; }
.study-action {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px 16px;
  background: #e2ebde;
  border: 1px solid #d0dece;
  border-radius: 16px;
  color: #213f32;
}
.study-action-body {
  --portrait-size: clamp(116px, 37vw, 152px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--portrait-size);
  align-items: center;
  gap: 5px;
}
.study-copy { display: grid; gap: 6px; overflow-wrap: anywhere; }
.study-step-label {
  display: flex; flex-wrap: wrap; gap: 2px 8px;
  color: #2d6249; font-size: .72rem; font-weight: 800; line-height: 1.4;
}
#step-context:empty { display: none; }
.study-portrait {
  position: relative;
  display: grid;
  aspect-ratio: 192 / 208;
}
.study-portrait::before {
  content: '';
  position: absolute;
  inset: 11% 8% 8%;
  border-radius: 50%;
  background: #f3f1e3;
}
.study-portrait .study-himari {
  position: relative;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 4px #79654426);
}
.study-action h2 { font-size: clamp(1.15rem, 5vw, 1.65rem); line-height: 1.34; margin: 0; }
.study-action p { font-size: .78rem; margin: 0; color: #435e4e; line-height: 1.55; }
.study-action .study-start {
  display: flex; align-items: center; justify-content: center;
  padding: 8px 12px; margin-top: 4px; min-height: 46px; border-radius: 10px;
  background: #285b49; color: #fffdf7; text-decoration: none; font-size: .9rem; font-weight: 800;
}
.study-alternate { justify-self: center; color: #355c48; font-size: .76rem; padding: 4px 7px; }
.study-status { display: grid; gap: 6px; }
.study-status-row {
  padding: 8px 11px;
  display: grid; grid-template-columns: 30px minmax(0,1fr) auto;
  gap: 2px 10px; align-items: center;
  border: 1px solid #dbe4d7; border-radius: 12px;
  background: #fffdf7; color: #354e41; text-decoration: none;
  font-size: .72rem; line-height: 1.4;
}
.study-course { grid-column: 1; grid-row: 1 / 3; font-size: .9rem; }
.study-check-count { grid-column: 2; grid-row: 1; }
.study-status-row progress { grid-column: 2; grid-row: 2; width: 100%; height: 5px; margin: 0; }
.study-score { grid-column: 3; grid-row: 1; text-align: right; font-weight: 800; }
.study-score-goal { grid-column: 3; grid-row: 2; text-align: right; color: #4b6455; font-size: .67rem; }
.study-status-row:hover, .material-links a:hover { border-color: #7c9c86; }
.study-status-row:focus-visible, .study-start:focus-visible { outline: 2px solid #275a89; outline-offset: 3px; }
#study-done { font-size: .73rem; padding: 0 2px; margin: 0; color: #406850; }
.material-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.material-links a {
  display: grid; align-content: start; gap: 5px; padding: 13px;
  text-decoration: none; color: #28553e; border-radius: 12px;
  background: #fffdf7; border: 1px solid #dbe4d7; min-height: 80px;
}
.material-links a span { font-size: .74rem; color: #4b6455; }
.material-links #materials-official { grid-column: 1 / -1; }
.material-extra { display: flex; flex-wrap: wrap; gap: 3px 15px; }
.material-extra a { font-size: .75rem; color: #3c614c; padding: 6px 0; }
@media (max-height: 620px) {
  .study-main { gap: 9px; }
  .study-action { padding: 11px 13px; }
  .study-action .study-start { min-height: 42px; }
  .study-home .study-status-heading { margin-bottom: 4px; line-height: 1.35; }
  .study-home .study-status-row { padding-block: 6px; }
}
@media (max-height: 550px) {
  .study-home .app-header { padding-block: 5px 3px; }
  .study-home .app-head-top { margin-bottom: 2px; }
  .study-home .app-nav a { min-height: 34px; }
  .study-home .study-main { gap: 4px; }
  .study-home .study-action { gap: 4px; padding-block: 7px; }
  .study-home .study-action .study-start { margin-top: 2px; }
  .study-home #study-done { line-height: 1.45; }
  .study-action-body { --portrait-size: clamp(96px, min(37vw, 22svh), 120px); }
  .study-copy { gap: 4px; }
}

#goal-readiness .readiness-card {
  padding: 9px 12px;
  margin-top: 8px;
  background: #fffdf7;
  border: 1px solid #dbe4d7;
  border-radius: 12px;
}
.readiness-card .study-heading h2 { font-size: .87rem; }
.readiness-card .study-heading a { color: #34674c; font-size: .72rem; }
.readiness-score { display: flex; gap: 8px 11px; flex-wrap: wrap; align-items: baseline; margin: 1px 0; }
.readiness-score strong { color: #2b5943; font-size: 1.36rem; }
.readiness-score span { font-weight: 750; font-size: .74rem; }
.readiness-card p { color: #4c6353; margin: 1px 0; font-size: .69rem; line-height: 1.5; }
.readiness-fields {
  margin: 7px 0;
  padding: 0;
  display: grid;
  gap: 4px 7px;
  grid-template-columns: repeat(3, minmax(0,1fr));
  list-style: none;
}
.readiness-fields li {
  color: #4a5c50;
  padding: 4px 3px;
  text-align: center;
  font-size: .71rem;
  background: #eeefe9;
  border-radius: 5px;
}
.readiness-fields li[data-done=true] { background: #e0ebde; color: #275940; font-weight: 750; }
.goal-main .button-link.readiness-today { padding: 9px 3px; color: #315948; }
#readiness-checked { font-size: .82rem; font-variant-numeric: tabular-nums; }
