@font-face {
  font-family: "GmarketSansBoldWeb";
  src: url("./fonts/GmarketSansTTFBold.ttf") format("truetype");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #e31b23;
  --red-deep: #b60010;
  --red-dark: #700006;
  --ink: #151821;
  --text: #28313e;
  --muted: #7a8392;
  --line: #e3e7ee;
  --surface: #ffffff;
  --canvas: #f3f5f8;
  --dark: #242b36;
  --rail: #252b36;
  --rail-active: #e31b23;
  --chat: #171b24;
  --shadow: 0 20px 50px rgba(22, 27, 38, .12);
  --radius: 18px;
  font-family: "GmarketSansBoldWeb", "GmarketSans", "Gmarket Sans", "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--text); }
body { overflow: hidden; font-family: inherit; font-weight: 700; }
[hidden] { display: none !important; }
button, input, select, textarea { font-family: inherit; font-weight: 700; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(255,255,255,.38); outline-offset: 2px; }

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 18px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(76, 0, 5, .26) 0%, rgba(120, 0, 8, .16) 32%, rgba(227, 27, 35, .08) 100%),
    url("./login-background-red-abstract.png") center center / cover no-repeat;
}

.login-screen::before,
.login-screen::after {
  content: "PHYART";
  position: absolute;
  z-index: 0;
  font-size: clamp(190px, 32vw, 520px);
  line-height: .72;
  font-weight: 900;
  letter-spacing: -.11em;
  pointer-events: none;
  white-space: nowrap;
  color: rgba(255,255,255,.10);
  text-shadow: 0 28px 90px rgba(40,0,6,.20);
}

.login-screen::before {
  left: -7vw;
  top: -3vw;
  transform: rotate(-7deg);
  background: linear-gradient(115deg, rgba(0,220,255,.42), rgba(255,255,255,.12) 44%, rgba(255,40,230,.35));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: .22;
}

.login-screen::after {
  right: -14vw;
  bottom: -7vw;
  transform: rotate(9deg);
  background: linear-gradient(115deg, rgba(255,30,235,.36), rgba(255,255,255,.10) 45%, rgba(0,225,255,.42));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: .20;
}

.login-card {
  width: min(1460px, calc(100vw - 56px));
  min-height: 330px;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 150px minmax(610px, 1fr) minmax(430px, 460px);
  align-items: center;
  gap: 24px;
  padding: 42px 38px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 32px;
  background: rgba(255,255,255,.075);
  box-shadow: 0 34px 100px rgba(60,0,8,.34);
  backdrop-filter: blur(18px);
}

.login-brand-panel {
  display: contents;
  min-width: 0;
}

.login-logo {
  width: 150px;
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,.20));
}

.login-copy h1 {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(34px, 3.42vw, 52px);
  line-height: .96;
  letter-spacing: -.085em;
  white-space: nowrap;
  text-transform: uppercase;
  text-shadow: 0 12px 26px rgba(80,0,5,.22);
}

.login-copy p {
  margin: 0;
  color: #fff;
  font-size: clamp(13px, 1.18vw, 18px);
  line-height: 1.42;
  letter-spacing: -.055em;
  white-space: nowrap;
}

.login-form-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 14px;
  align-items: center;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255,255,255,.17);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.13);
}

