.page--homepage {
  --home-page: var(--doj-chrome-page);
  --home-card: #fff;
  --home-text: var(--doj-chrome-text);
  --home-body: #33374a;
  --home-muted: var(--doj-chrome-muted);
  --home-weak: var(--doj-chrome-weak);
  --home-brand: #4c6fff;
  --home-border: var(--doj-chrome-border);
  --home-shadow: 0 4px 16px rgba(26, 31, 77, .06);
  --home-fortune-paper: #f7f9ff;
  --home-fortune-panel: rgba(255, 255, 255, .82);
  --home-fortune-border: #dce3f2;
  --home-fortune-text: #2f3446;
  --home-fortune-muted: #77819a;
  --home-fortune-accent: #4c6fff;
  --home-fortune-red: #d95757;
  --home-fortune-green: #36a26f;
  background: var(--home-page);
}

.page--homepage body,
.page--homepage #panel,
.page--homepage .main {
  background: var(--home-page);
}

.page--homepage .main {
  overflow-x: clip;
  padding: 64px 0 0;
}

.page--homepage .main > .row {
  max-width: 1440px;
  padding: 0 80px;
}

.page--homepage .main > .row > .columns {
  min-width: 0;
  padding: 0;
}

.doj-homepage {
  max-width: 1280px;
  margin: 0 auto;
  color: var(--home-body);
}

.doj-homepage a[href] {
  text-decoration: none;
  transition: color .18s ease, background-color .18s ease, box-shadow .18s ease, filter .18s ease, transform .18s ease;
  -webkit-user-select: none;
  user-select: none;
}

.doj-homepage a[href]:hover,
.doj-homepage a[href]:focus-visible {
  text-decoration: none;
}

.page--homepage .doj-homepage {
  visibility: visible;
  animation: none;
}

.doj-home-hero {
  position: relative;
  width: 100vw;
  width: 100dvw;
  min-width: 0;
  min-height: 280px;
  margin-left: calc(50% - 50vw);
  margin-left: calc(50% - 50dvw);
  aspect-ratio: 16 / 5;
  overflow: hidden;
  border-radius: 0;
  background: linear-gradient(120deg, #edf3ff 0%, #e1eaff 48%, #dce3ff 100%);
}

.doj-home-hero--empty::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 45% 42%, rgba(255, 255, 255, .9), transparent 25%),
    radial-gradient(circle at 78% 18%, rgba(126, 151, 255, .22), transparent 31%);
  content: '';
  pointer-events: none;
}

.doj-home-hero .doj-carousel {
  height: 100%;
  margin: 0;
  border-radius: inherit;
  background: transparent;
  box-shadow: none;
}

.doj-home-hero .doj-carousel__track {
  height: 100%;
  aspect-ratio: auto;
}

.doj-home-hero__intro {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: clamp(48px, 5.56vw, 80px);
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 24px;
  transform: translateY(-50%);
}

.doj-home-hero__brand {
  display: block;
  width: 196px;
  height: auto;
  filter: drop-shadow(0 2px 6px rgba(255, 255, 255, .72));
}

.doj-home-hero__cta {
  position: relative;
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  padding: 0 30px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(26, 31, 77, .18);
  color: var(--home-brand);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
  -webkit-user-select: none;
  user-select: none;
}

.doj-home-hero__cta::after {
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -40%;
  width: 36%;
  background: linear-gradient(90deg, transparent, rgba(76, 111, 255, .16), rgba(76, 111, 255, .34), transparent);
  content: '';
  pointer-events: none;
  transform: translateX(-160%) skewX(-20deg);
}

@keyframes doj-home-cta-shine {
  0% { transform: translateX(-160%) skewX(-20deg); }
  65%, 100% { transform: translateX(520%) skewX(-20deg); }
}

.doj-home-hero__cta:hover,
.doj-home-hero__cta:focus-visible {
  box-shadow: 0 10px 28px rgba(26, 31, 77, .24);
  color: var(--home-brand);
  text-decoration: none;
  transform: translateY(-2px);
}

.doj-home-hero__cta:hover::after,
.doj-home-hero__cta:focus-visible::after {
  animation: doj-home-cta-shine 1.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .doj-homepage a[href],
  .doj-home-hero__cta,
  .doj-home-hero__cta::after,
  .doj-home-hero__cta:hover::after,
  .doj-home-hero__cta:focus-visible::after { animation: none; transition: none; }
}

