:root {
  --student-bg: #111a2d;
  --student-panel: #1d293d;
  --student-line: #344158;
  --student-text: #f4f7fb;
  --student-muted: #9ba9be;
  --student-green: #20c997;
  --student-blue: #7588ff;
  --student-red: #ff6f7d;
  --student-gold: #f4c34e;
}
.student-habits-page {
  min-height: 100vh;
  margin: 0;
  background: var(--student-bg);
  color: var(--student-text);
  font-family: Pretendard, "Noto Sans KR", system-ui, sans-serif;
}
.student-habits-page [hidden] {
  display: none !important;
}
.student-habits-page button,
.student-habits-page input,
.student-habits-page select,
.student-habits-page textarea {
  font: inherit;
}
.student-habits-shell {
  width: min(600px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 112px;
}
.student-habits-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  border-bottom: 1px solid var(--student-line);
}
.student-habits-topbar > a,
.student-habits-topbar > button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--student-line);
  border-radius: 10px;
  background: var(--student-panel);
  color: var(--student-text);
  text-decoration: none;
  font-weight: 800;
}
.student-habits-topbar > button {
  justify-self: end;
}
.student-habits-topbar > div {
  display: grid;
  text-align: center;
}
.student-habits-topbar > div span {
  color: var(--student-muted);
  font-size: 12px;
}
.student-habit-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0;
}
.student-habit-tabs a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border: 1px solid var(--student-line);
  border-radius: 12px;
  background: var(--student-panel);
  color: var(--student-muted);
  text-decoration: none;
  font-weight: 900;
}
.student-habit-tabs a.is-active {
  border-color: var(--student-blue);
  background: #253563;
  color: #fff;
}
.student-habit-status {
  margin: 0 0 14px;
  padding: 10px 13px;
  border: 1px solid var(--student-line);
  border-radius: 10px;
  background: #182338;
  color: #cbd5e1;
}
.student-habit-status[data-tone="good"] {
  border-color: #267b64;
  color: #aef1d9;
}
.student-habit-status[data-tone="bad"] {
  border-color: #9a3c4b;
  color: #ffd0d5;
}
.student-routine-hero,
.student-goal-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 26px;
  border: 1px solid var(--student-line);
  border-radius: 18px;
  background: var(--student-panel);
}
.student-routine-hero p,
.student-goal-hero p,
.student-week-card header p,
.student-coach-card header p,
.student-reflection-card header p,
.student-goal-dialog header p {
  margin: 0;
  color: var(--student-green);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}
