:root {
  --violet-900: #4c1d95;
  --violet-700: #6d28d9;
  --violet-600: #7357ee;
  --violet-500: #7c3aed;
  --indigo-600: #4f46e5;
  --indigo-500: #6366f1;

  --text-900: #201b2c;
  --text-700: #514a61;
  --text-500: #7c748c;
  --text-400: #9992a5;

  --line: #e9e2f7;
  --line-strong: #ddd1f5;

  --surface: #ffffff;
  --surface-soft: #faf8ff;
  --surface-violet: #f5f1ff;
  --background: #f7f7fb;

  --success: #198754;
  --danger: #c53643;

  --shadow-soft:
    0 12px 36px rgba(77, 49, 130, 0.08);

  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text-900);
  background:
    radial-gradient(
      circle at 50% -10%,
      rgba(124, 58, 237, 0.08),
      transparent 35%
    ),
    var(--background);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Noto Sans KR",
    "Apple SD Gothic Neo",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(124, 58, 237, 0.2);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.boot-screen {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding:
    calc(28px + var(--safe-top))
    24px
    calc(28px + var(--safe-bottom));
  background: var(--surface);
  text-align: center;
}

.boot-logo {
  width: 150px;
  height: 40px;
  object-fit: contain;
}

.boot-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #ece7f7;
  border-top-color: var(--violet-600);
  border-radius: 50%;
  animation: acamate-spin 0.8s linear infinite;
}

.boot-screen p {
  margin: 0;
  color: var(--text-500);
  font-size: 14px;
}

@keyframes acamate-spin {
  to {
    transform: rotate(360deg);
  }
}

.primary-button,
.secondary-button,
.logout-button {
  width: 100%;
  min-height: 52px;
  border-radius: var(--radius-md);
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  border: 0;
  color: #fff;
  background:
    linear-gradient(
      135deg,
      var(--violet-500),
      var(--indigo-600)
    );
  box-shadow:
    0 10px 24px rgba(99, 70, 210, 0.22);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: default;
  opacity: 0.55;
  box-shadow: none;
}

.secondary-button {
  border: 1px solid var(--line-strong);
  color: var(--text-700);
  background: var(--surface);
}

.form-error {
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}

.state-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 15px;
  place-items: center;
  border-radius: 18px;
  color: var(--violet-600);
  background: var(--surface-violet);
  font-size: 22px;
  font-weight: 900;
}

.state-card {
  padding: 34px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}

.state-card h3 {
  margin: 0;
  font-size: 17px;
}

.state-card p {
  margin: 8px 0 0;
  color: var(--text-500);
  font-size: 13px;
  line-height: 1.65;
}

.toast {
  position: fixed;
  z-index: 200;
  right: 18px;
  bottom: calc(84px + var(--safe-bottom));
  left: 18px;
  width: min(calc(100% - 36px), 480px);
  margin: 0 auto;
  padding: 13px 15px;
  border-radius: 14px;
  color: #fff;
  background: rgba(32, 27, 44, 0.94);
  box-shadow:
    0 10px 30px rgba(22, 16, 33, 0.2);
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================================================== */
/* Parent Auth                                                               */
/* ========================================================================== */

.auth-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding:
    calc(34px + var(--safe-top))
    20px
    calc(28px + var(--safe-bottom));
}

.auth-brand {
  padding: 10px 6px 26px;
}

.auth-logo {
  width: 150px;
  height: 40px;
  object-fit: contain;
}

