/* ============================================
   Let's Vibe — Page-level Styles
   Shell styles for different page types
   ============================================ */

@import url("./userdash.css");

/* Home page shell */
.home-page-shell {
  padding: 0;
  background: var(--bg);
}

/* Non-home, non-IDE page shell */
.page-shell:not(.home-page-shell):not(.ide-page-shell) {
  background: var(--bg);
}

.page-shell:not(.home-page-shell):not(.ide-page-shell):not(.user-page-shell):not(.admin-page-shell) {
  padding-top: var(--header-offset, 72px);
}

/* Auth page */
.auth-wrap {
  position: relative;
  width: 100%;
  max-width: none;
  min-height: calc(100vh - 180px);
  display: grid;
  place-items: center;
  padding-inline: var(--container-pad);
  padding-block: clamp(2rem, 6vw, 5rem);
  overflow: hidden;
  isolation: isolate;
}

.auth-wrap::before,
.auth-wrap::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  z-index: -1;
  pointer-events: none;
}

.auth-wrap::before {
  width: min(420px, 80vw);
  height: min(420px, 80vw);
  left: -120px;
  top: -70px;
  background: radial-gradient(circle at 30% 30%, rgba(108, 92, 231, 0.28), rgba(108, 92, 231, 0.04) 70%);
  animation: auth-float-a 8s ease-in-out infinite alternate;
}

.auth-wrap::after {
  width: min(360px, 72vw);
  height: min(360px, 72vw);
  right: -110px;
  bottom: -80px;
  background: radial-gradient(circle at 60% 60%, rgba(143, 120, 255, 0.26), rgba(143, 120, 255, 0.05) 72%);
  animation: auth-float-b 9s ease-in-out infinite alternate;
}

.auth-wrap .auth-card {
  width: min(460px, 100%);
  margin: 0 auto;
  padding: clamp(1.2rem, 2.2vw, 1.9rem);
  border: 1px solid #e5dcff;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 247, 255, 0.96)),
    #ffffff;
  box-shadow: 0 22px 48px rgba(82, 67, 183, 0.14);
  backdrop-filter: blur(6px);
  display: grid;
  gap: 0.8rem;
}

.auth-wrap .auth-card h1 {
  font-size: clamp(1.65rem, 3.5vw, 2.05rem);
  font-weight: 800;
  color: #1f1f2c;
  letter-spacing: -0.02em;
}

.auth-wrap .auth-desc {
  color: #4e4b67;
  font-size: 0.92rem;
  line-height: 1.45;
}

.auth-wrap .auth-hint {
  color: #7d759a;
  font-size: 0.8rem;
  line-height: 1.45;
}

#auth-form-slot {
  margin-top: 0.25rem;
}

.auth-form {
  display: grid;
  gap: 0.8rem;
}

.auth-form label {
  display: grid;
  gap: 0.38rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: #2c2b3b;
}

.auth-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #ddd6fb;
  border-radius: 14px;
  padding: 0.58rem 0.82rem;
  font-size: 0.94rem;
  background: #ffffff;
  color: #1d1d29;
  transition: border-color var(--duration) ease, box-shadow var(--duration) ease;
}

.auth-form input:focus {
  border-color: #8d7cff;
  outline: none;
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.15);
}

.auth-form .btn {
  width: 100%;
}

.auth-form .btn-primary {
  box-shadow: 0 10px 22px rgba(67, 55, 150, 0.24);
}

.auth-switch-btn {
  min-height: 40px;
}

#auth-feedback {
  min-height: 1.25em;
  margin-top: 0.15rem;
  color: #5f4dd2;
  font-size: 0.82rem;
  font-weight: 600;
}

@keyframes auth-float-a {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(22px, 16px, 0);
  }
}

@keyframes auth-float-b {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-20px, -14px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-wrap::before,
  .auth-wrap::after {
    animation: none;
  }
}

