.school-learning-shell {
  min-height: 100vh;
  background: #f7f8fa;
  color: #27313f;
  padding: 0 0 88px;
}

.school-learning-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 10px max(16px, calc((100vw - 1080px) / 2));
  background: #fff;
  border-bottom: 1px solid #dce2e8;
}

.school-learning-header h1 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.school-learning-icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #cbd4dc;
  border-radius: 6px;
  background: #fff;
  color: #27313f;
  cursor: pointer;
  font-size: 1.25rem;
}

.school-learning-child-meta {
  font-size: .78rem;
  color: #52606d;
  text-align: right;
  white-space: nowrap;
}

.school-learning-content {
  width: min(1080px, 100%);
  margin: 0 auto;
}

.school-learning-band {
  padding: 24px max(16px, 4vw);
  background: #fff;
  border-bottom: 1px solid #dce2e8;
}

.school-learning-band + .school-learning-band {
  margin-top: 12px;
  border-top: 1px solid #dce2e8;
}

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

.school-learning-section-head h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0;
}

.school-learning-section-help {
  margin: -6px 0 16px;
  color: #586674;
  font-size: .82rem;
  line-height: 1.7;
}

.school-learning-count {
  font-size: .76rem;
  color: #667482;
}

.school-learning-input-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
  gap: 24px;
  align-items: start;
}

.school-learning-input-subsection-title {
  margin: 0 0 6px;
  color: #263442;
  font-size: .9rem;
}

.school-learning-input-help,
.school-learning-field-help {
  margin: 0 0 10px;
  color: #667482;
  font-size: .76rem;
  line-height: 1.65;
}

.school-learning-field-help {
  margin-bottom: 2px;
}

.school-learning-results-area {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #dce2e8;
}

.school-learning-file-row,
.school-learning-action-row,
.school-learning-unit-actions,
.school-learning-current-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.school-learning-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.school-learning-drop-zone {
  min-height: 96px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 16px;
  border: 2px dashed #aeb9c4;
  border-radius: 6px;
  background: #fafcfd;
  transition: border-color .15s ease, background-color .15s ease;
}

.school-learning-drop-zone.is-dragover {
  border-color: #276b5d;
  background: #e6f2ef;
}

.school-learning-drop-copy {
  margin: 0;
  color: #586674;
  font-size: .78rem;
  text-align: center;
}

.school-learning-supported-types {
  margin: 0;
  color: #6d7883;
  font-size: .7rem;
  line-height: 1.5;
  text-align: center;
}

.school-learning-command,
.school-learning-file-label {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid #276b5d;
  border-radius: 6px;
  background: #fff;
  color: #20584d;
  font: inherit;
  font-size: .86rem;
  font-weight: 700;
  cursor: pointer;
}

.school-learning-command--primary {
  background: #276b5d;
  color: #fff;
}

.school-learning-command--danger {
  border-color: #b44343;
  color: #923636;
}

.school-learning-command:disabled,
.school-learning-file-label[aria-disabled="true"] {
  opacity: .5;
  cursor: not-allowed;
}

.school-learning-camera-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #27313f;
  box-shadow: 0 18px 60px rgb(24 35 45 / 30%);
}

.school-learning-camera-dialog::backdrop {
  background: rgb(20 29 37 / 65%);
}

.school-learning-camera-panel {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.school-learning-camera-panel h2,
.school-learning-camera-panel p {
  margin: 0;
}

.school-learning-camera-panel p {
  color: #586674;
  font-size: .82rem;
  line-height: 1.6;
}

.school-learning-camera-stage {
  min-height: 280px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #151b20;
}

.school-learning-camera-stage video {
  display: block;
  width: 100%;
  max-height: min(62vh, 560px);
  object-fit: contain;
}

.school-learning-camera-stage p {
  padding: 24px;
  color: #fff;
  text-align: center;
}

.school-learning-camera-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.school-learning-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.school-learning-preview {
  min-width: 0;
  border: 1px solid #ccd5de;
  border-radius: 6px;
  background: #f7f8fa;
  overflow: hidden;
}

.school-learning-preview canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #e9edf1;
  touch-action: none;
  cursor: crosshair;
}

