:root {
  --blog-ink: #16201d;
  --blog-muted: #5d6963;
  --blog-line: #dce8e2;
  --blog-soft: #eef7f3;
  --blog-soft-2: #f7fbf9;
  --blog-primary: #276b5a;
  --blog-primary-dark: #1f5648;
  --blog-warn: #9a641f;
  --blog-danger: #9e4037;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--blog-ink);
  background: #f5f8f6;
}

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

button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; }
[hidden] { display: none !important; }

.blog-loading,
.blog-gate {
  min-height: calc(100vh - 78px);
  display: grid;
  place-items: center;
  gap: 12px;
  color: var(--blog-muted);
  text-align: center;
}

.blog-loading { grid-auto-flow: column; }
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid #d8e9e1;
  border-top-color: var(--blog-primary);
  border-radius: 50%;
  animation: blog-spin .8s linear infinite;
}

@keyframes blog-spin { to { transform: rotate(360deg); } }

.blog-gate-card {
  width: min(460px, calc(100% - 32px));
  padding: 40px 32px;
  border: 1px solid var(--blog-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(39, 107, 90, .08);
}

.blog-gate-icon,
.blog-intro-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 16px;
  border-radius: 15px;
  background: var(--blog-soft);
  color: var(--blog-primary);
}

.blog-gate-card h1,
.blog-head h1 { margin: 8px 0 12px; letter-spacing: -.04em; }
.blog-gate-card h2 { font-size: clamp(25px, 4vw, 32px); }
.blog-gate-card p { margin: 0 0 24px; color: var(--blog-muted); line-height: 1.7; }
.blog-gate-card .button { width: 100%; justify-content: center; }
.blog-gate-card small { display: block; margin-top: 14px; color: var(--blog-muted); line-height: 1.6; }
.gate-intro { margin: 22px 0 0 !important; font-size: 14px; }
.gate-intro a { color: var(--blog-primary); font-weight: 750; }

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--blog-primary); color: #fff; }
.button.primary:hover { background: var(--blog-primary-dark); }
.button.secondary { background: var(--blog-soft); border-color: #d6e9e1; color: var(--blog-primary); }
.button.secondary:hover { background: #e1f2eb; }
.button.ghost { background: transparent; border-color: var(--blog-line); color: var(--blog-muted); }
.button.danger { background: #fff4f2; border-color: #f0d2cd; color: var(--blog-danger); }

.blog-workspace {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 44px 0 72px;
}

.blog-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.eyebrow {
  color: var(--blog-primary);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .12em;
}

.blog-head h1 { font-size: clamp(31px, 5vw, 44px); }
.blog-head p { margin: 0; color: var(--blog-muted); font-size: 16px; line-height: 1.6; }
.blog-head-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.blog-user { display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; color: var(--blog-muted); font-size: 13px; font-weight: 700; }

.blog-intro-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 19px 22px;
  border: 1px solid #cfe7dd;
  border-radius: 16px;
  background: var(--blog-soft);
}

.blog-intro-icon { flex: 0 0 42px; width: 42px; height: 42px; margin: 0; border-radius: 12px; background: #fff; }
.blog-intro-card strong { display: block; margin-bottom: 4px; font-size: 16px; }
.blog-intro-card p { margin: 0; color: var(--blog-muted); font-size: 14px; line-height: 1.55; }
.blog-storage-note { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; color: var(--blog-primary); font-size: 13px; font-weight: 750; white-space: nowrap; }

.blog-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.summary-card {
  padding: 17px 18px;
  border: 1px solid var(--blog-line);
  border-radius: 14px;
  background: #fff;
}

.summary-card span { display: block; color: var(--blog-muted); font-size: 13px; }
.summary-card strong { display: block; margin-top: 6px; color: var(--blog-primary); font-size: 27px; letter-spacing: -.04em; }

.blog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0 14px;
}

.blog-filter-row { display: flex; flex-wrap: wrap; gap: 7px; }
.blog-filter-row button { min-height: 38px; padding: 8px 14px; border: 1px solid var(--blog-line); border-radius: 999px; background: #fff; color: var(--blog-muted); font-size: 14px; font-weight: 700; }
.blog-filter-row button.active { border-color: var(--blog-primary); background: var(--blog-primary); color: #fff; }
.blog-list-search { width: min(280px, 100%); display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--blog-line); border-radius: 10px; background: #fff; color: var(--blog-muted); }
.blog-list-search input { width: 100%; min-height: 42px; border: 0; outline: 0; color: var(--blog-ink); background: transparent; font-size: 14px; }

.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, .95fr);
  align-items: start;
  gap: 18px;
}

.blog-task-panel,
.blog-editor-panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--blog-line);
  border-radius: 18px;
  background: #fff;
}