/* Lecture page */
.lecture-page-root {
  position: relative;
  width: min(1380px, calc(100% - 24px));
  margin-inline: auto;
  padding-block: 18px 30px;
  display: grid;
  gap: 14px;
  overflow: hidden;
  isolation: isolate;
}

.lecture-topbar,
.lecture-hero {
  border: 1px solid #e3e0f6;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.05);
}

.lecture-topbar {
  min-height: 82px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}

.lecture-brand {
  justify-self: center;
  border: 0;
  background: transparent;
  padding: 0;
  line-height: 1;
  overflow: visible;
}

.lecture-brand .lv-wordmark {
  font-size: clamp(1.5rem, 1.86vw, 1.9rem);
}

.lecture-start-btn {
  border-color: #6c5ce7;
  background: #6c5ce7;
  color: #fff;
}

.lecture-start-btn:hover {
  border-color: #5b4ad2;
  background: #5b4ad2;
}

.lecture-topbar .btn-primary,
.lecture-board .btn-primary {
  border-color: #8f80ff;
  background: linear-gradient(135deg, #998cff, #7a6af2);
  color: #fff;
  font-weight: 700;
}

.lecture-topbar .btn-primary:hover,
.lecture-board .btn-primary:hover {
  border-color: #7c6bf1;
  background: linear-gradient(135deg, #8f81ff, #6f5fe7);
}

.lecture-hero {
  padding: clamp(12px, 2vw, 18px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.52fr);
  gap: clamp(12px, 2vw, 20px);
  align-items: center;
}

.lecture-thumb-wrap {
  display: grid;
}

.lecture-thumb {
  border: 1px solid #d7cffc;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(140deg, #f2eeff, #faf8ff);
  display: grid;
  place-items: center;
}

.lecture-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lecture-thumb span {
  color: #7567c0;
  font-size: 0.82rem;
  font-weight: 600;
}

.lecture-copy h1 {
  margin-top: 6px;
  font-size: clamp(1.8rem, 3.1vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.lecture-copy p {
  margin-top: 8px;
  color: #646a7b;
}

.lecture-meta {
  margin-top: 10px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lecture-meta span {
  border: 1px solid #dcdaf2;
  border-radius: 999px;
  background: #f8f7ff;
  color: #4f3fd1;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 700;
}

.lecture-stack {
  display: grid;
  gap: 14px;
}

.lecture-sub-root {
  width: min(1320px, calc(100% - 24px));
}

.lecture-board {
  border: 1px solid #e3e0f6;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.05);
  padding: clamp(13px, 2vw, 18px);
  display: grid;
  gap: 10px;
  align-content: start;
}

.lecture-sub-title {
  margin-top: 2px;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
}

.lecture-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.lecture-board h2 {
  margin-top: 4px;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
}

.lecture-review-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #646a7b;
  font-size: 0.8rem;
}

.lecture-review-filter select {
  border: 1px solid #ddd8fa;
  border-radius: 999px;
  background: #fff;
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.8rem;
}

.lecture-intro {
  font-size: 0.9rem;
  color: #6d7385;
  line-height: 1.55;
}

.lecture-curriculum,
.lecture-simple-list {
  display: grid;
  gap: 9px;
}

.lecture-curriculum li,
.lecture-board-item {
  border: 1px solid #e7e3f8;
  border-radius: 14px;
  background: #fcfbff;
  padding: 12px 13px;
  display: grid;
  gap: 6px;
}

.lecture-curriculum em {
  justify-self: start;
  border: 1px solid #ddd5ff;
  border-radius: 999px;
  background: #f6f2ff;
  color: #5b4ad2;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 700;
}

.lecture-board-item > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lecture-curriculum strong,
.lecture-board-item strong {
  color: #202431;
  font-size: 0.89rem;
}

.lecture-curriculum p,
.lecture-board-item p {
  color: #656f80;
  font-size: 0.84rem;
  line-height: 1.58;
}

.lecture-board-item span {
  color: #9aa1b4;
  font-size: 0.78rem;
}

.lecture-author-link {
  border: 0;
  background: transparent;
  color: #4f3fd1;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lecture-inline-form {
  display: grid;
  gap: 8px;
}

.lecture-quick-links {
  margin-top: 8px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lecture-quick-links .btn {
  min-height: 40px;
}

.lecture-board-form {
  border: 1px solid #e8e2ff;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #fbf9ff 100%);
  padding: 12px;
}

.lecture-material-form {
  display: grid;
  gap: 10px;
}

.lecture-field-label {
  color: #2f3546;
  font-size: 0.81rem;
  font-weight: 700;
}

.lecture-resource-inline {
  display: grid;
  grid-template-columns: minmax(160px, 0.6fr) minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.lecture-file-picker {
  position: relative;
  border: 1px dashed #d6ceff;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #faf8ff 100%);
  min-height: 44px;
  padding: 8px 11px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #586176;
  cursor: pointer;
  min-width: 0;
}

.lecture-file-picker input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.lecture-file-picker-btn {
  border: 1px solid #d6cdff;
  border-radius: 9px;
  background: #f4f0ff;
  color: #4f3fd1;
  padding: 0.33rem 0.72rem;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.lecture-file-picker-text {
  min-width: 0;
  color: #667187;
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lecture-material-list {
  display: grid;
  gap: 10px;
}

.lecture-material-section {
  border: 1px solid #e8e2ff;
  border-radius: 14px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.lecture-material-section h3 {
  color: #1e2434;
  font-size: 0.9rem;
}

.lecture-material-items {
  display: grid;
  gap: 8px;
}

.lecture-material-item {
  border: 1px solid #ece7ff;
  border-radius: 12px;
  background: #fcfbff;
  padding: 8px 9px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.lecture-material-item > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.lecture-material-item strong {
  color: #1f2536;
  font-size: 0.82rem;
}

.lecture-material-item a,
.lecture-material-item span {
  color: #6d7790;
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.lecture-inline-form input,
.lecture-inline-form textarea,
.lecture-inline-form select {
  width: 100%;
  border: 1px solid #ddd8fa;
  border-radius: 12px;
  background: #fff;
  min-height: 42px;
  padding: 9px 11px;
  font-size: 0.86rem;
}

.lecture-inline-form textarea {
  min-height: 96px;
  resize: vertical;
}

.lecture-inline-form input:focus,
.lecture-inline-form textarea:focus,
.lecture-inline-form select:focus,
.lecture-review-filter select:focus {
  border-color: #8d7cff;
  outline: 2px solid rgba(108, 92, 231, 0.2);
  outline-offset: 1px;
}

.lecture-review-summary {
  color: #5f56a8;
  font-size: 0.84rem;
  font-weight: 700;
}

.lecture-empty {
  border: 1px dashed #d8d3f2;
  border-radius: 10px;
  background: #faf9ff;
  color: #7a8194;
  font-size: 0.8rem;
  padding: 10px;
}

.lecture-empty-inline {
  color: #7d869b;
  font-size: 0.79rem;
}

.lecture-thread-list {
  display: grid;
  gap: 10px;
}

.lecture-thread-item {
  border: 1px solid #e5e1f8;
  border-radius: 14px;
  background: #fcfbff;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.lecture-thread-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lecture-thread-item header strong {
  color: #1f2433;
  font-size: 0.86rem;
}

.lecture-thread-item header span {
  color: #8d95a8;
  font-size: 0.75rem;
}

.lecture-thread-question p,
.lecture-thread-answer p,
.lecture-thread-item > p {
  color: #4f586d;
  font-size: 0.84rem;
  line-height: 1.62;
}

.lecture-thread-answer {
  border: 1px solid #ddd7fc;
  border-radius: 12px;
  background: #f8f6ff;
  padding: 9px 10px;
  display: grid;
  gap: 5px;
}

.lecture-thread-actions {
  display: inline-flex;
  justify-content: flex-end;
}

.lecture-thread-actions .btn {
  min-height: 34px;
  padding: 0.35rem 0.9rem;
}

.lecture-thread-item.is-review {
  background: #fff;
}

.lecture-review-head strong {
  font-size: 0.86rem;
}

.lecture-review-stars {
  color: #f4b133;
  font-size: 1.03rem;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lecture-review-stars em {
  color: #2f3650;
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 700;
}

.lecture-orb-field {
  position: absolute;
  right: -90px;
  bottom: -80px;
  width: min(360px, 56vw);
  height: min(360px, 56vw);
  pointer-events: none;
  z-index: -1;
}

.lecture-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(0.1px);
}

.lecture-orb.is-a {
  width: min(260px, 44vw);
  height: min(260px, 44vw);
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 35% 35%, rgba(124, 104, 255, 0.24), rgba(124, 104, 255, 0.05) 72%);
  animation: lecture-orb-a 8.2s ease-in-out infinite alternate;
}

.lecture-orb.is-b {
  width: min(190px, 34vw);
  height: min(190px, 34vw);
  right: 120px;
  bottom: 70px;
  background: radial-gradient(circle at 45% 45%, rgba(166, 138, 255, 0.22), rgba(166, 138, 255, 0.04) 74%);
  animation: lecture-orb-b 10s ease-in-out infinite alternate;
}

@keyframes lecture-orb-a {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-14px, -10px, 0);
  }
}

@keyframes lecture-orb-b {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(14px, -14px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lecture-orb.is-a,
  .lecture-orb.is-b {
    animation: none;
  }
}

@media (max-width: 900px) {
  .lecture-page-root {
    width: calc(100% - 20px);
    margin-inline: auto;
  }

  .lecture-topbar {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .lecture-brand {
    justify-self: start;
  }

  .lecture-brand .lv-wordmark {
    font-size: clamp(1.34rem, 6.8vw, 1.68rem);
  }

  .lecture-hero {
    grid-template-columns: 1fr;
  }

  .lecture-board-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .lecture-review-filter {
    justify-content: flex-start;
  }

  .lecture-resource-inline {
    grid-template-columns: 1fr;
  }

  .lecture-material-form .btn,
  .lecture-resource-inline .btn {
    justify-self: start;
  }

  .lecture-orb-field {
    right: -120px;
    bottom: -120px;
  }
}

/* Work page */
.work-page-root {
  width: min(1240px, calc(100% - 40px));
  margin-inline: auto;
  padding-block: 18px 40px;
  display: grid;
  gap: 14px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.work-page-root::before,
.work-page-root::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  z-index: -1;
}

.work-page-root::before {
  width: min(340px, 48vw);
  height: min(340px, 48vw);
  top: -120px;
  right: -100px;
  background: radial-gradient(circle at 40% 40%, rgba(129, 104, 255, 0.24), rgba(129, 104, 255, 0.04) 72%);
}

.work-page-root::after {
  width: min(280px, 38vw);
  height: min(280px, 38vw);
  bottom: -90px;
  left: -110px;
  background: radial-gradient(circle at 45% 45%, rgba(176, 150, 255, 0.2), rgba(176, 150, 255, 0.03) 74%);
}

.work-topbar,
.work-head,
.work-stage,
.work-surface {
  border: 1px solid #e3e0f6;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 10px 26px rgba(80, 62, 181, 0.09);
  backdrop-filter: blur(2px);
}

.work-topbar {
  min-height: 82px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}

.work-topbar .btn-primary,
.post-topbar .btn-primary,
.channel-topbar .btn-primary {
  border-color: #8f80ff;
  background: linear-gradient(135deg, #998cff, #7a6af2);
  color: #fff;
  font-weight: 800;
}

.work-topbar .btn-primary:hover,
.post-topbar .btn-primary:hover,
.channel-topbar .btn-primary:hover {
  border-color: #7c6bf1;
  background: linear-gradient(135deg, #8e81ff, #6f5fe7);
}

.work-brand {
  justify-self: center;
  border: 0;
  background: transparent;
  padding: 0;
  line-height: 1;
}

.work-brand .lv-wordmark {
  font-size: clamp(1.54rem, 1.92vw, 1.96rem);
}

.work-head {
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.work-head-copy {
  min-width: 0;
}

.work-head h1 {
  margin-top: 2px;
  font-size: clamp(1.24rem, 2.2vw, 1.72rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.work-meta {
  margin-top: 6px;
  color: #6a7283;
  font-size: 0.86rem;
}

.work-head-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.work-like-btn {
  border: 1px solid #d5ccff;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff 0%, #f7f4ff 100%);
  min-height: 42px;
  padding: 0.42rem 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.46rem;
  color: #352f54;
  font-weight: 800;
}

.work-like-btn .heart {
  color: #7563e7;
  font-size: 0.95rem;
  line-height: 1;
}

.work-like-btn strong {
  font-size: 1rem;
  color: #1f2330;
  line-height: 1;
}

.work-like-btn:hover {
  border-color: #baa9ff;
  box-shadow: 0 10px 22px rgba(108, 92, 231, 0.2);
}

.work-like-btn.is-active {
  border-color: #a996ff;
  background: linear-gradient(180deg, #f4efff 0%, #ece5ff 100%);
}

.work-share-btn,
.work-link-btn {
  min-height: 42px;
  padding-inline: 1rem;
}

.work-stage {
  padding: 14px;
}

.work-viewer {
  border: 1px solid #ddd8fa;
  border-radius: 14px;
  background: #f8f8ff;
  min-height: min(62vw, 560px);
  overflow: hidden;
}

.work-viewer iframe,
.work-viewer img {
  width: 100%;
  height: min(62vw, 560px);
  border: 0;
  display: block;
}

.work-viewer > p {
  color: #6f7890;
  font-size: 0.9rem;
  padding: 14px;
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
  gap: 12px;
  align-items: start;
}

.work-main {
  grid-column: 1 / 2;
}

.work-side {
  grid-column: 2 / 3;
  align-self: start;
}

.work-comments {
  grid-column: 1 / 2;
}

.work-surface {
  padding: 13px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.work-tabs {
  display: inline-flex;
  gap: 8px;
}

.work-tabs button {
  border: 0;
  border-bottom: 3px solid #6c5ce7;
  background: transparent;
  color: #282f40;
  padding: 0 4px 7px;
  font-size: 0.88rem;
  font-weight: 700;
}

.work-content p {
  color: #343e51;
  font-size: 0.95rem;
  line-height: 1.72;
  white-space: pre-wrap;
}

.work-content {
  min-height: 220px;
}

.work-author,
.work-related {
  border: 1px solid #ebe8fb;
  border-radius: 12px;
  background: rgba(251, 249, 255, 0.94);
  padding: 10px;
}

.work-author {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.work-author:hover {
  border-color: #c6b8ff;
  box-shadow: 0 10px 22px rgba(108, 92, 231, 0.17);
  transform: translateY(-1px);
}

.work-author:focus-visible {
  border-color: #bcaeff;
  outline: 2px solid rgba(108, 92, 231, 0.24);
  outline-offset: 1px;
}

.work-author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid #d8cdfd;
  background: linear-gradient(150deg, #f2edff, #faf7ff);
  color: #5d4bd5;
  display: grid;
  place-items: center;
  font-size: 1.02rem;
  font-weight: 800;
}

.work-author-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.work-author-copy h3,
.work-related h3 {
  font-size: 0.9rem;
}

.work-author-copy {
  display: grid;
  gap: 2px;
}

.work-author-copy p {
  margin: 0;
  color: #2c3141;
  font-size: 0.93rem;
  font-weight: 800;
}

.work-author-more {
  margin-top: 3px;
  color: #6b5ad8;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.work-related-list {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.work-related-item {
  border: 1px solid #e3defb;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  text-align: left;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.work-related-item .thumb {
  border: 1px solid #ebe6ff;
  border-radius: 8px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f3f2ff;
  display: grid;
  place-items: center;
}

.work-related-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-related-item .thumb span {
  color: #8f97ad;
  font-size: 0.7rem;
}

.work-related-item strong {
  display: block;
  color: #1f2330;
  font-size: 0.8rem;
}

.work-related-item span {
  color: #7f8798;
  font-size: 0.73rem;
}

.work-comments h2 {
  font-size: 1rem;
}

.work-comment-list {
  display: grid;
  gap: 8px;
}

.work-comment-list article {
  border: 1px solid #ebe8fb;
  border-radius: 11px;
  background: rgba(252, 251, 255, 0.95);
  padding: 9px 10px;
  display: grid;
  gap: 4px;
}

.work-comment-list strong {
  color: #232a39;
  font-size: 0.81rem;
}

.work-comment-author {
  border: 0;
  background: transparent;
  color: #232a39;
  font-size: 0.81rem;
  font-weight: 800;
  cursor: pointer;
}

.work-comment-author:hover {
  color: #4e3fcc;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.work-comment-list p {
  color: #4f586d;
  font-size: 0.83rem;
}

.work-comment-list span {
  color: #9aa1b4;
  font-size: 0.73rem;
}

.work-comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.work-comment-form input {
  border: 1px solid #ddd8fa;
  border-radius: 11px;
  background: #fff;
  min-height: 40px;
  padding: 8px 10px;
  font-size: 0.84rem;
}

.work-empty {
  border: 1px dashed #d8d3f2;
  border-radius: 10px;
  background: #faf9ff;
  color: #7a8194;
  font-size: 0.8rem;
  padding: 10px;
}

@media (max-width: 1080px) {
  .work-grid {
    grid-template-columns: 1fr;
  }

  .work-main,
  .work-side,
  .work-comments {
    grid-column: 1 / -1;
  }

  .work-head {
    grid-template-columns: 1fr;
  }

  .work-head-actions {
    justify-content: flex-start;
  }
}

/* Post page */
.post-page-root {
  width: min(1240px, calc(100% - 24px));
  margin-inline: auto;
  padding-block: 18px 32px;
  display: grid;
  gap: 14px;
}

.post-topbar,
.post-main-surface {
  border: 1px solid #e3e0f6;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.05);
}

.post-topbar {
  min-height: 82px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}

.post-brand {
  justify-self: center;
  border: 0;
  background: transparent;
  padding: 0;
  line-height: 1;
}

.post-brand .lv-wordmark {
  font-size: clamp(1.54rem, 1.92vw, 1.96rem);
}

.post-head {
  padding: 2px 0 12px;
  border-bottom: 1px solid #ece8fb;
  display: grid;
  gap: 10px;
}

.post-board-label {
  justify-self: start;
  border: 1px solid #dad4fb;
  border-radius: 999px;
  background: #f6f3ff;
  color: #5b4dd1;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 700;
}

.post-head h1 {
  font-size: clamp(1.38rem, 2.6vw, 2rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
}

.post-meta {
  color: #687186;
  font-size: 0.84rem;
}

.post-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 7px;
}

.post-tags span {
  border: 1px solid #ddd8fa;
  border-radius: 999px;
  background: #faf9ff;
  color: #5d62a5;
  padding: 3px 8px;
  font-size: 0.74rem;
}

.post-author-inline {
  color: #6f778d;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.post-author-link {
  border: 0;
  background: transparent;
  color: #4e3fcc;
  font-size: 0.83rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.post-main-surface {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.post-body p {
  color: #2f3647;
  font-size: 0.94rem;
  line-height: 1.7;
}

.post-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-icon-btn {
  border: 1px solid #d8d0ff;
  border-radius: 999px;
  background: #fff;
  min-height: 34px;
  padding: 0.3rem 0.74rem;
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  color: #43377f;
  font-size: 0.82rem;
  font-weight: 800;
}

.post-icon-btn:hover {
  border-color: #b8a9ff;
  background: #faf8ff;
}

.post-icon-btn.is-like span {
  color: #6f5ce9;
  font-size: 0.9rem;
  line-height: 1;
}

.post-icon-btn.is-share span {
  color: #5a4ac5;
  font-size: 0.9rem;
  line-height: 1;
}

.post-icon-btn strong {
  color: #1f2330;
  line-height: 1;
}

.post-comments-head h2 {
  font-size: 1.04rem;
}

.post-comment-list {
  display: grid;
  gap: 8px;
}

.post-comment-list article {
  border: 1px solid #e5e1f9;
  border-radius: 12px;
  background: #fcfbff;
  padding: 10px;
  display: grid;
  gap: 4px;
}

.post-comment-list strong {
  color: #1f2534;
  font-size: 0.82rem;
}

.post-comment-author {
  border: 0;
  background: transparent;
  color: #1f2534;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.post-comment-author:hover {
  color: #4e3fcc;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-comment-list p {
  color: #4a5368;
  font-size: 0.84rem;
}

.post-comment-list span {
  color: #929cb0;
  font-size: 0.74rem;
}

.post-comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.post-comment-form input {
  border: 1px solid #ddd8fa;
  border-radius: 11px;
  background: #fff;
  min-height: 40px;
  padding: 8px 10px;
  font-size: 0.84rem;
}

.post-comment-form .btn-primary,
.work-comment-form .btn-primary {
  border-color: #8f80ff;
  background: linear-gradient(135deg, #9a8cff, #7a6af2);
  color: #fff;
  font-weight: 700;
}

.post-comment-form .btn-primary:hover,
.work-comment-form .btn-primary:hover {
  border-color: #7c6bf1;
  background: linear-gradient(135deg, #8f81ff, #6f5fe7);
}

.post-navigation {
  border-top: 1px solid #ece8fb;
  padding-top: 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.post-navigation span {
  color: #697089;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-navigation .btn[disabled] {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

.post-empty {
  border: 1px dashed #d8d3f2;
  border-radius: 10px;
  background: #faf9ff;
  color: #7a8194;
  font-size: 0.8rem;
  padding: 10px;
}

/* Channel page */
.channel-page-root {
  width: min(1240px, calc(100% - 24px));
  margin-inline: auto;
  padding-block: 18px 32px;
  display: grid;
  gap: 14px;
}

.channel-topbar,
.channel-hero,
.channel-surface {
  border: 1px solid #e3e0f6;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 26px rgba(94, 73, 193, 0.1);
  backdrop-filter: blur(2px);
}

.channel-topbar {
  min-height: 82px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}

.channel-brand {
  justify-self: center;
  border: 0;
  background: transparent;
  padding: 0;
  line-height: 1;
}

.channel-brand .lv-wordmark {
  font-size: clamp(1.54rem, 1.92vw, 1.96rem);
}

.channel-hero {
  padding: 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.channel-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid #d6ceff;
  background: linear-gradient(140deg, #f0ebff, #faf8ff);
  color: #5b4ad2;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 800;
}

.channel-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.channel-copy h1 {
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
}

.channel-copy p {
  margin-top: 6px;
  color: #677086;
  font-size: 0.87rem;
}

.channel-stats {
  margin-top: 10px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.channel-stats span {
  border: 1px solid #ddd8fa;
  border-radius: 999px;
  background: #faf9ff;
  color: #5f56a8;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 700;
}

.channel-actions {
  display: inline-flex;
  gap: 8px;
}

.channel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 12px;
}

.channel-surface {
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.channel-surface-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.channel-surface-head h2 {
  font-size: 1.04rem;
}

.channel-work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.channel-work-card {
  border: 1px solid #e4e0fa;
  border-radius: 13px;
  background: #fff;
  overflow: hidden;
  text-align: left;
  display: grid;
  padding: 0;
}

.channel-work-card .thumb {
  border-bottom: 1px solid #ece8ff;
  background: #f4f2ff;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.channel-work-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.channel-work-card .thumb span {
  color: #8b93a7;
  font-size: 0.72rem;
}

.channel-work-card .body {
  padding: 10px;
  display: grid;
  gap: 4px;
}

.channel-work-card strong {
  color: #1f2533;
  font-size: 0.84rem;
}

.channel-work-card span {
  color: #848da1;
  font-size: 0.74rem;
}

.channel-chat-status {
  color: #5f56a8;
  font-size: 0.81rem;
  font-weight: 600;
}

.channel-chat-list {
  border: 1px solid #e5e1f9;
  border-radius: 12px;
  background: rgba(252, 251, 255, 0.96);
  min-height: 280px;
  max-height: 380px;
  overflow: auto;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.channel-message {
  border: 1px solid #e4e1f6;
  border-radius: 10px;
  background: #fff;
  padding: 8px 9px;
  display: grid;
  gap: 3px;
}

.channel-message.is-mine {
  border-color: #ccc3ff;
  background: #f4f1ff;
}

.channel-message strong {
  color: #30384b;
  font-size: 0.78rem;
}

.channel-message p {
  color: #50586c;
  font-size: 0.82rem;
}

.channel-message span {
  color: #8e97ad;
  font-size: 0.72rem;
}

.channel-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.channel-chat-form input {
  border: 1px solid #ddd8fa;
  border-radius: 11px;
  background: #fff;
  min-height: 40px;
  padding: 8px 10px;
  font-size: 0.84rem;
}

.channel-empty {
  border: 1px dashed #d8d3f2;
  border-radius: 10px;
  background: #faf9ff;
  color: #7a8194;
  font-size: 0.8rem;
  padding: 10px;
}

@media (max-width: 900px) {
  .work-page-root {
    width: calc(100% - 20px);
  }

  .work-topbar {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .work-brand {
    justify-self: start;
  }

  .work-comment-form {
    grid-template-columns: 1fr;
  }

  .post-page-root,
  .channel-page-root {
    width: calc(100% - 20px);
  }

  .post-topbar,
  .channel-topbar {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .post-brand,
  .channel-brand {
    justify-self: start;
  }

  .post-comment-form,
  .channel-chat-form {
    grid-template-columns: 1fr;
  }

  .post-navigation {
    grid-template-columns: 1fr;
  }

  .channel-hero {
    grid-template-columns: 1fr;
    justify-items: start;
  }

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

  .channel-work-grid {
    grid-template-columns: 1fr;
  }
}

/* 404 page */
.not-found-page {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 1rem;
  padding: clamp(4rem, 10vw, 8rem) var(--container-pad);
}

.not-found-page h1 {
  font-size: var(--h1);
  color: var(--text);
}

.not-found-page p {
  font-size: var(--body);
  color: var(--text-secondary);
}

/* Settings page */
.settings-wrap {
  padding-block: clamp(2rem, 5vw, 4rem);
}

.settings-card {
  max-width: 980px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
  padding: clamp(1.2rem, 2vw, 1.8rem);
  display: grid;
  gap: 1rem;
}

.settings-card h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.settings-desc {
  color: var(--text-secondary);
}

.settings-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.settings-header-row h2 {
  font-size: 1rem;
  font-weight: 700;
}

.settings-lang-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.settings-lang-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  min-height: 74px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 0.2rem;
  padding: 0.7rem 0.8rem;
  text-align: left;
  transition: border-color var(--duration) ease, box-shadow var(--duration) ease, transform var(--duration) ease;
}

.settings-lang-item strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.settings-lang-item span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.settings-lang-item:hover {
  border-color: #c9d7f2;
  box-shadow: 0 8px 16px rgba(17, 24, 39, 0.08);
  transform: translateY(-2px);
}

.settings-lang-item.is-active {
  border-color: #5b78f1;
  background: linear-gradient(135deg, rgba(91, 120, 241, 0.08), rgba(124, 58, 237, 0.08));
}

@media (max-width: 860px) {
  .settings-lang-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .settings-lang-grid {
    grid-template-columns: 1fr;
  }

  .settings-card {
    border-radius: var(--radius-md);
    padding: 1rem;
  }
}