.doj-home-user {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: 80px;
  transform: translateY(-50%);
  display: flex;
  width: 380px;
  min-height: 240px;
  flex-direction: column;
  justify-content: center;
  padding: 24px 28px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(38, 68, 164, .78), rgba(76, 111, 255, .78));
  box-shadow: 0 12px 28px rgba(20, 44, 121, .28);
  color: #fff;
}

.doj-home-user__identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
}

.doj-home-user__avatar {
  display: inline-flex;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  align-items: center;
  justify-content: center;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  color: #2e4daa;
  font-size: 32px;
  text-decoration: none;
}

.doj-home-user__avatar > .doj-avatar { --doj-avatar-size: 100% !important; }
.doj-home-user--guest .doj-home-user__avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }

.doj-home-user__hello {
  display: block;
  margin-bottom: 3px;
  color: #dce5ff;
  font-size: 12px;
}

.doj-home-user__identity strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doj-home-user__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 22px 0 0;
}

.doj-home-user__stats div {
  min-width: 0;
  padding: 0 10px;
  border-left: 1px solid rgba(255, 255, 255, .22);
  text-align: center;
}

.doj-home-user__stats div:first-child { padding-left: 0; border-left: 0; }
.doj-home-user__stats div:last-child { padding-right: 0; }
.doj-home-user__stats dt { color: #dce5ff; font-size: 11px; white-space: nowrap; }
.doj-home-user__stats dd { margin: 5px 0 0; color: #fff; font-size: 16px; font-weight: 700; white-space: nowrap; }
.doj-home-user a,
.doj-home-user a:hover,
.doj-home-user a:focus-visible { text-decoration: none; }
.doj-home-user__stats a { display: block; color: inherit; text-decoration: none; }
.doj-home-user__stats a:hover,
.doj-home-user__stats a:focus-visible { color: #fff; text-decoration: none; transform: translateY(-1px); }

.doj-home-user__avatar:hover,
.doj-home-user__avatar:focus-visible { transform: scale(1.04); }

.doj-home-user--guest {
  align-items: center;
  text-align: center;
}

.doj-home-user--guest .doj-home-user__avatar {
  width: 60px;
  height: 60px;
  flex-basis: 60px;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  font-size: 27px;
}

.doj-home-user--guest h2 {
  margin: 12px 0 4px;
  color: #fff;
  font-size: 20px;
}

.doj-home-user--guest p {
  margin: 0 0 16px;
  color: #dce5ff;
  font-size: 13px;
}

.doj-home-user--guest a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border-radius: 20px;
  background: #fff;
  color: var(--home-brand);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.doj-home-columns {
  display: grid;
  grid-template-columns: minmax(0, 876px) 380px;
  align-items: start;
  gap: 24px;
  margin-top: 28px;
}

.doj-home-column,
.doj-home-main-grid__left,
.doj-home-lower-grid__left,
.doj-home-lower-grid__right {
  min-width: 0;
}

.doj-home-column,
.doj-home-main-grid__left,
.doj-home-lower-grid__left,
.doj-home-lower-grid__right {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.doj-home-block,
.doj-home-panel { min-width: 0; }

.doj-home-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.doj-home-heading h2 {
  margin: 0;
  color: var(--home-text);
  font-size: 18px;
  font-weight: 700;
}

.doj-home-heading > a,
.doj-home-heading > span {
  flex: 0 0 auto;
  color: var(--home-weak);
  font-size: 13px;
  text-decoration: none;
}

.doj-home-heading__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
}

.doj-home-heading__actions a {
  color: var(--home-weak);
  font-size: 13px;
  text-decoration: none;
}

.doj-home-heading__actions .doj-home-recommendations__refresh {
  padding: 5px 12px;
  border: 1px solid #d9e0ff;
  border-radius: 14px;
  background: #f2f5ff;
  color: var(--home-brand);
  font-weight: 600;
}

.doj-home-heading__actions .doj-home-recommendations__refresh:hover,
.doj-home-heading__actions .doj-home-recommendations__refresh:focus-visible {
  border-color: #b9c5ff;
  background: #e7ecff;
  color: #3e5ee7;
  transform: translateY(-1px);
}

.doj-home-heading__actions .doj-home-recommendations__refresh[aria-busy="true"] {
  opacity: .62;
  pointer-events: none;
  transform: none;
}

.doj-home-resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 20px;
  margin-top: 18px;
}

.doj-home-resource {
  display: flex;
  min-width: 0;
  min-height: 88px;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--home-card);
  box-shadow: var(--home-shadow);
  text-decoration: none;
}

.doj-home-resource > span,
.doj-home-training__icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #edf2ff;
  font-size: 22px;
}