.auth-kicker {
  margin: 22px 0 8px;
  color: var(--violet-600);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.auth-brand h1 {
  margin: 0;
  font-size: clamp(29px, 8.2vw, 38px);
  line-height: 1.24;
  letter-spacing: -0.045em;
}

.auth-description {
  margin: 15px 0 0;
  color: var(--text-500);
  font-size: 15px;
  line-height: 1.7;
}

.auth-card {
  padding: 24px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.auth-card-head {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.auth-card-head h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.035em;
}

.auth-card-head p {
  margin: 6px 0 0;
  color: var(--text-500);
  font-size: 13px;
  line-height: 1.6;
}

.step-badge {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: var(--violet-600);
  background: var(--surface-violet);
  font-weight: 800;
}

.field-label {
  display: block;
  margin-bottom: 9px;
  color: var(--text-700);
  font-size: 13px;
  font-weight: 700;
}

.input-wrap {
  display: flex;
  min-height: 54px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.input-wrap:focus-within {
  border-color: var(--violet-500);
  box-shadow:
    0 0 0 4px rgba(124, 58, 237, 0.08);
}

.input-wrap input {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 15px;
  border: 0;
  outline: 0;
  color: var(--text-900);
  background: transparent;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.input-wrap input::placeholder {
  color: #b3adbc;
  font-weight: 500;
}

.field-help {
  margin: 8px 2px 0;
  color: var(--text-400);
  font-size: 12px;
}

.auth-card .form-error {
  margin: 12px 2px 0;
}

.auth-card .primary-button {
  margin-top: 20px;
}

.auth-card .secondary-button {
  margin-top: 10px;
}

.otp-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
}

.otp-digit {
  width: 100%;
  min-width: 0;
  aspect-ratio: 0.84;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--text-900);
  background: var(--surface);
  text-align: center;
  font-size: 22px;
  font-weight: 800;
}

.otp-digit:focus {
  border-color: var(--violet-500);
  outline: 0;
  box-shadow:
    0 0 0 4px rgba(124, 58, 237, 0.08);
}

.otp-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--text-500);
  font-size: 12px;
}

