/* Component stylesheet for game.actuator-control-challenge. */
html.iot-component-frame body {
  margin: 0;
  padding: 0;
  background: transparent;
}

html.iot-component-frame main,
html.iot-component-frame .page-columns,
html.iot-component-frame .content,
html.iot-component-frame #quarto-content,
html.iot-component-frame #quarto-document-content {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

html.iot-component-frame h1.title,
html.iot-component-frame #interactive-game > h1,
html.iot-component-frame #interactive-game > h2,
html.iot-component-frame #reference-material > h2,
html.iot-component-frame #scenario-walkthroughs > h2,
html.iot-component-frame #real-world-scenarios-walkthrough > h2,
html.iot-component-frame #related-resources,
html.iot-component-frame header,
html.iot-component-frame .quarto-title-block,
html.iot-component-frame nav,
html.iot-component-frame .sidebar,
html.iot-component-frame .toc-active,
html.iot-component-frame #quarto-header {
  display: none !important;
}

html.iot-component-frame .actuator-game-container {
  max-width: 100%;
  margin: 0;
  border-radius: 8px;
  box-shadow: none;
}

html.iot-resource-frame-standalone .actuator-game-container {
  margin-bottom: 22px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

html.iot-resource-frame-standalone .actuator-game-container .game-header {
  display: none;
}

.actuator-game-container {
  font-family: 'Segoe UI', system-ui, sans-serif;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
}

.game-header {
  text-align: center;
  margin-bottom: 24px;
  padding: 20px;
  background: linear-gradient(135deg, #2C3E50 0%, #1a252f 100%);
  border-radius: 10px;
  color: white;
}

.game-header h2 {
  margin: 0 0 8px 0;
  font-size: 1.8em;
  font-weight: 600;
}

.game-header p {
  margin: 0;
  opacity: 0.9;
  font-size: 1.1em;
}

.game-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.difficulty-btn {
  padding: 12px 24px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 600;
}

.difficulty-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.difficulty-btn.active {
  background: #16A085;
  color: white;
  border-color: #16A085;
}

.difficulty-btn.beginner {
  border-color: #27ae60;
}

.difficulty-btn.beginner.active {
  background: #27ae60;
}

.difficulty-btn.intermediate {
  border-color: #E67E22;
}

.difficulty-btn.intermediate.active {
  background: #E67E22;
}

.difficulty-btn.advanced {
  border-color: #c0392b;
}

.difficulty-btn.advanced.active {
  background: #c0392b;
}

.game-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .game-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card {
  background: white;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-value {
  font-size: 2em;
  font-weight: 700;
  color: #2C3E50;
}

.stat-label {
  font-size: 0.85em;
  color: #666;
  margin-top: 4px;
}

.scenario-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.scenario-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.scenario-title {
  font-size: 1.3em;
  font-weight: 600;
  color: #2C3E50;
}

.scenario-number {
  font-size: 1em;
  color: #666;
  background: #e8f4fd;
  padding: 4px 12px;
  border-radius: 20px;
}

.scenario-description {
  font-size: 1em;
  color: #333;
  line-height: 1.6;
  margin-bottom: 16px;
  padding: 12px;
  background: #f8f9fa;
  border-left: 4px solid #16A085;
  border-radius: 4px;
}

.scenario-requirements {
  margin-bottom: 20px;
}

.requirements-title {
  font-weight: 600;
  color: #2C3E50;
  margin-bottom: 8px;
}

.requirements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .requirements-grid {
    grid-template-columns: 1fr;
  }
}

.requirement-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.9em;
  color: #555;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 6px;
}

.requirement-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8em;
  font-weight: bold;
  color: white;
  flex-shrink: 0;
}

.requirement-icon.critical {
  background: #c0392b;
}

.requirement-icon.high {
  background: #E67E22;
}

.requirement-icon.medium {
  background: #3498db;
}

.requirement-icon.low {
  background: #27ae60;
}

