:root {
  --bg: #eef4f7;
  --surface: #ffffff;
  --surface-2: #f7fafc;
  --ink: #18242d;
  --muted: #657481;
  --line: #d9e4eb;
  --navy: #203645;
  --navy-2: #2f4c5d;
  --cyan: #2fb8cf;
  --cyan-soft: #d9f4f8;
  --orange: #f27a1a;
  --orange-dark: #c9570a;
  --green: #21a67a;
  --shadow: 0 20px 50px rgba(29, 55, 72, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(47, 184, 207, 0.18), transparent 28rem),
    linear-gradient(135deg, #edf5f8 0%, #f8fbfc 52%, #e6eef4 100%);
  color: var(--ink);
  font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Sans", system-ui, sans-serif;
  letter-spacing: 0;
}

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

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

.sidebar {
  padding: 28px 22px;
  background: linear-gradient(180deg, #152734 0%, #203845 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 4px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--orange), #ffb05d);
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(242, 122, 26, 0.25);
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
}

.brand-subtitle {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
}

.steps {
  display: grid;
  gap: 8px;
}

.step {
  width: 100%;
  min-height: 76px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 12px;
  text-align: left;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
}

.step span {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
}

.step strong {
  align-self: end;
  font-size: 14px;
}

.step small {
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
}

.step.is-active {
  background: rgba(47, 184, 207, 0.2);
  border-color: rgba(47, 184, 207, 0.55);
  color: #fff;
}

.step.is-active span {
  background: var(--orange);
}

.security-note {
  margin-top: auto;
  padding: 16px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.security-note strong {
  display: block;
  margin-bottom: 8px;
}

.security-note p {
  margin: 0;
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  line-height: 1.7;
}

.workspace {
  padding: 28px 34px 40px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--orange-dark);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 30px;
}

h2 {
  margin-bottom: 0;
  font-size: 25px;
}

h3 {
  margin-bottom: 14px;
  font-size: 16px;
}

.status-pill,
.review-label,
.passed {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.passed {
  color: #087052;
  background: #eaf8f2;
  border-color: #bcebd9;
}

.screen {
  display: none;
}

.screen.is-visible {
  display: block;
}

.screen-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.input-layout,
.copy-layout,
.thumb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.how-to,
.edit-hint {
  margin-bottom: 18px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #b9dbe4;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(217, 244, 248, 0.72));
  box-shadow: 0 12px 30px rgba(29, 55, 72, 0.08);
}

.how-to strong,
.edit-hint strong {
  display: block;
  margin-bottom: 5px;
  color: var(--navy);
  font-size: 15px;
}

.how-to p,
.edit-hint p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 13px;
}

.how-to ol {
  min-width: 310px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.how-to li {
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
}

.panel,
.announcement,
.final-note {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
}

textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fbfdfe;
  line-height: 1.7;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.compact-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.file-drop {
  margin-top: 14px;
  min-height: 78px;
  border: 1px dashed #a8c0ce;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--surface-2);
  color: var(--muted);
}

.file-drop .icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--cyan-soft);
  color: #0b7c8e;
  font-weight: 900;
}

.file-drop strong,
.file-drop small {
  display: block;
}

.action-row {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 12px 24px rgba(242, 122, 26, 0.22);
}

.secondary-button,
.ghost-button {
  background: #fff;
  border-color: var(--line);
  color: var(--navy);
}

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

.zero-grid label {
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
}

.copy-preview {
  min-height: 240px;
  border-radius: 8px;
  padding: 26px;
  background:
    radial-gradient(circle at right, rgba(47, 184, 207, 0.22), transparent 14rem),
    linear-gradient(135deg, #234152, #172b38);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.copy-edit-layout {
  grid-template-columns: minmax(240px, 0.85fr) minmax(320px, 1fr);
}

.copy-edit-layout .preview-panel,
.copy-edit-layout .panel:last-child {
  grid-column: span 1;
}

.copy-candidates {
  display: grid;
  align-content: start;
  gap: 10px;
}

.candidate {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.candidate strong,
.candidate small {
  display: block;
}

.candidate strong {
  font-size: 14px;
}

.candidate small {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.5;
}

.candidate.is-selected {
  border-color: rgba(242, 122, 26, 0.65);
  background: #fff7ef;
  box-shadow: inset 4px 0 0 var(--orange);
}

.full-button {
  width: 100%;
}

.copy-editor {
  display: grid;
  gap: 14px;
  align-content: start;
}

.small-textarea {
  min-height: 100px;
}

.editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.copy-preview span {
  width: max-content;
  max-width: 100%;
  padding: 6px 12px;
  background: var(--orange);
  border-radius: 5px;
  font-size: 36px;
  font-weight: 900;
}

.copy-preview strong {
  margin-top: 12px;
  font-size: 42px;
  line-height: 1.15;
}

.copy-preview small {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  font-weight: 800;
}

.check-list {
  list-style: none;
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0;
}

.check-list li {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--navy);
  font-weight: 700;
}

.check-list span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green);
  position: relative;
}

