:root {
  --bg: #f4efe7;
  --bg-strong: #efe5d6;
  --panel: rgba(255, 250, 244, 0.82);
  --panel-strong: #fffaf4;
  --line: rgba(95, 76, 48, 0.12);
  --text: #2c241a;
  --muted: #726149;
  --accent: #136f63;
  --accent-soft: rgba(19, 111, 99, 0.12);
  --accent-strong: #0d4c45;
  --warning-soft: rgba(190, 126, 54, 0.16);
  --warning: #8b5b17;
  --danger-soft: rgba(171, 74, 51, 0.12);
  --danger: #9c3d24;
  --shadow: 0 24px 64px rgba(44, 36, 26, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(19, 111, 99, 0.14), transparent 24%),
    radial-gradient(circle at top right, rgba(190, 126, 54, 0.16), transparent 28%),
    linear-gradient(180deg, #f8f3ec 0%, var(--bg) 100%);
}

button,
input,
textarea,
select {
  font: inherit;
}

.hidden {
  display: none !important;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-panel {
  width: min(620px, 100%);
}

.app-shell {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  padding: 24px;
  border-right: 1px solid var(--line);
  background: rgba(239, 229, 214, 0.55);
  backdrop-filter: blur(14px);
}

.main-content {
  padding: 22px;
}

.brand {
  margin-bottom: 20px;
}

.brand h1,
.hero h2 {
  margin: 4px 0 8px;
  line-height: 1.1;
}

.brand h1 {
  font-size: 2.05rem;
  white-space: nowrap;
}

.eyebrow {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.brand-copy,
.hero p,
.hint,
.feature-list,
.stack-list,
.item-meta {
  color: var(--muted);
}

.reference-box {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.66);
}

.reference-box h4 {
  margin: 0 0 10px;
  font-size: 0.98rem;
  color: var(--text);
}

.reference-code {
  margin: 10px 0 0;
  padding: 14px;
  border-radius: var(--radius-md);
  background: #1d2a28;
  color: #daf4ec;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.markdown-split-group {
  align-items: stretch;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
}

.markdown-editor-field,
.reference-pane {
  min-width: 0;
}

.markdown-editor-field textarea {
  min-height: 260px;
  resize: vertical;
}

.reference-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reference-pane .hint {
  margin: 0;
  line-height: 1.65;
}

.reference-pane .reference-code {
  flex: 1 1 auto;
  min-height: 220px;
  margin-top: 0;
}

.card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
  padding: 18px;
  margin-bottom: 14px;
  backdrop-filter: blur(20px);
}

.subtle-card {
  background: rgba(255, 255, 255, 0.62);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.metric {
  padding: 14px 14px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  text-align: center;
  box-shadow: var(--shadow);
}

.metric strong {
  display: block;
  font-size: 1.7rem;
}

.compact-metric span {
  font-size: 0.9rem;
}

.workspace-grid,
.board-grid,
.dashboard-grid {
  display: grid;
  gap: 14px;
}

.workspace-grid {
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.72fr);
  margin-bottom: 14px;
}

.workspace-grid > * {
  min-width: 0;
}

.board-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title-row h2,
.item-card h3 {
  margin: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 700;
}

.pill-live {
  background: rgba(19, 111, 99, 0.18);
}

.form-grid,
.field-group {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-form {
  margin-bottom: 14px;
}

.field,
.field-group {
  margin: 0;
}

.field-full {
  grid-column: 1 / -1;
}

.form-grid > .field-group {
  grid-column: 1 / -1;
}

.field span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(19, 111, 99, 0.38);
  box-shadow: 0 0 0 4px rgba(19, 111, 99, 0.09);
}

.auth-switcher,
.type-switcher,
.action-row,
.compact-row,
.item-actions,
.weekday-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.type-switcher,
.auth-switcher {
  margin-bottom: 18px;
}

.builder-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.builder-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.builder-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.94rem;
  line-height: 1.3;
}

.builder-card span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.builder-card.is-active {
  border-color: rgba(19, 111, 99, 0.35);
  background: linear-gradient(180deg, rgba(19, 111, 99, 0.14), rgba(255, 255, 255, 0.92));
  box-shadow: inset 0 0 0 1px rgba(19, 111, 99, 0.1);
}

.builder-help {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.composer-footer {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(95, 76, 48, 0.08);
}

.task-source-hint {
  margin: -4px 0 12px;
}

.share-field {
  margin: 0;
}

.upload-builder {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed rgba(95, 76, 48, 0.16);
}

.upload-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.image-cropper {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.crop-stage {
  padding: 12px;
  border-radius: 16px;
  background: rgba(239, 229, 214, 0.42);
}

.crop-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(19, 111, 99, 0.18), rgba(190, 126, 54, 0.24));
}