.actuator-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.actuator-btn {
  padding: 16px;
  border: 3px solid #ddd;
  border-radius: 10px;
  background: white;
  cursor: pointer;
  transition: all 0.3s;
  text-align: left;
}

.actuator-btn:hover {
  border-color: #16A085;
  background: #f0faf8;
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.actuator-btn.selected {
  border-color: #16A085;
  background: linear-gradient(135deg, #16A085 0%, #27ae60 100%);
  color: white;
}

.actuator-btn.correct {
  border-color: #27ae60;
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
  color: white;
  animation: correctPulse 0.5s ease-in-out;
}

.actuator-btn.incorrect {
  border-color: #c0392b;
  background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
  color: white;
  animation: incorrectShake 0.5s ease-in-out;
}

@keyframes correctPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes incorrectShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.actuator-info {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  align-items: center;
}

@media (max-width: 768px) {
  .actuator-info {
    grid-template-columns: 1fr;
  }
}

.actuator-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.actuator-name {
  font-weight: 600;
  font-size: 1.1em;
  margin-bottom: 4px;
}

.actuator-description {
  font-size: 0.85em;
  opacity: 0.9;
}

.actuator-specs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.spec-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: 600;
  background: rgba(255,255,255,0.2);
  white-space: nowrap;
}

.actuator-btn.selected .spec-badge,
.actuator-btn.correct .spec-badge,
.actuator-btn.incorrect .spec-badge {
  background: rgba(255,255,255,0.3);
}

.actuator-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(0,0,0,0.05);
  border-radius: 8px;
  min-height: 80px;
}

.actuator-btn.selected .actuator-visual,
.actuator-btn.correct .actuator-visual,
.actuator-btn.incorrect .actuator-visual {
  background: rgba(255,255,255,0.2);
}

.actuator-icon {
  font-size: 2.5em;
  margin-bottom: 4px;
}

.actuator-label {
  font-size: 0.75em;
  font-weight: 600;
  text-transform: uppercase;
  opacity: 0.8;
}