.login-inputs {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.login-inputs label {
  display: grid;
  gap: 7px;
  color: #fff;
  font-size: 14px;
  line-height: 1.1;
  letter-spacing: -.03em;
  min-width: 0;
}

.login-inputs input {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 15px;
  padding: 0 17px;
  background: rgba(255,255,255,.96);
  color: var(--ink);
  font-size: 16px;
  letter-spacing: -.02em;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}

.login-inputs input::placeholder { color: #9ca3af; }

.login-button {
  align-self: center;
  height: 124px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: var(--red);
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 16px 32px rgba(82,0,8,.18);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.login-button:hover { transform: translateY(-2px); box-shadow: 0 22px 42px rgba(82,0,8,.26); }
.login-button:active { transform: translateY(0); }

.login-error {
  position: absolute;
  left: 48px;
  right: 48px;
  bottom: 18px;
  min-height: 22px;
  margin: 0;
  color: #fff;
  text-align: right;
  font-size: 13px;
  text-shadow: 0 2px 8px rgba(0,0,0,.22);
}

.welchers-app { min-height: 100vh; display: grid; grid-template-columns: 246px minmax(0, 1fr); background: var(--canvas); }
.left-rail {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: var(--rail);
  color: #fff;
  border-right: 1px solid rgba(255,255,255,.08);
}
.rail-logo { height: 78px; display: grid; place-items: center; border-bottom: 1px solid rgba(255,255,255,.08); padding: 0 16px; }
.rail-logo img { width: 154px; max-height: 52px; object-fit: contain; object-position: center; }
.rail-nav { flex: 1; overflow-y: auto; padding: 12px 14px; display: grid; gap: 8px; align-content: start; }
.menu-item {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 15px;
  padding: 0 14px;
  background: transparent;
  color: rgba(255,255,255,.78);
  position: relative;
  text-align: left;
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.menu-item:hover { background: rgba(255,255,255,.08); color: #fff; transform: translateX(2px); }
.menu-item.active { background: var(--rail-active); color: #fff; box-shadow: 0 12px 24px rgba(227,27,35,.28); }
.menu-icon {
  min-width: 38px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(255,255,255,.08);
  line-height: 1;
  overflow: hidden;
}
.menu-icon img {
  width: 31px;
  height: 22px;
  object-fit: contain;
  display: block;
}
.menu-label {
  position: static;
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 14px;
  line-height: 1.22;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  transition: none;
  z-index: auto;
  box-shadow: none;
  white-space: normal;
  word-break: keep-all;
}
.menu-item:hover .menu-label { opacity: 1; transform: none; }
.rail-version { height: 52px; display: grid; place-items: center; color: rgba(255,255,255,.48); font-size: 12px; border-top: 1px solid rgba(255,255,255,.08); }

.workspace { min-width: 0; height: 100vh; display: grid; grid-template-rows: 74px minmax(0, 1fr); }
.workspace-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px 12px 28px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
}
.eyebrow { display: block; color: var(--red); font-size: 11px; letter-spacing: .08em; }
.topbar-title h2 { margin: 4px 0 0; color: var(--ink); font-size: 22px; letter-spacing: -.04em; }
.topbar-user-actions { display: flex; align-items: center; gap: 12px; }
.welcome-message { color: #404855; font-size: 14px; white-space: nowrap; }
.logout-button { height: 40px; padding: 0 15px; border: 0; border-radius: 12px; background: var(--ink); color: #fff; }

.workspace-body { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 550px; }
.content-panel { min-width: 0; overflow: auto; padding: 24px 24px 30px 28px; scroll-behavior: smooth; position: relative; }
.page-view { min-height: 100%; }
.page-enter-up { animation: ramyunPediaEnter .46s cubic-bezier(.19,1,.22,1) both; }
.page-exit-up { position: absolute; inset: 24px 24px 30px 28px; width: calc(100% - 52px); pointer-events: none; animation: ramyunPediaExit .34s cubic-bezier(.45,0,.55,1) both; }
.content-panel.is-transitioning { overflow: hidden; }
@keyframes ramyunPediaEnter {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ramyunPediaExit {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-36%); }
}

.hero-card {
  min-height: 210px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}
.hero-card h1 { margin: 0; color: var(--ink); font-size: clamp(28px, 3vw, 46px); letter-spacing: -.06em; line-height: 1.08; }
.hero-card p { margin: 14px 0 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.hero-visual {
  display: none !important;
  height: 164px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 28% 34%, rgba(255,255,255,.88), transparent 10%),
    linear-gradient(135deg, #520005, #e31b23);
  position: relative;
  overflow: hidden;
}
.hero-visual::before, .hero-visual::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.22); }
.hero-visual::before { width: 150px; height: 150px; right: -38px; top: -46px; }
.hero-visual::after { width: 90px; height: 90px; left: 28px; bottom: -28px; }

.page-view-welchers-home {
  min-height: 100%;
  display: grid;
}

.welchers-home-stage {
  min-height: calc(100vh - 128px);
  display: grid;
  grid-template-columns: minmax(420px, .82fr) minmax(560px, 1fr);
  align-items: center;
  gap: clamp(38px, 4vw, 74px);
  padding: clamp(42px, 5vw, 78px) clamp(38px, 5vw, 82px);
  border-radius: 28px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(88,0,8,.20) 0%, rgba(142,0,10,.12) 45%, rgba(227,27,35,.08) 100%),
    url("./login-background-red-abstract.png") center center / cover no-repeat;
  box-shadow: 0 28px 76px rgba(72,0,8,.22);
  position: relative;
}

.welchers-home-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 36%, rgba(0,0,0,.10), transparent 34%), linear-gradient(90deg, rgba(0,0,0,.10), transparent 58%);
  pointer-events: none;
}

.welchers-home-copy,
.welchers-home-controls {
  position: relative;
  z-index: 1;
}

.welchers-home-copy {
  max-width: 520px;
  font-size: 13px;
  line-height: 1.75;
  letter-spacing: -.012em;
  text-align: left;
  text-shadow: 0 2px 10px rgba(60,0,6,.30);
  align-self: center;
}

.welchers-home-copy p {
  margin: 0 0 clamp(12px, 1.35vw, 22px);
}

.welchers-home-copy p:last-child { margin-bottom: 0; }

.welchers-home-controls {
  display: grid;
  gap: clamp(18px, 1.6vw, 28px);
}

.home-field-row,
.home-query-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.home-field-row label,
.home-query-row > span {
  color: #fff;
  font-size: 16px;
  text-align: right;
  white-space: nowrap;
  text-shadow: 0 3px 12px rgba(40,0,4,.32);
}

.home-field-row input {
  width: 100%;
  height: 54px;
  border: 1px solid rgba(255,255,255,.40);
  border-radius: 999px;
  background: rgba(227,27,35,.60);
  color: #fff;
  text-align: center;
  font-size: 16px;
  box-shadow: 0 14px 30px rgba(70,0,8,.16);
}

.home-field-row input::placeholder { color: transparent; }
.home-date-range {
  position: relative;
  width: 100%;
  z-index: 10;
}

.home-date-range-input {
  cursor: pointer;
  caret-color: transparent;
}

.home-date-range-input::placeholder {
  color: rgba(255,255,255,.78) !important;
}

.home-date-range-popover {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  z-index: 40;
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.44);
  border-radius: 24px;
  background: rgba(227,27,35,.60);
  backdrop-filter: blur(18px);
  box-shadow: 0 22px 46px rgba(70,0,8,.30);
}

.home-date-range-popover[hidden] {
  display: none !important;
}

.home-date-range-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.home-date-chip {
  min-height: 54px;
  display: grid;
  gap: 4px;
  align-content: center;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 999px;
  background: rgba(227,27,35,.60);
  color: #fff;
  text-align: center;
  box-shadow: 0 14px 30px rgba(70,0,8,.16);
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.home-date-chip span {
  font-size: 12px;
  opacity: .86;
}

.home-date-chip strong {
  font-size: 14px;
  line-height: 1.1;
}

.home-date-chip.is-active,
.home-date-chip:hover {
  background: rgba(227,27,35,1);
  box-shadow: 0 16px 32px rgba(70,0,8,.24);
  transform: translateY(-1px);
}

.home-calendar {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.40);
  border-radius: 24px;
  background: rgba(227,27,35,.60);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 12px 28px rgba(70,0,8,.18);
}

.home-calendar-header {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 8px;
}

.home-calendar-header button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.44);
  border-radius: 999px;
  background: rgba(227,27,35,.60);
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.home-calendar-header button:hover {
  background: rgba(227,27,35,1);
}