.text-button {
  min-height: 40px;
  padding: 0 4px;
  border: 0;
  color: var(--violet-600);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.text-button:disabled {
  color: var(--text-400);
  cursor: default;
}

.empty-description,
.empty-note {
  color: var(--text-500);
  font-size: 14px;
  line-height: 1.65;
}

.empty-note {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.auth-footer {
  margin: 22px 0 0;
  color: var(--text-400);
  text-align: center;
  font-size: 11px;
}

@media (min-width: 440px) {
  .auth-shell {
    padding-right: 26px;
    padding-left: 26px;
  }
}

@media (max-width: 359px) {
  .auth-shell {
    padding-right: 16px;
    padding-left: 16px;
  }

  .auth-card {
    padding-right: 16px;
    padding-left: 16px;
  }

  .otp-grid {
    gap: 5px;
  }

  .otp-digit {
    border-radius: 12px;
    font-size: 20px;
  }
}

/* ========================================================================== */
/* Parent Login Install V1                                                   */
/* ========================================================================== */

.auth-install-card {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid #ccebe5;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(
      145deg,
      #f5fcfa,
      #edf9f7
    );
  box-shadow: var(--shadow-soft);
}

.auth-install-copy {
  text-align: left;
}

.auth-install-kicker {
  display: block;
  margin-bottom: 7px;
  color: #0f766e;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.auth-install-copy strong {
  display: block;
  color: var(--text-900);
  font-size: 16px;
  line-height: 1.45;
}

.auth-install-copy p {
  margin: 7px 0 0;
  color: var(--text-500);
  font-size: 12px;
  line-height: 1.65;
}

.auth-install-button {
  margin-top: 14px;
  border-color: #99d7cd;
  color: #0f766e;
  background: #ffffff;
}

.auth-install-button:active {
  background: #e8f7f4;
}

/* ========================================================================== */
/* Parent App Frame                                                          */
/* ========================================================================== */

.app-shell {
  width: min(100%, 560px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--background);
}

.app-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  min-height: calc(76px + var(--safe-top));
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding:
    calc(10px + var(--safe-top))
    18px
    10px;
  border-bottom:
    1px solid rgba(225, 219, 235, 0.82);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.academy-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.academy-logo-wrap {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.academy-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.academy-brand-copy {
  min-width: 0;
}

.academy-eyebrow {
  margin: 0 0 2px;
  color: var(--violet-600);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.academy-brand h1 {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  letter-spacing: -0.025em;
}

.child-switch-button {
  display: flex;
  flex: 0 0 auto;
  min-height: 46px;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--text-700);
  background: var(--surface);
  cursor: pointer;
}

.mini-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  color: var(--violet-700);
  background:
    linear-gradient(
      135deg,
      #f2ebff,
      #e7e9ff
    );
  font-size: 12px;
  font-weight: 900;
}

.child-switch-copy {
  display: grid;
  max-width: 86px;
  text-align: left;
}

.child-switch-copy small {
  color: var(--text-400);
  font-size: 9px;
}

.child-switch-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.app-content {
  min-height: calc(100vh - 150px);
  padding:
    22px
    17px
    calc(100px + var(--safe-bottom));
}

.app-view {
  animation:
    parent-fade-up 0.22s ease;
}

@keyframes parent-fade-up {
  from {
    transform: translateY(4px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.page-kicker {
  margin: 0 0 5px;
  color: var(--violet-600);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.page-heading h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.035em;
}

.page-heading p {
  margin: 6px 0 0;
  color: var(--text-500);
  font-size: 13px;
  line-height: 1.6;
}

.icon-button {
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--violet-600);
  background: var(--surface);
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
}

.bottom-nav {
  position: fixed;
  z-index: 40;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(100%, 560px);
  min-height: calc(68px + var(--safe-bottom));
  margin: 0 auto;
  padding:
    7px
    8px
    calc(6px + var(--safe-bottom));
  border-top:
    1px solid rgba(225, 219, 235, 0.9);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(18px);
}

.nav-button {
  display: grid;
  min-width: 0;
  min-height: 52px;
  place-items: center;
  align-content: center;
  gap: 3px;
  border: 0;
  border-radius: 13px;
  color: var(--text-400);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.nav-button.active {
  color: var(--violet-600);
  background: var(--surface-violet);
}

.nav-icon {
  font-size: 19px;
  line-height: 1;
}

@media (min-width: 500px) {
  .app-content {
    padding-right: 22px;
    padding-left: 22px;
  }
}

@media (max-width: 359px) {
  .app-header {
    padding-right: 13px;
    padding-left: 13px;
  }

  .app-content {
    padding-right: 13px;
    padding-left: 13px;
  }

  .child-switch-copy {
    max-width: 70px;
  }

  .bottom-nav {
    padding-right: 4px;
    padding-left: 4px;
  }
}

/* ========================================================================== */
/* Lesson Log                                                                */
/* ========================================================================== */

.lesson-list {
  display: grid;
  gap: 14px;
}

.lesson-card {
  position: relative;
  overflow: hidden;
  padding: 19px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow:
    0 8px 26px rgba(70, 53, 100, 0.045);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.lesson-card.deep-link-highlight {
  border-color: var(--violet-500);
  box-shadow:
    0 0 0 4px rgba(124, 58, 237, 0.08),
    var(--shadow-soft);
  transform: translateY(-1px);
}

.lesson-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0ebf7;
}

.lesson-date {
  display: inline-flex;
  margin-bottom: 7px;
  color: var(--violet-600);
  font-size: 12px;
  font-weight: 850;
}

.lesson-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: -0.03em;
}

.lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 7px;
  color: var(--text-500);
  font-size: 11px;
}

.lesson-field-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.lesson-field {
  display: grid;
  gap: 5px;
}

.lesson-field-label {
  color: var(--text-500);
  font-size: 11px;
  font-weight: 800;
}

.lesson-field-value {
  margin: 0;
  color: var(--text-900);
  text-align: left;
  font-size: 14px;
  line-height: 1.68;
  white-space: pre-line;
}

.lesson-no-detail {
  margin: 15px 0 0;
  color: var(--text-400);
  font-size: 13px;
}

.lesson-loading {
  display: grid;
  gap: 14px;
}

.skeleton-card {
  height: 190px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(
      90deg,
      #f0edf5 25%,
      #f8f6fb 37%,
      #f0edf5 63%
    );
  background-size: 400% 100%;
  animation:
    parent-skeleton 1.35s ease infinite;
}

@keyframes parent-skeleton {
  0% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0 50%;
  }
}

.state-card.large {
  padding-top: 50px;
  padding-bottom: 50px;
}

.secondary-button.compact {
  width: auto;
  min-height: 44px;
  padding-right: 18px;
  padding-left: 18px;
}

@media (min-width: 500px) {
  .lesson-card {
    padding: 21px 20px;
  }
}

/* ========================================================================== */
/* Parent Push Card                                                          */
/* ========================================================================== */

.push-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  margin-top: 18px;
  padding: 17px;
  border: 1px solid #ddd2fa;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(
      135deg,
      #faf7ff,
      #f2f3ff
    );
}

