.course-group-slot{
  width:min(900px,calc(100% - 40px));
  margin:30px auto 42px;
}

.kgw-root{
  --kgw-accent:#6500b8;
  --kgw-accent-strong:#520096;
  --kgw-accent-soft:#f7f2fb;
  --kgw-text:#18151d;
  --kgw-muted:#6c6672;
  --kgw-border:#e8e4eb;
  --kgw-surface:#fff;
  --kgw-surface-soft:#faf9fb;
  --kgw-success:#24724a;
  --kgw-success-soft:#eff8f3;
  --kgw-wait:#a26800;
  --kgw-wait-soft:#fff8ea;
  --kgw-danger:#9e2b2b;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  color:var(--kgw-text);
  box-sizing:border-box;
}
.kgw-root *{box-sizing:border-box}

/*
 * Public group block v1.4.0 — true two-meaning composition.
 * Left: when. Right: recruitment state + action as one vertical unit.
 */
.kgw-card{
  position:relative;
  background:rgba(255,255,255,.82);
  border:1px solid var(--kgw-border);
  border-radius:18px;
  box-shadow:none;
  overflow:hidden;
}
.kgw-card:before{display:none}

.kgw-card--active{padding:40px 40px}
.kgw-grid{
  display:grid;
  grid-template-columns:minmax(280px,.82fr) minmax(0,1.38fr);
  gap:clamp(34px,4vw,60px);
  align-items:stretch;
}

.kgw-date-block{min-width:0}
.kgw-eyebrow{
  margin:0 0 15px;
  color:var(--kgw-accent);
  font-size:15px;
  line-height:1.2;
  font-weight:700;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.kgw-dates{
  margin:0;
  font-size:clamp(25px,2vw,31px);
  line-height:1.08;
  font-weight:600;
  letter-spacing:-.025em;
}
.kgw-date-note{
  margin:30px 0 0;
  max-width:310px;
  color:var(--kgw-muted);
  font-size:16px;
  line-height:1.45;
}

/* One right-side semantic zone: status first, action directly beneath it. */
.kgw-recruitment{
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  padding-left:clamp(30px,3.8vw,46px);
  border-left:1px solid #eeeaf1;
}
.kgw-state{min-width:0}
.kgw-progress-row{
  display:flex;
  align-items:center;
  margin:0 0 10px;
}
.kgw-progress{display:flex;gap:7px;align-items:center;margin:0}
.kgw-dot{
  width:13px;
  height:13px;
  border:1.5px solid rgba(101,0,184,.62);
  border-radius:50%;
  background:#fff;
  box-shadow:none;
}
.kgw-dot.is-filled{
  background:var(--kgw-accent);
  border-color:var(--kgw-accent);
}
.kgw-progress-label{
  color:var(--kgw-muted);
  font-size:12px;
  line-height:1.2;
  white-space:nowrap;
}
.kgw-status{
  margin:0 0 10px;
  color:var(--kgw-text);
  font-size:26px;
  line-height:1.25;
  font-weight:600;
  letter-spacing:-.008em;
}
.kgw-status.is-formed{color:var(--kgw-text)}
.kgw-state-meta{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  column-gap:0;
  row-gap:3px;
}
.kgw-status-note,
.kgw-capacity{
  margin:0;
  color:var(--kgw-muted);
  font-size:14px;
  line-height:1.45;
}
.kgw-status-note{color:#49434e}
.kgw-capacity:before{
  content:"·";
  display:inline-block;
  margin:0 7px;
  color:#aaa4ad;
}
.kgw-meta-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}
.kgw-chip{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:4px 8px;
  border-radius:999px;
  background:transparent;
  border:1px solid var(--kgw-border);
  color:var(--kgw-muted);
  font-size:11.5px;
  line-height:1.2;
}

.kgw-actions{
  width:min(300px,100%);
  min-width:0;
  display:grid;
  gap:7px;
  margin-top:30px;
  align-items:stretch;
}
.kgw-button{
  appearance:none;
  width:100%;
  border:1px solid var(--kgw-accent);
  border-radius:999px;
  min-height:46px;
  padding:11px 20px;
  background:var(--kgw-accent);
  color:#fff;
  font:400 15px/1.2 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  text-align:center;
  cursor:pointer;
  box-shadow:none;
  transition:background .15s ease,transform .15s ease,border-color .15s ease;
}
.kgw-button:hover{
  background:var(--kgw-accent-strong);
  border-color:var(--kgw-accent-strong);
  transform:translateY(-1px);
}
.kgw-button:focus-visible,.kgw-close:focus-visible,.kgw-input:focus-visible{
  outline:3px solid rgba(101,0,184,.18);
  outline-offset:2px;
}
.kgw-button[disabled]{opacity:.62;cursor:wait;transform:none}
.kgw-action-note{
  margin:0;
  max-width:315px;
  color:var(--kgw-muted);
  font-size:11.5px;
  line-height:1.4;
  text-align:left;
}

/* Full / waiting states: status, not alert. */
.kgw-card--simple{
  padding:22px 26px;
  min-height:0;
  display:flex;
  align-items:center;
}
.kgw-simple-state{max-width:760px}
.kgw-simple-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin:0 0 20px;
  color:var(--kgw-muted);
  font-size:16px;
  line-height:1.2;
  font-weight:700;
  letter-spacing:.075em;
  text-transform:uppercase;
}
.kgw-simple-kicker:before{
  content:"";
  width:7px;
  height:7px;
  flex:0 0 7px;
  border-radius:50%;
  background:var(--kgw-accent);
}
.kgw-card--full,
.kgw-card--waiting{
  background:rgba(255,255,255,.78);
}
.kgw-card--full .kgw-simple-kicker:before{background:var(--kgw-success)}
.kgw-card--waiting .kgw-simple-kicker:before{background:var(--kgw-wait)}
.kgw-card--full .kgw-status,
.kgw-card--waiting .kgw-status{color:var(--kgw-text)}
.kgw-simple-note{
  margin:0;
  color:var(--kgw-muted);
  font-size:16px;
  line-height:1.5;
}
.kgw-simple-note strong{
  color:#4a454f;
  font-weight:650;
}
.kgw-simple-note + .kgw-simple-note{margin-top:20px}

