/* ==========================================================
   teachMe Online - MySpace student learning map
   ========================================================== */

:root {
  --myspace-paper: #f8f3e8;
  --myspace-paper-soft: #fbf7ef;
  --myspace-card: #fffdf8;
  --myspace-ink: #252522;
  --myspace-muted: #5d5b55;
  --myspace-faint: #8b877e;
  --myspace-green: #4d8c62;
  --myspace-green-deep: #2f6a45;
  --myspace-sage: #dfe8d4;
  --myspace-amber: #d8a54b;
  --myspace-purple: #725c87;
  --myspace-line: #ddd5c6;
  --myspace-line-soft: #e9e2d5;
  --myspace-shadow: 0 8px 24px rgba(33, 28, 19, .06);
  --myspace-radius: 16px;
  --myspace-radius-sm: 12px;
}

body {
  font-family: var(--font-body);
  background-color: var(--myspace-paper);
  background: linear-gradient(to bottom, #f6f1e4, #f9f6ee);
}

.myspace-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  color: var(--myspace-ink);
  background-color: var(--myspace-paper);
  background:
    radial-gradient(circle at 48% 24%, rgba(255, 253, 248, .56), transparent 42rem),
    linear-gradient(to bottom, #f6f1e4, #f9f6ee);
}

.myspace-sidebar {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 1.55rem 1.12rem 1.4rem;
  border-right: 1px solid var(--myspace-line);
  background: #f4f0e4;
}

.myspace-sidebar::-webkit-scrollbar {
  width: .48rem;
}

.myspace-sidebar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(91, 73, 45, .24);
}

.myspace-brand {
  display: inline-flex;
  align-items: baseline;
  gap: .18rem;
  width: fit-content;
  color: var(--myspace-ink);
  font-size: 1.62rem;
  font-weight: 780;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.myspace-brand span {
  color: var(--myspace-green);
}

.myspace-brand em {
  color: var(--coral);
  font-family: var(--font-hand);
  font-size: 1rem;
  font-style: normal;
  font-weight: 700;
}

.myspace-nav {
  display: grid;
  gap: .55rem;
  margin-top: .95rem;
}

.myspace-nav__item {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .78rem .95rem;
  border: 1px solid transparent;
  border-radius: var(--myspace-radius);
  color: var(--myspace-ink);
  font-size: .96rem;
  font-weight: 600;
  text-decoration: none;
}

.myspace-nav__item:hover,
.myspace-nav__item:focus-visible,
.myspace-nav__item.is-active {
  border-color: #c5d1b7;
  background: rgba(221, 229, 206, .82);
  outline: 0;
}

.myspace-nav__icon,
.mini-icon,
.icon-button {
  width: 1.65rem;
  height: 1.65rem;
  display: inline-grid;
  place-items: center;
  border: 1.5px solid #c9cfbf;
  border-radius: 11px;
  color: var(--myspace-green-deep);
  background: rgba(255, 255, 255, .55);
  font-size: .72rem;
  font-weight: 800;
  line-height: 1;
}

.side-card,
.side-note {
  border: 1px solid var(--myspace-line);
  border-radius: var(--myspace-radius);
  background: var(--myspace-card);
  box-shadow: var(--myspace-shadow);
}

.side-card--streak {
  margin-top: auto;
  padding: 1rem .9rem;
  text-align: center;
}

.side-card--streak p,
.side-card--streak span {
  color: var(--myspace-muted);
  font-size: .78rem;
  font-weight: 650;
}

.side-card--streak strong {
  display: block;
  margin: .35rem 0 .18rem;
  color: var(--myspace-green-deep);
  font-family: var(--font-hand);
  font-size: 2.05rem;
  line-height: 1;
}

.streak-dots {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: .38rem;
  margin-top: .85rem;
}

.streak-dots span {
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--myspace-green);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .68);
}

.streak-dots span:last-child {
  background: #fffaf0;
  border: 2px solid var(--myspace-green);
}

.side-note {
  min-height: 156px;
  display: grid;
  align-items: center;
  padding: 1rem;
  background:
    linear-gradient(rgba(255, 248, 229, .78), rgba(255, 248, 229, .78)),
    repeating-linear-gradient(0deg, transparent 0 25px, rgba(93, 74, 44, .08) 26px);
  transform: rotate(-1.5deg);
}

.side-note p {
  color: #5b4630;
  font-family: var(--font-hand);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.myspace-main {
  min-width: 0;
  padding: 1.1rem 1.55rem 2rem;
}

.myspace-top-ad {
  display: grid;
  gap: .55rem;
  min-height: 104px;
  margin-bottom: 1rem;
  border: 1px solid var(--myspace-line);
  border-radius: var(--myspace-radius);
  background: rgba(255, 253, 248, .72);
  box-shadow: var(--myspace-shadow);
  padding: .72rem .9rem .85rem;
}

.myspace-ad-label {
  color: var(--myspace-faint);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1;
  text-transform: uppercase;
}

.myspace-top-ad .ad-slot {
  min-height: 72px;
  display: grid;
  place-items: center;
  border: 1.5px dashed #d8d0c1;
  border-radius: var(--myspace-radius-sm);
  background: rgba(255, 255, 255, .2);
  color: var(--myspace-faint);
}

.myspace-topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 112px;
  margin-bottom: .7rem;
  padding: .15rem .2rem 0;
}