.crop-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
  transition: transform 120ms ease;
}

.crop-controls {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.composer-card,
.preview-card,
.code-preview,
.message-visual-preview {
  min-width: 0;
}

.type-chip,
.primary-button,
.secondary-button,
.ghost-button,
.mini-button {
  border: none;
  border-radius: 999px;
  padding: 11px 16px;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
}

.type-chip,
.ghost-button,
.mini-button {
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
}

.type-chip.is-active,
.primary-button {
  background: var(--accent);
  color: #fff;
}

.secondary-button {
  background: var(--warning-soft);
  color: var(--warning);
}

.type-chip:hover,
.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.mini-button:hover {
  transform: translateY(-1px);
}

.code-preview {
  margin: 0;
  min-height: 240px;
  max-height: 320px;
  overflow: auto;
  border-radius: var(--radius-lg);
  padding: 18px;
  background: #1d2a28;
  color: #daf4ec;
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message-preview-wrap {
  margin-top: 14px;
}

.preview-subtitle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.preview-subtitle-row h3 {
  margin: 0;
  font-size: 1rem;
}

.preview-pill {
  background: rgba(190, 126, 54, 0.14);
  color: var(--warning);
}

.message-stage {
  padding: 14px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(241, 243, 245, 0.96), rgba(232, 236, 240, 0.96));
  border: 1px solid rgba(95, 76, 48, 0.08);
}

.chat-meta {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.message-visual-preview {
  display: grid;
  gap: 12px;
  max-width: 440px;
}

.wecom-message {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.wecom-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(19, 111, 99, 0.88), rgba(52, 145, 129, 0.88));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(19, 111, 99, 0.22);
}

.wecom-message-body {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.wecom-sender {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: #7b8891;
  font-size: 0.82rem;
}

.wecom-sender strong {
  color: #62727d;
  font-size: 0.9rem;
}

.chat-bubble {
  max-width: 100%;
  border-radius: 18px 18px 18px 8px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid rgba(95, 76, 48, 0.08);
  box-shadow: 0 10px 24px rgba(44, 36, 26, 0.06);
}

.chat-bubble p,
.chat-bubble ul {
  margin: 0;
}

.wecom-bubble-reset {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.wecom-card-surface {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(23, 36, 48, 0.08);
  box-shadow: 0 10px 20px rgba(23, 36, 48, 0.06);
}

.plain-preview {
  display: grid;
  gap: 10px;
  white-space: pre-wrap;
  line-height: 1.7;
  color: #25313a;
}

.mention-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mention-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(45, 114, 210, 0.1);
  color: #2d72d2;
  font-size: 0.84rem;
  font-weight: 700;
}

.wecom-markdown,
.news-preview h4,
.file-preview h4,
.voice-preview h4,
.card-preview h4 {
  margin: 0;
  font-size: 1rem;
}

.wecom-markdown {
  display: grid;
  gap: 8px;
  color: #25313a;
  line-height: 1.68;
}

.wecom-markdown h1,
.wecom-markdown h2,
.wecom-markdown h3,
.wecom-markdown h4,
.wecom-markdown h5,
.wecom-markdown h6,
.wecom-markdown blockquote {
  margin: 0;
}

.wecom-markdown h1,
.wecom-markdown h2,
.wecom-markdown h3 {
  font-size: 1rem;
}

.wecom-markdown blockquote {
  padding-left: 10px;
  border-left: 3px solid rgba(19, 111, 99, 0.22);
  color: #60707b;
}

.wecom-markdown a {
  color: #2d72d2;
  text-decoration: none;
}

.wecom-markdown code {
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(23, 36, 48, 0.06);
  font-size: 0.92em;
}

.wecom-inline-tone {
  font-weight: 700;
}

.wecom-inline-tone.is-warning {
  color: #d97706;
}

.wecom-inline-tone.is-comment {
  color: #60707b;
}

.wecom-inline-tone.is-info {
  color: #2d72d2;
}

.brief-highlight,
.card-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(190, 126, 54, 0.12);
  color: var(--warning);
  width: fit-content;
}

.brief-highlight strong,
.card-metric strong {
  font-size: 1.3rem;
}

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

.fact-item {
  display: grid;
  gap: 2px;
  padding-left: 12px;
  border-left: 3px solid rgba(19, 111, 99, 0.2);
}

.fact-item span {
  color: var(--muted);
  font-size: 0.86rem;
}

.fact-item strong {
  font-size: 0.98rem;
  color: var(--text);
}

.fake-link,
.card-button {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(19, 111, 99, 0.12);
  color: var(--accent-strong);
  font-weight: 700;
}

.news-preview {
  padding: 0;
}

.news-cover {
  height: 148px;
  background:
    linear-gradient(135deg, rgba(19, 111, 99, 0.7), rgba(190, 126, 54, 0.52)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
}

.news-cover.has-image {
  background-size: cover;
  background-position: center;
}

.news-body {
  padding: 14px 16px;
  display: grid;
  gap: 8px;
  color: #60707b;
}

.news-body h4,
.card-header h4,
.file-preview-copy h4,
.voice-preview-copy h4 {
  color: #25313a;
  line-height: 1.45;
}

.card-preview {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
}

.card-header {
  display: grid;
  gap: 4px;
}

.card-header p {
  color: var(--muted);
}

.card-facts {
  display: grid;
  gap: 8px;
}

.template-card-preview {
  gap: 14px;
}

.template-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.news-preview .template-card-topline {
  padding: 14px 16px 0;
}

.template-card-source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #8a96a0;
}

.template-card-source.tone-0 {
  color: #8a96a0;
}

.template-card-source.tone-1 {
  color: #25313a;
}

.template-card-source.tone-2 {
  color: #d14343;
}

.template-card-source.tone-3 {
  color: #1d8f5f;
}

.template-card-source-icon {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  flex: 0 0 auto;
  background-size: cover;
  background-position: center;
  background-color: rgba(23, 36, 48, 0.08);
}

.wecom-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid rgba(23, 36, 48, 0.08);
  color: #35444f;
  font-weight: 700;
}

