@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css");

:root {
  --paper: #f4f1ea;
  --paper-deep: #eae5da;
  --card: #fbfaf6;
  --ink: #263733;
  --ink-soft: #65736f;
  --green: #325d52;
  --green-dark: #234b41;
  --mint: #d9e6df;
  --coral: #d6755f;
  --gold: #d5a13f;
  --line: #dcd7cc;
  --shadow: 0 22px 60px rgba(49, 57, 51, 0.09);
  --radius-lg: 28px;
  --radius-md: 18px;
  --font: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --serif: "Iowan Old Style", "Noto Serif KR", "Batang", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 12%, rgba(213, 161, 63, 0.08), transparent 28%),
    radial-gradient(circle at 92% 42%, rgba(50, 93, 82, 0.07), transparent 27%),
    var(--paper);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

button,
textarea,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(77, 114, 168, 0.35);
  outline-offset: 3px;
}

.page-shell {
  width: min(100%, 1520px);
  margin: 0 auto;
  padding: 0 38px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 90px;
  border-bottom: 1px solid rgba(38, 55, 51, 0.11);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-size: 21px;
  font-weight: 760;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
}

.brand-mark svg {
  width: 30px;
  stroke: #f9f7f0;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.header-note {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 550;
}

.status-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6e9a76;
  box-shadow: 0 0 0 4px rgba(110, 154, 118, 0.13);
}

.hero {
  padding: 78px 0 55px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.15em;
}

.eyebrow span {
  width: 26px;
  height: 1px;
  background: var(--green);
}

.hero h1 {
  margin: 18px 0 21px;
  color: #263a35;
  font-family: var(--serif);
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 520;
  letter-spacing: -0.055em;
  line-height: 1.12;
}

.hero h1 em,
.results-heading h2 em {
  position: relative;
  color: var(--coral);
  font-style: normal;
}

.hero h1 em::after {
  position: absolute;
  right: 0;
  bottom: -3px;
  left: 0;
  height: 7px;
  border-radius: 50%;
  background: rgba(214, 117, 95, 0.16);
  content: "";
}

.hero > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
  letter-spacing: -0.015em;
  line-height: 1.8;
}

.hero-steps {
  display: flex;
  gap: 17px;
  align-items: center;
  justify-content: center;
  margin-top: 35px;
  color: #929994;
  font-size: 12px;
  font-weight: 600;
}

.hero-steps span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.hero-steps b {
  display: inline-grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid #c8c8c0;
  border-radius: 50%;
  font-size: 10px;
}

.hero-steps .active {
  color: var(--green);
}

.hero-steps .active b {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.hero-steps i {
  width: 38px;
  height: 1px;
  background: #d4d1c8;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  overflow: hidden;
  min-height: 680px;
  border: 1px solid rgba(38, 55, 51, 0.11);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}

.drawing-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 34px 36px 31px;
}

.card-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 21px;
}

.step-label {
  display: block;
  margin-bottom: 8px;
  color: #87918d;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 730;
  letter-spacing: 0.16em;
}

.card-heading h2,
.side-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 720;
  letter-spacing: -0.035em;
}

.stroke-counter {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #8b9490;
  font-size: 11px;
}

.counter-line {
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--coral);
  transform: rotate(-7deg);
}

.canvas-frame {
  position: relative;
  overflow: hidden;
  min-height: 490px;
  flex: 1;
  border: 1px solid #d9d5cb;
  border-radius: 17px;
  background:
    linear-gradient(rgba(38, 55, 51, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 55, 51, 0.018) 1px, transparent 1px),
    #fffefb;
  background-size: 24px 24px;
  box-shadow: inset 0 1px 7px rgba(46, 55, 48, 0.035);
  touch-action: none;
}

#drawing-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

#drawing-canvas.eraser {
  cursor: cell;
}

.canvas-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  color: #a8aaa5;
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 180ms ease;
}

.canvas-empty.hidden {
  opacity: 0;
}

.canvas-empty svg {
  width: 45px;
  stroke: #b6b8b2;
  stroke-width: 1.25;
  stroke-linecap: round;
}

.drawing-toolbar {
  display: flex;
  gap: 19px;
  align-items: center;
  padding: 21px 5px 0;
}

.primary-button.mobile-analyze {
  display: none;
}