.doj-home-resource > span img,
.doj-home-training__icon img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.doj-home-resource > span.is-violet { background: #f3efff; }
.doj-home-resource > span.is-cyan { background: #eaf9fb; }
.doj-home-resource > span.is-orange { background: #fff1e8; }
.doj-home-resource > span.is-yellow { background: #fff8df; }
.doj-home-resource > span.is-green { background: #eaf8ef; }
.doj-home-resource div { min-width: 0; }
.doj-home-resource strong { display: block; overflow: hidden; color: var(--home-text); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.doj-home-resource small { display: block; margin-top: 5px; overflow: hidden; color: var(--home-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.doj-home-trainings > .doj-home-heading h2 { font-size: 22px; }
.doj-home-training-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 18px; }
.doj-home-training { min-width: 0; min-height: 210px; padding: 24px; border-radius: 12px; background: var(--home-card); box-shadow: var(--home-shadow); text-decoration: none; }
.doj-home-training:nth-child(2) .doj-home-training__icon { background: #fff5e8; }
.doj-home-training:nth-child(3) .doj-home-training__icon { background: #f1efff; }
.doj-home-training strong { display: block; margin-top: 16px; color: var(--home-text); font-size: 17px; }
.doj-home-training p { min-height: 40px; margin: 8px 0 14px; color: var(--home-muted); font-size: 13px; line-height: 20px; }
.doj-home-training small { color: var(--home-muted); font-size: 12px; }
.doj-home-training--join { border: 1px dashed #cfd5e6; box-shadow: none; }
.doj-home-homeworks > .doj-home-heading h2 { font-size: 22px; }
.doj-home-homework-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 18px; }
.doj-home-homework { display: flex; min-width: 0; flex-direction: column; gap: 12px; padding: 20px; border: 1px solid transparent; border-radius: 12px; background: var(--home-card); box-shadow: var(--home-shadow); text-decoration: none; }
.doj-home-homework:hover,
.doj-home-homework:focus-visible { border-color: var(--home-brand); }
.doj-home-homework:focus-visible { outline: 2px solid var(--home-brand); outline-offset: 3px; }
.doj-home-homework__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.doj-home-homework__top > .icon { color: var(--home-brand); font-size: 22px; }
.doj-home-homework__status { padding: 3px 8px; border: 1px solid var(--home-border); border-radius: 99px; color: var(--home-brand); font-size: 11px; white-space: nowrap; }
.doj-home-homework__status.is-pending { color: var(--home-muted); }
.doj-home-homework > strong { color: var(--home-text); font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.doj-home-homework > p { margin: 0; color: var(--home-muted); font-size: 12px; line-height: 1.8; }
.doj-home-homework__progress { margin-top: auto; padding-top: 3px; }
.doj-home-homework__progress > div:first-child { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 9px; color: var(--home-muted); font-size: 12px; }
.doj-home-homework__progress b { color: var(--home-brand); font-weight: 600; }
.doj-home-homework__progress .doj-home-progress { margin-bottom: 0; }
.doj-home-progress { height: 5px; margin: 0 0 8px; overflow: hidden; border-radius: 5px; background: #eef0f5; }
.doj-home-progress span { display: block; height: 100%; border-radius: inherit; background: var(--home-brand); }

.doj-home-fortune {
  min-width: 0;
  height: auto;
  min-height: 0;
  margin-top: 40px;
}

.doj-home-fortune > .section {
  display: flex;
  height: auto;
  min-height: 0;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--home-fortune-border);
  border-radius: 16px;
  background: var(--home-fortune-paper);
  box-shadow: var(--home-shadow);
  color: var(--home-fortune-text);
}

.doj-home-fortune .section__body {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 22px 20px 18px;
  background: var(--home-fortune-paper);
  color: var(--home-fortune-text);
  text-align: left;
}

.doj-home-fortune .doj-checkin__result {
  display: flex;
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  -webkit-user-select: none;
  user-select: none;
}

.doj-home-fortune .doj-checkin__masthead {
  display: flex;
  min-height: 48px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.doj-home-fortune .doj-checkin__date {
  margin: 5px 0 0;
  color: var(--home-fortune-muted);
  font-family: "Noto Serif SC", "Songti SC", STSong, serif;
  font-size: 12px;
  letter-spacing: .08em;
}

.doj-home-fortune .doj-checkin__seal {
  display: inline-flex;
  min-width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border-radius: 8px;
  background: var(--home-fortune-accent);
  color: #fff;
  font-family: "Noto Serif SC", "Songti SC", STSong, serif;
  font-size: 21px;
  line-height: 1;
  transform: rotate(-6deg);
}

.doj-home-fortune .doj-checkin__seal--0 { background: #d95757; }
.doj-home-fortune .doj-checkin__seal--1 { background: #df7b45; }
.doj-home-fortune .doj-checkin__seal--2 { background: #d2a52e; }
.doj-home-fortune .doj-checkin__seal--3 { background: #36a26f; }
.doj-home-fortune .doj-checkin__seal--4 { background: #398f88; }
.doj-home-fortune .doj-checkin__seal--5 { background: #77819a; }
.doj-home-fortune .doj-checkin__seal--6 { background: #3f4658; }

.doj-home-fortune .doj-checkin__hero {
  margin-top: 8px;
}

.doj-home-fortune .doj-checkin__verdict,
.doj-home-fortune .doj-checkin__empty h1 {
  margin: 0;
  color: var(--home-fortune-text);
  font-family: "Noto Serif SC", "Songti SC", STSong, serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.25;
}

.doj-home-fortune .doj-checkin__user {
  margin: 4px 0 0;
  color: var(--home-fortune-muted);
  font-size: 12px;
}

.doj-home-fortune .doj-checkin__username {
  color: var(--home-fortune-text);
  font-weight: 700;
}

.doj-home-fortune .doj-checkin__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.doj-home-fortune .doj-checkin__chips span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 10px;
  border-radius: 14px;
  background: rgba(76, 111, 255, .09);
  color: var(--home-fortune-muted);
  font-size: 10px;
  white-space: nowrap;
}

.doj-home-fortune .doj-checkin__chips span:first-child {
  background: var(--home-fortune-accent);
  color: #fff;
}

.doj-home-fortune .doj-checkin__divider {
  height: 0;
  margin: 14px 0;
  border: 0;
  border-top: 1px solid var(--home-fortune-border);
}

.doj-home-fortune .doj-checkin__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.doj-home-fortune .doj-checkin__panel {
  min-width: 0;
  padding: 11px 10px;
  border: 1px solid var(--home-fortune-border);
  border-radius: 10px;
  background: var(--home-fortune-panel);
}

.doj-home-fortune .doj-checkin__panel h2 {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 0 0 9px;
  font-weight: 400;
}

.doj-home-fortune .doj-checkin__panel h2 span {
  font-family: "Noto Serif SC", "Songti SC", STSong, serif;
  font-size: 27px;
  font-weight: 700;
  line-height: 1;
}

.doj-home-fortune .doj-checkin__panel h2 small {
  color: var(--home-fortune-muted);
  font-size: 9px;
  font-weight: 400;
}

.doj-home-fortune .doj-checkin__panel ul {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.doj-home-fortune .doj-checkin__panel li {
  display: grid;
  min-width: 0;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: start;
  gap: 6px;
}

.doj-home-fortune .doj-checkin__panel li p {
  min-width: 0;
  margin: 0;
}

.doj-home-fortune .doj-checkin__panel li strong,
.doj-home-fortune .doj-checkin__panel li small {
  display: block;
  overflow-wrap: anywhere;
}

.doj-home-fortune .doj-checkin__panel li strong {
  color: var(--home-fortune-text);
  font-size: 12px;
  line-height: 1.35;
}

.doj-home-fortune .doj-checkin__panel li small {
  margin-top: 2px;
  color: var(--home-fortune-muted);
  font-size: 10px;
  line-height: 1.4;
}

.doj-home-fortune .doj-checkin__mark {
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
}

.doj-home-fortune .doj-checkin__panel--good h2 span,
.doj-home-fortune .doj-checkin__panel--good .doj-checkin__mark {
  color: var(--home-fortune-green);
}

.doj-home-fortune .doj-checkin__panel--bad h2 span,
.doj-home-fortune .doj-checkin__panel--bad .doj-checkin__mark {
  color: var(--home-fortune-red);
}

.doj-home-fortune .doj-checkin__account {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--home-fortune-border);
  border-radius: 10px;
  background: var(--home-fortune-panel);
  text-align: center;
}

.doj-home-fortune .doj-checkin__quote {
  margin: 0 0 9px;
  color: var(--home-fortune-muted);
  font-family: "Noto Serif SC", "Songti SC", STSong, serif;
  font-size: 12px;
  line-height: 1.55;
}

.doj-home-fortune .doj-checkin__meta {
  margin: 0;
  padding-top: 9px;
  border-top: 1px solid var(--home-fortune-border);
  color: var(--home-fortune-muted);
  font-size: 10px;
  line-height: 1.5;
}

.doj-home-fortune .doj-checkin__meta b {
  color: var(--home-fortune-text);
}

.doj-home-fortune .doj-checkin__reward {
  margin: 6px 0 0;
  color: var(--home-fortune-accent);
  font-size: 12px;
}

.doj-home-fortune .doj-checkin__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 8px 0 0;
  padding-top: 0;
  color: var(--home-fortune-muted);
  font-family: "Noto Serif SC", "Songti SC", STSong, serif;
  font-size: 10px;
  letter-spacing: .08em;
  line-height: 1.5;
}

.doj-home-fortune .doj-checkin__footer strong {
  color: var(--home-fortune-text);
  font-size: 12px;
}

.doj-home-fortune .doj-checkin__empty {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.doj-home-fortune .doj-checkin__empty p {
  max-width: 240px;
  margin: 10px auto 0;
  color: var(--home-fortune-muted);
  font-size: 12px;
  line-height: 1.6;
}

.page--homepage .doj-home-fortune .button.doj-checkin__action {
  display: inline-flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto !important;
  max-width: 100%;
  min-width: 180px;
  height: 44px;
  margin: 20px 0 0;
  padding: 0 24px;
  border: 1px solid rgba(54, 79, 184, .18);
  border-radius: 22px;
  background: linear-gradient(135deg, #4c6be2, #3f5ed4);
  box-shadow: 0 4px 10px rgba(63, 94, 212, .18);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .03em;
  cursor: pointer;
  transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.page--homepage .doj-home-fortune .button.doj-checkin__action:hover,
.page--homepage .doj-home-fortune .button.doj-checkin__action:focus-visible {
  background: linear-gradient(135deg, #4361d9, #3653c5);
  box-shadow: 0 6px 14px rgba(63, 94, 212, .24);
  color: #fff;
  transform: translateY(-1px);
}

.page--homepage .doj-home-fortune .button.doj-checkin__action:focus-visible {
  outline: 2px solid #4c6be2;
  outline-offset: 3px;
}

.page--homepage .doj-home-fortune .button.doj-checkin__action:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(63, 94, 212, .18);
}

.page--homepage .doj-home-fortune .doj-checkin__action .icon {
  margin: 0;
  font-size: 16px;
  color: inherit;
}

@media (prefers-reduced-motion: reduce) {
  .page--homepage .doj-home-fortune .button.doj-checkin__action {
    transition: none;
  }
  .page--homepage .doj-home-fortune .button.doj-checkin__action:hover,
  .page--homepage .doj-home-fortune .button.doj-checkin__action:focus-visible,
  .page--homepage .doj-home-fortune .button.doj-checkin__action:active {
    transform: none;
  }
}

.doj-home-panel {
  padding: 24px;
  border-radius: 12px;
  background: var(--home-card);
  box-shadow: var(--home-shadow);
}

.doj-home-discussion-list,
.doj-home-problem-list,
.doj-home-ranking__list,
.doj-home-countdown ol { margin: 14px 0 0; padding: 0; list-style: none; }

.doj-home-discussion-list li { display: grid; min-width: 0; grid-template-columns: 6px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 42px; border-top: 1px solid var(--home-border); }
.doj-home-discussion-list li:first-child { border-top: 0; }
.doj-home-discussion-list__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--home-brand); }
.doj-home-discussion-list__dot.is-pinned { background: #ff9f43; }
.doj-home-discussion-list a { min-width: 0; overflow: hidden; color: var(--home-body); font-size: 14px; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.doj-home-discussion-list em { margin-right: 7px; padding: 2px 5px; border-radius: 4px; background: #fff2e8; color: #f0782c; font-size: 10px; font-style: normal; }
.doj-home-discussion-list time { color: var(--home-weak); font-size: 12px; }

.doj-home-problem-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.doj-home-problem-list li { display: flex; min-width: 0; align-items: center; gap: 12px; min-height: 56px; border-top: 1px solid var(--home-border); }
.doj-home-problem-list li:nth-child(-n + 2) { border-top: 0; }
.doj-home-problem-list__level { display: inline-flex; width: 36px; height: 36px; flex: 0 0 36px; align-items: center; justify-content: center; border-radius: 50%; font-size: 13px; font-weight: 700; }
.doj-home-problem-list__level.is-entry { background: #eaf7ef; color: #3ca568; }
.doj-home-problem-list__level.is-easy { background: #eef2ff; color: var(--home-brand); }
.doj-home-problem-list__level.is-medium { background: #fff4e8; color: #e48b35; }
.doj-home-problem-list__level.is-hard { background: #fff0f1; color: #d95757; }
.doj-home-problem-list div { min-width: 0; }
.doj-home-problem-list a { display: block; overflow: hidden; color: var(--home-body); font-size: 14px; font-weight: 600; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.doj-home-problem-list small { display: block; margin-top: 4px; color: var(--home-weak); font-size: 12px; }

.doj-home-ranking .doj-home-heading { margin-bottom: 12px; }
.doj-home-ranking__head,
.doj-home-ranking__list li { display: grid; grid-template-columns: 42px minmax(0, 1fr) 68px; align-items: center; gap: 8px; }
.doj-home-ranking__head { color: var(--home-weak); font-size: 12px; }
.doj-home-ranking__head span:last-child { text-align: right; }
.doj-home-ranking__list { counter-reset: none; }
.doj-home-ranking__list li { min-height: 52px; border-top: 1px solid var(--home-border); }
.doj-home-ranking__list li.is-self { margin: 0 -8px; padding: 0 8px; border-radius: 8px; background: #f5f7ff; }
.doj-home-ranking__rank { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 8px; background: #f0f2f6; color: var(--home-muted); font-size: 12px; font-weight: 700; }
.doj-home-ranking__rank.is-medal { width: 30px; height: 32px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.doj-home-ranking__rank.medal-1 { --medal-main: #f4bd3f; --medal-dark: #d98c14; --medal-ribbon: #ffcf5b; }
.doj-home-ranking__rank.medal-2 { --medal-main: #bdc6d3; --medal-dark: #7d899a; --medal-ribbon: #dce3ec; }
.doj-home-ranking__rank.medal-3 { --medal-main: #c98252; --medal-dark: #98512e; --medal-ribbon: #e7a675; }
.doj-home-ranking__medal-icon { display: block; overflow: visible; width: 28px; height: 32px; filter: drop-shadow(0 2px 2px rgba(43, 49, 71, .2)); }
.doj-home-ranking__medal-ribbon { fill: var(--medal-ribbon); }
.doj-home-ranking__medal-disc { fill: var(--medal-main); stroke: rgba(255, 255, 255, .92); stroke-width: 1.2; }
.doj-home-ranking__medal-rim { fill: none; stroke: var(--medal-dark); stroke-width: 1.3; }
.doj-home-ranking__medal-star { fill: #fffaf0; }
.doj-home-ranking__user { display: flex; min-width: 0; align-items: center; gap: 8px; }
.doj-home-ranking__user i { display: inline-flex; overflow: visible; width: 30px; height: 30px; flex: 0 0 30px; align-items: center; justify-content: center; border-radius: 50%; background: #edf2ff; font-size: 15px; font-style: normal; }
.doj-home-ranking__identity { display: flex; min-width: 0; flex: 1 1 auto; align-items: center; gap: 6px; }
.doj-home-ranking__identity > a { min-width: 0; flex: 1 1 auto; overflow: hidden; color: var(--home-body); font-size: 13px; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.doj-home-ranking__identity .user-profile-badge { max-width: 72px; flex: 0 1 auto; margin: 0; overflow: hidden; padding: 2px 5px; border-radius: 9px; font-size: 9px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.doj-home-ranking__identity > img.v-center { display: block; width: auto; max-width: 52px; height: 18px !important; flex: 0 1 auto; object-fit: contain; }
.doj-home-ranking__score { text-align: right; }
.doj-home-ranking__score strong { display: block; color: var(--home-brand); font-size: 13px; }
.doj-home-ranking__score small { display: block; margin-top: 2px; color: var(--home-weak); font-size: 10px; }

.doj-home-countdown ol { display: flex; flex-direction: column; gap: 8px; }
.doj-home-countdown li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: baseline; gap: 5px; padding: 11px 12px; border-radius: 8px; background: #f7f8fc; }
.doj-home-countdown li span { overflow: hidden; color: var(--home-body); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.doj-home-countdown li strong { color: var(--home-brand); font-size: 21px; }
.doj-home-countdown li small { color: var(--home-muted); font-size: 11px; }

.doj-home-common__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.doj-home-common__links a { display: flex; min-width: 0; min-height: 42px; align-items: center; gap: 8px; padding: 0 10px; border-radius: 8px; background: #f7f8fc; color: var(--home-body); font-size: 12px; text-decoration: none; }
.doj-home-common__links img { display: block; width: 26px; height: 26px; flex: 0 0 26px; object-fit: contain; }

.doj-home-empty { margin: 16px 0 0; color: var(--home-weak); font-size: 13px; }
.doj-home-empty--action { display: flex; min-height: 92px; align-items: center; justify-content: center; border: 1px dashed #ccd3e5; border-radius: 12px; color: var(--home-brand); text-decoration: none; }

.doj-home-resource:hover,
.doj-home-resource:focus-visible,
.doj-home-training:hover,
.doj-home-training:focus-visible,
.doj-home-empty--action:hover,
.doj-home-empty--action:focus-visible,
.doj-home-common__links a:hover,
.doj-home-common__links a:focus-visible,
.doj-home-fortune .doj-checkin__action:hover,
.doj-home-fortune .doj-checkin__action:focus-visible,
.doj-home-user--guest > a:hover,
.doj-home-user--guest > a:focus-visible {
  box-shadow: 0 8px 22px rgba(26, 31, 77, .12);
  transform: translateY(-2px);
}

.doj-home-heading > a:hover,
.doj-home-heading > a:focus-visible,
.doj-home-heading__actions a:hover,
.doj-home-heading__actions a:focus-visible,
.doj-home-discussion-list a:hover,
.doj-home-discussion-list a:focus-visible,
.doj-home-problem-list a:hover,
.doj-home-problem-list a:focus-visible,
.doj-home-ranking__user a:hover,
.doj-home-ranking__user a:focus-visible {
  color: var(--home-brand);
}

.doj-homepage a.doj-carousel__slide:hover,
.doj-homepage a.doj-carousel__slide:focus-visible {
  filter: brightness(1.06);
}

.theme--dark.page--homepage,
.theme--dark.page--homepage body,
.theme--dark.page--homepage #panel,
.theme--dark.page--homepage .main {
  --home-page: #15181d;
  --home-card: #20242b;
  --home-text: #eef1f5;
  --home-body: #d6dbe3;
  --home-muted: #a5adba;
  --home-weak: #858e9c;
  --home-border: #303640;
  --home-shadow: 0 4px 16px rgba(0, 0, 0, .18);
  --home-fortune-paper: #20242b;
  --home-fortune-panel: #272c35;
  --home-fortune-border: #343b49;
  --home-fortune-text: #eef1f5;
  --home-fortune-muted: #a5adba;
  --home-fortune-accent: #7891ff;
  --home-fortune-red: #ff7f7f;
  --home-fortune-green: #78c99a;
}

.theme--dark.page--homepage .doj-home-heading__actions .doj-home-recommendations__refresh {
  border-color: #3a4566;
  background: #292f43;
  color: #9dadff;
}

@media (max-width: 1100px) {
  .page--homepage .main > .row { padding-right: 32px; padding-left: 32px; }
  .doj-home-user { right: 32px; width: 340px; }
  .doj-home-columns { grid-template-columns: minmax(0, 1fr) 320px; }
  .doj-home-resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .page--homepage .main { padding-top: 64px; }
  .page--homepage .main > .row { padding-right: 20px; padding-left: 20px; }
  .doj-home-columns {
    grid-template-columns: 1fr;
    grid-template-areas: "main" "fortune" "feed" "sidebar";
  }
  .doj-home-column { display: contents; }
  .doj-home-main-grid__left { grid-area: main; }
  .doj-home-fortune { grid-area: fortune; }
  .doj-home-lower-grid__left { grid-area: feed; }
  .doj-home-lower-grid__right { grid-area: sidebar; }
  .doj-home-fortune,
  .doj-home-fortune > .section { height: auto; }
  .doj-home-fortune { margin-top: 0; }
  .doj-home-lower-grid__right { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 20px; }
  .doj-home-ranking { grid-row: span 2; }
}

@media (max-width: 700px) {
  .doj-home-hero__intro { display: none; }
}

@media (max-width: 600px) {
  .page--homepage .main { padding-top: 0; }
}

@media (max-width: 480px) {
  .page--homepage .main > .row { padding-right: 12px; padding-left: 12px; }
  .doj-home-hero { min-height: 0; height: 180px; aspect-ratio: auto; }
  .doj-home-user { right: 12px; width: calc(100% - 24px); min-height: 156px; padding: 14px 16px; border-radius: 12px; }
  .doj-home-user__identity { gap: 10px; }
  .doj-home-user__avatar { width: 44px; height: 44px; flex-basis: 44px; font-size: 21px; }
  .doj-home-user__identity strong { font-size: 16px; }
  .doj-home-user__stats { margin-top: 12px; }
  .doj-home-user__stats div { padding: 0 5px; }
  .doj-home-user__stats dt { font-size: 9px; }
  .doj-home-user__stats dd { margin-top: 2px; font-size: 12px; }
  .doj-home-columns { gap: 16px; margin-top: 16px; }
  .doj-home-main-grid__left,
  .doj-home-lower-grid__left,
  .doj-home-lower-grid__right { gap: 16px; }
  .doj-home-resource-grid,
  .doj-home-training-grid,
  .doj-home-homework-grid,
  .doj-home-lower-grid__right { grid-template-columns: 1fr; gap: 12px; }
  .doj-home-problem-list { grid-template-columns: 1fr; }
  .doj-home-problem-list li:nth-child(2) { border-top: 1px solid var(--home-border); }
  .doj-home-resource { padding: 14px; }
  .doj-home-panel { padding: 18px 16px; }
  .doj-home-fortune .section__body { padding: 20px 16px 16px; }
  .doj-home-fortune .doj-checkin__grid { grid-template-columns: 1fr; }
  .doj-home-ranking { grid-row: auto; }
}

/* Initial SSR skeleton for logged-in homepage recommendations before doj_recommend.lazy.js loads. */
.doj-home-recommendations .rec-home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.doj-home-recommendations .rec-home-loading { display: flex; flex-direction: column; justify-content: center; gap: 8px; min-height: 236px; padding: 16px; border: 1px solid var(--home-border); border-radius: 12px; background: var(--home-card); }
.doj-home-recommendations .rec-home-loading .rec-skel { display: block; width: 75%; height: 16px; border-radius: 999px; background: var(--home-border); opacity: .65; }
.doj-home-recommendations .rec-home-loading .rec-skel + span { width: 55%; }
.doj-home-recommendations .rec-muted { margin: 12px 0 0; color: var(--home-muted); font-size: 13px; }
@media (max-width: 1023px) {
  .doj-home-recommendations .rec-home-grid { grid-template-columns: 1fr; }
  .doj-home-recommendations .rec-home-loading:not(:first-child) { display: none; }
}