.school-learning-preview-tools {
  display: grid;
  grid-template-columns: repeat(3, 36px) minmax(76px, auto);
  justify-content: center;
  gap: 4px;
  padding: 7px;
}

.school-learning-preview-tools button {
  width: 36px;
  height: 34px;
  border: 1px solid #ccd5de;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
}

.school-learning-preview-tools .school-learning-preview-remove {
  width: auto;
  padding: 0 9px;
  border-color: #b44343;
  color: #923636;
  font-size: .72rem;
  font-weight: 700;
}

.school-learning-field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.school-learning-field label,
.school-learning-field legend {
  color: #394654;
  font-size: .78rem;
  font-weight: 700;
}

.school-learning-field input[type="text"],
.school-learning-field select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #aeb9c4;
  border-radius: 6px;
  background: #fff;
  color: #27313f;
  font: inherit;
  font-size: .9rem;
}

.school-learning-segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid #aeb9c4;
  border-radius: 6px;
  overflow: hidden;
}

.school-learning-segmented label {
  position: relative;
  min-height: 40px;
  display: grid;
  place-items: center;
  padding: 6px;
  background: #fff;
  border-right: 1px solid #aeb9c4;
  cursor: pointer;
  font-size: .78rem;
}

.school-learning-segmented label:last-child { border-right: 0; }
.school-learning-segmented input { position: absolute; opacity: 0; }
.school-learning-segmented label:has(input:checked) { background: #e6f2ef; color: #174e43; }

.school-learning-status {
  min-height: 22px;
  margin-top: 12px;
  color: #536270;
  font-size: .82rem;
}

.school-learning-status[data-tone="error"] { color: #9b3030; }
.school-learning-status[data-tone="success"] { color: #17664f; }

.school-learning-result-list,
.school-learning-current-list,
.school-learning-search-list {
  display: grid;
  gap: 10px;
}

.school-learning-candidate,
.school-learning-current-item,
.school-learning-search-item {
  border: 1px solid #cbd4dc;
  border-left: 4px solid #276b5d;
  border-radius: 6px;
  background: #fff;
  padding: 16px;
}

.school-learning-candidate h3,
.school-learning-current-item h3,
.school-learning-search-item h3 {
  margin: 0 0 5px;
  font-size: .95rem;
  letter-spacing: 0;
}

.school-learning-candidate p,
.school-learning-current-item p,
.school-learning-search-item p {
  margin: 0;
  color: #586674;
  font-size: .82rem;
  line-height: 1.55;
}

.school-learning-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 9px 0;
}

.school-learning-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 4px;
  background: #edf1f4;
  color: #42515f;
  font-size: .7rem;
}

.school-learning-evidence {
  margin: 10px 0;
  padding-left: 20px;
  color: #43515e;
  font-size: .78rem;
  line-height: 1.55;
}

.school-learning-explanation {
  margin: 12px 0;
  padding: 10px 12px;
  border-left: 3px solid #7aa99f;
  background: #f4f8f7;
}

.school-learning-explanation h4 {
  margin: 0 0 5px;
  color: #234f46;
  font-size: .78rem;
}

.school-learning-explanation p {
  color: #43515e;
  line-height: 1.7;
}

.school-learning-unit-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.school-learning-unit {
  padding-top: 10px;
  border-top: 1px solid #e0e5ea;
}

.school-learning-unit strong {
  display: block;
  margin-bottom: 7px;
  font-size: .82rem;
}

.school-learning-unit-actions button {
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid #aeb9c4;
  border-radius: 5px;
  background: #fff;
  color: #344351;
  font: inherit;
  font-size: .72rem;
  cursor: pointer;
}

.school-learning-warning {
  padding: 9px 11px;
  border-left: 3px solid #bd7a19;
  background: #fff6df;
  color: #63460e;
  font-size: .78rem;
  margin-bottom: 8px;
}

.school-learning-empty {
  padding: 22px 0;
  color: #687684;
  font-size: .84rem;
  text-align: center;
}

.school-learning-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 8px;
  margin-bottom: 12px;
}