.push-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--violet-600);
  background: var(--surface);
  font-size: 19px;
}

.push-copy {
  min-width: 0;
}

.push-label {
  display: block;
  margin-bottom: 3px;
  color: var(--violet-600);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.push-copy strong {
  display: block;
  font-size: 14px;
  line-height: 1.45;
}

.push-copy p {
  margin: 5px 0 0;
  color: var(--text-500);
  font-size: 11px;
  line-height: 1.55;
}

.push-action-button {
  grid-column: 1 / -1;
  min-height: 44px;
  border:
    1px solid rgba(124, 58, 237, 0.22);
  border-radius: 13px;
  color: var(--violet-700);
  background: var(--surface);
  font-weight: 850;
  cursor: pointer;
}

.push-action-button:disabled {
  color: var(--text-400);
  cursor: default;
  opacity: 0.7;
}

.push-action-button:not(:disabled):active {
  transform: translateY(1px);
}

/* ========================================================================== */
/* Parent More Menu                                                          */
/* ========================================================================== */

.profile-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.profile-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: var(--violet-700);
  background:
    linear-gradient(
      135deg,
      #f2ebff,
      #e7e9ff
    );
  font-weight: 900;
}

.profile-card strong {
  display: block;
  font-size: 15px;
}

.profile-card p {
  margin: 4px 0 0;
  color: var(--text-500);
  font-size: 12px;
}

.menu-card {
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.more-menu-item {
  display: flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 17px;
  border: 0;
  border-bottom: 1px solid #f0ecf5;
  color: var(--text-900);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.more-menu-item:last-child {
  border-bottom: 0;
}

.more-menu-item span {
  font-size: 14px;
  font-weight: 750;
}

.more-menu-item small {
  color: var(--text-400);
  font-size: 11px;
}

.more-menu-item:active {
  background: var(--surface-soft);
}

.logout-button {
  margin-top: 18px;
  border: 1px solid #f0d7db;
  color: var(--danger);
  background: var(--surface);
}

.app-version {
  margin: 18px 0 0;
  color: var(--text-400);
  text-align: center;
  font-size: 10px;
}

/* ========================================================================== */
/* Parent Child Selector                                                     */
/* ========================================================================== */

.sheet-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  background: rgba(22, 17, 31, 0.38);
  backdrop-filter: blur(2px);
}

.bottom-sheet {
  position: fixed;
  z-index: 100;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100%, 560px);
  max-height: min(78vh, 680px);
  margin: 0 auto;
  padding:
    9px
    17px
    calc(20px + var(--safe-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 26px 26px 0 0;
  background: var(--surface);
  box-shadow:
    0 -18px 60px rgba(37, 27, 56, 0.16);
  animation:
    parent-sheet-up 0.22s ease;
}

@keyframes parent-sheet-up {
  from {
    transform: translateY(22px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.sheet-handle {
  width: 40px;
  height: 4px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: #ddd7e5;
}

.sheet-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sheet-heading h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.035em;
}

.sheet-heading p {
  margin: 6px 0 0;
  color: var(--text-500);
  font-size: 13px;
  line-height: 1.6;
}

.sheet-close {
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text-500);
  background: var(--surface);
  font-size: 24px;
  cursor: pointer;
}

.child-list {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.child-item {
  display: flex;
  width: 100%;
  min-height: 68px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--text-900);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.child-item.selected {
  border-color: var(--violet-500);
  background: var(--surface-violet);
}

.child-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  color: var(--violet-700);
  background:
    linear-gradient(
      135deg,
      #f2ebff,
      #e7e9ff
    );
  font-weight: 900;
}

.child-copy {
  min-width: 0;
  flex: 1;
}

.child-copy strong {
  display: block;
  font-size: 14px;
}

.child-copy p {
  overflow: hidden;
  margin: 3px 0 0;
  color: var(--text-500);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.child-check {
  flex: 0 0 auto;
  color: var(--violet-600);
  font-weight: 900;
}

@media (max-width: 359px) {
  .bottom-sheet {
    padding-right: 13px;
    padding-left: 13px;
  }
}

/* ==========================================================================
   Parent Lesson Archive V1
   ========================================================================== */

.lesson-month-toolbar {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  margin: 4px 0 18px;
  padding: 9px;
  border: 1px solid rgba(112, 82, 190, 0.18);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(48, 34, 84, 0.04);
}

.lesson-month-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--surface-violet);
  color: inherit;
  font: inherit;
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.lesson-month-button:active:not(:disabled) {
  transform: translateY(1px);
}

.lesson-month-button:disabled {
  opacity: 0.28;
  cursor: default;
}

.lesson-month-label {
  min-width: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.025em;
}

.lesson-summary-list {
  display: grid;
  gap: 12px;
}

.lesson-summary-card {
  display: grid;
  width: 100%;
  gap: 7px;
  padding: 18px;
  border: 1px solid rgba(112, 82, 190, 0.18);
  border-radius: 20px;
  background: var(--surface);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(48, 34, 84, 0.05);
  -webkit-tap-highlight-color: transparent;
}

.lesson-summary-card:active {
  transform: translateY(1px);
}

.lesson-summary-date {
  display: block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  opacity: 0.58;
}

.lesson-summary-title {
  display: block;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: -0.03em;
  word-break: keep-all;
}

.lesson-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 13px;
  line-height: 1.45;
  opacity: 0.68;
}

.lesson-summary-meta > span {
  position: relative;
}

.lesson-summary-meta > span + span::before {
  content: "·";
  margin-right: 10px;
  opacity: 0.55;
}

.lesson-summary-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.lesson-summary-action > span {
  font-size: 20px;
  line-height: 1;
}

.lesson-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 14px;
}

.lesson-detail-month {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  opacity: 0.58;
}

.lesson-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid rgba(112, 82, 190, 0.18);
  border-radius: 13px;
  background: var(--surface);
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(48, 34, 84, 0.04);
  -webkit-tap-highlight-color: transparent;
}