.wecom-chevron {
  color: #98a4ae;
  font-size: 1.1rem;
  line-height: 1;
}

.wecom-news-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(241, 243, 245, 0.92);
  border: 1px solid rgba(23, 36, 48, 0.05);
}

.wecom-news-area-copy {
  display: grid;
  gap: 4px;
}

.wecom-news-area-copy strong {
  color: #25313a;
  font-size: 0.94rem;
}

.wecom-news-area-copy span {
  color: #60707b;
  font-size: 0.86rem;
  line-height: 1.5;
}

.wecom-news-area-thumb {
  width: 72px;
  height: 54px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(19, 111, 99, 0.36), rgba(190, 126, 54, 0.28));
  background-size: cover;
  background-position: center;
}

.file-preview,
.voice-preview {
  display: grid;
  gap: 12px;
  padding: 14px 16px 0;
}

.file-preview-main,
.voice-preview-main {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.file-preview-icon,
.voice-wave {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(19, 111, 99, 0.12);
  color: var(--accent-strong);
  font-weight: 800;
  font-size: 0.82rem;
}

.voice-wave {
  font-size: 1.1rem;
}

.file-preview-copy,
.voice-preview-copy {
  display: grid;
  gap: 4px;
}

.file-preview-copy p,
.voice-preview-copy p {
  color: #7b8891;
  font-size: 0.88rem;
}

.empty-preview {
  color: var(--muted);
  line-height: 1.7;
}

.status-box {
  margin-top: 14px;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.65);
}

.status-box.error {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-box.success {
  background: rgba(19, 111, 99, 0.12);
  color: var(--accent-strong);
}

.stack-list {
  display: grid;
  gap: 12px;
}

.panel-list {
  min-height: 280px;
  max-height: 360px;
  overflow: auto;
  align-content: start;
  padding-right: 4px;
  scrollbar-width: thin;
}

.stack-list.empty-state {
  min-height: 120px;
  place-content: center;
}

.item-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 15px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 250, 244, 0.72));
  box-shadow: 0 8px 20px rgba(44, 36, 26, 0.05);
}

.data-card {
  display: grid;
  gap: 10px;
}

.item-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.item-topline h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.meta-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-chip,
.mini-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.82rem;
  line-height: 1;
}

.meta-chip {
  background: rgba(95, 76, 48, 0.08);
  color: var(--muted);
}

.mini-pill {
  background: rgba(19, 111, 99, 0.12);
  color: var(--accent-strong);
  font-weight: 700;
  white-space: nowrap;
}

.mini-pill.is-private,
.mini-pill.is-muted {
  background: rgba(95, 76, 48, 0.1);
  color: var(--muted);
}

