:root {
  --v4-bg: #fbf6eb;
  --v4-card: #fffdf8;
  --v4-ink: #173047;
  --v4-muted: #68737d;
  --v4-line: #e6dccb;
  --v4-green: #3c9b78;
  --v4-green-soft: #edf8f1;
  --v4-green-line: #b9dfcc;
  --v4-blue: #4d86c9;
  --v4-blue-soft: #eef6ff;
  --v4-blue-line: #bfd9f4;
  --v4-orange: #ee9a43;
  --v4-orange-soft: #fff4e7;
  --v4-orange-line: #f4c991;
  --v4-red: #ef6b68;
  --v4-active: var(--v4-green);
  --v4-active-soft: var(--v4-green-soft);
  --v4-active-line: var(--v4-green-line);
}

body.student-v4-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
  color: var(--v4-ink);
  background: var(--v4-bg);
  font-family: "Pretendard", "Apple SD Gothic Neo", system-ui, sans-serif;
}

body.student-v4-page[data-active-module="assignments"] {
  --v4-active: var(--v4-blue);
  --v4-active-soft: var(--v4-blue-soft);
  --v4-active-line: var(--v4-blue-line);
}

body.student-v4-page[data-active-module="documents"] {
  --v4-active: var(--v4-orange);
  --v4-active-soft: var(--v4-orange-soft);
  --v4-active-line: var(--v4-orange-line);
}

body.student-v4-page[data-active-module="stocks"] {
  --v4-active: #7048e8;
  --v4-active-soft: #f1edff;
  --v4-active-line: #cfc1ff;
}

body.student-v4-page[data-active-module="discussion"] {
  --v4-active: #3f6fc7;
  --v4-active-soft: #eef4ff;
  --v4-active-line: #c7d9f8;
}

body.student-v4-page[data-active-module="deliberation"] {
  --v4-active: #6e55c9;
  --v4-active-soft: #f1edff;
  --v4-active-line: #d3c8f7;
}
body.student-v4-page[data-active-module="career-vote"] {
  --v4-active: #2477c9;
  --v4-active-soft: #e7f3ff;
  --v4-active-line: #b9dbf6;
}
body.student-v4-page[data-active-module="secret-friend"] {
  --v4-active: #d94b78;
  --v4-active-soft: #fff0f5;
  --v4-active-line: #f5bfd1;
}

* { box-sizing: border-box; }
button, textarea { font: inherit; }
button { cursor: pointer; }