.palette {
  display: flex;
  gap: 11px;
  align-items: center;
}

.color-swatch {
  position: relative;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--swatch);
  cursor: pointer;
  transition: transform 150ms ease;
}

.color-swatch:hover {
  transform: scale(1.12);
}

.color-swatch.selected::after {
  position: absolute;
  inset: -5px;
  border: 1.5px solid var(--swatch);
  border-radius: 50%;
  content: "";
}

.tool-divider {
  width: 1px;
  height: 25px;
  background: var(--line);
}

.size-control {
  display: flex;
  gap: 9px;
  align-items: center;
}

.size-dot {
  display: block;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #6b7672;
}

.size-dot.small {
  width: 4px;
  height: 4px;
}

.size-dot.large {
  width: 11px;
  height: 11px;
}

#brush-size {
  width: 86px;
  height: 3px;
  border-radius: 10px;
  background: #d3d4cf;
  cursor: pointer;
  outline: 0;
  appearance: none;
}

#brush-size::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  border: 3px solid var(--card);
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 1px var(--green);
  appearance: none;
}

.tool-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.icon-button {
  display: grid;
  width: 37px;
  height: 37px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: 150ms ease;
}

.icon-button:hover:not(:disabled),
.icon-button[aria-pressed="true"] {
  border-color: #d8d7d0;
  background: #edeee9;
}

.icon-button[aria-pressed="true"] {
  color: var(--coral);
}

.icon-button:disabled {
  cursor: default;
  opacity: 0.28;
}

.icon-button svg {
  width: 19px;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.side-panel {
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(38, 55, 51, 0.1);
  background: #f2f0e9;
}

.side-section {
  padding: 35px 28px;
}

.prompt-section {
  flex: 1;
}

.prompt-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 21px;
}

.prompt-option {
  position: relative;
  display: grid;
  grid-template-columns: 39px 1fr 14px;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 14px 13px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.prompt-option:hover {
  background: rgba(255, 255, 255, 0.55);
}

.prompt-option.selected {
  border-color: rgba(50, 93, 82, 0.24);
  background: #fffefa;
  box-shadow: 0 7px 20px rgba(48, 62, 54, 0.06);
}

.prompt-icon {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 12px;
  color: #71807b;
  background: #e5e5df;
}

.prompt-option.selected .prompt-icon {
  color: var(--green);
  background: var(--mint);
}

.prompt-icon svg {
  width: 21px;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.prompt-option strong,
.prompt-option small {
  display: block;
}

.prompt-option strong {
  margin-bottom: 4px;
  color: #34443f;
  font-size: 13px;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.prompt-option small {
  color: #89918e;
  font-size: 10.5px;
  line-height: 1.35;
}

.prompt-option > i {
  width: 13px;
  height: 13px;
  border: 1px solid #b8bdb9;
  border-radius: 50%;
}

.prompt-option.selected > i {
  border: 4px solid var(--green);
}

.reflection-tip {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0 28px 22px;
  padding: 15px 16px;
  border: 1px solid rgba(213, 161, 63, 0.2);
  border-radius: 13px;
  background: rgba(213, 161, 63, 0.08);
}

.reflection-tip svg {
  width: 18px;
  min-width: 18px;
  margin-top: 1px;
  stroke: #ac7e26;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reflection-tip p {
  margin: 0;
  color: #747066;
  font-size: 10.5px;
  line-height: 1.55;
}

.reflection-tip strong {
  display: block;
  color: #5c5b54;
  font-weight: 690;
}

.primary-button,
.secondary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  font-weight: 670;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: 170ms ease;
}

.primary-button {
  gap: 12px;
  min-height: 51px;
  margin: 0 28px;
  border: 1px solid var(--green);
  color: #fff;
  background: var(--green);
  box-shadow: 0 10px 23px rgba(50, 93, 82, 0.17);
}

.primary-button:hover:not(:disabled) {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.primary-button:disabled {
  border-color: #b9bdb9;
  background: #b9bdb9;
  box-shadow: none;
  cursor: not-allowed;
}

.primary-button svg,
.secondary-button svg {
  width: 19px;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.privacy-copy {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin: 12px 10px 25px;
  color: #8b928f;
  font-size: 9.5px;
}

.privacy-copy svg {
  width: 13px;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linejoin: round;
}

.results {
  padding: 115px 5% 35px;
  scroll-margin-top: 20px;
}

.results[hidden] {
  display: none;
}

.results-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
}

.results-heading h2 {
  margin: 13px 0 8px;
  font-family: var(--serif);
  font-size: clamp(33px, 4vw, 48px);
  font-weight: 520;
  letter-spacing: -0.05em;
}

.results-heading p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.method-badge {
  padding: 9px 13px;
  border: 1px solid #cad7d1;
  border-radius: 30px;
  color: var(--green);
  background: #e8efeb;
  font-size: 10px;
  font-weight: 700;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.result-card {
  position: relative;
  overflow: hidden;
  min-height: 440px;
  padding: 37px;
  border: 1px solid rgba(38, 55, 51, 0.1);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 15px 40px rgba(48, 57, 51, 0.06);
}

.result-card-label {
  color: #89928e;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.13em;
}

.result-summary {
  max-width: 580px;
  margin: 18px 0 27px;
  color: #30443e;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 530;
  letter-spacing: -0.035em;
  line-height: 1.52;
}

.meter-list {
  display: grid;
  gap: 16px;
  margin-bottom: 26px;
}

.meter-row > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  color: #66716e;
  font-size: 11px;
}

.meter-row strong {
  color: var(--green);
  font-size: 10px;
}

.meter-track {
  overflow: hidden;
  height: 5px;
  border-radius: 10px;
  background: #e6e4dd;
}

.meter-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9fb8ac, var(--green));
  transition: width 800ms cubic-bezier(0.22, 1, 0.36, 1);
}

.observation-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  color: #687470;
  font-size: 11px;
  line-height: 1.55;
  list-style: none;
}

