:root {
  font-family: "Noto Sans SC", system-ui, sans-serif;
  color: #172e33;
  background: #f5f3ef;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
}
#app {
  min-height: 100vh;
}
.shell {
  display: grid;
  grid-template-columns: 238px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #142c31;
  color: #ecf2ee;
  padding: 30px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.brand {
  padding: 0 15px 34px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.brand small {
  display: block;
  color: #b7c9c3;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  margin-top: 3px;
}
.nav {
  display: grid;
  gap: 7px;
}
.nav button {
  border: 0;
  background: none;
  color: #c8d5d0;
  text-align: left;
  padding: 13px 16px;
  border-radius: 11px;
  font-weight: 600;
}
.nav button.active,
.nav button:hover {
  background: #2b494d;
  color: #fff;
}
.nav button span {
  margin-right: 10px;
  color: #d5ad69;
}
.sidebar-foot {
  margin-top: auto;
  padding: 14px;
  font-size: 12px;
  color: #aabcb5;
  border-top: 1px solid #355255;
}
.main {
  padding: 35px clamp(18px, 4vw, 58px) 80px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}
.topline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 27px;
}
.eyebrow {
  color: #9c7440;
  letter-spacing: 0.15em;
  font-size: 12px;
  font-weight: 700;
}
.title {
  font-size: 30px;
  margin: 4px 0 5px;
  letter-spacing: -0.025em;
}
.muted {
  color: #778583;
  font-size: 14px;
}
.card {
  background: #fff;
  border: 1px solid #e8e5de;
  border-radius: 17px;
  box-shadow: 0 8px 28px #172e3308;
  padding: 22px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 15px;
}
.project-card {
  text-align: left;
  width: 100%;
  border: 1px solid #e6e3dc;
  background: #fff;
  border-radius: 17px;
  padding: 21px;
  box-shadow: 0 8px 25px #172e3306;
}
.project-card:hover {
  border-color: #cbb27e;
  transform: translateY(-1px);
}
.code {
  font-family: ui-monospace, monospace;
  color: #916d38;
  font-size: 13px;
  font-weight: 700;
}
.project-card h3 {
  margin: 12px 0 6px;
  font-size: 20px;
}
.pill {
  display: inline-block;
  border-radius: 99px;
  background: #e8f1ed;
  color: #376255;
  font-size: 12px;
  padding: 5px 10px;
  font-weight: 700;
}
.pill.warn {
  background: #fff0dd;
  color: #9c6a28;
}
.pill.gray {
  background: #efefed;
  color: #6c7775;
}
.btn {
  border: 0;
  border-radius: 10px;
  background: #1e4948;
  color: #fff;
  font-weight: 700;
  padding: 12px 17px;
  min-height: 44px;
}
.btn:hover {
  background: #306764;
}
.btn.secondary {
  background: #e9efec;
  color: #21514d;
}
.btn.ghost {
  background: transparent;
  color: #285b56;
  border: 1px solid #c8d8d2;
}
.btn.danger {
  background: #9d4f47;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.stack {
  display: grid;
  gap: 15px;
}
.field {
  display: grid;
  gap: 7px;
  color: #405653;
  font-size: 14px;
  font-weight: 600;
}
.field input,
.field textarea,
.field select {
  border: 1px solid #d6dcd7;
  border-radius: 9px;
  padding: 11px 12px;
  background: #fff;
  color: #203837;
  min-width: 0;
}
.field textarea {
  min-height: 110px;
  resize: vertical;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid #c4d9d1;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 25px 0 14px;
}
.section-head h2 {
  margin: 0;
  font-size: 20px;
}
.tabs {
  display: flex;
  border-bottom: 1px solid #dfe3dd;
  gap: 4px;
  margin: 24px 0;
}
.tabs button {
  border: 0;
  background: transparent;
  padding: 13px 20px;
  color: #71827e;
  font-weight: 700;
  border-bottom: 3px solid transparent;
}
.tabs button.active {
  color: #1d514c;
  border-color: #bd9455;
}
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 21px 0;
}
.step {
  background: #e7e8e2;
  border-radius: 9px;
  padding: 10px 13px;
  font-size: 13px;
  color: #6f7975;
  font-weight: 700;
}
.step.current {
  background: #234c49;
  color: #fff;
}
.step.done {
  background: #dbe9dd;
  color: #3d6849;
}
.notice {
  padding: 14px 16px;
  background: #fff8ea;
  border: 1px solid #efdbb4;
  border-radius: 10px;
  color: #725526;
}
.error {
  background: #fbeeea;
  border-color: #ebc4ba;
  color: #904c3f;
}
.success {
  background: #e8f4ed;
  border-color: #c8e2d0;
  color: #356d4c;
}
.file-row,
.item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid #edf0ec;
}
.file-row:first-child,
.item-row:first-child {
  border-top: 0;
}
.file-row small {
  display: block;
  color: #86948e;
}
.timeline {
  border-left: 2px solid #d7dfd7;
  margin-left: 9px;
  padding-left: 20px;
}
.timeline > div {
  position: relative;
  padding: 0 0 22px;
}
.timeline > div:before {
  content: "";
  position: absolute;
  left: -27px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #b99559;
}
.timeline p {
  margin: 5px 0;
  color: #63736e;
}
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}
.auth-hero {
  background: #142c31;
  color: #fff;
  padding: clamp(40px, 7vw, 110px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-hero h1 {
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.14;
  margin: 0;
}
.auth-hero p {
  color: #b4c8bf;
  max-width: 420px;
  line-height: 1.8;
}
.auth-art {
  height: 170px;
  border: 1px solid #53736d;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 75% 10%, #345d58, transparent 50%);
}
.auth-art:before,
.auth-art:after {
  content: "";
  position: absolute;
  border: 2px solid #d5ad69;
  transform: rotate(-22deg);
}
.auth-art:before {
  width: 210px;
  height: 105px;
  left: 24%;
  top: 30%;
}
.auth-art:after {
  width: 210px;
  height: 105px;
  left: 35%;
  top: 7%;
}
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 35px;
}
.auth-panel .card {
  width: min(440px, 100%);
  padding: 32px;
}
.auth-panel h2 {
  margin: 0 0 7px;
  font-size: 26px;
}
.empty {
  text-align: center;
  color: #73847d;
  padding: 50px 20px;
  border: 1px dashed #ced8cf;
  border-radius: 15px;
  background: #fafbf8;
}
.question-options {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.question-options button {
  font-size: 13px;
}
.toast {
  position: fixed;
  bottom: 26px;
  right: 26px;
  background: #183b38;
  color: #fff;
  border-radius: 10px;
  padding: 13px 18px;
  box-shadow: 0 10px 35px #0003;
  z-index: 10;
}
.mobile-nav {
  display: none;
}
.download {
  color: #23605c;
  text-decoration: none;
  font-weight: 700;
}
.hidden {
  display: none !important;
}
@media (max-width: 800px) {
  .shell {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .main {
    padding: 24px 16px 100px;
  }
  .title {
    font-size: 25px;
  }
  .steps {
    gap: 5px;
  }
  .step {
    font-size: 11px;
    padding: 9px 4px;
    text-align: center;
  }
  .mobile-nav {
    position: fixed;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e2e8e3;
    padding: 7px 5px max(7px, env(safe-area-inset-bottom));
    z-index: 5;
  }
  .mobile-nav button {
    border: 0;
    background: transparent;
    color: #71817c;
    padding: 7px 0;
    font-size: 12px;
    font-weight: 700;
  }
  .mobile-nav button.active {
    color: #1f5a54;
  }
  .auth {
    display: block;
  }
  .auth-hero {
    min-height: 270px;
    padding: 28px;
  }
  .auth-hero h1 {
    font-size: 39px;
  }
  .auth-art {
    display: none;
  }
  .auth-panel {
    padding: 22px;
    margin-top: -28px;
    position: relative;
  }
  .auth-panel .card {
    padding: 25px;
  }
  .topline {
    align-items: center;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}
summary {
  cursor: pointer;
  font-weight: 700;
  color: #24554e;
  min-height: 36px;
}
details[open] > summary {
  margin-bottom: 12px;
}
.more-panel {
  padding-top: 14px;
  border-top: 1px solid #edf0ec;
}
.question-card {
  padding: 20px;
  background: #f5f8f5;
  border-radius: 14px;
}
.question-card h3 {
  margin: 10px 0 18px;
}
.question-card textarea,
.row input,
.row select,
.row textarea,
.comment select {
  border: 1px solid #d6dcd7;
  border-radius: 9px;
  padding: 11px;
  background: #fff;
  min-width: 0;
}
.question-card textarea {
  width: 100%;
  min-height: 115px;
}
.question-line {
  display: block;
  width: 100%;
  padding: 11px;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid #edf0ec;
  color: #284b45;
}
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.thumb {
  border: 1px solid #dbe4dc;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  text-align: left;
  min-width: 0;
}
.thumb img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: contain;
  background: #f5f6f2;
}
.thumb span {
  display: block;
  padding: 8px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.comment {
  padding: 18px 0;
  border-top: 1px solid #edf0ec;
}
.comment-head {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.comment p {
  margin: 8px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.comment-actions {
  margin-top: 10px;
}
.comment-actions .btn {
  padding: 7px 11px;
  min-height: 34px;
}
.reply {
  margin: 12px 0 0 20px;
  padding: 12px;
  border-left: 3px solid #cadbd2;
  background: #f8faf7;
  white-space: pre-wrap;
}
.preview-wrap {
  position: relative;
  margin: 12px 0;
  border: 1px solid #dce5dd;
  border-radius: 10px;
  overflow: hidden;
  background: #f5f6f2;
}
.preview-image {
  width: 100%;
  max-height: 600px;
  object-fit: contain;
  display: block;
}
.mark-layer {
  position: absolute;
  inset: 0;
  cursor: crosshair;
  touch-action: none;
}
.pin {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #d8583f;
  border: 3px solid #fff;
  box-shadow: 0 1px 5px #0008;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.pdf-box {
  height: min(68vh, 620px);
}
.pdf-box iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.upload-label {
  display: inline-block;
  position: relative;
  overflow: hidden;
}
.upload-label input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.overlay {
  position: fixed;
  inset: 0;
  background: #0d2427b8;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.dialog {
  width: min(900px, 100%);
  max-height: 94vh;
  overflow: auto;
}
.dialog pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f6f7f5;
  padding: 12px;
  max-height: 300px;
  overflow: auto;
}
.dialog .preview-image {
  max-height: 68vh;
}
@media (max-width: 800px) {
  .compare {
    grid-template-columns: 1fr;
  }
  .file-row,
  .item-row {
    align-items: flex-start;
  }
  .file-row {
    flex-wrap: wrap;
  }
  .row > * {
    max-width: 100%;
  }
  .tabs button {
    flex: 1;
    padding: 12px 4px;
  }
  .btn {
    min-height: 46px;
  }
  .dialog {
    max-height: 90vh;
  }
  .thumb-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.pdf-box,
.image-box {
  position: relative;
}
.preview-toolbar {
  padding: 10px;
}
.todo-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 4px 12px;
  width: 100%;
  border: 0;
  border-top: 1px solid #edf0ec;
  background: #fff;
  text-align: left;
  padding: 15px 4px;
  color: #223c36;
}
.todo-row:first-child {
  border-top: 0;
}
.todo-row small {
  grid-column: 2;
  color: #778583;
}
.todo-row:hover {
  background: #f7faf7;
}
@media (max-width: 800px) {
  .todo-row {
    grid-template-columns: 1fr;
  }
  .todo-row small {
    grid-column: 1;
  }
}
.image-box {
  width: max-content;
  max-width: 100%;
  margin: auto;
}
.image-box .preview-image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 600px;
}
.mark-readonly {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.mark-rect {
  position: absolute;
  border: 3px solid #d8583f;
  background: #d8583f30;
  box-shadow: 0 1px 5px #0005;
  pointer-events: none;
}
.pdf-canvas-box {
  position: relative;
  width: max-content;
  max-width: 100%;
  margin: auto;
  overflow: hidden;
}
.pdf-canvas-box canvas {
  display: block;
  max-width: 100%;
  height: auto;
}
.pdf-status {
  padding: 9px 12px;
}
.preview-toolbar {
  gap: 8px;
}
.preview-toolbar input {
  width: 78px;
}
.pdf-canvas-box .mark-layer,
.pdf-canvas-box .mark-readonly {
  inset: 0;
}
.app-status-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: 10px 18px;
  background: #e9f1eb;
  color: #254d42;
  display: flex;
  justify-content: center;
  gap: 16px;
  align-items: center;
  box-shadow: 0 2px 8px #0002;
}
.app-status-banner button {
  border: 1px solid #325e50;
  border-radius: 8px;
  background: #fff;
  color: #285348;
  font-weight: 700;
  padding: 8px 12px;
}
.recovery-item {
  border-top: 1px solid #edf0ec;
  padding: 10px 0;
}
.recovery-item:first-child {
  border-top: 0;
}
.recovery-item textarea {
  min-height: 90px;
}