.school-learning-search-row input {
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #aeb9c4;
  border-radius: 6px;
  font: inherit;
}

#school-home-recommendation .school-home-link,
#school-home-recommendation .school-home-link * {
  min-width: 0;
  box-sizing: border-box;
}

#school-home-recommendation .school-home-link-status {
  min-height: 24px;
  margin-top: 16px;
  color: #536270;
  font-size: .84rem;
}

#school-home-recommendation .school-home-how {
  margin-top: 18px;
  border: 1px solid #bfd2ec;
  border-radius: 8px;
  background: #f6faff;
  padding: 18px 20px;
}

#school-home-recommendation .school-home-how-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

#school-home-recommendation .school-home-how-head h3,
#school-home-recommendation .school-home-how-head p,
#school-home-recommendation .school-home-how-step p {
  margin: 0;
}

#school-home-recommendation .school-home-how-head h3 {
  color: #1f5eae;
  font-size: .98rem;
}

#school-home-recommendation .school-home-how-head p {
  margin-top: 6px;
  color: #52616d;
  font-size: .8rem;
  line-height: 1.65;
}

#school-home-recommendation .school-home-how-action {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #155fd7;
  padding: 4px 0;
  font: inherit;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
}

#school-home-recommendation .school-home-how-action:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 3px;
}

#school-home-recommendation .school-home-how-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1.18fr);
  align-items: stretch;
  gap: 10px;
  margin-top: 16px;
}

#school-home-recommendation .school-home-how-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 88px;
  border: 1px solid #cdd9e6;
  border-radius: 8px;
  background: #fff;
  padding: 13px;
}

#school-home-recommendation .school-home-how-step--result {
  border-color: #9cc9bc;
  background: #eaf7f3;
}

#school-home-recommendation .school-home-how-step strong {
  display: block;
  font-size: .84rem;
}

#school-home-recommendation .school-home-how-step p {
  margin-top: 6px;
  color: #5b6874;
  font-size: .73rem;
  line-height: 1.55;
}

#school-home-recommendation .school-home-how-step p a {
  color: #155fd7;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#school-home-recommendation .school-home-how-step p a:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 2px;
}

#school-home-recommendation .school-home-how-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #e8f4f1;
  color: #276f62;
  font-weight: 800;
}

#school-home-recommendation .school-home-how-icon--blue {
  background: #e8efff;
  color: #2467df;
}

#school-home-recommendation .school-home-how-icon--result {
  background: #276f62;
  color: #fff;
}

#school-home-recommendation .school-home-how-operator {
  align-self: center;
  color: #758493;
  font-size: 1.1rem;
  font-weight: 700;
}

#school-home-recommendation .school-home-link-list {
  display: grid;
  gap: 12px;
}

#school-home-recommendation .school-home-link-card {
  overflow-wrap: anywhere;
  border: 1px solid #cbd4dc;
  border-left: 4px solid #276b5d;
  border-radius: 6px;
  background: #fff;
  padding: 16px;
}

#school-home-recommendation .school-home-link-card h3,
#school-home-recommendation .school-home-link-card h4,
#school-home-recommendation .school-home-link-card p {
  margin: 0;
}

#school-home-recommendation .school-home-link-kicker {
  display: block;
  margin-bottom: 4px;
  color: #52616d;
  font-size: .72rem;
}

#school-home-recommendation .school-home-link-reference,
#school-home-recommendation .school-home-link-message,
#school-home-recommendation .school-home-link-empty {
  margin-top: 9px;
  color: #43515e;
  font-size: .82rem;
  line-height: 1.65;
}

#school-home-recommendation .school-home-link-source {
  margin-top: 12px;
  border: 1px solid #c8ded8;
  border-radius: 8px;
  background: #f7faf9;
  padding: 11px 13px;
}