.observation-list li {
  position: relative;
  padding-left: 13px;
}

.observation-list li::before {
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--coral);
  content: "";
}

.question-card {
  padding-left: 49px;
  background:
    radial-gradient(circle at 100% 0, rgba(214, 117, 95, 0.1), transparent 33%),
    #fbfaf6;
}

.question-mark {
  position: absolute;
  top: -22px;
  right: 27px;
  color: rgba(214, 117, 95, 0.1);
  font-family: var(--serif);
  font-size: 180px;
  line-height: 1;
  pointer-events: none;
}

.question-card ol {
  position: relative;
  display: grid;
  gap: 14px;
  margin: 22px 0 27px;
  padding: 0;
  counter-reset: question;
  list-style: none;
}

.question-card li {
  position: relative;
  min-height: 36px;
  padding-left: 43px;
  color: #3d4e49;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.55;
  counter-increment: question;
}

.question-card li::before {
  position: absolute;
  top: -4px;
  left: 0;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #ced8d3;
  border-radius: 50%;
  color: var(--green);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  content: "0" counter(question);
}

.note-field {
  display: block;
}

.note-field span {
  display: block;
  margin-bottom: 8px;
  color: #68736f;
  font-size: 10px;
  font-weight: 650;
}

.note-field textarea {
  width: 100%;
  resize: vertical;
  min-height: 78px;
  padding: 13px 14px;
  border: 1px solid #d9d6cc;
  border-radius: 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  line-height: 1.5;
}

.note-field textarea::placeholder {
  color: #aaaca7;
}

.text-button {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 9px;
  padding: 0;
  border: 0;
  color: var(--green);
  background: none;
  font-size: 10px;
  font-weight: 680;
  cursor: pointer;
}

.text-button svg {
  width: 15px;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.result-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 25px 0;
}

.secondary-button {
  gap: 8px;
  min-height: 46px;
  padding: 0 21px;
  border: 1px solid #cfd2cc;
  background: transparent;
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.55);
}

.primary-button.compact {
  min-height: 46px;
  margin: 0;
  padding: 0 23px;
}

.safety-note {
  padding: 17px 20px;
  border-radius: 13px;
  color: #777c78;
  background: rgba(255, 255, 255, 0.43);
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}

.safety-note strong {
  margin-right: 5px;
  color: #616a66;
}

footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  margin-top: 80px;
  padding: 30px 4px 38px;
  border-top: 1px solid rgba(38, 55, 51, 0.11);
  color: #89918e;
  font-size: 11px;
}

footer > span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 750;
}

footer p,
footer small {
  margin: 0;
  font-size: inherit;
}

