:root {
  --play-ink: #171717;
  --play-paper: #f6f4ef;
  --play-red: #ff5a45;
  --play-blue: #2864ff;
  --play-yellow: #ffd84d;
  --play-mint: #bdf4db;
  --play-line: #171717;
}

body { background: var(--play-paper); }

.app-shell {
  background-color: var(--play-paper);
  background-image: linear-gradient(#1717170a 1px, transparent 1px), linear-gradient(90deg, #1717170a 1px, transparent 1px);
  background-size: 32px 32px;
}

.sidebar { background: #fffdf8; border-right: 2px solid var(--play-line); }
.brand { color: var(--play-ink); font-weight: 850; }
.brand-mark { transform: rotate(-6deg); }
.brand-mark i { background: var(--play-red); border: 1px solid var(--play-line); box-shadow: 2px 2px 0 var(--play-line); }
.brand-mark i:nth-child(2) { background: var(--play-blue); }
.brand-mark i:nth-child(3) { background: var(--play-yellow); }

.nav-item {
  border: 1px solid transparent;
  border-radius: 6px;
  transition: transform 160ms ease-out, background-color 160ms ease-out, box-shadow 160ms ease-out;
}
.nav-item:hover { background: #fff0a8; transform: translateX(2px); }
.nav-item.active { color: var(--play-ink); background: var(--play-yellow); border-color: var(--play-line); box-shadow: 3px 3px 0 var(--play-line); }
.mini-art, .profile .avatar { border: 1px solid var(--play-line); border-radius: 6px; }
.profile .avatar { color: var(--play-ink); background: var(--play-mint); }
.profile > div:not(.avatar) { min-width: 0; }
.profile strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-logout { flex: 0 0 auto; min-height: 30px; margin-left: auto; padding: 0 9px; border: 1px solid var(--play-line); border-radius: 5px; color: var(--play-ink); background: #fff; font-size: 11px; font-weight: 700; cursor: pointer; }
.profile-logout:hover { background: var(--play-yellow); }
.growth-grid.completion-only { grid-template-columns: minmax(0, 760px); }
.completion-panel { min-height: 360px; }
.completion-panel h2 { margin: 8px 0 28px; font-size: 22px; }
.completion-panel .ability { grid-template-columns: 92px minmax(0, 1fr) 44px; }
.portfolio-score, .day-score, .skill-growth { display: none !important; }
.seven-step-archive { grid-column: 1 / -1; }
.seven-step-archive .panel-heading { align-items: center; }
.archive-progress { color: #5e45ca; font-size: 12px; font-weight: 750; }
.archive-step { min-height: 72px; }
.archive-step-number { width: 38px; height: 38px; border: 1px solid var(--play-line); border-radius: 6px; color: #5136c7; background: #f1edff; display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.archive-step .status { min-width: 58px; text-align: center; }
.archive-step-dialog { width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 30px; border: 1px solid #cfd5df; border-radius: 8px; color: #171b24; background: #fff; box-shadow: 0 24px 70px rgba(20, 29, 46, .2); }
.archive-step-dialog::backdrop { background: rgba(20, 26, 38, .48); }
.archive-dialog-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: 0; border-radius: 4px; color: #555e6c; background: #f2f4f7; font-size: 20px; cursor: pointer; }
.archive-dialog-kicker { margin: 0 0 8px; color: #6248cf; font-size: 11px; font-weight: 800; }
.archive-step-dialog h2 { margin: 0 40px 20px 0; font-size: 26px; }
.archive-note { color: #5e6673; line-height: 1.75; }
.archive-step-dialog ul { margin: 16px 0 22px; padding-left: 22px; color: #353d49; line-height: 1.9; }
.archive-goal { padding: 20px; border-left: 4px solid #ffd84f; background: #fff9dc; font-size: 20px; font-weight: 800; line-height: 1.5; }
.archive-download { min-height: 40px; padding: 0 15px; border: 1px solid #bdb3ee; border-radius: 6px; color: #5136c7; background: #f4f1ff; display: inline-flex; align-items: center; font-size: 13px; font-weight: 750; text-decoration: none; }
.archive-url-label { color: #313845; display: grid; gap: 8px; font-size: 12px; font-weight: 700; }
.archive-url-label input { height: 44px; padding: 0 12px; border: 1px solid #bcc5d0; border-radius: 6px; font: inherit; }
.archive-url-error { margin: 10px 0 0; color: #c43b32; font-size: 12px; }
.archive-dialog-actions { margin-top: 24px; padding-top: 18px; border-top: 1px solid #e2e6ec; display: flex; justify-content: flex-end; }
.archive-complete { min-height: 42px; padding: 0 17px; border: 1px solid #161922; border-radius: 6px; color: #fff; background: #1b1e27; font-weight: 750; cursor: pointer; }
.archive-complete:disabled { border-color: #d0d5dd; color: #98a2b3; background: #eaecf0; cursor: not-allowed; }
.archive-certificate { padding: 32px 24px; border: 1px solid #c7b978; background: #fffdf3; text-align: center; }
.archive-certificate span { color: #9b7b18; font-size: 10px; font-weight: 850; }
.archive-certificate h3 { margin: 12px 0 8px; font-size: 28px; }
.archive-certificate p { margin: 0 0 24px; color: #4f5662; }
.archive-certificate strong { color: #1c2430; font-size: 13px; }
@media (max-width: 640px) {
  .archive-step-dialog { padding: 24px 18px; }
  .archive-step .file-copy small { white-space: normal; }
  .archive-progress { display: none; }
}
.sidebar-section-head button { min-width: 44px; min-height: 44px; }
.add-project-link { min-height: 44px; }

.topbar { background: #fffdf8f2; border-bottom: 2px solid var(--play-line); }
.topbar:before { content: "AI \521b\5ba2\5bb6  /  DEMO DAY"; color: var(--play-ink); font-size: 12px; font-weight: 850; }
.topbar > div:first-child { margin-right: auto; margin-left: 24px; }
.preview-button, .overview-head button {
  color: #fff;
  background: var(--play-blue);
  border: 1px solid var(--play-line);
  border-radius: 6px;
  box-shadow: 3px 3px 0 var(--play-line);
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}
.preview-button:hover, .overview-head button:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--play-line); }
.content { max-width: 1240px; padding-top: 30px; }

.projects-intro {
  min-height: 268px;
  padding: 38px 44px;
  border: 2px solid var(--play-line);
  border-radius: 8px;
  background: var(--play-yellow);
  box-shadow: 8px 8px 0 var(--play-line);
  position: relative;
  overflow: hidden;
}
.projects-intro:before, .projects-intro:after { content: ""; position: absolute; pointer-events: none; }
.projects-intro:before { width: 150px; height: 150px; right: 156px; bottom: -78px; border: 28px solid var(--play-red); border-radius: 50%; }
.projects-intro:after {
  width: 92px;
  height: 92px;
  right: 24px;
  top: 18px;
  background: linear-gradient(45deg, transparent 42%, var(--play-ink) 43% 55%, transparent 56%), linear-gradient(-45deg, transparent 42%, var(--play-ink) 43% 55%, transparent 56%);
  transform: rotate(7deg);
}
.projects-intro > div:first-child { position: relative; z-index: 1; }
.projects-intro .eyebrow {
  width: max-content;
  margin-bottom: 15px;
  padding: 6px 10px;
  color: #fff;
  background: var(--play-red);
  border: 1px solid var(--play-line);
  border-radius: 4px;
  box-shadow: 2px 2px 0 var(--play-line);
  letter-spacing: 0;
}
.projects-intro h1 {
  max-width: 650px;
  margin-bottom: 18px;
  color: var(--play-ink);
  font-size: clamp(42px, 5.2vw, 68px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: 0;
  text-wrap: balance;
}
.projects-intro > div > p:last-child { max-width: 560px; color: #38321f; font-size: 16px; font-weight: 600; }
.portfolio-score {
  z-index: 1;
  flex: 0 0 auto;
  width: 154px;
  height: 154px;
  color: #fff;
  background: var(--play-blue);
  border: 2px solid var(--play-line);
  border-radius: 50%;
  box-shadow: 6px 6px 0 var(--play-line);
  transform: rotate(5deg);
}
.portfolio-score:after { border: 2px dashed #ffffff99; }
.portfolio-score span, .portfolio-score strong, .portfolio-score small { color: #fff; }
.portfolio-score strong { font-size: 44px; font-variant-numeric: tabular-nums; }

.overview-head { margin-top: 52px; margin-bottom: 18px; }
.overview-head .eyebrow { color: var(--play-red); letter-spacing: 0; }
.overview-head h2 { font-size: 28px; font-weight: 850; }
.project-grid { gap: 20px; }
.project-card, .new-project-card {
  min-height: 298px;
  border: 2px solid var(--play-line);
  border-radius: 8px;
  box-shadow: 5px 5px 0 var(--play-line);
  transition: transform 180ms ease-out, box-shadow 180ms ease-out;
}
.project-card:hover, .new-project-card:hover { transform: translate(3px, 3px) rotate(-0.4deg); box-shadow: 2px 2px 0 var(--play-line); }
.project-card:focus-visible, .new-project-card:focus-visible, .coach-banner button:focus-visible, .overview-head button:focus-visible, .preview-button:focus-visible {
  outline: 4px solid #fff;
  box-shadow: 0 0 0 7px var(--play-blue);
}
.project-art { height: 126px; background: var(--play-yellow); border-bottom: 2px solid var(--play-line); overflow: hidden; }
.project-art:after { content: ""; width: 84px; height: 84px; border: 12px solid #ffffff8a; border-radius: 50%; position: absolute; right: -22px; bottom: -36px; }
.project-art.cyan { background: #73d9ff; }
.project-art.violet { background: #ff8cc6; }
.project-art b { z-index: 1; filter: none; font-size: 46px; transform: rotate(-7deg); transition: transform 180ms ease-out; }
.project-card:hover .project-art b { transform: rotate(4deg) scale(1.08); }
.project-art small {
  z-index: 2;
  color: var(--play-ink);
  background: #fff;
  border: 1px solid var(--play-line);
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 750;
  box-shadow: 2px 2px 0 var(--play-line);
}
.project-card-body { padding: 17px 18px 18px; }
.project-card-top { color: #686868; font-weight: 700; }
.project-card-body > strong { margin-top: 8px; color: var(--play-ink); font-size: 17px; font-weight: 850; letter-spacing: 0; }
.project-summary { color: #5e5e5e; font-size: 11px; line-height: 1.6; }
.card-progress { height: 7px; background: #e6e2da; border: 1px solid var(--play-line); border-radius: 0; }
.card-progress i { background: var(--play-red); }
.card-foot { color: #555; font-size: 10px; font-weight: 650; }
.card-foot b { color: var(--play-red); font-size: 12px; font-variant-numeric: tabular-nums; }
.new-project-card { color: #414141; background: var(--play-mint); border-style: dashed; }
.new-project-card > span { color: #fff; background: var(--play-red); border: 2px solid var(--play-line); border-radius: 50%; box-shadow: 3px 3px 0 var(--play-line); }
.new-project-card strong { color: var(--play-ink); font-size: 15px; font-weight: 850; }
.new-project-card small { font-size: 10px; }

.coach-banner {
  margin-top: 24px;
  padding: 22px 24px;
  color: var(--play-ink);
  background: var(--play-red);
  border: 2px solid var(--play-line);
  border-radius: 8px;
  box-shadow: 6px 6px 0 var(--play-line);
}
.coach-orb { color: var(--play-ink); background: var(--play-yellow); border: 2px solid var(--play-line); border-radius: 50%; }
.coach-banner .eyebrow, .coach-banner strong, .coach-banner small { color: var(--play-ink); }
.coach-banner strong { font-size: 14px; font-weight: 850; }
.coach-banner small { margin-top: 5px; font-size: 11px; }
.coach-banner button { min-height: 44px; color: #fff; background: var(--play-ink); border: 2px solid var(--play-ink); border-radius: 5px; padding: 10px 14px; font-weight: 750; }
.project-grid:not(:has(.project-card)) + .coach-banner { display: none; }

@media (max-width: 1000px) {
  .projects-intro { padding: 34px; }
  .projects-intro h1 { font-size: 46px; }
  .projects-intro:after { display: none; }
}

@media (max-width: 680px) {
  .app-shell { background-size: 24px 24px; }
  .topbar { height: 58px; padding: 0 14px; }
  .topbar:before { content: "AI \521b\5ba2\5bb6"; font-size: 14px; }
  .topbar > div:first-child { display: none; }
  .top-actions { margin-left: auto; }
  .autosave { display: none; }
  .preview-button { min-height: 40px; padding: 8px 11px; }
  .content { padding: 18px 14px 38px; }
  .projects-intro { min-height: 302px; padding: 26px 22px 88px; align-items: flex-start; box-shadow: 5px 5px 0 var(--play-line); }
  .projects-intro:before { width: 112px; height: 112px; right: -34px; bottom: -50px; border-width: 22px; }
  .projects-intro:after { display: block; width: 58px; height: 58px; right: 18px; top: auto; bottom: 18px; }
  .projects-intro h1 { font-size: 39px; line-height: 1.04; }
  .projects-intro > div > p:last-child { font-size: 14px; line-height: 1.6; }
  .overview-head { margin-top: 38px; }
  .overview-head h2 { font-size: 24px; }
  .overview-head button { min-height: 42px; }
  .project-grid { gap: 16px; }
  .project-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); min-height: 184px; }
  .project-art { height: 100%; min-height: 184px; border-right: 2px solid var(--play-line); border-bottom: 0; }
  .project-art small { top: 12px; left: 9px; max-width: 92px; }
  .project-card-body { min-width: 0; padding: 15px 14px; }
  .project-card-body > strong { overflow-wrap: anywhere; }
  .project-summary { height: auto; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .new-project-card { min-height: 176px; }
  .coach-banner { align-items: flex-start; flex-wrap: wrap; padding: 20px; }
  .coach-banner > div { min-width: calc(100% - 64px); }
  .coach-banner button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-item, .preview-button, .overview-head button, .project-card, .new-project-card, .project-art b { transition: none; }
}