.mini-pill.is-success,
.mini-pill.is-active,
.mini-pill.is-shared {
  background: rgba(19, 111, 99, 0.12);
  color: var(--accent-strong);
}

.mini-pill.is-danger {
  background: rgba(171, 74, 51, 0.12);
  color: var(--danger);
}

.item-note {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.sequence-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.sequence-order {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(19, 111, 99, 0.12);
  color: var(--accent-strong);
  font-weight: 800;
}

.sequence-content {
  min-width: 0;
}

.sequence-item .item-actions {
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: flex-end;
  align-self: center;
}

.sequence-item .mini-button {
  padding: 8px 10px;
  font-size: 0.88rem;
  white-space: nowrap;
}

.tight-row h3 {
  margin: 0;
  font-size: 1rem;
}

.task-sequence-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(95, 76, 48, 0.08);
}

.dashboard-grid > .card {
  position: relative;
  overflow: hidden;
}

.dashboard-grid > .card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, rgba(19, 111, 99, 0.72), rgba(190, 126, 54, 0.42));
}

.dashboard-grid > .card > * {
  position: relative;
}

.shared-card.is-own-shared {
  border-color: rgba(19, 111, 99, 0.22);
  background: linear-gradient(180deg, rgba(236, 245, 241, 0.88), rgba(255, 250, 244, 0.74));
}

.item-meta {
  font-size: 0.92rem;
  margin-top: 6px;
}

.action-chip-row {
  gap: 8px;
}

.mini-button {
  padding: 8px 12px;
  border: 1px solid rgba(95, 76, 48, 0.12);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.mini-button:hover {
  background: #fff;
}

.danger-button {
  color: var(--danger);
  border-color: rgba(171, 74, 51, 0.14);
  background: rgba(255, 244, 239, 0.9);
}

.task-card .item-note,
.delivery-entry .item-note {
  min-height: 54px;
}

.profile-summary {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.profile-summary strong {
  font-size: 1.15rem;
}

.weekday-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-weight: 600;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.modal {
  border: none;
  border-radius: 24px;
  padding: 0;
  width: min(760px, calc(100vw - 32px));
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(24, 16, 8, 0.45);
}

.modal-content {
  padding: 22px;
  background: var(--panel-strong);
}

.identity-card .action-row {
  margin-top: 10px;
}

.tutorial-panel {
  margin: 2px 0 0;
  border: 1px solid rgba(19, 111, 99, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  overflow: hidden;
}

.tutorial-panel summary {
  list-style: none;
  cursor: pointer;
  padding: 13px 16px;
  font-weight: 700;
  color: var(--accent-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tutorial-panel summary::-webkit-details-marker {
  display: none;
}

.tutorial-panel summary::after {
  content: "展开";
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(19, 111, 99, 0.1);
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 700;
}

.tutorial-panel[open] summary {
  border-bottom: 1px solid rgba(95, 76, 48, 0.08);
  background: rgba(19, 111, 99, 0.04);
}

.tutorial-panel[open] summary::after {
  content: "收起";
}

.tutorial-content {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
}

.tutorial-content h3 {
  margin: 0;
  font-size: 0.98rem;
}

.tutorial-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  display: grid;
  gap: 8px;
  line-height: 1.65;
}

.tutorial-faq {
  margin-top: 0;
}

.tutorial-content .hint {
  margin: 0;
  line-height: 1.65;
}

.tutorial-content a {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 600;
}

.tutorial-content a:hover {
  text-decoration: underline;
}

.feature-list {
  margin: 8px 0 0;
  padding-left: 18px;
}

.feature-list li + li {
  margin-top: 6px;
}

.task-planner-card {
  grid-column: span 1;
  display: flex;
  flex-direction: column;
}

.delivery-card {
  grid-column: span 2;
}

.dashboard-grid > .card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

@media (max-width: 1080px) {
  .app-shell,
  .workspace-grid,
  .board-grid,
  .dashboard-grid,
  .metric-strip {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .auth-shell,
  .sidebar,
  .main-content {
    padding: 18px;
  }

  .card {
    border-radius: 24px;
    padding: 18px;
  }

  .form-grid,
  .field-group {
    grid-template-columns: 1fr;
  }

  .crop-controls {
    grid-template-columns: 1fr;
  }

  .sequence-item {
    grid-template-columns: 42px 1fr;
    align-items: start;
  }

  .sequence-item .item-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

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

  .brand h1 {
    white-space: normal;
    font-size: 1.9rem;
  }

  .delivery-card,
  .task-planner-card {
    grid-column: span 1;
  }
}