.lesson-back-button:active {
  transform: translateY(1px);
}

.lesson-back-button > span {
  font-size: 21px;
  line-height: 1;
}

.lesson-detail-view {
  display: grid;
  min-width: 0;
}

.lesson-detail-view .lesson-card {
  margin: 0;
}

@media (max-width: 480px) {
  .lesson-month-toolbar {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 8px;
    padding: 8px;
    border-radius: 17px;
  }

  .lesson-month-button {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .lesson-summary-card {
    padding: 16px;
    border-radius: 18px;
  }

  .lesson-summary-title {
    font-size: 16px;
  }

  .lesson-detail-toolbar {
    margin-bottom: 12px;
  }
}


/* ========================================================================== */
/* Parent Installed Splash V1                                                 */
/* Installed PWA uses the OS/WebAPK splash only.                              */
/* Browser mode keeps the existing ACAMATE boot screen.                       */
/* ========================================================================== */

@media (display-mode: standalone) {
  .boot-screen {
    display: none !important;
  }
}

/* ========================================================================== */
/* ACAMATE_PARENT_ATTENDANCE_V1_STYLE                                         */
/* ========================================================================== */

/* ACAMATE_PARENT_ABSENCE_REQUEST_V1_STYLE */
.absence-request-card {
  margin: 0 0 18px;
  padding: 15px;
  border: 1px solid #ddd2fa;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(
      135deg,
      #faf7ff,
      #f2f3ff
    );
}

.absence-request-head {
  margin-bottom: 10px;
}

