@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Noto+Sans+SC:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #172230;
  --muted: #778392;
  --line: #e6e9ec;
  --paper: #f7f8f5;
  --card: #ffffff;
  --orange: #f4773d;
  --orange-soft: #fff1e9;
  --blue: #163b59;
  --yellow: #ffcf54;
  --shadow: 0 24px 70px rgba(30, 47, 64, 0.08);
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.page-shell { max-width: 1240px; margin: 0 auto; padding: 0 34px 30px; }
.site-header { height: 76px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: .02em; }
.brand-mark { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--orange); font-size: 16px; }
.header-note { color: var(--muted); font-size: 12px; }

.intro-section { min-height: 360px; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; padding: 62px 7% 56px; border-radius: 30px; overflow: hidden; position: relative; background: #eef2f2; }
.intro-section::after { content: ''; position: absolute; right: -100px; top: -160px; width: 500px; height: 500px; border: 1px solid rgba(22,59,89,.11); border-radius: 50%; pointer-events: none; }
.intro-copy { position: relative; z-index: 1; max-width: 540px; }
.eyebrow, .step-kicker, .progress-label { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: .11em; color: var(--orange); margin: 0 0 14px; }
h1 { margin: 0; font-size: clamp(42px, 5.2vw, 70px); line-height: 1.06; letter-spacing: -.06em; font-weight: 800; }
h1 em { color: var(--orange); font-style: normal; }
.intro-text { max-width: 440px; margin: 22px 0 24px; color: #62707b; font-size: 15px; line-height: 1.9; }
.intro-meta { display: flex; gap: 18px; color: #7e8992; font-size: 12px; }
.intro-meta b { color: var(--blue); font-size: 15px; }
.sticker-preview { min-height: 260px; position: relative; z-index: 1; }
.preview-orbit { position: absolute; border: 1px solid rgba(22,59,89,.12); border-radius: 50%; }
.orbit-one { width: 290px; height: 150px; right: 10px; top: 28px; transform: rotate(-28deg); }
.orbit-two { width: 240px; height: 130px; right: 0; bottom: 6px; transform: rotate(15deg); }
.hero-sticker { position: absolute; width: 137px; height: 137px; object-fit: contain; filter: drop-shadow(0 12px 8px rgba(22, 59, 89, .1)); }
.sticker-a { left: 16%; top: 10px; transform: rotate(-8deg); }
.sticker-b { right: 5%; top: 70px; transform: rotate(8deg); }
.sticker-c { left: 36%; bottom: -4px; transform: rotate(5deg); }
.preview-caption { position: absolute; left: 2%; bottom: 2px; color: var(--blue); font-size: 12px; line-height: 1.7; font-weight: 600; }

.form-layout { display: grid; grid-template-columns: 235px minmax(0, 1fr); gap: 46px; padding: 66px 7% 44px; }
.progress-panel { padding-top: 5px; }
.progress-label { color: var(--blue); margin-bottom: 12px; }
.progress-line { height: 3px; background: #dfe5e8; border-radius: 4px; margin-bottom: 28px; overflow: hidden; }
.progress-line span { display: block; height: 100%; width: 25%; border-radius: inherit; background: var(--orange); transition: width .3s ease; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.step-item { display: flex; gap: 12px; align-items: flex-start; color: #a3adb5; transition: color .2s ease; }
.step-item > span { font-family: 'DM Mono', monospace; font-size: 11px; padding-top: 2px; }
.step-item strong, .step-item small { display: block; }
.step-item strong { font-size: 13px; font-weight: 600; }
.step-item small { margin-top: 4px; font-size: 11px; }
.step-item.is-active, .step-item.is-done { color: var(--ink); }
.step-item.is-active > span { color: var(--orange); }
.save-note { display: flex; align-items: center; gap: 7px; margin: 46px 0 0; color: #a3adb5; font-size: 11px; line-height: 1.5; }
.save-dot { display: block; width: 6px; height: 6px; border-radius: 50%; background: #78b89d; }

.form-card { padding: 40px 46px 32px; min-width: 0; border: 1px solid var(--line); border-radius: 24px; background: var(--card); box-shadow: var(--shadow); }
.form-step { display: none; min-height: 530px; animation: rise .28s ease both; }
.form-step.is-visible { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.step-heading { margin-bottom: 34px; }
.step-heading h2 { margin: 0 0 10px; font-size: 29px; letter-spacing: -.04em; }
.step-heading p:not(.step-kicker) { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.field-grid { display: grid; gap: 18px; }
.two-col { grid-template-columns: 1fr 1fr; }
.field, .field-group { display: block; margin: 0 0 28px; border: 0; padding: 0; }
.field > span, legend { display: block; margin-bottom: 10px; color: #485562; font-size: 12px; font-weight: 600; }
.field i, legend i, .consent-row i { color: var(--orange); font-style: normal; }
input[type='text'], textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; color: var(--ink); background: #fcfcfb; outline: none; transition: border .2s, box-shadow .2s; }
textarea { resize: vertical; min-height: 82px; line-height: 1.6; }
input[type='text']::placeholder, textarea::placeholder { color: #b3bbc1; }
input[type='text']:focus, textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(244, 119, 61, .1); }
.choice-list { display: flex; flex-wrap: wrap; gap: 9px; }
.choice { position: relative; }
.choice input, .tone-choice input, .consent-row input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: block; padding: 9px 14px; border: 1px solid var(--line); border-radius: 9px; color: #71808c; font-size: 12px; transition: all .2s; }
.choice input:checked + span { border-color: var(--orange); color: var(--orange); background: var(--orange-soft); }
.choice span:hover { border-color: #bbc7cf; }
.compact { gap: 8px; }
.compact .choice span { padding: 8px 12px; }

.upload-box { min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1px dashed #bdc8cf; border-radius: 16px; color: #81909c; background: #fbfcfb; text-align: center; cursor: pointer; transition: border .2s, background .2s; }
.upload-box:hover, .upload-box.is-dragging { border-color: var(--orange); background: var(--orange-soft); }
.upload-box input { display: none; }
.upload-icon { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--orange); font-size: 24px; font-weight: 300; }
.upload-box strong { color: var(--blue); font-size: 13px; }
.upload-box > span:last-child { font-size: 11px; }
.upload-tip { margin: 13px 0 17px; color: #83909a; font-size: 11px; }
.upload-tip span { color: var(--orange); font-weight: 700; }
.file-preview { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 24px; }
.file-card { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #f0f2f2; }
.file-card img { width: 100%; height: 100%; object-fit: cover; }
.file-card button { position: absolute; right: 5px; top: 5px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: rgba(23,34,48,.75); line-height: 1; }
.file-card span { position: absolute; left: 6px; right: 6px; bottom: 5px; overflow: hidden; color: #fff; font-size: 9px; white-space: nowrap; text-overflow: ellipsis; text-shadow: 0 1px 3px #000; }
.privacy-line { margin: 4px 0 0; color: #8b979f; font-size: 11px; }

.tone-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 28px; }
.tone-choice { position: relative; min-height: 128px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: all .2s; }
.tone-choice:hover { border-color: #bcc7ce; }
.tone-choice input:checked + .tone-icon { color: var(--orange); background: var(--orange-soft); }
.tone-choice:has(input:checked) { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.tone-icon { width: 31px; height: 31px; display: grid; place-items: center; margin-bottom: 7px; border-radius: 9px; color: var(--blue); background: #eef3f3; font-size: 14px; }
.tone-choice b { font-size: 12px; }
.tone-choice small { color: #9aa4ab; font-size: 10px; }
.style-reference-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 6px 0 13px; padding: 14px 15px; border-radius: 12px; background: #f8f9f7; }
.mini-label { margin: 0 0 4px; color: #485562; font-size: 12px; font-weight: 600; }
.mini-label small { margin-left: 5px; color: #a1abb1; font-size: 10px; font-weight: 400; }
.mini-help { margin: 0; color: #929da4; font-size: 10px; line-height: 1.55; }
.small-upload { flex: none; position: relative; padding: 9px 12px; border: 1px solid #f1c0a6; border-radius: 8px; color: var(--orange); background: #fff; font-size: 11px; cursor: pointer; transition: all .2s; }
.small-upload:hover { border-color: var(--orange); background: var(--orange-soft); }
.small-upload input { display: none; }
.style-preview { grid-template-columns: repeat(5, 1fr); margin: 0 0 21px; }

.phrase-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.count-badge { flex: none; padding: 7px 10px; border-radius: 20px; color: var(--orange); background: var(--orange-soft); font-size: 11px; }
.count-badge b { font-size: 15px; }
.phrase-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.phrase-card { min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fcfcfb; }
.phrase-card.is-edited { border-color: #f5bc9e; }
.phrase-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.phrase-card-top img { width: 45px; height: 45px; object-fit: contain; border-radius: 8px; background: #f1f2f0; }
.phrase-number { font-family: 'DM Mono', monospace; color: #a0aab1; font-size: 10px; }
.phrase-label { color: var(--muted); font-size: 10px; }
.phrase-card input { padding: 8px; border-radius: 7px; font-size: 12px; }
.phrase-extra { margin-top: 22px; margin-bottom: 16px; }
.consent-row { display: flex; align-items: flex-start; gap: 9px; color: #77828b; font-size: 11px; line-height: 1.6; cursor: pointer; }
.consent-row::before { content: '✓'; width: 17px; height: 17px; flex: none; display: grid; place-items: center; border: 1px solid #cad2d7; border-radius: 5px; color: transparent; background: #fff; }
.consent-row:has(input:checked)::before { border-color: var(--orange); color: #fff; background: var(--orange); }

.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding-top: 20px; border-top: 1px solid #f0f1f1; }
.action-spacer { flex: 1; }
.button { min-height: 42px; padding: 0 17px; border: 1px solid transparent; border-radius: 9px; font-size: 12px; font-weight: 700; transition: all .2s; }
.button span { margin-left: 8px; font-size: 16px; }
.button.primary { color: #fff; background: var(--orange); box-shadow: 0 8px 17px rgba(244,119,61,.2); }
.button.primary:hover { background: #e7632a; transform: translateY(-1px); }
.button.secondary { color: #667580; border-color: var(--line); background: #fff; }
.button.secondary:hover { border-color: #bec8ce; color: var(--ink); }
.form-error { min-height: 16px; margin: 10px 0 0; color: #c8563b; font-size: 11px; }

.success-card { max-width: 760px; margin: 15px auto 70px; padding: 70px 56px; border: 1px solid var(--line); border-radius: 24px; background: var(--card); box-shadow: var(--shadow); text-align: center; }
.success-icon { width: 55px; height: 55px; display: grid; place-items: center; margin: 0 auto 22px; border-radius: 50%; color: #fff; background: #72b290; font-size: 25px; }
.success-card h2 { margin: 0 0 14px; font-size: 30px; letter-spacing: -.04em; }
.success-card > p:not(.eyebrow) { max-width: 480px; margin: 0 auto; color: var(--muted); font-size: 13px; line-height: 1.8; }
.success-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 30px 0; padding: 17px; border-radius: 12px; background: #f7f8f6; }
.summary-item { color: #78858e; font-size: 11px; }
.summary-item b { display: block; margin-top: 5px; color: var(--blue); font-size: 15px; }
.success-actions { display: flex; justify-content: center; gap: 10px; }
.site-footer { padding-top: 28px; border-top: 1px solid var(--line); color: #a3adb3; text-align: center; font-size: 11px; }
[hidden] { display: none !important; }

.admin-shell { max-width: 1180px; margin: 0 auto; padding: 0 34px 30px; }
.admin-login { max-width: 460px; margin: 100px auto 150px; padding: 45px; border: 1px solid var(--line); border-radius: 24px; background: var(--card); box-shadow: var(--shadow); }
.admin-login h1, .admin-title-row h1 { margin: 0 0 11px; font-size: 34px; letter-spacing: -.05em; }
.admin-login > p:not(.eyebrow):not(.form-error), .admin-title-row p:not(.eyebrow) { margin: 0 0 28px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.admin-login .button { width: 100%; }
.admin-dashboard { padding: 64px 0 80px; }
.admin-title-row { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 29px; }
.admin-title-row p { margin-bottom: 0 !important; }
.admin-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; align-items: start; }
.project-list, .project-detail { min-width: 0; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.project-list { overflow: hidden; }
.project-item { width: 100%; display: flex; align-items: center; gap: 11px; padding: 14px 15px; border: 0; border-bottom: 1px solid #f0f1f1; color: var(--ink); background: #fff; text-align: left; }
.project-item:last-child { border-bottom: 0; }
.project-item:hover, .project-item.is-selected { background: #f8f9f7; }
.project-avatar { width: 34px; height: 34px; display: grid; place-items: center; flex: none; border-radius: 50%; color: #fff; background: var(--blue); font-size: 14px; font-weight: 700; }
.project-item-copy { min-width: 0; flex: 1; }
.project-item-copy b, .project-item-copy small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.project-item-copy b { font-size: 12px; }
.project-item-copy small { margin-top: 4px; color: #9ba5ab; font-size: 10px; }
.status-pill { flex: none; padding: 4px 7px; border-radius: 20px; color: #76838c; background: #eef1f1; font-size: 10px; }
.status-new { color: var(--orange); background: var(--orange-soft); }
.status-making { color: #47759b; background: #e9f1f6; }
.status-review { color: #90732b; background: #fff7dc; }
.status-done { color: #4e9670; background: #e9f5ed; }
.empty-state { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 30px; color: #99a4ab; text-align: center; font-size: 12px; }
.empty-state span { font-size: 28px; color: #c3ccd0; }
.empty-state b { color: #6f7c85; }
.empty-state small { font-size: 10px; }
.project-detail { padding: 26px 28px; }
.detail-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 23px; border-bottom: 1px solid #f0f1f1; }
.detail-top h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.04em; }
.detail-top .eyebrow { margin-bottom: 10px; }
.detail-id { margin: 0; color: #9ba5ab; font-family: 'DM Mono', monospace; font-size: 10px; }
.download-link { white-space: nowrap; text-decoration: none; }
.detail-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 17px; padding: 23px 0; }
.detail-fields span, .detail-fields b { display: block; }
.detail-fields span { margin-bottom: 5px; color: #9ca6ac; font-size: 10px; }
.detail-fields b { color: #52606b; font-size: 12px; font-weight: 600; }
.status-field { max-width: 220px; margin-bottom: 26px; }
select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fcfcfb; outline: none; }
select:focus { border-color: var(--orange); }
.detail-section { padding-top: 21px; border-top: 1px solid #f0f1f1; }
.detail-section h3 { margin: 0 0 13px; font-size: 13px; }
.admin-phrases { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-phrases span { padding: 8px 10px; border-radius: 7px; color: #66747e; background: #f5f7f5; font-size: 11px; }
.detail-note { margin: 0; color: #77858d; font-size: 12px; line-height: 1.8; }
.detail-error { margin-bottom: 0; }

@media (max-width: 860px) {
  .page-shell { padding: 0 18px 24px; }
  .intro-section { grid-template-columns: 1fr; padding: 42px 28px 26px; }
  .sticker-preview { min-height: 220px; margin-top: 10px; }
  .form-layout { grid-template-columns: 1fr; gap: 24px; padding: 42px 0 25px; }
  .progress-panel { padding: 0 8px; }
  .steps { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .step-item { display: block; }
  .step-item strong { margin-top: 7px; font-size: 11px; }
  .step-item small { display: none; }
  .save-note { margin: 18px 0 0; }
  .form-card { padding: 28px 22px 24px; }
  .form-step { min-height: 0; }
}

@media (max-width: 560px) {
  .site-header { height: 62px; }
  .header-note { display: none; }
  .intro-section { border-radius: 20px; padding: 36px 23px 18px; }
  h1 { font-size: 43px; }
  .intro-text { font-size: 13px; }
  .intro-meta { gap: 11px; font-size: 10px; }
  .sticker-preview { min-height: 183px; transform: scale(.9); transform-origin: center top; }
  .form-layout { padding-top: 30px; }
  .steps { padding-bottom: 2px; }
  .step-item strong { font-size: 10px; line-height: 1.3; }
  .form-card { border-radius: 17px; padding: 25px 17px 20px; }
  .step-heading { margin-bottom: 27px; }
  .step-heading h2 { font-size: 24px; }
  .two-col { grid-template-columns: 1fr; gap: 0; }
  .tone-grid { grid-template-columns: repeat(2, 1fr); }
  .phrase-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .phrase-card-top img { width: 37px; height: 37px; }
  .phrase-card input { font-size: 11px; }
  .style-reference-row { align-items: flex-start; flex-direction: column; gap: 11px; }
  .small-upload { width: 100%; text-align: center; }
  .phrase-heading { display: block; }
  .count-badge { display: inline-block; margin-top: 13px; }
  .success-card { padding: 45px 22px; }
  .success-card h2 { font-size: 25px; }
  .success-summary { grid-template-columns: 1fr; }
  .success-actions { flex-direction: column; }
  .success-actions .button { width: 100%; }
  .admin-shell { padding: 0 18px 24px; }
  .admin-login { margin: 58px auto 100px; padding: 29px 21px; }
  .admin-login h1, .admin-title-row h1 { font-size: 28px; }
  .admin-dashboard { padding-top: 35px; }
  .admin-title-row { display: block; }
  .admin-title-row .button { width: 100%; margin-top: 5px; }
  .admin-grid { grid-template-columns: 1fr; }
  .project-list { max-height: 300px; overflow: auto; }
  .project-detail { padding: 21px 17px; }
  .detail-top { display: block; }
  .download-link { display: block; margin-top: 18px; text-align: center; }
  .detail-fields { grid-template-columns: 1fr 1fr; }
}