.action-buttons {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.action-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.action-btn.submit {
  background: #16A085;
  color: white;
}

.action-btn.submit:hover:not(:disabled) {
  background: #138a72;
}

.action-btn.next {
  background: #E67E22;
  color: white;
}

.action-btn.next:hover:not(:disabled) {
  background: #d35400;
}

.action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.feedback-panel {
  margin-top: 16px;
  padding: 16px;
  border-radius: 8px;
  display: none;
}

.feedback-panel.show {
  display: block;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feedback-panel.correct {
  background: #d4edda;
  border: 2px solid #27ae60;
}

.feedback-panel.incorrect {
  background: #f8d7da;
  border: 2px solid #c0392b;
}

.feedback-title {
  font-weight: 600;
  font-size: 1.1em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feedback-content {
  font-size: 0.95em;
  line-height: 1.6;
}

.simulation-container {
  margin-top: 16px;
  padding: 16px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.simulation-title {
  font-weight: 600;
  color: #2C3E50;
  margin-bottom: 12px;
}

.simulation-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.simulation-animation {
  font-size: 3em;
  animation: simPulse 2s ease-in-out infinite;
}

@keyframes simPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

.metric-item {
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  text-align: center;
}

.metric-label {
  font-size: 0.8em;
  color: #666;
  margin-bottom: 4px;
}

.metric-value {
  font-size: 1.2em;
  font-weight: 700;
  color: #2C3E50;
}

.metric-bar {
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
}

.metric-fill {
  height: 100%;
  transition: width 0.5s ease-in-out;
}

.metric-fill.excellent {
  background: linear-gradient(90deg, #27ae60 0%, #2ecc71 100%);
}

.metric-fill.good {
  background: linear-gradient(90deg, #16A085 0%, #1abc9c 100%);
}

.metric-fill.moderate {
  background: linear-gradient(90deg, #E67E22 0%, #f39c12 100%);
}

.metric-fill.poor {
  background: linear-gradient(90deg, #c0392b 0%, #e74c3c 100%);
}

.comparison-table {
  width: 100%;
  margin-top: 12px;
  font-size: 0.9em;
  border-collapse: collapse;
}

.comparison-table th {
  text-align: left;
  padding: 8px;
  background: rgba(0,0,0,0.1);
  font-weight: 600;
}

.comparison-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.game-complete {
  text-align: center;
  padding: 40px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.complete-icon {
  font-size: 4em;
  margin-bottom: 16px;
}

.complete-title {
  font-size: 2em;
  font-weight: 700;
  color: #27ae60;
  margin-bottom: 12px;
}

.complete-score {
  font-size: 1.5em;
  color: #2C3E50;
  margin-bottom: 8px;
}

.complete-feedback {
  font-size: 1.1em;
  color: #666;
  margin-bottom: 24px;
}

.restart-btn {
  padding: 14px 32px;
  background: #16A085;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.restart-btn:hover {
  background: #138a72;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 20px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #16A085 0%, #27ae60 100%);
  transition: width 0.5s ease-in-out;
}

.actuator-game-container {
  max-width: 1180px;
  padding: 28px;
  background: #eef3f5;
  border: 1px solid #d7e1e5;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(36, 48, 57, 0.14);
}

.game-header {
  position: relative;
  overflow: hidden;
  text-align: left;
  padding: 28px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(9, 132, 142, 0.92), rgba(31, 52, 63, 0.96)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 48px);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.16);
}

.game-header h2 {
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: 0;
  margin: 10px 0 10px;
}

.game-header p {
  max-width: 720px;
  color: rgba(255,255,255,0.88);
}

.game-kicker,
.game-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.game-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255,255,255,0.12);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.game-summary {
  margin-top: 18px;
}

.game-metric {
  min-width: 112px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
}

.game-metric strong,
.game-metric span {
  display: block;
}

.game-metric strong {
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.1;
}

.game-metric span {
  color: rgba(255,255,255,0.72);
  font-size: 0.75rem;
}

.game-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 12px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #dbe5e9;
  box-shadow: 0 8px 20px rgba(36, 48, 57, 0.08);
}

.difficulty-label {
  color: #34454f;
  font-size: 0.9rem;
  font-weight: 700;
}

.game-controls {
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 0;
}

.difficulty-btn {
  min-height: 42px;
  padding: 9px 14px;
  border-width: 1px;
  border-color: #cfdbe0;
  border-radius: 8px;
  color: #30424d;
  background: #f8fafb;
}

.difficulty-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(36, 48, 57, 0.12);
}

.difficulty-btn.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #ffffff;
}

.difficulty-btn.beginner.active {
  background: #2e7d32;
  border-color: #2e7d32;
}

.difficulty-btn.intermediate.active {
  background: #b85c00;
  border-color: #b85c00;
}

.difficulty-btn.advanced.active {
  background: #a73535;
  border-color: #a73535;
}

.progress-bar {
  height: 10px;
  margin: 0 0 18px;
  background: #d7e2e6;
  border-radius: 999px;
}

.progress-fill {
  background: linear-gradient(90deg, #0f766e 0%, #d8872b 100%);
}

.game-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.stat-card,
.scenario-card,
.game-complete {
  border-radius: 8px;
  border: 1px solid #dbe5e9;
  box-shadow: 0 10px 24px rgba(36, 48, 57, 0.09);
}

.stat-card {
  padding: 14px;
  text-align: left;
}

.stat-value {
  color: #17313b;
  font-size: 1.65rem;
  line-height: 1;
}

.stat-label {
  color: #5c6d76;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.scenario-card {
  padding: 24px;
}

.game-loading,
.game-error {
  color: #334851;
  line-height: 1.5;
}

.game-error {
  border-color: #d77a7a;
  background: #fff4f4;
}

.scenario-header {
  align-items: flex-start;
  gap: 16px;
}

.scenario-title {
  color: #17313b;
  font-size: 1.45rem;
  line-height: 1.2;
}

.scenario-number {
  color: #0f766e;
  background: #e2f4f1;
  border: 1px solid #b9dcd6;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}

.scenario-description {
  padding: 16px;
  background: #f7fafb;
  border: 1px solid #dbe5e9;
  border-left: 5px solid #0f766e;
  border-radius: 8px;
  color: #2f3f47;
}

.requirements-title {
  color: #243742;
}

.requirement-item {
  align-items: center;
  min-height: 48px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid #e2e9ec;
  border-radius: 8px;
}

.requirement-icon {
  width: 26px;
  height: 26px;
  font-size: 0;
}

.requirement-icon::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
}

.actuator-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.actuator-btn {
  position: relative;
  min-height: 164px;
  padding: 16px;
  border-width: 1px;
  border-color: #d6e0e4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(36, 48, 57, 0.08);
}

.actuator-btn:hover {
  border-color: #0f766e;
  background: #f4fbf9;
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(36, 48, 57, 0.13);
}

.actuator-btn.selected {
  border-color: #0f766e;
  background: #0f766e;
}

.actuator-btn.correct {
  border-color: #2e7d32;
  background: #2e7d32;
}

.actuator-btn.incorrect {
  border-color: #a73535;
  background: #a73535;
}

.actuator-info {
  grid-template-columns: 1fr auto;
  height: 100%;
}

.actuator-name {
  color: #17313b;
  font-size: 1.08rem;
}

.actuator-description {
  color: #52656e;
  opacity: 1;
}

.actuator-btn.selected .actuator-name,
.actuator-btn.correct .actuator-name,
.actuator-btn.incorrect .actuator-name,
.actuator-btn.selected .actuator-description,
.actuator-btn.correct .actuator-description,
.actuator-btn.incorrect .actuator-description {
  color: #ffffff;
}

.spec-badge {
  background: #eaf1f3;
  color: #334851;
  border-radius: 999px;
}

.actuator-visual {
  width: 74px;
  min-height: 74px;
  border-radius: 8px;
  background: #eef4f6;
}

.actuator-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 6px;
  border-radius: 50%;
  color: #ffffff;
  background: #17313b;
  font-size: 1.2rem;
  font-weight: 800;
}

.actuator-label {
  color: #5b6e77;
  line-height: 1.1;
  text-align: center;
}

.action-btn {
  min-height: 46px;
  border-radius: 8px;
}

.action-btn.submit {
  background: #0f766e;
}

.action-btn.submit:hover:not(:disabled) {
  background: #0b5f59;
}

.action-btn.next,
.restart-btn {
  background: #b85c00;
}

.action-btn.next:hover:not(:disabled),
.restart-btn:hover {
  background: #914900;
}

.feedback-panel {
  border-radius: 8px;
}

.feedback-panel.correct {
  background: #e9f6ea;
  border-color: #2e7d32;
}

.feedback-panel.incorrect {
  background: #faecec;
  border-color: #a73535;
}

.game-complete {
  background: #ffffff;
}

.complete-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  color: #ffffff;
  background: #0f766e;
  font-size: 2rem;
}

.complete-title {
  color: #0f766e;
}

.reference-intro {
  margin: 0 0 14px;
  color: #4e6069;
}

.reference-scan {
  overflow-x: auto;
  margin: 14px 0 18px;
  border: 1px solid #dbe5e9;
  border-radius: 8px;
  background: #ffffff;
}

.reference-scan-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
  font-size: 0.94rem;
}

.reference-scan-table th,
.reference-scan-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5ecef;
  vertical-align: top;
}