.home-calendar-header strong {
  color: #fff;
  font-size: 14px;
  text-align: center;
  letter-spacing: .02em;
}

.home-calendar-weekdays,
.home-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.home-calendar-grid {
  grid-auto-rows: 42px;
}

.home-calendar-weekdays span {
  color: rgba(255,255,255,.82);
  text-align: center;
  font-size: 12px;
}

.home-calendar-day {
  aspect-ratio: auto;
  width: 100%;
  height: 42px;
  min-height: 42px;
  border: 1px solid rgba(255,255,255,.30);
  border-radius: 999px;
  background: rgba(227,27,35,.54);
  color: #fff;
  font-size: 12px;
  box-shadow: 0 5px 12px rgba(70,0,8,.10);
  transition: background .18s ease, transform .18s ease, border-color .18s ease;
}

.home-calendar-day:hover,
.home-calendar-day.is-today {
  background: rgba(227,27,35,.78);
  border-color: rgba(255,255,255,.58);
}

.home-calendar-day.is-selected {
  background: rgba(227,27,35,1);
  border-color: rgba(255,255,255,.86);
  transform: translateY(-1px);
}

.home-calendar-day.is-in-range {
  background: rgba(255,255,255,.24);
  border-color: rgba(255,255,255,.36);
}

.home-calendar-day.is-outside {
  opacity: .38;
}