.myspace-topbar h1 {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 4.65vw, 5.05rem);
  font-weight: 600;
  line-height: .95;
  letter-spacing: 0;
  text-wrap: balance;
}

.myspace-subtitle {
  display: inline-flex;
  align-items: center;
  gap: .62rem;
  margin-top: .42rem;
  color: var(--myspace-green-deep);
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2vw, 2.08rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: 0;
}

.welcome-line {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: .62rem;
  row-gap: .18rem;
  margin-top: .52rem;
  color: var(--myspace-muted);
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.7;
}

.welcome-sun {
  position: relative;
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  border: 2px solid #e7ad38;
  border-radius: 50%;
}

.welcome-sun::before,
.welcome-sun::after {
  content: "";
  position: absolute;
  inset: -.48rem;
  background:
    linear-gradient(#e7ad38, #e7ad38) center top / 2px .28rem no-repeat,
    linear-gradient(#e7ad38, #e7ad38) center bottom / 2px .28rem no-repeat,
    linear-gradient(90deg, #e7ad38, #e7ad38) left center / .28rem 2px no-repeat,
    linear-gradient(90deg, #e7ad38, #e7ad38) right center / .28rem 2px no-repeat;
}

.welcome-sun::after {
  transform: rotate(45deg);
}

.learner-strip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding-top: .25rem;
}

.learner-level {
  position: relative;
  padding-left: 2.2rem;
  color: var(--myspace-muted);
  font-size: .78rem;
  line-height: 1.2;
}

.learner-level::before {
  content: '';
  position: absolute;
  left: 0;
  top: -.18rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50% 50% 50% 0;
  background: linear-gradient(135deg, #99bc72, #2f7350);
  transform: rotate(-35deg);
}

.learner-level strong {
  display: block;
  color: var(--myspace-green-deep);
  font-weight: 800;
}

.icon-button {
  border-color: rgba(42, 41, 35, .18);
  background: rgba(255, 250, 240, .7);
  cursor: pointer;
}

.learner-profile {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--myspace-ink);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
}

.learner-avatar {
  width: 2.45rem;
  height: 2.45rem;
  display: inline-grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, .8);
  border-radius: 50%;
  background: linear-gradient(135deg, #f4d2be, #9fc099);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 16px rgba(79, 57, 25, .14);
}

.myspace-layout {
  display: block;
}

.map-stage {
  min-width: 0;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 8%, rgba(251, 247, 239, .7), transparent 45%),
    linear-gradient(180deg, rgba(248, 243, 232, .36), rgba(248, 243, 232, .08));
  padding: .28rem;
}

.learning-map {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(226, 218, 203, .18),
    0 18px 46px rgba(33, 28, 19, .035);
}

.learning-map img {
  width: 100%;
  height: auto;
  border-radius: inherit;
  filter: saturate(.98) brightness(1.015);
}

.map-hotspot {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  border: 1px solid rgba(82, 56, 31, .36);
  border-radius: 999px;
  background: rgba(104, 77, 43, .9);
  box-shadow: 0 10px 22px rgba(51, 34, 17, .18);
  color: #fff8ea;
  font-size: .82rem;
  font-weight: 800;
  line-height: 1;
  padding: .62rem .92rem;
  text-decoration: none;
  transform: translate(-50%, -50%);
  transition: transform .15s ease, background .15s ease;
}

.map-hotspot:hover {
  background: var(--myspace-green-deep);
  transform: translate(-50%, -52%);
}

.map-hotspot:focus-visible {
  outline: 3px solid rgba(77, 140, 98, .92);
  outline-offset: 3px;
}

.hotspot--garden {
  left: 11%;
  top: 43%;
}

.hotspot--business {
  left: 90%;
  top: 38%;
}

.hotspot--vault {
  left: 10%;
  top: 73%;
}

.hotspot--room {
  left: 89%;
  top: 72%;
}

.panel-card {
  border: 1px solid var(--myspace-line);
  border-radius: var(--myspace-radius);
  background: var(--myspace-card);
  box-shadow: var(--myspace-shadow);
  padding: 1.1rem;
}

.panel-card__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .85rem;
}

.panel-card__title h2 {
  color: var(--myspace-ink);
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0;
}

.panel-card__title p,
.panel-card__title a {
  color: var(--myspace-green-deep);
  font-size: .78rem;
  font-weight: 800;
  text-decoration: none;
}

.myspace-app .ad-slot__label {
  color: var(--myspace-faint);
  font-size: .78rem;
  font-weight: 700;
}

.summary-grid {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(360px, 1fr) minmax(280px, .8fr);
  gap: 1rem;
  margin-top: 1.1rem;
}

.world-list,
.glance-list {
  display: grid;
  gap: .5rem;
}

.world-row,
.glance-row {
  min-height: 46px;
  display: grid;
  align-items: center;
  gap: .7rem;
  border: 1px solid rgba(91, 73, 45, .12);
  border-radius: var(--myspace-radius);
  background: rgba(255, 250, 240, .64);
  color: var(--myspace-ink);
  text-decoration: none;
}

.world-row {
  grid-template-columns: 1.55rem minmax(0, 1fr) minmax(104px, .48fr);
  padding: .55rem .65rem;
  font-size: .86rem;
  font-weight: 750;
}

.world-row__mark {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50% 50% 50% 0;
  background: var(--row-color, var(--myspace-green));
  transform: rotate(-35deg);
}

.world-row--green { --row-color: var(--myspace-green); }
.world-row--amber { --row-color: var(--myspace-amber); }
.world-row--purple { --row-color: var(--myspace-purple); }
.world-row--sage { --row-color: #86a86a; }

.world-row__progress {
  display: grid;
  gap: .2rem;
  color: var(--myspace-muted);
  font-size: .68rem;
  font-weight: 700;
  text-align: right;
}

.world-row__progress i {
  height: .22rem;
  justify-self: end;
  border-radius: 999px;
  background: var(--row-color, var(--myspace-green));
}

.world-row__note {
  color: var(--myspace-muted);
  font-size: .68rem;
  font-weight: 700;
  text-align: right;
}

.stamp-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(72px, 1fr));
  gap: .8rem;
}