.reference-scan-table th {
  color: #17313b;
  background: #eef5f6;
  font-size: 0.78rem;
  text-align: left;
  text-transform: uppercase;
}

.reference-scan-table tr:last-child td {
  border-bottom: 0;
}

.reference-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.reference-card {
  padding: 14px;
  border: 1px solid #dbe5e9;
  border-radius: 8px;
  background: #ffffff;
}

.reference-card h4 {
  margin: 0;
  color: #17313b;
  font-size: 1.05rem;
}

.reference-role {
  margin: 4px 0 10px;
  color: #5c6d76;
  font-size: 0.92rem;
  line-height: 1.45;
}

.reference-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.reference-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eaf1f3;
  color: #334851;
  font-size: 0.78rem;
  font-weight: 700;
}

.reference-card dl {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 7px 10px;
  margin: 0;
}

.reference-card dt {
  color: #667983;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.reference-card dd {
  margin: 0;
  color: #2f3f47;
  line-height: 1.42;
}

.reference-card ul,
.reference-card ol {
  margin: 8px 0 0;
  padding-left: 1.1rem;
  color: #2f3f47;
}

.reference-card li {
  margin: 4px 0;
  line-height: 1.4;
}

.reference-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 12px 0 18px;
}

.reference-mini {
  padding: 12px;
  border: 1px solid #dbe5e9;
  border-radius: 8px;
  background: #f8fbfc;
}