.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-head h2 { margin: 5px 0 0; font-size: 21px; letter-spacing: -.035em; }
.task-count,
.editor-status { color: var(--blog-muted); font-size: 13px; font-weight: 700; }
.editor-status { padding: 6px 9px; border-radius: 999px; background: var(--blog-soft); color: var(--blog-primary); }

.blog-task-list { display: grid; gap: 10px; }
.task-empty { padding: 42px 24px; border: 1px dashed #cfe0d8; border-radius: 14px; background: var(--blog-soft-2); text-align: center; }
.task-empty h3 { margin: 12px 0 7px; font-size: 18px; }
.task-empty p { margin: 0; color: var(--blog-muted); font-size: 14px; line-height: 1.65; }

.task-card {
  width: 100%;
  padding: 17px;
  border: 1px solid var(--blog-line);
  border-radius: 13px;
  background: #fff;
  text-align: left;
  color: var(--blog-ink);
}

.task-card:hover,
.task-card.selected { border-color: #8fc7b5; background: var(--blog-soft-2); }
.task-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.task-platform { color: var(--blog-primary); font-size: 12px; font-weight: 750; }
.task-status { padding: 5px 8px; border-radius: 999px; background: #fff5e2; color: var(--blog-warn); font-size: 12px; font-weight: 750; white-space: nowrap; }
.task-card-title { display: block; margin: 11px 0 5px; font-size: 17px; font-weight: 800; line-height: 1.45; letter-spacing: -.025em; }
.task-keyword { display: block; overflow: hidden; color: var(--blog-muted); font-size: 14px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.task-card-bottom { display: flex; align-items: center; gap: 10px; margin-top: 13px; color: var(--blog-muted); font-size: 13px; }
.task-next { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-next b { color: var(--blog-primary); }

.blog-form-grid,
.blog-readonly-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.blog-editor-panel form { display: grid; gap: 14px; }
.blog-brief-card { display: grid; gap: 13px; padding: 16px; border: 1px solid #cfe7dd; border-radius: 13px; background: var(--blog-soft-2); }
.blog-brief-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 2px; }
.blog-brief-icon { flex: 0 0 38px; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; background: #e4f2ec; color: var(--blog-primary); }
.blog-brief-icon svg { width: 19px; height: 19px; }
.blog-brief-heading h3 { margin: 0; font-size: 16px; line-height: 1.4; }
.blog-brief-heading p { margin: 3px 0 0; color: var(--blog-muted); font-size: 13px; line-height: 1.5; }
.blog-field-help { color: var(--blog-muted); font-size: 12px; font-weight: 500; line-height: 1.5; }
.blog-experience-none { margin: 0; padding: 11px 12px; border-radius: 9px; background: #eaf4ef; color: var(--blog-primary-dark); font-size: 13px; line-height: 1.55; }
.blog-task-details { overflow: hidden; border: 1px solid var(--blog-line); border-radius: 12px; background: var(--blog-soft-2); }
.blog-task-details > summary { display: flex; min-height: 70px; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
.blog-task-details > summary::-webkit-details-marker { display: none; }
.blog-task-details > summary:focus-visible { outline: 3px solid rgba(39, 107, 90, .32); outline-offset: -3px; }
.blog-task-details-icon,
.blog-task-details-toggle { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border-radius: 10px; background: #fff; color: var(--blog-primary); }
.blog-task-details-icon svg { width: 19px; height: 19px; }
.blog-task-details-copy { display: grid; min-width: 0; flex: 1; gap: 3px; }
.blog-task-details-copy strong { color: var(--blog-ink); font-size: 14px; font-weight: 800; }
.blog-task-details-copy small { color: var(--blog-muted); font-size: 12px; font-weight: 500; line-height: 1.45; }
.blog-task-details-copy .details-open,
.blog-task-details[open] .blog-task-details-copy .details-closed { display: none; }
.blog-task-details[open] .blog-task-details-copy .details-open { display: block; }
.blog-task-details-toggle { flex-basis: 32px; width: 32px; height: 32px; background: transparent; color: var(--blog-muted); transition: transform .18s ease; }
.blog-task-details-toggle svg { width: 18px; height: 18px; }
.blog-task-details[open] .blog-task-details-toggle { transform: rotate(180deg); }
.blog-task-details-content { display: grid; gap: 14px; padding: 14px; border-top: 1px solid var(--blog-line); background: #fff; }
.blog-editor-panel label { display: grid; gap: 7px; color: var(--blog-ink); font-size: 13px; font-weight: 750; }
.blog-editor-panel label small { color: var(--blog-muted); font-size: 12px; font-weight: 500; }
.blog-editor-panel input,
.blog-editor-panel select,
.blog-editor-panel textarea { width: 100%; border: 1px solid var(--blog-line); border-radius: 9px; background: #fff; color: var(--blog-ink); outline: 0; font-size: 14px; font-weight: 500; }
.blog-editor-panel input,
.blog-editor-panel select { min-height: 44px; padding: 10px 12px; }
.blog-editor-panel textarea { min-height: 118px; padding: 11px 12px; line-height: 1.6; resize: vertical; }
.blog-editor-panel input:focus,
.blog-editor-panel select:focus,
.blog-editor-panel textarea:focus { border-color: var(--blog-primary); box-shadow: 0 0 0 3px rgba(39, 107, 90, .1); }
.blog-title-tools { padding: 14px; border: 1px solid #cfe7dd; border-radius: 12px; background: var(--blog-soft-2); }
.blog-title-tools-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.blog-title-tools-head > div { min-width: 0; }
.blog-title-tools-head span { display: block; color: var(--blog-ink); font-size: 14px; font-weight: 800; }
.blog-title-tools-head small { color: var(--blog-muted); font-size: 12px; font-weight: 500; }
.blog-title-tools-head p { margin: 4px 0 0; color: var(--blog-muted); font-size: 12px; line-height: 1.5; }
.blog-title-tools-head .button { flex: 0 0 auto; min-height: 38px; padding: 8px 11px; font-size: 13px; }
.title-meta,
.title-candidate-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; color: var(--blog-muted); font-size: 11px; line-height: 1.4; }
.title-meta > span,
.title-candidate-meta > span { padding: 3px 6px; border-radius: 999px; background: #f1f5f3; }
.title-meta-good { color: var(--blog-primary); background: #e5f4ed !important; }
.title-meta-warn { color: var(--blog-warn); background: #fff5e2 !important; }
.title-meta-empty { color: var(--blog-muted); }
.title-candidates { display: grid; gap: 7px; margin-top: 12px; }
.title-candidates-empty { margin: 0; color: var(--blog-muted); font-size: 13px; line-height: 1.55; }
.title-candidate { width: 100%; display: flex; align-items: flex-start; gap: 8px; padding: 10px 11px; border: 1px solid var(--blog-line); border-radius: 9px; background: #fff; color: var(--blog-ink); text-align: left; font-size: 13px; font-weight: 650; line-height: 1.45; }
.title-candidate:hover,
.title-candidate:focus-visible { border-color: #8fc7b5; background: #f0faf6; outline: 0; }
.title-candidate-number { flex: 0 0 22px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--blog-soft); color: var(--blog-primary); font-size: 11px; font-weight: 850; }
.title-candidate-copy { min-width: 0; display: grid; gap: 2px; }
.title-candidate-copy strong { font-size: 13px; font-weight: 750; line-height: 1.45; }
.title-candidate-meta { margin-top: 2px; }
.title-candidate-meta > span { padding: 2px 5px; font-size: 10px; }
.blog-readonly-grid { padding: 12px; border-radius: 10px; background: var(--blog-soft-2); }
.blog-readonly-grid div { min-width: 0; }
.blog-readonly-grid span { display: block; margin-bottom: 5px; color: var(--blog-muted); font-size: 12px; }
.blog-readonly-grid b { display: block; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.blog-form-error { margin: 0; color: var(--blog-danger); font-size: 14px; line-height: 1.5; }
.blog-editor-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-editor-actions .button.primary { flex: 1 1 180px; }

.blog-source-snapshot { padding: 14px; border: 1px solid #d9eae3; border-radius: 11px; background: var(--blog-soft); color: var(--blog-muted); font-size: 13px; line-height: 1.6; }
.blog-source-snapshot strong { display: block; margin-bottom: 5px; color: var(--blog-primary); font-size: 14px; }
.blog-source-snapshot a { color: var(--blog-primary); font-weight: 700; }

.blog-packet-card { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--blog-line); }
.blog-packet-card h3 { margin: 5px 0 5px; font-size: 18px; }
.blog-packet-card p { margin: 0; color: var(--blog-muted); font-size: 14px; line-height: 1.6; }
.packet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.packet-actions .button:last-child { grid-column: 1 / -1; }
.blog-prompt-next { display: inline-flex; margin-top: 14px; min-height: 44px; align-items: center; color: var(--blog-primary); font-size: 14px; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 90; display: inline-flex; align-items: center; gap: 7px; padding: 12px 15px; border-radius: 10px; background: var(--blog-ink); color: #fff; box-shadow: 0 12px 28px rgba(22, 32, 29, .18); font-size: 14px; font-weight: 700; }

@media (max-width: 940px) {
  .blog-layout { grid-template-columns: 1fr; }
  .blog-editor-panel { order: -1; }
}

@media (max-width: 680px) {
  .blog-workspace { width: min(100% - 28px, 560px); padding: 28px 0 52px; }
  .blog-head { align-items: flex-start; flex-direction: column; gap: 16px; }
  .blog-head h1 { font-size: 33px; }
  .blog-head p { font-size: 15px; }
  .blog-head-actions { justify-content: flex-start; width: 100%; }
  .blog-user { width: 100%; margin: 0 0 2px; }
  .blog-intro-card { align-items: flex-start; flex-wrap: wrap; padding: 17px; }
  .blog-intro-card > div:nth-child(2) { flex: 1 1 calc(100% - 60px); }
  .blog-storage-note { width: 100%; margin: 0 0 0 58px; }
  .blog-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blog-toolbar { align-items: stretch; flex-direction: column; }
  .blog-list-search { width: 100%; }
  .blog-task-panel,
  .blog-editor-panel { padding: 18px; border-radius: 15px; }
  .blog-form-grid,
  .blog-readonly-grid { grid-template-columns: 1fr; }
  .blog-title-tools-head { flex-direction: column; }
  .blog-title-tools-head .button { width: 100%; }
  .packet-actions { grid-template-columns: 1fr; }
  .packet-actions .button:last-child { grid-column: auto; }
  .toast { right: 14px; bottom: 14px; left: 14px; justify-content: center; }
}