.toast {
  position: fixed;
  z-index: 10;
  bottom: 28px;
  left: 50%;
  padding: 12px 18px;
  border-radius: 30px;
  color: #fff;
  background: rgba(38, 55, 51, 0.94);
  box-shadow: 0 10px 30px rgba(20, 35, 30, 0.2);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 15px);
  transition: 200ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1050px) {
  .page-shell {
    padding: 0 22px;
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr) 295px;
  }

  .drawing-card {
    padding: 30px 25px 27px;
  }

  .side-section {
    padding-right: 20px;
    padding-left: 20px;
  }

  .reflection-tip,
  .primary-button {
    margin-right: 20px;
    margin-left: 20px;
  }

  .drawing-toolbar {
    gap: 12px;
  }

  .palette {
    gap: 8px;
  }

  .size-control {
    display: none;
  }
}

@media (max-width: 800px) {
  .page-shell {
    padding: 0 15px;
  }

  .site-header {
    height: 72px;
  }

  .hero {
    padding: 58px 12px 40px;
  }

  .hero-steps {
    gap: 8px;
  }

  .hero-steps i {
    width: 17px;
  }

  .hero-steps span {
    gap: 5px;
    font-size: 10px;
  }

  .workspace {
    display: flex;
    flex-direction: column;
  }

  .side-panel {
    order: -1;
    border-bottom: 1px solid rgba(38, 55, 51, 0.1);
    border-left: 0;
  }

  .prompt-section {
    padding-bottom: 20px;
  }

  .prompt-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .prompt-option {
    grid-template-columns: 34px 1fr;
    padding: 11px;
  }

  .prompt-option > i,
  .prompt-option small {
    display: none;
  }

  .prompt-icon {
    width: 34px;
    height: 34px;
  }

  .reflection-tip,
  .privacy-copy {
    display: none;
  }

  .side-panel > .primary-button {
    display: none;
  }

  .drawing-card {
    min-height: 620px;
  }

  .canvas-frame {
    min-height: 430px;
  }

  .drawing-toolbar {
    flex-wrap: wrap;
  }

  .primary-button.mobile-analyze {
    display: flex;
    width: 100%;
    margin: 18px 0 0;
  }

  .tool-actions {
    margin-left: auto;
  }

  .results {
    padding: 80px 0 20px;
  }

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

  .results-heading {
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .header-note {
    font-size: 0;
  }

  .header-note::after {
    font-size: 10px;
    content: "기기 내 처리";
  }

  .desktop-only {
    display: none;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero > p {
    font-size: 14px;
  }

  .hero-steps i {
    display: none;
  }

  .hero-steps {
    justify-content: space-between;
  }

  .workspace {
    border-radius: 20px;
  }

  .prompt-list {
    gap: 6px;
  }

  .prompt-option strong {
    font-size: 12px;
  }

  .drawing-card {
    min-height: 565px;
    padding: 24px 16px 19px;
  }

  .card-heading {
    align-items: flex-start;
  }

  .card-heading h2 {
    max-width: 220px;
    font-size: 17px;
  }

  .stroke-counter {
    margin-top: 23px;
  }

  .canvas-frame {
    min-height: 365px;
  }

  .drawing-toolbar {
    gap: 13px;
    padding-top: 18px;
  }

  .palette {
    width: 100%;
    justify-content: space-around;
    padding: 0 4px 6px;
  }

  .drawing-toolbar > .tool-divider {
    display: none;
  }

  .tool-actions {
    width: 100%;
    justify-content: flex-end;
    border-top: 1px solid var(--line);
    padding-top: 7px;
  }

  .tool-actions::before {
    align-self: center;
    margin-right: auto;
    color: #9a9f9b;
    font-size: 9px;
    content: "선 굵기는 화면 압력에 반응해요";
  }

  .results-heading {
    display: block;
  }

  .method-badge {
    display: inline-block;
    margin-top: 15px;
  }

  .result-card,
  .question-card {
    min-height: 0;
    padding: 29px 23px;
  }

  .result-summary {
    font-size: 21px;
  }

  .question-card li {
    font-size: 14px;
  }

  .result-actions {
    align-items: stretch;
    flex-direction: column;
  }

  footer {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: center;
  }

  footer small {
    margin-top: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
