@font-face {
  font-family: "Onest";
  src: url("Onest-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ice-canvas: #f2f9fc;
  --ice-soft: #e7f5fa;
  --ice-line: #d2e6ee;
  --cyan: #16b9dc;
  --cyan-deep: #079cbe;
  --cyan-pale: #c9f3fb;
  --ink: #102c3a;
  --ink-soft: #446578;
  --muted: #8499a8;
  --white: #ffffff;
  --positive: #28ad7d;
  --warning: #d98124;
  --danger: #dd5f62;
  --shadow: 0 10px 26px rgba(31, 81, 101, 0.08);
  --radius-card: 24px;
  --nav-height: 78px;
}

* { box-sizing: border-box; }
html { background: #dfeef3; }
body {
  margin: 0;
  min-width: 0;
  min-height: 100dvh;
  background: #dfeef3;
  color: var(--ink);
  font-family: "Onest", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(22, 185, 220, 0.42);
  outline-offset: 2px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--ice-canvas);
  box-shadow: 0 0 44px rgba(27, 63, 76, 0.12);
}
.app-main { min-height: 100dvh; padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom)); }
.view { min-height: calc(100dvh - var(--nav-height)); }
.view[hidden] { display: none !important; }

.schedule-header {
  padding: max(20px, env(safe-area-inset-top)) 18px 8px;
  background:
    radial-gradient(circle at 88% 0%, rgba(22, 185, 220, 0.12), transparent 32%),
    var(--ice-canvas);
}
.schedule-topbar,
.schedule-topbar__leading,
.schedule-topbar__actions,
.day-summary-row,
.schedule-tools__actions {
  display: flex;
  align-items: center;
}
.schedule-topbar, .day-summary-row { justify-content: space-between; }
.schedule-topbar__leading { gap: 8px; }
.schedule-topbar__actions { min-width: 0; gap: 2px; }
.profile-avatar,
.mode-button,
.month-button,
.top-icon-button,
.icon-button,
.back-button,
.sheet-close {
  border: 0;
  cursor: pointer;
}
.profile-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 50%;
  color: #087e9b;
  background: var(--cyan-pale);
}
.profile-avatar svg { width: 25px; height: 25px; fill: currentColor; }
.mode-button, .month-button {
  display: inline-flex;
  min-height: 44px;
  padding: 0 7px;
  align-items: center;
  gap: 3px;
  border-radius: 12px;
  background: transparent;
  font-size: 15px;
  font-weight: 750;
}
.mode-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.month-button {
  max-width: 88px;
  padding-inline: 6px;
}
.month-button__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.date-picker {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.top-icon-button {
  position: relative;
  display: grid;
  width: 40px;
  height: 44px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 12px;
  background: transparent;
}
.top-icon-button svg,
.icon-button svg,
.back-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.notification-dot {
  position: absolute;
  top: 7px;
  right: 5px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--ice-canvas);
  border-radius: 50%;
  background: var(--danger);
}
.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(210, 230, 238, 0.7);
  border-radius: 15px;
}
.week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-top: 17px;
  touch-action: pan-y;
  user-select: none;
}
.day-button {
  min-width: 0;
  padding: 4px 0;
  border: 0;
  border-radius: 17px;
  background: transparent;
  cursor: pointer;
}
.day-button__weekday {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.day-button__number {
  display: grid;
  width: 36px;
  height: 36px;
  margin: auto;
  place-items: center;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 650;
}
.day-button.is-selected .day-button__number {
  color: var(--white);
  background: var(--cyan-deep);
  box-shadow: 0 7px 18px rgba(7, 156, 190, 0.25);
}
.day-button:last-child:not(.is-selected) .day-button__number { color: var(--danger); }
.day-summary-row { min-height: 48px; margin-top: 7px; }
.day-summary {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 560;
}
.schedule-tools__actions { gap: 8px; }
.freshness {
  min-height: 26px;
  padding: 1px 22px 5px;
  color: var(--muted);
  font-size: 12px;
}
.freshness.is-stale { color: #9c651a; }
.schedule-content {
  padding: 0 14px 24px;
  touch-action: pan-y;
}
.schedule-content.is-entering-next {
  animation: schedule-enter-next 180ms ease-out;
}
.schedule-content.is-entering-previous {
  animation: schedule-enter-previous 180ms ease-out;
}

.lesson-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 19px 20px 18px 23px;
  overflow: hidden;
  border: 1px solid rgba(210, 230, 238, 0.65);
  border-radius: var(--radius-card);
  background: var(--white);
  box-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
}
.lesson-card::before {
  content: "";
  position: absolute;
  inset: 18px auto 18px 0;
  width: 5px;
  border-radius: 0 8px 8px 0;
  background: var(--cyan);
}
.lesson-card[data-accent="green"]::before { background: #73c89f; }
.lesson-card[data-accent="blue"]::before { background: #6ca8e8; }
.lesson-card[data-accent="orange"]::before { background: #f0b46c; }
.lesson-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
}
.lesson-card h2 {
  margin: 11px 0 8px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.23;
  letter-spacing: -0.025em;
}
.lesson-card__type {
  display: inline-flex;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 10px;
  color: #17647b;
  background: var(--ice-soft);
  font-size: 12px;
  font-weight: 700;
}
.lesson-card__location {
  margin: 11px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}
.lesson-card__teacher {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}
.break-row, .overlap-row {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.break-row {
  justify-content: space-between;
  padding: 0 10px;
}
.break-row__label {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}
.break-row__label svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.break-row__time {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}
.overlap-row {
  justify-content: center;
  margin: 8px 0;
  padding: 8px 12px;
  border-radius: 12px;
  color: #8a5715;
  background: #fff2dc;
  text-align: center;
}
.empty-state {
  margin-top: 28px;
  padding: 42px 24px;
  border: 1px solid var(--ice-line);
  border-radius: var(--radius-card);
  background: rgba(255,255,255,.75);
  text-align: center;
}
.empty-state__icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 20px;
  color: var(--cyan-deep);
  background: var(--cyan-pale);
  font-size: 25px;
}
.empty-state h2 { margin: 0; font-size: 20px; }
.empty-state p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.skeleton-card {
  height: 142px;
  border-radius: var(--radius-card);
  background: linear-gradient(100deg, #e7f2f6 20%, #f8fcfd 36%, #e7f2f6 52%);
  background-size: 240% 100%;
  animation: shimmer 1.1s linear infinite;
}

.detail-hero {
  position: relative;
  min-height: 310px;
  padding: max(34px, env(safe-area-inset-top)) 30px 55px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.62), transparent 25%),
    linear-gradient(155deg, #ccf5fb 0%, #81dfef 58%, #50c9e1 100%);
  text-align: center;
}
.back-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  transition: background-color .16s ease, transform .16s ease;
}
.back-button:hover {
  background: rgba(255,255,255,.28);
}
.back-button:active {
  transform: scale(.94);
}
.detail-hero .back-button { position: absolute; top: max(28px, env(safe-area-inset-top)); left: 18px; }
.detail-hero__eyebrow {
  display: inline-flex;
  margin: 0 auto 18px;
  padding: 7px 11px;
  border-radius: 10px;
  color: #0d6077;
  background: rgba(255,255,255,.72);
  font-size: 12px;
  font-weight: 750;
}
.detail-hero__title {
  max-width: 330px;
  margin: 0 auto;
  font-size: 31px;
  line-height: 1.1;
  letter-spacing: -0.045em;
}
.detail-hero__time { margin: 12px 0 0; color: #38697a; font-size: 15px; }
.detail-content {
  position: relative;
  z-index: 1;
  margin-top: -36px;
  padding: 0 14px 30px;
}
.detail-card {
  margin-bottom: 14px;
  padding: 24px;
  border: 1px solid var(--ice-line);
  border-radius: var(--radius-card);
  background: var(--white);
}
.detail-card h2 {
  margin: 0 0 19px;
  font-size: 15px;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; }
.field-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.field-value { display: block; font-size: 15px; font-weight: 700; line-height: 1.35; }
.teacher-list { display: grid; gap: 10px; }
.teacher-row + .teacher-row { padding-top: 10px; border-top: 1px solid var(--ice-line); }
.detail-link {
  display: flex;
  width: 100%;
  min-height: 56px;
  padding: 8px 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.detail-link + .detail-link { margin-top: 12px; }
.detail-link--static { cursor: default; }
.detail-link__icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 11px;
  color: var(--cyan-deep);
  background: var(--ice-soft);
  transition: background-color 140ms ease, transform 140ms ease;
}
.detail-link__icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.detail-link__copy { min-width: 0; flex: 1 1 auto; }
.detail-link .field-label { margin-bottom: 4px; }
.detail-link__arrow {
  flex: 0 0 auto;
  color: var(--cyan-deep);
  font-size: 22px;
  transition: color 140ms ease, transform 140ms ease;
}
.detail-link:not(.detail-link--static):active .detail-link__icon {
  background: #d8f0f7;
  transform: scale(.96);
}
.detail-link:not(.detail-link--static):active .detail-link__arrow {
  transform: translateX(2px);
}
.detail-action { margin-top: 16px; }
.requirements { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.55; }
.source-note { margin: 18px 0 0; color: var(--muted); font-size: 12px; }
.source-note::before { content: "●"; margin-right: 8px; color: var(--positive); }

.subpage-header {
  display: flex;
  min-height: 138px;
  padding: max(26px, env(safe-area-inset-top)) 18px 22px;
  align-items: flex-end;
  gap: 16px;
  background: var(--ice-canvas);
}
.back-button--plain { background: transparent; }
.subpage-header__eyebrow { margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.subpage-header h1 { margin: 0; font-size: 25px; letter-spacing: -0.03em; }
.team-content { padding: 0 14px 30px; }
.team-summary {
  display: flex;
  margin-bottom: 12px;
  padding: 18px 20px;
  justify-content: space-between;
  border-radius: 18px;
  background: var(--cyan-pale);
  font-size: 14px;
  font-weight: 700;
}
.member-list { overflow: hidden; border: 1px solid var(--ice-line); border-radius: var(--radius-card); background: var(--white); }
.member {
  display: flex;
  min-height: 63px;
  padding: 11px 16px;
  align-items: center;
  gap: 12px;
}
.member + .member { border-top: 1px solid #e9f1f4; }
.member__avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 13px;
  color: #17647b;
  background: var(--ice-soft);
  font-size: 12px;
  font-weight: 750;
}
.member__name { font-size: 14px; font-weight: 650; line-height: 1.35; }
.show-more {
  width: 100%;
  margin-top: 12px;
  padding: 15px;
  border: 1px solid var(--ice-line);
  border-radius: 16px;
  background: var(--white);
  color: var(--cyan-deep);
  font-weight: 700;
  cursor: pointer;
}

.placeholder-view {
  display: grid;
  padding: 80px 30px;
  place-content: center;
  text-align: center;
}
.placeholder-view__mark {
  display: grid;
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  place-items: center;
  border-radius: 24px;
  color: var(--white);
  background: var(--cyan);
  font-size: 30px;
  font-weight: 800;
}
.placeholder-view h1 { margin: 0; font-size: 27px; }
.placeholder-view p { color: var(--muted); }

.bottom-nav {
  position: fixed;
  z-index: 20;
  inset: auto 0 0;
  display: grid;
  width: min(100%, 430px);
  min-height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  margin: 0 auto;
  padding: 8px 4px env(safe-area-inset-bottom);
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(210, 230, 238, .85);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(16px);
}
.bottom-nav__item {
  display: flex;
  min-width: 0;
  min-height: 58px;
  padding: 4px 1px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  border: 0;
  background: transparent;
  color: #94a3ad;
  font-size: 10px;
  font-weight: 620;
  cursor: pointer;
}
.bottom-nav__item.is-active { color: var(--ink); }
.bottom-nav__icon { font-size: 23px; line-height: 1; }

.maps-sheet {
  width: min(calc(100% - 20px), 410px);
  max-width: 410px;
  margin: auto auto 10px;
  padding: 0;
  border: 0;
  border-radius: 28px;
  color: var(--ink);
  background: var(--white);
}
.maps-sheet::backdrop { background: rgba(5, 31, 43, .46); backdrop-filter: blur(3px); }
.maps-sheet form { padding: 10px 18px calc(20px + env(safe-area-inset-bottom)); }
.sheet-handle { width: 42px; height: 4px; margin: 0 auto 16px; border-radius: 99px; background: #d7e2e7; }
.sheet-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sheet-heading p { margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.sheet-heading h2 { margin: 0; font-size: 17px; line-height: 1.35; }
.sheet-close { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 13px; font-size: 23px; }
.map-options { display: grid; gap: 8px; margin-top: 20px; }
.map-options button {
  display: flex;
  min-height: 56px;
  padding: 8px 12px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--ice-line);
  border-radius: 16px;
  background: var(--white);
  font-weight: 650;
  cursor: pointer;
}
.map-options button span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  color: var(--cyan-deep);
  background: var(--ice-soft);
  font-weight: 800;
}
.copy-status { min-height: 18px; margin: 10px 2px 0; color: var(--positive); font-size: 12px; }
.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: calc(var(--nav-height) + 18px + env(safe-area-inset-bottom));
  max-width: min(340px, calc(100% - 32px));
  padding: 11px 15px;
  border-radius: 13px;
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: .2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@keyframes shimmer { to { background-position-x: -240%; } }
@keyframes schedule-enter-next {
  from { opacity: .35; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes schedule-enter-previous {
  from { opacity: .35; transform: translateX(-18px); }
  to { opacity: 1; transform: translateX(0); }
}
@media (hover: hover) and (pointer: fine) {
  .detail-link:not(.detail-link--static):hover .detail-link__icon {
    background: #d8f0f7;
    transform: translateY(-1px);
  }
  .detail-link:not(.detail-link--static):hover .detail-link__arrow {
    color: #047f9c;
    transform: translateX(2px);
  }
}
@media (min-width: 431px) {
  .bottom-nav { left: 50%; right: auto; transform: translateX(-50%); }
}
@media (max-width: 340px) {
  .schedule-header { padding-inline: 12px; }
  .schedule-topbar__actions { gap: 0; }
  .top-icon-button { width: 36px; flex-basis: 36px; }
  .month-button { max-width: 76px; font-size: 14px; }
  .schedule-content, .detail-content, .team-content { padding-inline: 10px; }
  .lesson-card { padding-inline: 18px 14px; }
  .lesson-card h2 { font-size: 18px; }
  .detail-hero__title { font-size: 27px; }
  .detail-card { padding: 20px; }
  .bottom-nav__item { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
