/* Shared course navigation, enabled only in the independent camp workspace. */
.camp-course-sidebar, .camp-course-mobile { display: none; }

html.camp-workspace {
  --camp-sidebar-width: 260px;
  --camp-paper: #faf7f2;
  --camp-surface: #fffefd;
  --camp-line: #ebe3da;
  --camp-ink: #17233d;
  --camp-muted: #697487;
  --camp-coral: #d95346;
  --camp-coral-soft: #fff0eb;
}
html.camp-workspace body { background: var(--camp-paper); }
html.camp-workspace .view:not([data-view="camp-learning"]) { display: none !important; }
html.camp-workspace :is(.sidebar, .mobile-nav, .paipai-pet) { display: none !important; }
html.camp-workspace .app-shell,
html.camp-workspace .camp-portal-shell {
  display: grid;
  grid-template-columns: var(--camp-sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}
html.camp-workspace :is(.page-column, .camp-portal-main) { min-width: 0; }
html.camp-workspace .page-column { padding: 0 clamp(24px, 3vw, 44px) 40px; }
html.camp-workspace .topbar { min-height: 100px; background: var(--camp-paper); }
html.camp-workspace .topbar > div:first-child { min-width: 0; }
html.camp-workspace .topbar h1 { overflow-wrap: anywhere; }
html.camp-workspace .camp-course-sidebar {
  position: relative;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  min-width: 0;
  padding: 30px 20px 24px;
  overflow-y: auto;
  background: var(--camp-surface);
  border-right: 1px solid var(--camp-line);
}
html.camp-workspace .camp-course-brand {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  column-gap: 14px;
  align-items: center;
  color: var(--camp-ink);
  text-decoration: none;
}
html.camp-workspace .camp-course-mark {
  position: relative;
  grid-column: 1;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 3px solid #fff;
  border-radius: 16px;
  color: #fff;
  background: #ff7567;
  box-shadow: 0 6px 14px #df6d5f24;
  font: 800 24px/1 Georgia, serif;
}
html.camp-workspace .camp-course-mark img {
  position: absolute;
  right: -10px;
  bottom: -7px;
  width: 31px;
  height: 31px;
  object-fit: contain;
}
html.camp-workspace .camp-course-brand > :not(.camp-course-mark) { grid-column: 2; min-width: 0; }
html.camp-workspace .camp-course-brand strong { display: block; font: 800 15px/1.4 Georgia, "Microsoft YaHei", serif; }
html.camp-workspace .camp-course-brand small { display: block; margin-top: 4px; color: var(--camp-muted); font-size: 11px; letter-spacing: .08em; }
html.camp-workspace .camp-course-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 44px 8px 17px; }
html.camp-workspace .camp-course-heading p { margin: 0; color: var(--camp-muted); font-size: 11px; letter-spacing: .12em; }
html.camp-workspace .camp-course-beta { padding: 3px 7px; border: 1px solid #efd5c9; border-radius: 6px; color: #995348; background: #fff6f1; font-size: 10px; white-space: nowrap; }
html.camp-workspace .camp-course-nav { display: grid; gap: 7px; }
html.camp-workspace .camp-course-nav a {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--camp-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  overflow-wrap: anywhere;
}
html.camp-workspace .camp-course-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #a98b7b; font-size: 17px; font-weight: 400; }
html.camp-workspace .camp-course-nav a:hover { color: var(--camp-ink); background: #faf5ef; }
html.camp-workspace .camp-course-nav a[aria-current="page"] { color: #a74237; border-color: #f3d8cd; background: var(--camp-coral-soft); }
html.camp-workspace .camp-course-nav a[aria-current="page"] .camp-course-icon { color: var(--camp-coral); background: #fffefd; }
html.camp-workspace .camp-course-foot { margin-top: auto; padding: 28px 8px 0; }
html.camp-workspace .camp-course-foot p { margin: 0 0 13px; color: var(--camp-muted); font-size: 11px; line-height: 1.8; }
html.camp-workspace .camp-course-foot a { display: inline-flex; align-items: center; min-height: 44px; color: #9c5548; font-size: 12px; text-decoration: none; }
html.camp-workspace :is(.camp-course-brand, .camp-course-nav a, .camp-course-foot a, .camp-course-mobile > summary):focus-visible { outline: 3px solid var(--camp-coral); outline-offset: 4px; }

/* Keep the existing submission components and date sidebar inside the new shell. */
html.camp-workspace .camp-feedback-page .camp-frame { width: 100%; max-width: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
html.camp-workspace .camp-feedback-page .site-header { min-height: 100px; padding: 22px 32px; border-radius: 0; background: var(--camp-paper); gap: 18px; }
html.camp-workspace .camp-feedback-page .wordmark { width: auto; }
html.camp-workspace .camp-feedback-page .wordmark strong { font-size: 27px; line-height: 1.35; white-space: normal; }
html.camp-workspace .camp-feedback-page .site-header nav { min-width: 0; flex-wrap: wrap; }
html.camp-workspace .camp-feedback-page .camp-shell { max-width: 1288px; padding: 0 32px; }
html.camp-workspace .camp-feedback-page .hero { grid-template-columns: minmax(0, 1fr) 210px; gap: 28px; padding: 32px 0; }
html.camp-workspace .camp-feedback-page .hero h1 { font-size: clamp(27px, 2.5vw, 36px); line-height: 1.4; }
html.camp-workspace .camp-feedback-page .hero-copy { margin-top: 12px; font-size: 13px; }
html.camp-workspace .camp-feedback-page .hero-progress { padding-left: 24px; border-left-width: 2px; }
html.camp-workspace .camp-feedback-page .progress-number { font-size: 52px; }
html.camp-workspace .camp-feedback-page .workspace { grid-template-columns: 190px minmax(0, 1fr); gap: 20px; }
html.camp-workspace .camp-feedback-page :is(.daily-content, .panel, .topic-option, .cohort-panel > div) { min-width: 0; }
html.camp-workspace .camp-feedback-page :is(.site-header, .hero, .daily-content, .cohort-panel) :is(h1, h2, p, b, small, a) { overflow-wrap: anywhere; }
html.camp-workspace .camp-feedback-page .site-footer { margin-inline: 32px; padding-inline: 0; }

@media (max-width: 1100px) {
  html.camp-workspace .camp-feedback-page .site-header { padding-inline: 24px; }
  html.camp-workspace .camp-feedback-page .camp-shell { padding-inline: 24px; }
  html.camp-workspace .camp-feedback-page .hero { grid-template-columns: minmax(0, 1fr) 160px; gap: 20px; }
  html.camp-workspace .camp-feedback-page .workspace { grid-template-columns: 170px minmax(0, 1fr); gap: 16px; }
  html.camp-workspace .camp-feedback-page .selection-footer { flex-wrap: wrap; gap: 12px; }
  html.camp-workspace .camp-feedback-page .selection-footer .button-row { flex-wrap: wrap; }
}

@media (max-width: 900px) {
  html.camp-workspace .app-shell, html.camp-workspace .camp-portal-shell { display: block; }
  html.camp-workspace .camp-course-sidebar { display: none; }
  html.camp-workspace .page-column { padding: 0 20px calc(28px + env(safe-area-inset-bottom)); }
  html.camp-workspace .topbar { min-height: 84px; position: static; }
  html.camp-workspace .camp-course-mobile { display: block; margin: 16px 0 0; border: 1px solid var(--camp-line); border-radius: 12px; color: var(--camp-ink); background: var(--camp-surface); }
  html.camp-workspace .camp-course-mobile > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 13px 16px; cursor: pointer; font-size: 13px; font-weight: 700; list-style: none; }
  html.camp-workspace .camp-course-mobile > summary::-webkit-details-marker { display: none; }
  html.camp-workspace .camp-course-mobile > summary::after { content: "+"; color: var(--camp-coral); font-size: 20px; font-weight: 400; }
  html.camp-workspace .camp-course-mobile[open] > summary::after { content: "−"; }
  html.camp-workspace .camp-course-mobile .camp-course-nav { padding: 0 8px 8px; }
  html.camp-workspace .camp-course-mobile .camp-course-nav a { min-height: 46px; }
  html.camp-workspace .camp-feedback-page .camp-portal-main > .camp-course-mobile { margin: 16px 24px 0; }
  html.camp-workspace .camp-feedback-page .site-header { min-height: 84px; }
  html.camp-workspace .toast { bottom: calc(18px + env(safe-area-inset-bottom)); }
}

@media (max-width: 760px) {
  html.camp-workspace .page-column { padding-inline: 16px; }
  html.camp-workspace .topbar { flex-wrap: wrap; gap: 12px; padding-block: 18px; }
  html.camp-workspace .topbar h1 { max-width: none; font-size: 23px; }
  html.camp-workspace .top-actions { flex-shrink: 0; }
  html.camp-workspace .camp-feedback-page .camp-portal-main > .camp-course-mobile { margin-inline: 16px; }
  html.camp-workspace .camp-feedback-page .site-header { padding: 20px 16px; gap: 12px; }
  html.camp-workspace .camp-feedback-page .wordmark strong { font-size: 23px; }
  html.camp-workspace .camp-feedback-page .camp-shell { padding-inline: 16px; }
  html.camp-workspace .camp-feedback-page .hero { grid-template-columns: minmax(0, 1fr) 112px; gap: 15px; padding: 25px 0; }
  html.camp-workspace .camp-feedback-page .hero h1 { font-size: 25px; }
  html.camp-workspace .camp-feedback-page .hero-copy { font-size: 11px; line-height: 1.8; }
  html.camp-workspace .camp-feedback-page .hero-progress { padding-left: 14px; }
  html.camp-workspace .camp-feedback-page .progress-number { font-size: 40px; }
  html.camp-workspace .camp-feedback-page .workspace { display: block; }
  html.camp-workspace .camp-feedback-page .day-list { max-width: 100%; }
  html.camp-workspace .camp-feedback-page .topic-grid { grid-template-columns: minmax(0, 1fr); }
  html.camp-workspace .camp-feedback-page .question-actions { flex-wrap: wrap; }
  html.camp-workspace .camp-feedback-page .question-actions .button-row { flex-wrap: wrap; }
  html.camp-workspace .camp-feedback-page .site-footer { margin-inline: 16px; gap: 12px; flex-wrap: wrap; }
}

.camp-topic-drawer{--topic-top:max(0px,calc(var(--topic-frame-top) + var(--topic-anchor-offset) + 4px));position:fixed;inset:var(--topic-top) 0 0;box-sizing:border-box;margin:0;width:100%;max-width:none;height:calc(100% - var(--topic-top));max-height:none;overflow:hidden;overscroll-behavior:contain;border:0;background:#30271d55;color:#47392e;padding:0;font:14px/1.45 Georgia,"Songti SC",serif}
.camp-topic-drawer::backdrop{background:transparent}
.camp-topic-panel{width:min(84%,320px);height:100%;box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain;background:#fffdfa;border:1px solid #ddcdbb;border-left:0;border-radius:0 8px 0 0;padding:16px}
.camp-topic-drawer[open] .camp-topic-panel{animation:camp-topic-enter .16s ease-out}
@keyframes camp-topic-enter{from{transform:translateX(-100%)}to{transform:translateX(0)}}
@media(prefers-reduced-motion:reduce){.camp-topic-drawer[open] .camp-topic-panel{animation:none}}
.camp-topic-drawer header{display:flex;align-items:center;justify-content:space-between;padding:0 0 10px;margin:0 0 6px;border-bottom:1px solid #ddd0c1}
.camp-topic-drawer h2{margin:0;color:#574738;font:700 19px/1.35 Georgia,"Songti SC",serif}
.camp-topic-drawer button{color:inherit;font:inherit;text-align:left;background:none;border:0;cursor:pointer}
.camp-topic-drawer header button{font-size:24px;min-width:40px;text-align:center}
.camp-topic-drawer nav button{display:block;width:100%;min-height:40px;padding:8px 9px;border-radius:5px}
.camp-topic-drawer nav button[aria-current],.camp-topic-drawer nav button[aria-pressed=true]{background:#f3e5d8;color:#7d4e2f;font-weight:700}
.camp-topic-drawer nav h3{margin:9px 9px 2px;font:600 12px/1.5 Georgia,serif;color:#796451}
.camp-topic-drawer button:focus-visible{outline:2px solid #98623c;outline-offset:-2px}

.camp-directory-search{position:fixed;inset:50% auto auto 50%;margin:0;transform:translate(-50%,-50%);box-sizing:border-box;width:min(620px,calc(var(--search-width,100vw) - 28px));height:min(540px,76dvh);max-height:calc(var(--search-height,100dvh) - 24px);padding:0;border:1px solid #dfd2c3;border-radius:14px;background:#fffdfa;color:#493c31;font:15px/1.45 Georgia,"Songti SC",serif;overflow:hidden}
.camp-directory-search[open]{display:flex;flex-direction:column}
.camp-directory-search::backdrop{background:#332a245c}
.camp-directory-search .search-head{display:flex;align-items:center;gap:10px;padding:10px 16px;border-bottom:1px solid #e8ded2}
.camp-directory-search .search-head input{flex:1;min-width:0;font:inherit;font-size:16px;background:transparent;border:0;color:inherit;padding:8px 0}
.camp-directory-search .search-head button{background:none;border:0;font-size:24px;color:inherit;cursor:pointer;width:36px;height:36px}
.camp-directory-search p{margin:0;padding:8px 16px;font-size:12px;color:#766859}
.camp-directory-search .search-results{flex:1;min-height:0;padding:0 10px 10px;overflow:auto;overscroll-behavior:contain}
.camp-directory-search .search-results button{display:block;text-align:left;font:inherit;color:inherit;width:100%;padding:9px 12px;margin-bottom:5px;border:1px solid #e8ded2;border-radius:7px;background:white;cursor:pointer}
.camp-directory-search .search-results button:is(:hover,:focus-visible){background:#f5ebe1}
.camp-directory-search .search-results button:disabled{color:#897e74;cursor:default}
.camp-directory-search .search-results span{display:block;overflow-wrap:anywhere}
.camp-directory-search .search-group,.camp-directory-search .search-cn{font-size:12px;color:#786958}
.camp-directory-search mark{background:#f1dec8;color:inherit}
html:has(.camp-directory-search[open]){overflow:hidden;scrollbar-gutter:stable}
.camp-topic-drawer .camp-drawer-task{display:table;margin-top:3px;border:1px solid #e4d1bf;background:linear-gradient(110deg,#f4ece5,#f1e3d5);color:#896347;border-radius:99px;padding:3px 9px;font:12px/1.45 Georgia,"Songti SC",serif}
.camp-topic-drawer .camp-drawer-task[data-task="自由选练"]{color:#827e74;background:#f1f0ec;border-color:#e4e1d9}
.camp-topic-drawer .camp-drawer-task[data-task="练前准备"]{color:#978372;background:linear-gradient(110deg,#f8f6f2,#f5eee6);border-color:#ece2d7}
.camp-topic-drawer .camp-drawer-task[data-task="每个话题打卡一道"]{color:#93775f;background:linear-gradient(110deg,#f2efeb,#f4e8dd);border-color:#e7dace}