.student-routine-hero h1,
.student-goal-hero h1 {
  margin: 5px 0 6px;
  font-size: 30px;
}
.student-routine-hero span,
.student-goal-hero span {
  color: var(--student-muted);
}
.student-routine-score {
  display: grid;
  min-width: 170px;
  padding: 14px;
  border: 1px solid #3a4962;
  border-radius: 14px;
  background: #263349;
  text-align: right;
}
.student-routine-score span,
.student-routine-score small {
  color: var(--student-muted);
}
.student-routine-score strong {
  margin: 3px 0;
  font-size: 30px;
  color: var(--student-green);
}
.student-progress {
  height: 9px;
  margin: 14px 0 22px;
  border-radius: 999px;
  background: #334157;
  overflow: hidden;
}
.student-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--student-green);
}
.student-routine-groups {
  display: grid;
  gap: 18px;
}
.student-slot-card {
  border: 1px solid var(--student-line);
  border-radius: 16px;
  background: var(--student-panel);
  overflow: hidden;
}
.student-slot-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid var(--student-line);
}
.student-slot-card > header h2 {
  margin: 0;
  font-size: 18px;
}
.student-slot-card > header span {
  color: var(--student-muted);
  font-size: 12px;
}
.student-routine-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 17px 18px;
  border-bottom: 1px solid #303d53;
}
.student-routine-row:last-child {
  border-bottom: 0;
}
.student-routine-copy {
  display: grid;
  gap: 4px;
}
.student-routine-copy strong {
  font-size: 17px;
}
.student-routine-copy span {
  color: var(--student-muted);
  font-size: 12px;
}
.student-routine-choices {
  display: flex;
  gap: 7px;
}
.student-routine-choices button {
  min-width: 92px;
  min-height: 44px;
  border: 1px solid #485770;
  border-radius: 10px;
  background: #263349;
  color: #d8e1ed;
  font-weight: 900;
}
.student-routine-choices button[data-status="done"].is-active {
  border-color: var(--student-green);
  background: #14634e;
  color: #fff;
}
.student-routine-choices button[data-status="skip"].is-active {
  border-color: var(--student-red);
  background: #713041;
  color: #fff;
}
.student-sticky-action {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
  min-height: 82px;
  padding: 12px 20px;
  border-top: 1px solid var(--student-line);
  background: #111a2df2;
  backdrop-filter: blur(12px);
}
.student-sticky-action > div {
  display: grid;
  min-width: 360px;
}
.student-sticky-action span {
  color: var(--student-muted);
  font-size: 12px;
}
.student-sticky-action button,
.student-goal-hero button,
.student-goal-empty button,
.student-goal-actions button,
.student-reflection-card > button,
.student-goal-dialog footer button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  background: var(--student-green);
  color: #071f18;
  font-weight: 900;
}
.student-goal-hero button {
  border: 1px solid #4a5870;
  background: #263349;
  color: #fff;
}
.student-goal-notice {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid #5e512d;
  border-radius: 14px;
  background: #332f21;
}
.student-goal-notice i {
  font-size: 22px;
  color: var(--student-gold);
}
.student-goal-notice > div {
  display: grid;
  gap: 3px;
}
.student-goal-notice span {
  color: #d8c993;
  font-size: 13px;
}
.student-goal-notice--warn {
  border-color: #71394a;
  background: #382433;
}
.student-goal-notice--warn i {
  color: #ff8ca8;
}
.student-goal-notice--warn span {
  color: #e7a9b8;
}
.student-goal-empty {
  display: grid;
  place-items: center;
  gap: 9px;
  margin-top: 14px;
  padding: 50px 24px;
  border: 1px solid var(--student-line);
  border-radius: 18px;
  background: var(--student-panel);
  text-align: center;
}
.student-goal-empty i {
  font-size: 40px;
  color: var(--student-blue);
}
.student-goal-empty h2,
.student-goal-empty p {
  margin: 0;
}
.student-goal-empty p {
  color: var(--student-muted);
}
#studentGoalDashboard {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}
.student-goal-card,
.student-week-card,
.student-coach-card,
.student-reflection-card {
  padding: 20px;
  border: 1px solid var(--student-line);
  border-radius: 16px;
  background: var(--student-panel);
}
.student-goal-card > span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #2e3d60;
  color: #aebdff;
  font-size: 12px;
  font-weight: 800;
}
.student-goal-card h2 {
  margin: 14px 0 8px;
  font-size: 27px;
}
.student-goal-card p {
  margin: 0;
  color: #dbe4f2;
}
.student-goal-card small {
  display: block;
  margin-top: 12px;
  color: var(--student-muted);
}
.student-week-card header,
.student-coach-card header,
.student-reflection-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.student-week-card header h2,
.student-coach-card header h2,
.student-reflection-card header h2 {
  margin: 4px 0 0;
}
.student-week-card header > strong {
  font-size: 28px;
  color: var(--student-blue);
}
.student-goal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin: 18px 0;
}
.student-goal-day {
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 78px;
  border: 1px solid #3c4a61;
  border-radius: 11px;
  background: #263349;
}
.student-goal-day span {
  color: var(--student-muted);
  font-size: 11px;
}
.student-goal-day strong {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #3d4a5d;
  color: #aab6c7;
}
.student-goal-day[data-status="done"] strong {
  background: var(--student-green);
  color: #06251d;
}
.student-goal-day[data-status="not"] strong {
  background: var(--student-red);
  color: #fff;
}
.student-goal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.student-goal-target {
  display: grid;
  gap: 4px;
  margin: 0 0 12px;
  padding: 11px 13px;
  border: 1px solid #3c4a61;
  border-radius: 11px;
  background: #202d42;
}
.student-goal-target strong { color: #fff; }
.student-goal-target span { color: var(--student-muted); font-size: 12px; line-height: 1.5; }
.student-goal-actions button.is-active { box-shadow: 0 0 0 3px #fff7 inset; }
.student-goal-actions button:last-child {
  background: #703241;
  color: #fff;
}
.student-coach-card > div {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.student-coach-message {
  padding: 13px;
  border: 1px solid #3b4960;
  border-radius: 11px;
  background: #263349;
}
.student-coach-message p {
  margin: 0;
}
.student-coach-message time {
  display: block;
  margin-top: 5px;
  color: var(--student-muted);
  font-size: 11px;
}
.student-reflection-card textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 100px;
  margin: 13px 0;
  padding: 12px;
  border: 1px solid #435168;
  border-radius: 11px;
  background: #121c30;
  color: #fff;
  resize: vertical;
}
.student-rating {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.student-rating button {
  min-height: 42px;
  border: 1px solid #435168;
  border-radius: 9px;
  background: #263349;
  color: #cbd5e1;
  font-weight: 900;
}
.student-rating button.is-active {
  border-color: var(--student-gold);
  background: #665322;
  color: #fff;
}
.student-goal-dialog {
  width: min(600px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid var(--student-line);
  border-radius: 18px;
  background: var(--student-panel);
  color: #fff;
  box-shadow: 0 24px 80px #0009;
}
.student-goal-dialog::backdrop {
  background: #050b16d9;
}
.student-goal-dialog form {
  display: grid;
  gap: 14px;
  padding: 22px;
}
.student-goal-dialog header,
.student-goal-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.student-goal-dialog header h2 {
  margin: 4px 0;
}
.student-goal-dialog header button {
  width: 40px;
  height: 40px;
  border: 1px solid #435168;
  border-radius: 10px;
  background: #263349;
  color: #fff;
}
.student-goal-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.student-goal-steps li {
  padding: 9px;
  border: 1px solid #3d4a60;
  border-radius: 9px;
  color: var(--student-muted);
  font-size: 11px;
  text-align: center;
}
.student-goal-steps li.is-active {
  border-color: var(--student-blue);
  background: #2b3d72;
  color: #fff;
}
.student-goal-dialog label {
  display: grid;
  gap: 7px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
}
.student-goal-dialog select,
.student-goal-dialog textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 10px;
  border: 1px solid #435168;
  border-radius: 10px;
  background: #121c30;
  color: #fff;
}
.student-goal-check-dialog-copy { margin: 0; color: #dbe4f2; line-height: 1.6; }
.student-goal-check-count { justify-self: end; color: var(--student-muted); font-size: 12px; }
.student-goal-dialog textarea {
  min-height: 84px;
  resize: vertical;
}
.student-goal-dialog footer {
  justify-content: flex-end;
  gap: 8px;
}
.student-goal-dialog footer button:first-child {
  border: 1px solid #435168;
  background: #263349;
  color: #fff;
}
@media (max-width: 700px) {
  .student-habits-shell {
    width: min(100% - 18px, 600px);
  }
  .student-habits-topbar {
    grid-template-columns: auto 1fr auto;
  }
  .student-habits-topbar a span,
  .student-habits-topbar button span {
    display: none;
  }
  .student-routine-hero,
  .student-goal-hero {
    align-items: flex-start;
    padding: 20px;
  }
  .student-routine-score {
    min-width: 130px;
  }
  .student-routine-row {
    grid-template-columns: 1fr;
  }
  .student-routine-choices button {
    flex: 1;
  }
  .student-sticky-action {
    justify-content: space-between;
    gap: 12px;
  }
  .student-sticky-action > div {
    min-width: 0;
  }
  .student-sticky-action span {
    display: none;
  }
  .student-goal-week {
    gap: 4px;
  }
  .student-goal-day {
    min-height: 66px;
  }
  .student-goal-day span {
    font-size: 10px;
  }
}
@media (max-width: 480px) {
  .student-routine-hero,
  .student-goal-hero {
    display: grid;
  }
  .student-routine-score {
    width: auto;
    text-align: left;
  }
  .student-goal-hero button {
    width: 100%;
  }
  .student-routine-choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .student-sticky-action strong {
    font-size: 12px;
  }
  .student-sticky-action button {
    padding: 0 12px;
  }
  .student-goal-week {
    grid-template-columns: repeat(7, minmax(38px, 1fr));
    overflow: auto;
  }
  .student-goal-dialog form {
    padding: 18px;
  }
  .student-goal-steps {
    grid-template-columns: 1fr;
  }
  .student-goal-steps li:not(.is-active) {
    display: none;
  }
}