.home-date-range-actions {
  display: grid;
  grid-template-columns: 1fr;
  justify-content: stretch;
  width: 100%;
  gap: 8px;
}

.home-date-range-actions button {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255,255,255,.46);
  border-radius: 999px;
  background: rgba(227,27,35,.78);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 12px 24px rgba(70,0,8,.18);
}

.home-date-range-actions button:hover {
  background: rgba(227,27,35,1);
}

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

.home-query-option,
.home-action-stack button {
  min-height: 52px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 999px;
  background: rgba(227,27,35,.60);
  color: #fff;
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 14px 32px rgba(82,0,8,.16);
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.home-query-option:hover,
.home-action-stack button:hover {
  transform: translateY(-1px);
  background: rgba(227,27,35,.82);
  box-shadow: 0 18px 38px rgba(82,0,8,.22);
}

.home-query-option.is-selected,
.home-query-option[aria-pressed="true"] {
  background: rgba(227,27,35,1);
  color: #fff;
  border-color: rgba(255,255,255,.72);
  box-shadow: 0 20px 42px rgba(82,0,8,.28);
}

.home-action-stack {
  display: grid;
  gap: 12px;
  margin-left: 92px;
  margin-top: clamp(18px, 2vw, 34px);
}

.home-action-stack button {
  min-height: 56px;
}

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin: 18px 0; }
.metric-card, .info-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(23, 31, 46, .05);
}
.metric-card span { display: block; color: var(--muted); font-size: 12px; }
.metric-card strong { display: block; margin-top: 8px; color: var(--ink); font-size: 28px; letter-spacing: -.04em; }
.metric-card em { display: block; margin-top: 5px; color: var(--red); font-size: 11px; font-style: normal; }
.section-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; }
.info-card h3 { margin: 0 0 14px; color: var(--ink); font-size: 18px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 12px 10px; border-bottom: 1px solid #eef1f5; text-align: left; white-space: nowrap; }
.table th { color: #687181; background: #fafbfc; }
.badge { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; background: #fff1f2; color: var(--red); font-size: 12px; }
.progress-list { display: grid; gap: 12px; }
.progress-row { display: grid; gap: 7px; }
.progress-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: #596272; }
.progress-track { height: 10px; background: #f0f2f6; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--red), #ff7177); }

.charter-inline-card { height: calc(100vh - 124px); min-height: 620px; display: grid; grid-template-rows: 50px minmax(0,1fr); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.charter-frame-toolbar { display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 0 14px 0 18px; border-bottom: 1px solid var(--line); background: #fff; }
.charter-frame-toolbar strong { color: var(--ink); }
.charter-frame-toolbar a { color: var(--red); text-decoration: none; font-size: 12px; }
.charter-inline-root { min-width: 0; min-height: 0; overflow: auto; background: #fff; position: relative; }
.charter-inline-loading, .charter-inline-error { min-height: 380px; display: grid; place-items: center; color: #667085; font-size: 15px; text-align: center; line-height: 1.7; }
.charter-inline-error a { color: var(--red); }
.page-view-charter { height: 100%; }
.charter-inline-root .report-preview-modal,
.charter-inline-root .modal-backdrop,
.charter-inline-root .class-history-modal,
.charter-inline-root .previous-exercise-modal { z-index: 9999 !important; }

.chat-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: 86px minmax(0,1fr) 74px;
  background:
    radial-gradient(circle at 20% 18%, rgba(86,112,255,.2), transparent 24%),
    radial-gradient(circle at 74% 78%, rgba(227,27,35,.15), transparent 28%),
    var(--chat);
  border-left: 1px solid rgba(255,255,255,.08);
  color: #fff;
}
.chat-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.chat-kicker { display: block; color: #8d98ff; font-size: 10px; letter-spacing: .08em; }
.chat-header h3 { margin: 5px 0 0; font-size: 22px; letter-spacing: -.04em; }
.chat-status { padding: 6px 9px; border-radius: 999px; background: rgba(14,159,110,.18); color: #7af0c4; font-size: 10px; }
.chat-body { min-height: 0; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.chat-message { max-width: 92%; padding: 13px 14px; border-radius: 16px; font-size: 13px; line-height: 1.55; }
.chat-message.assistant { align-self: flex-start; background: rgba(255,255,255,.08); color: rgba(255,255,255,.92); }
.chat-message.user { align-self: flex-end; background: var(--red); color: #fff; }
.chat-suggestion { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(255,255,255,.06); color: rgba(255,255,255,.9); text-align: left; }
.chat-input-row { display: grid; grid-template-columns: minmax(0,1fr) 64px; gap: 8px; padding: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.chat-input-row input { min-width: 0; height: 46px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 0 13px; background: rgba(255,255,255,.08); color: #fff; }
.chat-input-row input::placeholder { color: rgba(255,255,255,.5); }
.chat-input-row button { border: 0; border-radius: 14px; background: var(--red); color: #fff; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; z-index: 999; min-width: 260px; max-width: calc(100vw - 40px); padding: 13px 16px; border-radius: 14px; background: #111620; color: #fff; text-align: center; box-shadow: 0 16px 34px rgba(0,0,0,.26); transition: .2s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 1180px) {
  .welchers-home-stage {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 34px 24px;
  }
  .welchers-home-copy { max-width: none; font-size: 13px; line-height: 1.7; }
  .home-action-stack { margin-left: 0; }

  body { overflow: auto; }
  .welchers-app { grid-template-columns: 220px minmax(0,1fr); }
  .workspace-body { grid-template-columns: minmax(0,1fr); }
  .chat-panel { position: fixed; right: 16px; bottom: 16px; width: min(550px, calc(100vw - 96px)); height: 560px; border-radius: 24px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.28); z-index: 90; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 860px) {
  .login-screen { padding: 18px; }
  .login-card { width: min(860px, calc(100vw - 36px)); grid-template-columns: 1fr; padding: 30px; gap: 24px; justify-items: center; text-align: center; }
  .login-brand-panel { display: grid; grid-template-columns: 1fr; text-align: center; justify-items: center; gap: 18px; }
  .login-logo { width: min(230px, 70vw); }
  .login-copy h1 { font-size: clamp(30px, 10vw, 52px); white-space: normal; }
  .login-copy p { white-space: normal; }
  .login-form-panel { grid-template-columns: 1fr; width: min(440px, 100%); }
  .login-button { height: 54px; }
  .login-error { position: static; text-align: center; margin-top: -12px; }
  .welchers-app { grid-template-columns: 220px minmax(0,1fr); }
  .left-rail { width: 220px; }
  .menu-item { min-height: 44px; border-radius: 12px; padding: 0 12px; }
  .workspace-topbar { min-height: 96px; flex-direction: column; align-items: flex-start; }
  .topbar-user-actions { width: 100%; justify-content: space-between; }
  .welcome-message { white-space: normal; font-size: 12px; }
  .content-panel { padding: 16px 14px 96px; }
  .hero-card, .section-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr; }
  .chat-panel { width: calc(100vw - 84px); height: 430px; right: 12px; bottom: 12px; }
  .charter-inline-card { height: 680px; }
}

@media (max-width: 640px) {
  .welchers-app { grid-template-columns: 1fr; }
  .left-rail { height: auto; max-height: 220px; overflow: hidden; }
  .rail-logo { display: none; }
  .rail-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 170px; }
  .workspace { height: auto; min-height: 100vh; }
  .workspace-topbar { flex-direction: column; align-items: flex-start; }
  .chat-panel { width: calc(100vw - 24px); }
}


/* 옅은 빨간색 계열 스크롤바 */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(227, 27, 35, .32) rgba(227, 27, 35, .07);
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: rgba(227, 27, 35, .07);
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb {
  background: rgba(227, 27, 35, .30);
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.72);
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(227, 27, 35, .54);
}


.home-date-range-actions-top {
  margin-top: -2px;
}

.home-calendar {
  min-height: 352px;
  max-height: none;
  overflow: visible;
}

.charter-inline-root #pwaInstallBtn,
.charter-inline-root .pwa-install-btn {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}


@media (max-width: 760px) {
  .home-calendar-grid { grid-auto-rows: 36px; }
  .home-calendar-day { height: 36px; min-height: 36px; font-size: 11px; }
  .home-calendar { min-height: 312px; }
}

/* CHARTER 인라인 로딩 시 기존 빨간 스플래시 화면이 표시되지 않도록 차단 */
.charter-inline-root #appLaunchSplash,
.charter-inline-root .app-launch-splash { display: none !important; visibility: hidden !important; opacity: 0 !important; pointer-events: none !important; }

@media (max-width: 760px) {
  .welchers-home-stage { min-height: 720px; }
  .welchers-home-copy { font-size: 13px; line-height: 1.65; }
  .home-field-row, .home-query-row { grid-template-columns: 1fr; gap: 8px; }
  .home-field-row label, .home-query-row > span { text-align: left; }
  .home-query-grid { grid-template-columns: 1fr; }

}

@media (max-width: 700px) {
  .home-date-range-fields { grid-template-columns: 1fr; }
  .home-date-range-actions { grid-template-columns: 1fr; justify-content: stretch; }
  .home-date-range-popover { position: static; margin-top: 10px; }
}

/* 회원별 수업기록 API 조회 화면 */
.lesson-filter-panel {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) 180px 180px auto;
  gap: 14px;
  align-items: end;
  padding: 18px;
  margin: 0 0 18px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.lesson-filter-field {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.1;
}

.lesson-filter-field select,
.lesson-filter-field input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  color: var(--ink);
  padding: 0 14px;
  font-size: 14px;
}

.lesson-filter-button,
.report-view-button {
  height: 46px;
  border: 0;
  border-radius: 14px;
  background: var(--red);
  color: #fff;
  padding: 0 18px;
  box-shadow: 0 12px 22px rgba(227, 27, 35, .2);
}

.report-view-button {
  height: 38px;
  white-space: nowrap;
}

.lesson-report-count-grid {
  margin-bottom: 18px;
}

.lesson-table-title-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

.lesson-table-title-row h3 {
  margin: 0;
}

.lesson-record-summary {
  color: var(--muted);
  font-size: 13px;
}

.lesson-empty-cell {
  text-align: center;
  padding: 38px 14px !important;
  color: var(--muted);
}

.lesson-error-cell {
  color: var(--red);
}

.admin-report-open {
  overflow: hidden;
}

.admin-report-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  background: rgba(12, 15, 22, .68);
  backdrop-filter: blur(5px);
  padding: 28px;
}

.admin-report-modal.show {
  display: grid;
  place-items: center;
}

.admin-report-dialog {
  position: relative;
  width: min(1120px, calc(100vw - 40px));
  max-height: calc(100vh - 44px);
  border-radius: 24px;
  background: #f5f6f9;
  box-shadow: 0 30px 100px rgba(0,0,0,.36);
  overflow: hidden;
}

.admin-report-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  padding: 0 20px;
  box-shadow: 0 14px 30px rgba(227,27,35,.30);
}

.admin-report-scroll {
  max-height: calc(100vh - 44px);
  overflow: auto;
  padding: 70px 28px 28px;
}

.admin-lesson-report {
  width: min(980px, 100%);
  margin: 0 auto;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid #e1e5ee;
  box-shadow: 0 18px 45px rgba(18, 24, 34, .10);
}

.admin-lesson-report-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px;
  color: #fff;
  background: linear-gradient(135deg, #7b0006, #e31b23);
}

.admin-lesson-report-header p {
  margin: 0 0 8px;
  opacity: .85;
  font-size: 13px;
}

.admin-lesson-report-header h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -.04em;
}

.admin-lesson-report-date {
  align-self: end;
  font-size: 18px;
  white-space: nowrap;
}

.admin-lesson-report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid #e1e5ee;
}

.admin-lesson-report-summary div {
  padding: 18px;
  border-right: 1px solid #e1e5ee;
}

.admin-lesson-report-summary div:last-child {
  border-right: 0;
}

.admin-lesson-report-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 7px;
}

.admin-lesson-report-summary strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.admin-lesson-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 22px;
}

.admin-lesson-report-card {
  border: 1px solid #e2e7f0;
  border-radius: 18px;
  padding: 18px;
  min-height: 140px;
  background: #fff;
}

.admin-lesson-report-card h3 {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 20px;
}

.admin-lesson-report-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-lesson-report-card th,
.admin-lesson-report-card td {
  border: 1px solid #e2e7f0;
  padding: 9px 10px;
  vertical-align: top;
  text-align: left;
}

.admin-lesson-report-card th {
  width: 82px;
  background: #f8fafc;
  color: #4b5563;
}

.admin-lesson-report-card p {
  margin: 0 0 9px;
  line-height: 1.55;
  color: var(--ink);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.admin-lesson-report-wide {
  grid-column: 1 / -1;
}

.admin-lesson-report-note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #d6dce8;
}

.lesson-report-empty {
  color: var(--muted) !important;
}

@media (max-width: 1180px) {
  .lesson-filter-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lesson-filter-button { grid-column: 1 / -1; }
  .admin-lesson-report-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-lesson-report-grid { grid-template-columns: 1fr; }
}

.admin-charter-report-modal .admin-charter-report-shell {
  width: min(1180px, calc(100vw - 36px));
  height: calc(100vh - 36px);
  display: flex;
}

.admin-charter-report-modal .report-preview-dialog {
  width: 100%;
  height: 100%;
}

.admin-report-loading,
.admin-report-error {
  width: min(760px, 90vw);
  margin: 80px auto;
  padding: 28px 30px;
  border-radius: 18px;
  background: #fff;
  color: #151922;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.6;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .12);
}

.admin-report-error {
  color: #b91c1c;
}