.student-v4-shell {
  width: min(430px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px 30px;
  overflow-x: hidden;
}

.student-v4-header { padding: 3px 2px 0; }

.student-v4-class,
.student-v4-code,
.student-v4-kicker,
.student-v4-panel-copy,
.student-v4-status { margin: 0; }

.student-v4-class {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 13px;
  color: #60715f;
  font-size: 13px;
  font-weight: 900;
}

.student-v4-class i { color: #5c9e55; }

.student-v4-header-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.student-v4-profile {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.student-v4-avatar {
  position: relative;
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
}

.student-v4-avatar::after {
  position: absolute;
  z-index: 2;
  inset: -2px;
  background: url("/student-v4-home-avatar-frame.png") center / contain no-repeat;
  content: "";
  pointer-events: none;
}

.student-v4-avatar img {
  position: absolute;
  z-index: 1;
  inset: 7px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--v4-card);
  object-fit: cover;
}

.student-v4-header h1 {
  max-width: 112px;
  margin: 0;
  overflow: hidden;
  color: var(--v4-ink);
  font-size: 25px;
  font-weight: 900;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-v4-code {
  max-width: 112px;
  margin-top: 5px;
  overflow: hidden;
  color: var(--v4-muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-v4-rank {
  width: calc(100% - 72px);
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 7px 0 0 72px;
  border: 1px solid #ecd9b9;
  border-radius: 12px;
  padding: 3px 8px;
  color: var(--v4-active);
  background: #fff9ec;
}

.student-v4-rank img { width: 27px; height: 27px; flex: 0 0 27px; object-fit: contain; }
.student-v4-rank span { min-width: 0; display: grid; }
.student-v4-rank strong,
.student-v4-rank small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-v4-rank strong { font-size: 12px; }
.student-v4-rank small { color: var(--v4-muted); font-size: 9px; font-weight: 800; }
.student-v4-rank.is-unavailable { color: var(--v4-muted); }

.student-v4-header-actions {
  width: calc(100% - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) 62px;
  align-items: stretch;
  margin-left: 72px;
  gap: 7px;
}
.student-v4-parent-messages { min-height: 52px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid #f4c8d8; border-radius: 15px; background: #fff0f6; padding: 5px 9px; color: #9a315d; font: inherit; font-size: 10px; font-weight: 900; }
.student-v4-parent-messages img { width: 32px; height: 32px; object-fit: contain; }
.student-v4-parent-messages strong { display: inline-grid; min-width: 19px; min-height: 19px; place-items: center; margin-left: 3px; border-radius: 999px; background: #c94b7d; color: #fff; font-size: 9px; }
.student-v4-parent-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border: 0; background: #fffaf2; padding: 0; color: var(--v4-ink); }
.student-v4-parent-dialog::backdrop { background: rgba(31, 40, 52, .45); }
.student-v4-parent-dialog-body { min-height: 100dvh; padding: max(18px, env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom)); }
.student-v4-parent-dialog-body > header { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 9px; }
.student-v4-parent-dialog-body > header button { width: 48px; height: 48px; border: 0; border-radius: 14px; background: #fff; color: var(--v4-ink); font-size: 20px; box-shadow: 0 4px 14px rgba(79, 67, 39, .08); }
.student-v4-parent-dialog-body > header small { color: #c94b7d; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.student-v4-parent-dialog-body > header h2 { margin: 3px 0 0; font-size: 24px; }
.student-v4-parent-dialog-body > p { margin: 16px 2px 10px; color: var(--v4-muted); font-size: 11px; }
.student-v4-parent-list { display: grid; gap: 10px; }
.student-v4-parent-thread { border: 1px solid #f0d8bd; border-radius: 18px; background: #fff; padding: 14px; box-shadow: 0 6px 18px rgba(79, 67, 39, .06); }
.student-v4-parent-thread > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.student-v4-parent-thread > header span { border-radius: 999px; background: #fff0f6; padding: 5px 8px; color: #a23b66; font-size: 9px; font-weight: 900; }
.student-v4-parent-thread > header small { color: var(--v4-muted); font-size: 9px; }
.student-v4-parent-thread h3 { margin: 10px 0 5px; font-size: 16px; }
.student-v4-parent-thread > p { margin: 0; border-radius: 11px; background: #fffaf2; padding: 10px; color: #51657b; font-size: 11px; font-weight: 800; line-height: 1.5; }
.student-v4-parent-reactions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.student-v4-parent-reactions span { border-radius: 999px; background: #eef2f6; padding: 5px 8px; color: #4d6074; font-size: 10px; }
.student-v4-parent-comments { display: grid; gap: 6px; margin-top: 8px; }
.student-v4-parent-comment { border-left: 3px solid #e36e9e; border-radius: 9px; background: #fff2f7; padding: 9px 10px; }
.student-v4-parent-comment small { color: #986178; font-size: 8px; }
.student-v4-parent-comment p { margin: 4px 0 0; color: #66364a; font-size: 10px; font-weight: 800; line-height: 1.45; }

.student-v4-counseling,
.student-v4-logout {
  min-height: 56px;
  border: 1px solid var(--v4-line);
  border-radius: 16px;
  background: var(--v4-card);
  box-shadow: 0 7px 18px rgba(88, 65, 38, 0.08);
  font-weight: 900;
}

.student-v4-counseling {
  width: 82px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1px;
  padding: 4px;
  color: #7256a6;
  font-size: 11px;
}

.student-v4-counseling img { width: 29px; height: 29px; object-fit: contain; }

.student-v4-logout {
  min-width: 63px;
  padding: 0 8px;
  color: var(--v4-ink);
}

.student-v4-today,
.student-v4-schedule,
.student-v4-recommended {
  margin-top: 22px;
  border: 1px solid var(--v4-line);
  border-radius: 18px;
  background: var(--v4-card);
  box-shadow: 0 8px 22px rgba(88, 65, 38, 0.07);
}

.student-v4-today {
  display: grid;
  grid-template-columns: 79px minmax(0, 1fr);
  min-height: 76px;
  overflow: hidden;
  padding: 10px 8px;
}

.student-v4-today-label {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1px;
  border-right: 1px dashed #d7c7ae;
}

.student-v4-today-label img { width: 36px; height: 36px; object-fit: contain; }
.student-v4-today-label .student-v4-kicker { display: none; }
.student-v4-today-label h2 { margin: 0; font-size: 13px; font-weight: 900; white-space: nowrap; }

.student-v4-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.student-v4-summary-grid button {
  min-width: 0;
  min-height: 56px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  place-items: center;
  gap: 2px;
  border: 0;
  border-right: 1px dashed #d7c7ae;
  padding: 4px;
  color: var(--v4-ink);
  background: transparent;
  font-size: 12px;
}

.student-v4-summary-grid button:last-child { border-right: 0; }
.student-v4-summary-grid button img { width: 34px; height: 34px; object-fit: contain; }
.student-v4-summary-grid button span { white-space: nowrap; }
.student-v4-summary-grid button strong { color: var(--v4-active); font-size: 19px; }
.student-v4-summary-grid button[aria-pressed="true"] { background: var(--v4-active-soft); border-radius: 12px; }
.student-v4-writing-shortcut, .student-v4-writing-action {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px;
  border: 1px solid var(--v4-line); border-radius: 12px;
  background: var(--v4-card); color: var(--v4-active); font: inherit; font-weight: 800; text-decoration: none;
}
.student-v4-writing-shortcut { width: 100%; margin-top: 10px; text-align: left; }
.student-v4-writing-shortcut span { flex: 1; }
.student-v4-writing-shortcut[aria-pressed="true"], .student-v4-writing-action { background: var(--v4-active-soft); }
.student-v4-writing-action { width: fit-content; margin: 14px auto 0; }
.student-v4-writing-shortcut[hidden], .student-v4-writing-action[hidden] { display: none; }

.student-v4-modules { margin-top: 27px; }
.student-v4-job-detail { min-width: 0; padding: 12px; border: 1px solid #465178; border-radius: 16px; color: #f5f3ff; background: #101725; }
.student-v4-job-detail[hidden] { display: none; }
.student-v4-job-detail-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.student-v4-job-detail-head button, .student-v4-job-retry { min-height: 44px; padding: 8px 12px; border: 1px solid #a886df; border-radius: 10px; color: #f5f3ff; background: #25233c; }
.student-v4-job-retry[hidden] { display: none; }
.student-v4-job-status { margin: 0 0 10px; font-size: 13px; line-height: 1.6; color: #d7d0ea; }
.student-v4-job-body { width: 100%; min-width: 0; }
.student-v4-job-body[hidden] { display: none; }
.student-v4-job-detail .student-job-quest { width: 100%; min-width: 0; }

.student-v4-module { min-width: 0; }

.student-v4-discussion-boundary {
  border: 1px solid var(--v4-active-line);
  border-radius: 24px;
  background: var(--v4-card);
  padding: 27px 22px;
  text-align: center;
  box-shadow: 0 12px 26px rgb(67 89 115 / 8%);
}

.student-v4-discussion-boundary > span {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0 auto 15px;
  place-items: center;
  border-radius: 22px;
  color: var(--v4-active);
  background: var(--v4-active-soft);
  font-size: 31px;
}

.student-v4-discussion-boundary > small { color: var(--v4-active); font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.student-v4-discussion-boundary h3 { margin: 8px 0; font-size: 21px; }
.student-v4-discussion-boundary > p { margin: 0; color: var(--v4-muted); font-size: 13px; line-height: 1.65; }
.student-v4-discussion-boundary dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 20px 0 0; text-align: left; }
.student-v4-discussion-boundary dl div { min-width: 0; border-radius: 13px; background: var(--v4-active-soft); padding: 12px; }
.student-v4-discussion-boundary dt { color: #718196; font-size: 10px; }
.student-v4-discussion-boundary dd { overflow: hidden; margin: 5px 0 0; color: var(--v4-ink); font-size: 12px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }

.student-v4-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 15px;
  padding: 0 5px;
}

.student-v4-section-head > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.student-v4-section-head img { width: 42px; height: 42px; object-fit: contain; }
.student-v4-section-head i { width: 36px; color: var(--v4-active); font-size: 25px; text-align: center; }

.student-v4-section-head h2 {
  position: relative;
  margin: 0;
  padding: 0 4px 6px;
  color: var(--v4-ink);
  font-size: 27px;
  font-weight: 900;
}

.student-v4-section-head h2::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 5px;
  border-radius: 999px;
  background: var(--v4-active-line);
  content: "";
}

.student-v4-head-action {
  min-width: 54px;
  min-height: 44px;
  border: 0;
  padding: 0 6px;
  color: var(--v4-active);
  background: transparent;
  font-weight: 900;
}

.student-v4-list,
.student-v4-schedule-list,
.student-v4-tool-list { display: grid; gap: 12px; }

.student-v4-row {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 132px;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  border: 1px solid var(--v4-active-line);
  border-radius: 18px;
  padding: 16px 13px;
  color: var(--v4-ink);
  background: var(--v4-card);
  box-shadow: 0 8px 22px rgba(88, 65, 38, 0.07);
  text-align: left;
}

.student-v4-row[data-today-priority="due"] { border-color: #c85f4d; background: #fff2ee; }
.student-v4-row[data-today-priority="chest"] { border-color: #7657c8; background: #f4f0ff; }
.student-v4-row[data-today-priority="both"] { border-color: #8a4fa3; background: #f7eef9; }

.student-v4-row-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-right: 1px dashed #d7c7ae;
  padding-right: 10px;
}

.student-v4-row-icon img { width: 60px; height: 60px; object-fit: contain; }
.student-v4-row-copy { min-width: 0; }

.student-v4-row strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--v4-ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.student-v4-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  color: var(--v4-muted);
  font-size: 13px;
  font-weight: 750;
}

.student-v4-row-chevron { color: #7e858b; font-size: 19px; }

.student-v4-badge {
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--v4-active);
  font-size: 12px;
  font-weight: 900;
}

.student-v4-badge[data-tone="required"] { color: #76511c; background: #fff0bd; }
.student-v4-badge[data-tone="optional"] { color: #276d64; background: #dff5ef; }
.student-v4-badge[data-tone="due-today"] { color: #7b2f24; background: #ffe0d8; }
.student-v4-badge[data-tone="chest-today"] { color: #49358f; background: #e5dcff; }

.student-v4-filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.student-v4-filter-row button {
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--v4-line);
  border-radius: 14px;
  color: var(--v4-ink);
  background: var(--v4-card);
  box-shadow: 0 5px 12px rgba(88, 65, 38, 0.05);
  font-size: 13px;
  font-weight: 900;
}

.student-v4-filter-row button[aria-selected="true"] {
  border-color: var(--v4-blue);
  color: #fff;
  background: var(--v4-blue);
}

.student-v4-reward-section { margin-top: 12px; }

.student-v4-reward-toggle {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--v4-orange-line);
  border-radius: 16px;
  padding: 8px 12px;
  color: var(--v4-ink);
  background: var(--v4-card);
  text-align: left;
}

.student-v4-reward-toggle img { width: 40px; height: 40px; object-fit: contain; }
.student-v4-reward-toggle span { font-weight: 900; }
.student-v4-reward-toggle strong { color: var(--v4-orange); }
.student-v4-reward-toggle[aria-expanded="true"] i { transform: rotate(180deg); }
.student-v4-reward-section > .student-v4-list { margin-top: 12px; }

.student-v4-message {
  margin: 0;
  padding: 16px;
  border: 1px dashed var(--v4-line);
  border-radius: 16px;
  color: var(--v4-muted);
  background: var(--v4-card);
  line-height: 1.55;
}

[data-state="error"] .student-v4-message { color: #b91c1c; border-color: #fecaca; }

.student-v4-wide-link,
.student-v4-tool,
.student-v4-schedule-row {
  min-width: 0;
  display: grid;
  gap: 5px;
  border: 1px solid var(--v4-line);
  border-radius: 15px;
  padding: 13px 14px;
  color: var(--v4-ink);
  background: var(--v4-card);
}

.student-v4-wide-link {
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  min-height: 82px;
  margin-top: 10px;
}
.student-v4-wide-link > img { width: 50px; height: 50px; object-fit: contain; }
.student-v4-wide-link > span { min-width: 0; }
.student-v4-wide-link strong { display: block; color: var(--v4-ink); font-size: 16px; }
.student-v4-wide-link small { display: block; margin-top: 5px; color: var(--v4-muted); font-size: 12px; line-height: 1.4; }
button.student-v4-tool { width: 100%; text-align: left; }
.student-v4-wide-link span,
.student-v4-tool span,
.student-v4-schedule-row span { color: var(--v4-muted); font-size: 13px; line-height: 1.45; }

.student-v4-detail {
  display: grid;
  gap: 12px;
  padding: 17px;
  border: 1px solid var(--v4-active-line);
  border-radius: 18px;
  background: var(--v4-card);
  box-shadow: 0 8px 22px rgba(88, 65, 38, 0.07);
}

.student-v4-detail h3,
.student-v4-detail p { margin: 0; }
.student-v4-detail h3 { font-size: 21px; line-height: 1.35; }
.student-v4-detail-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.student-v4-detail-badges span { min-height: 29px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 999px; color: #fff; background: var(--v4-active); font-size: 12px; font-weight: 900; }
.student-v4-detail-meta,
.student-v4-detail-state { color: var(--v4-muted); font-size: 13px; line-height: 1.55; }
.student-v4-detail-copy { padding: 13px; border: 1px solid var(--v4-line); border-radius: 13px; white-space: pre-wrap; line-height: 1.65; }
.student-v4-detail-field { display: grid; gap: 7px; font-size: 13px; font-weight: 900; }
.student-v4-detail > form { display: grid; gap: 12px; }
.student-v4-detail-field textarea { width: 100%; min-height: 132px; resize: vertical; border: 1px solid var(--v4-active-line); border-radius: 13px; padding: 12px; color: var(--v4-ink); background: #fff; line-height: 1.55; }
.student-v4-detail-submit { min-height: 49px; border: 0; border-radius: 14px; padding: 0 14px; color: #fff; background: var(--v4-active); font-weight: 900; }
.student-v4-detail-submit:disabled { color: var(--v4-muted); background: #ebe7df; }

.student-v4-schedule,
.student-v4-recommended { padding: 16px; }
.student-v4-schedule { margin-top: 24px; }
.student-v4-schedule-row { grid-template-columns: 54px minmax(0, 1fr); align-items: center; }
.student-v4-schedule-row strong { color: var(--v4-green); }

.student-v4-balance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0 0 12px; }
.student-v4-balance-grid div { min-width: 0; padding: 14px; border: 1px solid var(--v4-line); border-radius: 14px; background: var(--v4-card); }
.student-v4-balance-grid dt { color: var(--v4-muted); font-size: 12px; font-weight: 900; }
.student-v4-balance-grid dd { margin: 5px 0 0; font-size: 13px; font-weight: 800; }
.student-v4-balance-grid strong { color: var(--v4-active); font-size: 22px; }
.student-v4-panel-copy { color: var(--v4-muted); line-height: 1.6; }
.student-v4-finance-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 17px;
  border: 1px solid var(--v4-line);
  border-radius: 12px;
  overflow: hidden;
  background: #f2f1ee;
}
.student-v4-finance-switch button {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  color: var(--v4-muted);
  background: transparent;
  font-size: 15px;
  font-weight: 900;
}
.student-v4-finance-switch button + button { border-left: 1px solid var(--v4-line); }
.student-v4-finance-switch img { width: 29px; height: 29px; object-fit: contain; }
.student-v4-finance-switch button[aria-pressed="true"] { color: var(--v4-green); background: var(--v4-green-soft); }
.student-v4-money-flow {
  display: grid;
  gap: 12px;
  padding: 17px;
  border: 1px solid var(--v4-green-line);
  border-radius: 18px;
  background: var(--v4-card);
  box-shadow: 0 8px 22px rgba(88, 65, 38, 0.07);
}
.student-v4-money-flow h3 { margin: 0; font-size: 22px; }
.student-v4-money-flow-art { width: min(300px, 100%); height: 96px; margin: 0 auto; object-fit: cover; }
.student-v4-money-flow .student-v4-balance-grid { margin: 0; }
.student-v4-money-flow > p { margin: 0; padding-top: 10px; border-top: 1px solid var(--v4-line); color: var(--v4-muted); font-size: 12px; text-align: center; }
.student-v4-finance-actions { display: grid; gap: 10px; margin-top: 12px; }
.student-v4-finance-actions > button {
  min-height: 80px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--v4-line);
  border-radius: 16px;
  padding: 11px 14px;
  color: var(--v4-ink);
  background: var(--v4-card);
  text-align: left;
}
.student-v4-finance-actions img { width: 50px; height: 50px; object-fit: contain; }
.student-v4-finance-actions span { min-width: 0; }
.student-v4-finance-actions strong,
.student-v4-finance-actions small { display: block; }
.student-v4-finance-actions strong { font-size: 17px; }
.student-v4-finance-actions small { margin-top: 5px; color: var(--v4-muted); font-size: 12px; }
.student-v4-finance-actions > button > i { color: #7b858c; }

.student-v4-finance-sheet {
  width: min(430px, 100%);
  max-width: none;
  max-height: calc(100vh - 70px);
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 28px 28px 0 0;
  color: var(--v4-ink);
  background: var(--v4-card);
  box-shadow: 0 -16px 46px rgba(23, 48, 71, 0.24);
}
.student-v4-finance-sheet::backdrop { background: rgba(26, 29, 30, 0.48); backdrop-filter: blur(2px); }
.student-v4-finance-sheet form { display: grid; gap: 16px; padding: 12px 22px calc(24px + env(safe-area-inset-bottom)); }
.student-v4-sheet-handle { width: 58px; height: 6px; margin: 0 auto; border-radius: 999px; background: #d5d1cb; }
.student-v4-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.student-v4-sheet-head h2 { margin: 0; font-size: 25px; }
.student-v4-sheet-head button { width: 44px; height: 44px; border: 0; border-radius: 50%; color: var(--v4-muted); background: #f3efe8; }
.student-v4-sheet-directions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--v4-line); border-radius: 999px; overflow: hidden; }
.student-v4-sheet-directions button { min-height: 52px; border: 0; color: var(--v4-muted); background: transparent; font-weight: 900; }
.student-v4-sheet-directions button[aria-pressed="true"] { color: var(--v4-green); background: var(--v4-green-soft); box-shadow: inset 0 0 0 1px var(--v4-green-line); }
.student-v4-sheet-flow { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); align-items: center; gap: 8px; padding: 14px; border: 1px solid var(--v4-line); border-radius: 17px; background: #fffefa; text-align: center; }
.student-v4-sheet-flow > span { min-width: 0; display: grid; justify-items: center; gap: 4px; }
.student-v4-sheet-flow > span > i { font-size: 27px; color: var(--v4-green); }
.student-v4-sheet-flow small { color: var(--v4-muted); font-size: 12px; }
.student-v4-sheet-flow strong { max-width: 100%; overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.student-v4-sheet-flow > i { color: var(--v4-muted); }
.student-v4-sheet-amount { display: grid; gap: 8px; font-weight: 900; }
.student-v4-sheet-amount input { width: 100%; min-height: 68px; border: 1px solid var(--v4-line); border-radius: 15px; padding: 10px 16px; color: var(--v4-ink); background: #fff; font-size: 30px; font-weight: 900; }
.student-v4-sheet-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.student-v4-sheet-quick button { min-width: 0; min-height: 48px; border: 1px solid var(--v4-line); border-radius: 13px; color: var(--v4-ink); background: #fff; font-weight: 800; }
.student-v4-sheet-result { min-height: 48px; margin: 0; padding: 13px; border-radius: 13px; color: var(--v4-muted); background: #f6f3ed; font-size: 13px; line-height: 1.55; }
.student-v4-sheet-result[data-tone="good"] { color: #087a55; background: #e9f8f1; }
.student-v4-sheet-result[data-tone="bad"] { color: #b42318; background: #fff0ef; }
.student-v4-sheet-submit { min-height: 56px; border: 0; border-radius: 15px; color: #fff; background: var(--v4-green); font-size: 17px; font-weight: 900; }
.student-v4-sheet-submit:disabled { color: var(--v4-muted); background: #e7e3dc; }
.student-v4-status { min-height: 22px; padding: 14px 4px 0; color: var(--v4-muted); font-size: 12px; font-weight: 800; }

.student-v4-stock-session {
  width: fit-content;
  min-height: 48px;
  display: flex;
  align-items: center;
  margin: 0 0 16px;
  padding: 10px 16px;
  border: 1px solid var(--v4-green-line);
  border-radius: 15px;
  color: var(--v4-green);
  background: var(--v4-green-soft);
  font-weight: 900;
}
.student-v4-stock-session[data-tone="muted"] { color: var(--v4-muted); border-color: var(--v4-line); background: #f6f3ed; }
.student-v4-stock-account { margin-bottom: 14px; padding: 20px 16px; border: 1px solid var(--v4-green-line); border-radius: 18px; background: rgba(255, 255, 255, 0.72); }
.student-v4-stock-account h3 { margin: 0 0 17px; font-size: 23px; }
.student-v4-stock-account dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.student-v4-stock-account dl div { min-width: 0; padding: 4px 10px; text-align: center; }
.student-v4-stock-account dl div + div { border-left: 1px dashed #cfc9bf; }
.student-v4-stock-account dt { color: var(--v4-muted); font-size: 12px; font-weight: 800; }
.student-v4-stock-account dd { margin: 8px 0 0; overflow: hidden; color: var(--v4-green); font-size: 17px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.student-v4-stock-account dl div:last-child dd { color: #e36f09; }
.student-v4-stock-actions { display: grid; gap: 10px; }
.student-v4-stock-actions button {
  min-height: 72px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--v4-line);
  border-radius: 16px;
  padding: 10px 14px;
  color: var(--v4-ink);
  background: var(--v4-card);
  font-size: 19px;
  font-weight: 900;
  text-align: left;
}
.student-v4-stock-actions button:first-child { border-color: var(--v4-green-line); background: var(--v4-green-soft); }
.student-v4-stock-actions img { width: 48px; height: 48px; object-fit: contain; }
.student-v4-stock-actions i { color: var(--v4-muted); }

.student-v4-stock-page {
  width: min(430px, 100%);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0 auto;
  padding: 0;
  border: 0;
  color: var(--v4-ink);
  background: var(--v4-bg);
}
.student-v4-stock-page::backdrop { background: rgba(26, 29, 30, 0.48); }
.student-v4-stock-page-body { min-height: 100%; padding: calc(20px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom)); }
.student-v4-stock-page-head { min-height: 58px; display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 8px; }
.student-v4-stock-page-head button { width: 48px; height: 48px; border: 0; border-radius: 14px; color: var(--v4-ink); background: transparent; font-size: 24px; }
.student-v4-stock-page-head h2 { margin: 0; font-size: 27px; text-align: center; }
.student-v4-stock-picker-profile { display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: center; gap: 14px; margin: 18px 4px 4px; }
.student-v4-stock-picker-profile .student-v4-avatar { width: 68px; height: 68px; }
.student-v4-stock-picker-profile .student-v4-avatar img { inset: 7px; width: 54px; height: 54px; }
.student-v4-stock-picker-profile strong, .student-v4-stock-picker-profile small { display: block; }
.student-v4-stock-picker-profile strong { font-size: 24px; }
.student-v4-stock-picker-profile small { margin-top: 5px; color: var(--v4-muted); font-size: 14px; }
.student-v4-stock-search { min-height: 66px; display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 12px; margin: 22px 0; border: 1px solid var(--v4-green-line); border-radius: 17px; padding: 0 18px; background: rgba(255, 255, 255, 0.7); }
.student-v4-stock-search i { color: #77a28f; font-size: 24px; }
.student-v4-stock-search input { min-width: 0; height: 60px; border: 0; outline: 0; color: var(--v4-ink); background: transparent; font-size: 16px; font-weight: 800; }
.student-v4-stock-list { display: grid; border-top: 1px dashed #d8d1c6; }
.student-v4-stock-row {
  min-height: 96px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px dashed #d8d1c6;
  padding: 12px 4px;
  color: var(--v4-ink);
  background: transparent;
  text-align: left;
}
.student-v4-stock-row > img { width: 56px; height: 56px; border: 1px solid var(--v4-line); border-radius: 50%; padding: 9px; background: #fff; object-fit: contain; }
.student-v4-stock-row span { min-width: 0; }
.student-v4-stock-row strong, .student-v4-stock-row small { display: block; }
.student-v4-stock-row strong { overflow: hidden; font-size: 19px; text-overflow: ellipsis; white-space: nowrap; }
.student-v4-stock-row small { margin-top: 5px; color: var(--v4-muted); font-size: 13px; }
.student-v4-stock-row em { color: var(--v4-ink); font-size: 17px; font-style: normal; font-weight: 900; text-align: right; }
.student-v4-stock-row em small { text-align: right; }
.student-v4-stock-empty { padding: 28px 8px; color: var(--v4-muted); line-height: 1.6; text-align: center; }

.student-v4-stock-trade-sheet form { gap: 14px; }
.student-v4-stock-trade-head { display: grid; grid-template-columns: 66px minmax(0, 1fr); align-items: center; gap: 14px; }
.student-v4-stock-trade-head img { width: 64px; height: 64px; border: 1px solid var(--v4-line); border-radius: 50%; padding: 11px; background: #fff; object-fit: contain; }
.student-v4-stock-trade-head strong, .student-v4-stock-trade-head small { display: block; }
.student-v4-stock-trade-head strong { font-size: 24px; }
.student-v4-stock-trade-head small { margin-top: 4px; color: var(--v4-muted); font-size: 14px; }
.student-v4-stock-price { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border: 1px solid var(--v4-line); border-radius: 17px; background: #fffefa; }
.student-v4-stock-price div { padding: 15px 10px; text-align: center; }
.student-v4-stock-price div + div { border-left: 1px dashed #d8d1c6; }
.student-v4-stock-price dt { color: var(--v4-muted); font-size: 12px; }
.student-v4-stock-price dd { margin: 8px 0 0; color: var(--v4-green); font-size: 20px; font-weight: 900; }
.student-v4-stock-quantity > span { display: block; margin-bottom: 8px; font-weight: 900; }
.student-v4-stock-quantity > div { height: 64px; display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; border: 1px solid var(--v4-line); border-radius: 16px; overflow: hidden; background: #fff; }
.student-v4-stock-quantity button { border: 0; color: var(--v4-ink); background: #f7f4ee; font-size: 30px; }
.student-v4-stock-quantity output { display: grid; place-items: center; font-size: 25px; font-weight: 900; }
.student-v4-stock-trade-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.student-v4-stock-trade-actions button { min-height: 58px; border: 1px solid var(--v4-green); border-radius: 15px; color: var(--v4-ink); background: var(--v4-green-soft); font-size: 18px; font-weight: 900; }
.student-v4-stock-trade-actions button:last-child { border-color: #ef6a5b; color: #d44839; background: #fff4f1; }
.student-v4-stock-trade-actions button:disabled { border-color: var(--v4-line); color: var(--v4-muted); background: #e7e3dc; }
.student-v4-stock-holding-summary { margin: 22px 0; padding: 17px; border: 1px solid var(--v4-green-line); border-radius: 17px; color: var(--v4-green); background: var(--v4-green-soft); font-weight: 900; line-height: 1.55; }
.student-v4-stock-holdings-sheet { max-height: calc(100dvh - 108px); overflow: auto; }
.student-v4-stock-holdings-sheet .student-v4-stock-page-body { min-height: 0; padding: 18px 18px calc(28px + env(safe-area-inset-bottom)); }

.student-v4-bottom-nav {
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(430px, 100%);
  min-height: calc(82px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin: 0 auto;
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  border: 1px solid var(--v4-line);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: rgba(255, 253, 248, 0.97);
  box-shadow: 0 -10px 24px rgba(88, 65, 38, 0.1);
  backdrop-filter: blur(14px);
}

.student-v4-bottom-nav button {
  min-width: 0;
  min-height: 64px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  border: 0;
  border-radius: 15px;
  color: #53616b;
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.student-v4-bottom-nav img { width: 36px; height: 36px; object-fit: contain; }
.student-v4-bottom-nav button[aria-current="page"] { color: var(--v4-active); background: var(--v4-active-soft); box-shadow: inset 0 0 0 1px var(--v4-active-line); }

body.student-v4-page[data-active-module="assignments"] .student-v4-row { min-height: 116px; }
body.student-v4-page[data-active-module="assignments"] .student-v4-row-icon { height: 64px; }

.student-v4-gratitude-card { display: grid; gap: 18px; }
.student-v4-gratitude-hero { display: grid; grid-template-columns: 118px minmax(0,1fr); align-items: center; gap: 14px; border: 1px solid #bad9b2; border-radius: 20px; background: linear-gradient(145deg,#e8f7dd,#fff9e8); padding: 12px; }
.student-v4-gratitude-hero img { width: 118px; height: 118px; object-fit: contain; }
.student-v4-gratitude-hero small { color: var(--v4-muted); font-size: 12px; font-weight: 800; }
.student-v4-gratitude-hero strong { display: block; margin: 5px 0; color: var(--v4-green); font-size: 27px; }
.student-v4-gratitude-hero p { margin: 0; color: #677362; font-size: 12px; line-height: 1.5; }
.student-v4-gratitude form { display: grid; gap: 12px; }
.student-v4-gratitude form > label { color: var(--v4-ink); font-size: 13px; font-weight: 900; }
.student-v4-gratitude select,.student-v4-gratitude textarea { width: 100%; margin-top: 6px; border: 1px solid var(--v4-line); border-radius: 15px; background: #fff; padding: 13px; color: var(--v4-ink); font: inherit; }
.student-v4-gratitude select { min-height: 52px; }
.student-v4-gratitude textarea { resize: vertical; line-height: 1.55; }
.student-v4-gratitude .student-v4-gratitude-check { display: flex; align-items: center; gap: 8px; border-radius: 13px; background: #fff7d9; padding: 12px; color: #755c24; }
.student-v4-gratitude-check input { width: 20px; height: 20px; accent-color: var(--v4-green); }
.student-v4-gratitude-list { display: grid; gap: 8px; }
.student-v4-gratitude-note { border: 1px solid var(--v4-line); border-radius: 14px; background: #fffefa; padding: 12px; }
.student-v4-gratitude-note strong { display: block; color: var(--v4-green); font-size: 12px; }
.student-v4-gratitude-note p { margin: 5px 0 0; color: var(--v4-ink); font-size: 13px; line-height: 1.55; white-space: pre-wrap; }

[hidden] { display: none !important; }

@media (max-width: 360px) {
  .student-v4-shell { padding-right: 10px; padding-left: 10px; }
  .student-v4-avatar { width: 54px; height: 54px; flex-basis: 54px; }
  .student-v4-avatar img { inset: 6px; width: 42px; height: 42px; }
  .student-v4-header h1,
  .student-v4-code { max-width: 92px; }
  .student-v4-header h1 { font-size: 21px; }
  .student-v4-header-actions,
  .student-v4-rank { width: calc(100% - 64px); margin-left: 64px; }
  .student-v4-counseling { width: 73px; font-size: 10px; }
  .student-v4-logout { min-width: 57px; padding: 0 5px; }
  .student-v4-today { grid-template-columns: 70px minmax(0, 1fr); padding-right: 5px; padding-left: 5px; }
  .student-v4-summary-grid button { grid-template-columns: 30px minmax(0, 1fr); padding: 2px; font-size: 11px; }
  .student-v4-summary-grid button img { width: 30px; height: 30px; }
  .student-v4-row { grid-template-columns: 68px minmax(0, 1fr) 16px; gap: 9px; padding-right: 10px; padding-left: 10px; }
  .student-v4-row-icon { width: 64px; }
  .student-v4-row-icon img { width: 54px; height: 54px; }
}

.student-v4-avatar-shop-link {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin-top: 3px;
    color: #21674f;
    font-size: .82rem;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: .18em;
}