.kgw-loading,.kgw-empty,.kgw-error{
  padding:22px 24px;
  color:var(--kgw-muted);
  font-size:14px;
  line-height:1.5;
}

/* Dialog remains intentionally unchanged from v1.1.2. */
.kgw-dialog{
  position:fixed;
  inset:0;
  margin:auto;
  width:min(520px,calc(100% - 32px));
  max-height:min(760px,calc(100vh - 40px));
  max-height:min(760px,calc(100dvh - 40px));
  overflow:auto;
  overscroll-behavior:contain;
  border:0;
  border-radius:24px;
  padding:0;
  background:#fff;
  color:var(--kgw-text);
  box-shadow:0 30px 84px rgba(20,14,28,.26);
}
.kgw-dialog::backdrop{background:rgba(20,16,28,.52);backdrop-filter:blur(2px)}
.kgw-modal{padding:28px}
.kgw-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:22px}
.kgw-modal-title{margin:0 0 7px;font-size:25px;line-height:1.15;letter-spacing:-.015em}
.kgw-modal-meta{margin:0;color:var(--kgw-muted);font-size:14px;line-height:1.45}
.kgw-close{
  flex:0 0 42px;width:42px;height:42px;
  border:1px solid var(--kgw-border);
  border-radius:50%;
  background:#fff;
  color:var(--kgw-text);
  font-size:22px;line-height:1;
  cursor:pointer;
}
.kgw-form{display:grid;gap:17px}
.kgw-field{display:grid;gap:7px}
.kgw-label{font-size:14px;font-weight:700}
.kgw-input{
  width:100%;height:52px;margin-top: 8px;
  border:1px solid #cbc6d0;
  border-radius:13px;
  background:#fff;
  padding:0 14px;
  color:var(--kgw-text);
  font:16px/1.2 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
}
.kgw-input:focus{border-color:var(--kgw-accent)}
.kgw-consent{display:flex;align-items:flex-start;gap:10px;color:var(--kgw-muted);font-size:13px;line-height:1.45}
.kgw-consent input{width:18px;height:18px;margin:1px 0 0;flex:0 0 auto;accent-color:var(--kgw-accent)}
.kgw-consent a{color:var(--kgw-accent)}
.kgw-honeypot{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}
.kgw-form-error{display:none;border-radius:12px;background:#fff1f1;color:var(--kgw-danger);padding:11px 13px;font-size:14px;line-height:1.4}
.kgw-form-error.is-visible{display:block}
.kgw-success{text-align:center;padding:14px 2px 6px}
.kgw-success-mark{width:58px;height:58px;margin:0 auto 17px;border-radius:50%;display:grid;place-items:center;background:var(--kgw-success-soft);color:var(--kgw-success);font-size:30px;font-weight:700}
.kgw-success h3{margin:0 0 10px;font-size:25px}
.kgw-success p{max-width:400px;margin:0 auto 20px;color:var(--kgw-muted);font-size:14px;line-height:1.55}

@media(max-width:980px){
  .kgw-card--active{padding:22px}
  .kgw-grid{
    grid-template-columns:minmax(230px,.8fr) minmax(0,1.2fr);
    gap:28px;
  }
  .kgw-recruitment{padding-left:28px}
  .kgw-actions{width:min(310px,100%)}
}

@media(max-width:600px){
  .course-group-slot{width:calc(100% - 24px);margin:18px auto 28px}
  .kgw-card{
    border-radius:16px;
    box-shadow:none;
    background:#fff;
  }
  .kgw-card--active{padding:19px 18px 17px}
  .kgw-grid{grid-template-columns:1fr;gap:30px}
  .kgw-recruitment{
    width:100%;
    padding:16px 0 0;
    border-left:0;
    border-top:1px solid #eeeaf1;
  }
  .kgw-eyebrow{margin-bottom:17px;font-size:13.5px}
  .kgw-dates{font-size:26px}
  .kgw-date-note{margin-top:7px;font-size:12.5px;max-width:none}
  .kgw-state{padding-top:1px}
  .kgw-progress-row{margin:0 0 9px}
  .kgw-dot{width:13px;height:13px}
  .kgw-status{font-size:19px}
  .kgw-status-note,.kgw-capacity{font-size:13px}
  .kgw-meta-row{margin-top:9px}
  .kgw-actions{width:100%;margin-top:30px;display:grid;gap:7px}
  .kgw-button{width:100%;min-height:42px;padding:11px 18px;font-size: 14px;}
  .kgw-action-note{max-width:none;text-align:center;margin:0 auto}
  .kgw-card--simple{padding:19px 18px;min-height:0}
  .kgw-simple-kicker{margin-bottom:16px;font-size:14.5px}
  .kgw-simple-note{font-size:14px}
  .kgw-dialog{
    inset:auto 0 0 0;
    margin:0 auto;
    width:100%;
    max-width:none;
    max-height:90vh;
    max-height:90dvh;
    border-radius:24px 24px 0 0;
  }
  .kgw-modal{padding:24px 20px max(24px,env(safe-area-inset-bottom))}
  .kgw-modal-title{font-size:20px}
}

@media(max-width:380px){
  .kgw-card--active{padding:25px 40px 20px}
  .kgw-dates{font-size:30px}
  .kgw-progress-label{font-size:12px}
  .kgw-chip{font-size:11.5px}
}

@media(prefers-reduced-motion:reduce){.kgw-button{transition:none}}