#school-home-recommendation .school-home-link-source strong {
  display: block;
  margin-bottom: 5px;
  color: #52616d;
  font-size: .74rem;
}

#school-home-recommendation .school-home-link-source p {
  color: #34434f;
  font-size: .76rem;
  line-height: 1.55;
}

#school-home-recommendation .school-home-link-reason {
  margin-top: 16px;
  border-top: 1px solid #dfe6eb;
  padding-top: 16px;
}

#school-home-recommendation .school-home-link-section-title {
  margin-bottom: 10px !important;
  font-size: .9rem;
}

#school-home-recommendation .school-home-link-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

#school-home-recommendation .school-home-link-facts span,
#school-home-recommendation .school-home-link-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: #edf4f2;
  color: #234f46;
  padding: 4px 9px;
  font-size: .75rem;
}

#school-home-recommendation .school-home-link-target {
  margin-top: 9px;
  font-size: .95rem;
}

#school-home-recommendation .school-home-link-purpose {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

#school-home-recommendation .school-home-link-purpose h4 {
  margin-bottom: 7px;
  font-size: .88rem;
}

#school-home-recommendation .school-home-link-purpose p {
  color: #43515e;
  font-size: .8rem;
  line-height: 1.65;
}

#school-home-recommendation .school-home-link-skill,
#school-home-recommendation .school-home-link-daily,
#school-home-recommendation .school-home-link-future {
  border-radius: 8px;
  padding: 13px 15px;
}

#school-home-recommendation .school-home-link-skill {
  background: #f3faf7;
}

#school-home-recommendation .school-home-link-skill h4 {
  color: #276f62;
}

#school-home-recommendation .school-home-link-purpose-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#school-home-recommendation .school-home-link-daily,
#school-home-recommendation .school-home-link-future {
  border: 1px solid #dce4ea;
  background: #fbfcfd;
}

#school-home-recommendation .school-home-link-encouragement {
  border: 1px solid #ead6a8;
  border-radius: 8px;
  background: #fff9ec;
  padding: 12px 15px;
}

#school-home-recommendation .school-home-link-encouragement strong {
  display: block;
  margin-bottom: 5px;
  color: #69521a;
  font-size: .74rem;
}

#school-home-recommendation .school-home-link-encouragement p {
  color: #3f392a;
  font-weight: 700;
}

#school-home-recommendation .school-home-link-card .school-learning-command,
#school-home-recommendation .school-home-link-list > .school-learning-command {
  min-height: 44px;
  margin-top: 14px;
}

#school-home-recommendation .school-home-link-card .school-learning-command:focus-visible,
#school-home-recommendation .school-home-link-list > .school-learning-command:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 2px;
}

@media print {
  #school-home-recommendation .school-home-link { display: none !important; }
}

@media (max-width: 760px) {
  .school-learning-header {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .school-learning-child-meta {
    grid-column: 2;
    text-align: left;
  }

  .school-learning-input-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .school-learning-preview-grid {
    grid-template-columns: 1fr;
  }

  #school-home-recommendation .school-home-how-head {
    display: block;
  }

  #school-home-recommendation .school-home-how-action {
    margin-top: 10px;
  }

  #school-home-recommendation .school-home-how-flow {
    grid-template-columns: 1fr;
  }

  #school-home-recommendation .school-home-how-operator {
    justify-self: center;
    transform: rotate(90deg);
  }

  #school-home-recommendation .school-home-how-operator:not(.school-home-how-arrow) {
    transform: none;
  }

  #school-home-recommendation .school-home-link-purpose-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 420px) {
  .school-learning-header h1 { font-size: 1rem; }
  .school-learning-band { padding: 20px 14px; }
  .school-learning-search-row { grid-template-columns: 1fr; }
  .school-learning-command { width: 100%; }
  .school-learning-camera-stage { min-height: 220px; }
  .school-learning-camera-actions .school-learning-command { width: 100%; }
  #school-home-recommendation .school-home-how { padding: 15px 13px; }
  #school-home-recommendation .school-home-link-card { padding: 14px 12px; }
}
