.student-profile,
.avatar-preview {
  overflow: hidden;
  border-radius: 50%;
  aspect-ratio: 1;
}

.student-profile img,
.avatar-preview img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

#booking-dialog [hidden] {
  display: none !important;
}

.library-shop-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.library-market {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(140deg, #fffdfa, #f5efe6);
}

.library-market-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.library-market-head h3,
.library-market-head p {
  margin: 0;
}

.library-market-head h3 {
  font: 500 25px var(--serif);
}

.library-market-head p {
  max-width: 680px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.library-market-head > span {
  flex: none;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--sage-soft);
  color: var(--success);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.library-market-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.library-market-grid a {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(218, 208, 195, .8);
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
  color: var(--ink);
  text-decoration: none;
}

.library-market-grid a > span {
  grid-row: 1 / 3;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #eee5d8;
  color: var(--terra-dark);
  font: 700 10px var(--sans);
}

.library-market-grid strong,
.library-market-grid small,
.library-market-grid b {
  display: block;
}

.library-market-grid strong { font-size: 10px; }
.library-market-grid small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.library-market-grid b { grid-column: 2; color: var(--terra-dark); font-size: 8px; }
.library-rights-note { margin: 14px 2px 0; color: var(--muted); font-size: 8px; }

@media (max-width: 900px) {
  .library-market-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .library-market { padding: 17px; }
  .library-market-head { flex-direction: column; gap: 10px; }
  .library-market-grid { grid-template-columns: 1fr; }
}

.checkout-security-note {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.session-welcome[hidden] { display: none !important; }
.session-welcome {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 75% 15%, rgba(212, 190, 156, .2), transparent 32%), rgba(250, 248, 243, .97);
  opacity: 1;
  transition: opacity .3s ease;
}
.session-welcome.is-leaving { opacity: 0; pointer-events: none; }
.session-welcome-card {
  width: min(100%, 470px);
  text-align: center;
  animation: welcome-in .55s ease both;
}
.session-welcome-logo {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 34px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 16px 40px rgba(79, 61, 40, .09);
}
.session-welcome-logo img { width: auto; height: 44px; max-width: 42px; object-fit: contain; }
.session-welcome-card h1 {
  margin: 8px 0 15px;
  font: 500 clamp(40px, 7vw, 61px)/.98 var(--serif);
  letter-spacing: -.04em;
}
.session-welcome-card h1 strong { color: var(--terra-dark); font-weight: 500; }
.session-welcome-card > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 13px; }
.session-welcome-progress {
  display: block;
  width: 150px;
  height: 3px;
  margin: 31px auto 19px;
  overflow: hidden;
  border-radius: 99px;
  background: #e8e1d7;
}
.session-welcome-progress i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--terra);
  transform-origin: left;
  animation: welcome-progress 2.1s linear both;
}
.session-welcome-card button { color: var(--muted); font-size: 9px; }
@keyframes welcome-in { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes welcome-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .session-welcome-card,.session-welcome-progress i { animation: none; }
}
