/* ????????????????? */
.coach-panel {
  z-index: 90;
  width: min(22rem, 90vw);
  padding: 0.85rem 1rem 0.95rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(110, 150, 210, 0.45);
  background: linear-gradient(165deg, rgba(28, 36, 52, 0.97), rgba(12, 14, 20, 0.98));
  box-shadow: 0 0.55rem 1.6rem rgba(0, 0, 0, 0.45);
  color: #e8eef8;
  font-size: 0.86rem;
  box-sizing: border-box;
}
.coach-panel--intro {
  position: fixed;
  left: 50%;
  top: 48%;
  right: auto;
  transform: translate(-50%, -50%);
}
/* ????????????? */
.coach-panel--dock {
  position: absolute;
  top: 3.1rem;
  right: 0.65rem;
  left: auto;
  transform: none;
  width: auto;
  min-width: 0;
  padding: 0.35rem 0.55rem;
  z-index: 40;
  box-shadow: 0 0.25rem 0.8rem rgba(0, 0, 0, 0.35);
}
.coach-panel--dock .coach-panel-actions {
  margin: 0;
}
.coach-panel[hidden] {
  display: none !important;
}

.coach-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.coach-panel-head strong {
  letter-spacing: 0.08em;
  color: #c9dcff;
}

.coach-panel-tag {
  font-size: 0.68rem;
  color: rgba(180, 200, 230, 0.65);
}

.coach-advice-text {
  margin: 0 0 0.55rem;
  line-height: 1.45;
  color: rgba(230, 236, 248, 0.9);
  min-height: 2.6em;
  max-height: 14rem;
  overflow: auto;
}
.coach-line {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: rgba(230, 236, 248, 0.85);
}
.coach-line-head {
  font-size: 0.9rem;
  font-weight: 700;
  color: #e8ffe0;
}
.coach-advice-text .coach-line {
  white-space: pre-wrap;
}
.coach-line-disc {
  margin-top: 0.45rem;
  font-size: 0.72rem;
  opacity: 0.65;
}

.coach-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.coach-intensity {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: rgba(200, 210, 230, 0.75);
}

.coach-intensity select {
  height: 1.7rem;
  border-radius: 0.3rem;
  border: 1px solid rgba(120, 150, 190, 0.4);
  background: rgba(10, 12, 18, 0.85);
  color: #e8eef8;
  font-size: 0.72rem;
}

body[data-mode='coach'] #coachPanel {
  display: block;
}

body:not([data-mode='coach']) #coachPanel {
  display: none !important;
}

/* �Զ����ⵯ�� */
.coach-teach-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 0.75rem;
  box-sizing: border-box;
}
.coach-teach-modal[hidden] { display: none !important; }
.coach-teach-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.coach-teach-card {
  position: relative;
  z-index: 1;
  width: min(26rem, 94vw);
  max-height: min(78vh, 32rem);
  overflow: auto;
  padding: 0.9rem 1rem 1rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(130, 170, 230, 0.45);
  background: linear-gradient(165deg, rgba(24, 32, 48, 0.98), rgba(10, 12, 18, 0.98));
  box-shadow: 0 0.6rem 2rem rgba(0, 0, 0, 0.5);
  color: #e8eef8;
}
.coach-teach-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.coach-teach-head strong { color: #d4e6ff; letter-spacing: 0.04em; }
.coach-teach-head span { font-size: 0.72rem; color: rgba(180, 200, 230, 0.7); }
.coach-teach-body { margin-bottom: 0.45rem; }
.coach-teach-disc { margin: 0 0 0.7rem; font-size: 0.7rem; opacity: 0.6; }
.coach-teach-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}
.coach-panel.is-teaching {
  outline: 1px solid rgba(140, 200, 255, 0.35);
}

.coach-teach-ok {
  min-width: 7.5rem;
  font-size: 1rem;
  padding: 0.55rem 1.2rem;
}
body.coach-teaching #actionBar {
  pointer-events: none;
  opacity: 0.35;
  filter: grayscale(0.2);
}
body.coach-teaching #shotClockRing {
  display: none !important;
}
.coach-panel-actions--quiet .btn { display: none; }