.stamp {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: .35rem;
  text-align: center;
}

.stamp__seal {
  width: 3.95rem;
  height: 3.95rem;
  display: grid;
  place-items: center;
  border: 2px dashed rgba(47, 115, 80, .7);
  border-radius: 50%;
  background: rgba(244, 196, 108, .1);
  color: var(--myspace-green-deep);
  font-size: 1rem;
  font-weight: 900;
}

.stamp--locked {
  opacity: .48;
}

.stamp strong {
  min-height: 2.2rem;
  color: var(--myspace-ink);
  font-size: .78rem;
  line-height: 1.18;
}

.stamp small {
  color: var(--myspace-muted);
  font-size: .66rem;
  line-height: 1.25;
}

.glance-row {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: .68rem .75rem;
}

.glance-row strong,
.glance-row small {
  display: block;
}

.glance-row strong {
  font-size: .85rem;
}

.glance-row small {
  color: var(--myspace-muted);
  font-size: .72rem;
  font-weight: 650;
}

@media (max-width: 1180px) {
  .myspace-app {
    grid-template-columns: 1fr;
  }

  .myspace-sidebar {
    position: static;
    height: auto;
    max-height: none;
    overflow: visible;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    padding: 1rem;
  }

  .myspace-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 0;
  }

  .myspace-nav__item {
    justify-content: center;
    min-height: 40px;
    padding: .5rem .45rem;
    font-size: .75rem;
  }

  .myspace-nav__icon {
    display: none;
  }

  .side-card,
  .side-note {
    display: none;
  }

  .myspace-main {
    padding: 1.4rem 1rem 2rem;
  }

  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .glance-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .myspace-sidebar {
    grid-template-columns: 1fr;
  }

  .myspace-brand {
    font-size: 1.45rem;
  }

  .myspace-nav {
    display: flex;
    gap: .45rem;
    overflow-x: auto;
    padding-bottom: .3rem;
    scrollbar-width: none;
  }

  .myspace-nav::-webkit-scrollbar {
    display: none;
  }

  .myspace-nav__item {
    flex: 0 0 auto;
    padding-inline: .75rem;
  }

  .myspace-topbar {
    display: grid;
    min-height: auto;
  }

  .learner-strip {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .stamp-list {
    grid-template-columns: repeat(3, minmax(72px, 1fr));
  }
}

@media (max-width: 520px) {
  .myspace-main {
    padding-inline: .75rem;
  }

  .myspace-topbar h1 {
    font-size: 2.9rem;
  }

  .myspace-subtitle {
    font-size: 1.42rem;
  }

  .map-stage {
    overflow-x: auto;
    padding-bottom: .35rem;
  }

  .learning-map {
    width: 740px;
    max-width: none;
  }

  .learning-map img {
    width: 100%;
  }

  .panel-card {
    padding: .85rem;
  }

  .world-row {
    grid-template-columns: 1.45rem minmax(0, 1fr);
  }

  .world-row__progress,
  .world-row__note {
    grid-column: 2;
    justify-self: stretch;
    text-align: left;
  }

  .world-row__progress i {
    justify-self: stretch;
  }

  .stamp-list {
    grid-template-columns: repeat(2, minmax(72px, 1fr));
  }
}