.reference-mini strong {
  display: block;
  margin-bottom: 4px;
  color: #17313b;
}

.reference-mini span {
  color: #52656e;
  line-height: 1.4;
}

.reference-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 14px 0 18px;
}

.reference-map-item {
  padding: 12px;
  border: 1px solid #dbe5e9;
  border-radius: 8px;
  background: #ffffff;
}

.reference-map-item strong,
.reference-map-item span {
  display: block;
}

.reference-map-item strong {
  color: #17313b;
  font-size: 0.92rem;
}

.reference-map-item span {
  margin-top: 4px;
  color: #5c6d76;
  font-size: 0.82rem;
  line-height: 1.35;
}

.reference-loading {
  padding: 14px;
  border: 1px solid #dbe5e9;
  border-radius: 8px;
  background: #ffffff;
  color: #52656e;
}

.reference-section {
  margin: 10px 0;
  border: 1px solid #dbe5e9;
  border-left: 5px solid #1c75d8;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.reference-section-tip {
  border-left-color: #179a71;
}

.reference-section-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px;
  color: #3d454b;
  background: #e7f1ff;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.reference-section-tip .reference-section-summary {
  background: #e8f3ee;
}

.reference-section-summary::-webkit-details-marker {
  display: none;
}

.reference-section-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: #1c75d8;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.reference-section-tip .reference-section-icon {
  color: #179a71;
}

.reference-section-chevron {
  margin-left: auto;
  color: #52656e;
  transition: transform 0.2s ease;
}

.reference-section[open] .reference-section-chevron {
  transform: rotate(90deg);
}

.reference-section-body {
  padding: 14px 12px 16px;
  background: #ffffff;
}

@media (max-width: 860px) {
  .actuator-game-container {
    padding: 18px;
  }

  .game-toolbar,
  .scenario-header {
    align-items: stretch;
    flex-direction: column;
  }

  .game-controls {
    justify-content: stretch;
  }

  .difficulty-btn {
    flex: 1;
  }

  .actuator-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .game-header {
    padding: 22px;
  }

  .game-header h2 {
    font-size: 1.6rem;
  }

  .game-summary,
  .game-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-summary {
    display: grid;
  }

  .actuator-info {
    grid-template-columns: 1fr;
  }

  .actuator-visual {
    width: 100%;
  }

  .reference-scan-table {
    min-width: 0;
  }

  .reference-scan-table th:nth-child(n+3),
  .reference-scan-table td:nth-child(n+3) {
    display: none;
  }

  .reference-card-grid {
    grid-template-columns: 1fr;
  }

  .reference-card dl {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .reference-card dt {
    margin-top: 8px;
  }
}