.absence-request-kicker {
  margin: 0 0 3px;
  color: var(--violet-600);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.absence-request-head h3 {
  margin: 0;
  color: var(--text-900);
  font-size: 17px;
  font-weight: 850;
}

.absence-request-head p:last-child {
  margin: 5px 0 0;
  color: var(--text-500);
  font-size: 11px;
  line-height: 1.55;
}

.absence-request-grid {
  display: grid;
  grid-template-columns:
    minmax(145px, 0.7fr)
    minmax(0, 1.6fr);
  gap: 9px;
}

.absence-request-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.absence-request-field > span {
  color: var(--text-700);
  font-size: 11px;
  font-weight: 850;
}

.absence-request-field input,
.absence-request-field textarea {
  width: 100%;
  border: 1px solid #ddd2fa;
  border-radius: 13px;
  color: var(--text-900);
  background: var(--surface);
  font: inherit;
  outline: none;
}

.absence-request-field input {
  min-height: 44px;
  padding: 0 12px;
}

.absence-request-field textarea {
  min-height: 54px;
  padding: 9px 12px;
  resize: vertical;
  line-height: 1.5;
}

.absence-request-field input:focus,
.absence-request-field textarea:focus {
  border-color: rgba(124, 58, 237, 0.42);
  box-shadow:
    0 0 0 3px rgba(124, 58, 237, 0.08);
}

.absence-request-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 9px;
}

.absence-request-status {
  min-height: 0;
  margin: 0;
  color: var(--text-500);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.absence-request-status:empty {
  display: none;
}

.absence-request-status[data-kind="success"] {
  color: #15803d;
}

.absence-request-status[data-kind="error"] {
  color: var(--danger);
}

.absence-request-submit {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border:
    1px solid rgba(124, 58, 237, 0.22);
  border-radius: 13px;
  color: var(--violet-700);
  background: var(--surface);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.absence-request-submit:disabled {
  color: var(--text-400);
  cursor: default;
  opacity: 0.7;
}

.absence-request-submit:not(:disabled):active {
  transform: translateY(1px);
}

@media (max-width: 640px) {
  .absence-request-grid {
    grid-template-columns: 1fr;
  }

  .absence-request-field textarea {
    min-height: 52px;
  }
}

.attendance-view {
  width: 100%;
}

.attendance-month-toolbar {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.attendance-month-button {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid #e9e3f3;
  border-radius: 14px;
  background: #ffffff;
  color: #554568;
  font: inherit;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(51, 36, 66, 0.05);
}

.attendance-month-button:active:not(:disabled) {
  transform: translateY(1px);
}

.attendance-month-button:disabled {
  opacity: 0.34;
  cursor: default;
}

.attendance-month-label {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #f8f6fb;
  color: #31283c;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.attendance-record-list {
  display: grid;
  gap: 12px;
}

.attendance-record-card {
  overflow: hidden;
  border: 1px solid #eee9f4;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(44, 31, 57, 0.055);
}

.attendance-record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 18px 15px;
  border-bottom: 1px solid #f1edf5;
}

.attendance-record-date {
  margin: 0;
  color: #302738;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.attendance-record-class {
  margin: 5px 0 0;
  color: #81758c;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.attendance-status {
  flex: 0 0 auto;
  display: inline-flex;
  min-width: 48px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f0edff;
  color: #654de1;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.attendance-status[data-status="ABSENT"] {
  background: #fff0f0;
  color: #c65353;
}

.attendance-status[data-status="LATE"] {
  background: #fff7e8;
  color: #b97819;
}

.attendance-status[data-status="EARLY_LEAVE"] {
  background: #fff6e9;
  color: #a96b20;
}

.attendance-status[data-status="MAKEUP"] {
  background: #eaf8f3;
  color: #317d68;
}

.attendance-status[data-status="UNKNOWN"] {
  background: #f2f2f4;
  color: #77727c;
}

.attendance-time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 15px 18px 17px;
}

.attendance-time-item {
  min-width: 0;
}

.attendance-time-item + .attendance-time-item {
  padding-left: 18px;
  border-left: 1px solid #f0ecf4;
}

.attendance-time-item > span {
  display: block;
  margin-bottom: 5px;
  color: #918797;
  font-size: 11px;
  font-weight: 700;
}

.attendance-time-item > strong {
  display: block;
  color: #302738;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
}

@media (max-width: 420px) {
  .attendance-record-head {
    padding: 15px 16px 13px;
  }

  .attendance-time-grid {
    padding: 14px 16px 16px;
  }

  .attendance-time-item + .attendance-time-item {
    padding-left: 16px;
  }
}