.check-list span::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  rotate: -45deg;
  left: 4px;
  top: 5px;
}

.thumb-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.thumb-block h3 {
  margin-top: 10px;
  color: var(--muted);
}

.generated-thumb {
  display: none;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid rgba(16, 38, 56, 0.14);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.thumb-block.has-generated .thumb {
  display: none;
}

.thumb-block.has-generated .generated-thumb {
  display: block;
}

.thumb {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 76% 46%, rgba(47, 184, 207, 0.34), transparent 13rem),
    linear-gradient(135deg, #294758 0%, #183240 100%);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
}

.x-thumb {
  aspect-ratio: 16 / 9;
}

.line-thumb {
  aspect-ratio: 1024 / 678;
}

.thumb-top {
  position: absolute;
  top: 7%;
  left: 6%;
  font-size: clamp(11px, 1.1vw, 16px);
  font-weight: 800;
  letter-spacing: 0;
}

.thumb-copy {
  position: absolute;
  left: 6%;
  top: 28%;
  z-index: 2;
}

.thumb-copy span {
  display: inline-block;
  padding: 4px 10px;
  background: var(--orange);
  border-radius: 4px;
  font-size: clamp(18px, 2.5vw, 34px);
  font-weight: 900;
}

.thumb-copy strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(20px, 2.8vw, 38px);
  line-height: 1.1;
  font-weight: 900;
}

.thumb-copy small {
  display: block;
  margin-top: 10px;
  font-size: clamp(10px, 1.1vw, 15px);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.84);
}

.axis-visual {
  position: absolute;
  right: 12%;
  top: 18%;
  width: 26%;
  height: 56%;
  background:
    linear-gradient(90deg, transparent 48%, rgba(255, 165, 75, 0.95) 49%, rgba(47, 184, 207, 0.95) 52%, transparent 53%),
    radial-gradient(circle at 50% 80%, rgba(242, 122, 26, 0.62), transparent 28%),
    repeating-radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0.28) 0 1px, transparent 1px 14px);
  opacity: 0.9;
}

.axis-visual::before,
.axis-visual::after {
  content: "";
  position: absolute;
  width: 42px;
  height: 54px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  transform: rotate(-12deg);
}

.axis-visual::before {
  left: -48px;
  top: 16px;
}

.axis-visual::after {
  right: -34px;
  bottom: 42px;
  transform: rotate(14deg);
}

.date-bar {
  position: absolute;
  left: 6%;
  bottom: 8%;
  min-width: 46%;
  padding: 7px 12px;
  border-radius: 5px;
  background: var(--orange);
  color: #fff;
  font-weight: 900;
  font-size: clamp(11px, 1.5vw, 20px);
}

.quality-strip {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.quality-strip div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.quality-strip span {
  color: #087052;
  font-weight: 900;
}

.announcement {
  max-width: 900px;
  line-height: 1.8;
}

.announcement p,
.announcement li {
  color: #334754;
}

.announcement .archive {
  margin-top: 18px;
  font-weight: 800;
  color: var(--navy);
}

.export-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.export-item {
  min-height: 160px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.export-item span {
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--cyan-soft);
  color: #0b7c8e;
  font-weight: 900;
}

.export-item strong,
.export-item small {
  display: block;
}

.export-item small {
  margin-top: 6px;
  color: var(--muted);
}

.final-note {
  margin-top: 18px;
  max-width: 760px;
  box-shadow: none;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .steps,
  .zero-grid,
  .input-layout,
  .copy-layout,
  .copy-edit-layout,
  .thumb-layout,
  .quality-strip,
  .export-grid {
    grid-template-columns: 1fr;
  }

  .how-to,
  .edit-hint {
    align-items: stretch;
    flex-direction: column;
  }

  .how-to ol {
    min-width: 0;
  }

  .workspace {
    padding: 24px 18px 32px;
  }
}
