:root {
  color-scheme: light;
  --paper: #f7f7f2;
  --ink: #203d35;
  --muted: #64756e;
  --line: #dce4dc;
  --green: #276a50;
  --soft: #edf4eb;
  --white: #fff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  font-size: 15px;
  line-height: 1.55;
}
header {
  height: 92px;
  max-width: 1260px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  color: inherit;
  letter-spacing: -0.3px;
}
.brand small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.1px;
}
.mark,
.avatar {
  background: var(--green);
  color: white;
  display: grid;
  place-items: center;
  border-radius: 14px;
  width: 43px;
  height: 43px;
  font-weight: 700;
  font-size: 23px;
}
.tag {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 6px 14px;
  color: var(--muted);
  font-size: 12px;
}
main {
  max-width: 1260px;
  margin: auto;
  padding: 36px;
}
.welcome {
  max-width: 650px;
  margin: 8vh auto;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 700;
}
h1 {
  font-size: 36px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -1px;
  margin: 14px 0 22px;
}
.welcome h1 {
  font-size: 48px;
}
.welcome > p {
  color: var(--muted);
  max-width: 530px;
  font-size: 17px;
}
label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin: 18px 0 8px;
}
input,
textarea,
select,
button {
  font: inherit;
}
input,
textarea,
select {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 12px;
  color: var(--ink);
  width: 100%;
}
textarea {
  resize: vertical;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid #b3d7aa;
  outline-offset: 3px;
}
button {
  border: 0;
  border-radius: 10px;
  background: var(--green);
  color: white;
  padding: 12px 20px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s;
}
button:hover {
  background: #1d523d;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button.secondary {
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
}
button.plain {
  background: transparent;
  color: var(--muted);
  font-weight: 400;
  padding: 10px;
}
.login-row {
  display: flex;
  gap: 10px;
}
.login-row button {
  white-space: nowrap;
}
.fine {
  font-size: 12px !important;
  color: var(--muted);
}
.workspace-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.workspace-title h1 {
  margin-bottom: 26px;
}
.actions {
  display: flex;
  gap: 8px;
}
.workspace-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 24px;
}
.task-card,
.chat-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.task-card {
  padding: 24px;
  align-self: start;
}
.section-label {
  display: flex;
  gap: 10px;
  align-items: center;
}
.step {
  border: 1px solid #c9dac9;
  background: var(--soft);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
}
h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
.upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px dashed #a8c1af;
  background: #f8fbf6;
  border-radius: 14px;
  padding: 24px 12px;
  cursor: pointer;
}
.upload-icon {
  font-size: 30px;
  color: #5c856c;
}
.upload.drag-over {
  border-color: var(--green);
  background: var(--soft);
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.upload:focus-within {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.upload > span:last-of-type {
  font-size: 11px;
  color: var(--muted);
  margin: 5px 0 12px;
}
.upload input {
  font-size: 11px;
  border: 0;
  background: transparent;
  padding: 0;
}
.check {
  display: flex;
  gap: 9px;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  align-items: flex-start;
}
.check input {
  width: 16px;
  margin-top: 4px;
  flex-shrink: 0;
  accent-color: var(--green);
}
.wide {
  width: 100%;
  margin-top: 16px;
}
#preview,
#crop-preview {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 10px;
}
.task-footnote {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 24px;
}
#crop-tools {
  margin: 12px 0;
}
#crop-dialog {
  width: min(900px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  color: var(--ink);
}
#crop-dialog::backdrop {
  background: #12251dc0;
}
#crop-stage {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  cursor: crosshair;
}
#crop-image {
  display: block;
  max-width: 100%;
  max-height: 55dvh;
  width: auto;
  height: auto;
}
#crop-box {
  position: absolute;
  border: 2px solid var(--green);
  outline: 1px solid white;
  box-shadow: 0 0 0 200vmax #0007;
  pointer-events: none;
}
#crop-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 16px 0;
  border: 0;
  padding: 0;
}
#crop-fields legend {
  font-size: 12px;
  color: var(--muted);
}
#crop-fields label {
  margin: 0;
  font-size: 12px;
}
#crop-fields input {
  width: 100%;
  margin: 0;
}
.crop-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.notice {
  font-size: 12px;
  color: #7a6123;
  background: #fffae7;
  border-radius: 10px;
  padding: 10px;
}
.confirmed-label {
  display: block;
  font-size: 12px;
  color: var(--green);
  margin-top: 20px;
}
#confirmed-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.chat-card {
  display: flex;
  flex-direction: column;
  min-height: 640px;
  overflow: hidden;
}
.chat-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.chat-header > div > span {
  font-size: 12px;
  color: var(--muted);
}
.avatar {
  width: 38px;
  height: 38px;
  font-size: 20px;
  background: var(--soft);
  color: var(--green);
}
.connection {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}
.messages {
  flex: 1;
  padding: 26px;
  overflow: auto;
  max-height: 60vh;
  min-height: 320px;
}
.empty {
  max-width: 330px;
  text-align: center;
  margin: 60px auto;
  color: var(--muted);
}
.empty h3 {
  font-size: 19px;
  color: var(--ink);
  margin: 18px 0 8px;
}
.empty p {
  font-size: 13px;
}
.empty-symbol {
  font-size: 25px;
  letter-spacing: 3px;
  color: #77a584;
}
.bubble {
  max-width: 88%;
  padding: 14px 18px;
  margin: 0 0 16px;
  border-radius: 16px;
  background: #f1f5ed;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bubble.user {
  margin-left: auto;
  background: #e2eee5;
}
.bubble small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 6px;
}
.composer {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin: 0 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: #fff;
}
.composer textarea {
  border: 0;
  resize: none;
  outline: none;
  min-height: 55px;
  padding: 6px;
  font-size: 14px;
}
.composer button {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 24px;
  flex-shrink: 0;
}
.chat-note {
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  margin: 12px 10px 18px;
}
.activity {
  font-size: 12px;
  color: var(--muted);
  margin: 0 26px 12px;
  min-height: 18px;
}
.owner-panel {
  margin-top: 26px;
  padding: 18px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 13px;
}
.owner-panel summary {
  cursor: pointer;
  font-weight: 600;
}
.owner-panel form {
  max-width: 500px;
}
.owner-panel input {
  max-width: 200px;
}
footer {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin: 26px;
}
.error {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  background: #fff3ed;
  border: 1px solid #dfb6a4;
  padding: 14px 22px;
  border-radius: 12px;
  color: #823e28;
  z-index: 10;
  box-shadow: 0 8px 30px #0001;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
[hidden] {
  display: none !important;
}
@media (max-width: 800px) {
  header {
    padding: 0 20px;
    height: 75px;
  }
  main {
    padding: 20px;
  }
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  .workspace-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }
  .actions {
    margin-bottom: 20px;
  }
  .workspace-title h1 {
    font-size: 29px;
    margin-bottom: 16px;
  }
  .welcome h1 {
    font-size: 36px;
  }
  .chat-card {
    min-height: 560px;
  }
  .messages {
    padding: 18px;
  }
  .task-card {
    padding: 20px;
  }
  .connection {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
