/* =========================================================
   블로그 스튜디오 — style.css
   종이·잉크그린 톤. 모바일 우선.
   ========================================================= */

:root {
  --cream: #faf7f0;
  --cream-2: #f3eee2;
  --paper: #ffffff;
  --ink: #222b25;
  --ink-soft: #5f6b62;
  --ink-faint: #94a096;
  --line: #e5e0d3;
  --line-strong: #d5cdba;
  --accent: #2f6b4f;
  --accent-deep: #1f4a36;
  --accent-soft: #e3efe6;
  --butter: #e8c27a;
  --ok: #2f7a4d;
  --warn: #a9661f;
  --danger: #b23b32;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(40, 46, 38, .05), 0 10px 26px -18px rgba(40, 46, 38, .35);
  --shadow-lift: 0 2px 6px rgba(40, 46, 38, .07), 0 18px 40px -22px rgba(40, 46, 38, .45);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
          "Noto Sans KR", "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 480px at 85% -10%, #eef4ea 0%, rgba(238, 244, 234, 0) 62%),
    radial-gradient(900px 420px at 0% 105%, #fbf1de 0%, rgba(251, 241, 222, 0) 60%),
    var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(28px + var(--safe-bottom));
}

[hidden], .hidden { display: none !important; }

h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
a { color: var(--accent-deep); }

.wrap { width: 100%; max-width: 880px; margin: 0 auto; padding: 0 16px; }

input[type="file"] { font-size: 13px; color: var(--ink-soft); }
input[type="file"]::file-selector-button {
  font: inherit; font-size: 12.5px; font-weight: 700; margin-right: 10px;
  padding: 8px 12px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: #fffdf9; color: var(--ink-soft); cursor: pointer;
}
input[type="file"]::file-selector-button:hover { border-color: var(--accent); color: var(--accent-deep); }

/* ───────────────────────── 잠금 화면 ───────────────────────── */

.lock-screen {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 20px;
  background:
    radial-gradient(700px 380px at 50% -10%, #e9f2e6 0%, rgba(233, 242, 230, 0) 70%),
    var(--cream);
}
.lock-card {
  width: min(380px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-lift);
  padding: 30px 24px 24px;
  text-align: center;
}
.lock-mark {
  width: 56px; height: 56px; margin: 0 auto 14px;
  display: grid; place-items: center;
  font-size: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px #cfe3d5;
}
.lock-card h1 { font-size: 21px; letter-spacing: -.03em; }
.lock-sub { margin-top: 6px; font-size: 13px; color: var(--ink-soft); line-height: 1.55; }
.lock-card form { display: grid; gap: 10px; margin-top: 20px; }
.lock-card input {
  width: 100%; padding: 13px 14px; text-align: center; letter-spacing: .22em; font-size: 17px;
  border: 1px solid var(--line-strong); border-radius: 12px; background: #fffdf9;
}
.lock-card input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 107, 79, .16); }
.lock-msg { margin-top: 10px; font-size: 13px; color: var(--danger); }
.lock-note { margin-top: 16px; font-size: 11.5px; color: var(--ink-faint); }
.lock-note code { background: var(--cream-2); padding: 1px 4px; border-radius: 4px; }
.lock-card.shake { animation: shake .35s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-3px); }
}

/* ───────────────────────── header ───────────────────────── */

.app-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(250, 247, 240, .93);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding-top: max(8px, env(safe-area-inset-top, 0px));
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 6px; padding-bottom: 8px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.brand-mark {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: #f6f1e4;
  font-size: 20px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text b { font-size: 16.5px; letter-spacing: -.02em; }
.brand-text small { font-size: 11.5px; color: var(--ink-faint); }
.header-actions { display: flex; align-items: center; gap: 4px; flex: none; }

.status-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--paper); font-size: 12px; color: var(--ink-soft); cursor: pointer;
  white-space: nowrap; max-width: 44vw; overflow: hidden;
}
.status-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); flex: none; }
.status-chip.is-ok .dot { background: var(--ok); }
.status-chip.is-warn .dot { background: var(--warn); }
.status-chip.is-off .dot { background: #c7b7a6; }
.status-label { overflow: hidden; text-overflow: ellipsis; }

.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--ink-soft);
}
.icon-btn:hover { background: rgba(0, 0, 0, .045); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ───────────────────────── hero / main ───────────────────────── */

.main { padding-top: 22px; }

.hero { margin-bottom: 16px; }
.hero h1 { font-size: 23px; letter-spacing: -.035em; line-height: 1.35; }
.hero p { margin-top: 7px; font-size: 13.5px; color: var(--ink-soft); max-width: 62ch; }
.hero p b { color: var(--accent-deep); }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px;
}
.card + .output, .output + .history-panel { margin-top: 20px; }

/* ───────────────────────── form ───────────────────────── */

.step-head { display: flex; align-items: center; gap: 10px; margin: 26px 0 14px; }
.step-head:first-child { margin-top: 0; }
.step-no {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-deep);
  font-size: 13px; font-weight: 800; display: grid; place-items: center;
}
.step-head h2 { font-size: 16px; letter-spacing: -.02em; }
.step-head small { margin-left: auto; font-size: 12px; color: var(--ink-faint); }

.field { display: block; margin-top: 16px; }
.field:first-child { margin-top: 0; }
.field-label {
  display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700;
  color: var(--ink-soft); margin-bottom: 7px; letter-spacing: -.01em;
}
.req { font-style: normal; font-size: 10.5px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 999px; padding: 1px 7px; }
.hint-inline { font-style: normal; font-weight: 500; font-size: 11.5px; color: var(--ink-faint); }
.hint { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-faint); line-height: 1.55; }
.hint b { color: var(--warn); }
.hint code { background: var(--cream-2); padding: 1px 4px; border-radius: 4px; font-size: 11.5px; }

input[type="text"], input[type="password"], textarea, select {
  width: 100%; padding: 12px 13px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fffdf9; font: inherit; font-size: 15px; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
  -webkit-appearance: none; appearance: none;
}
textarea { resize: vertical; line-height: 1.62; min-height: 44px; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6b62' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 16px; padding-right: 34px;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 107, 79, .15); background: #fff;
}
input::placeholder, textarea::placeholder { color: #b6b3a6; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

.memo-field { margin-top: 0; }
.memo-input {
  min-height: 190px; font-size: 15.5px; line-height: 1.75; padding: 15px 16px;
  background: #fffdf6; border-color: #cdbfa2;
}
.memo-input:focus { background: #fff; }
.memo-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 6px; }
.memo-foot .hint { margin-top: 0; flex: 1; }
.memo-foot .count { flex: none; margin-top: 0; }

.check { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; color: var(--ink-soft); padding: 6px 0; line-height: 1.45; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin-top: 2px; flex: none; }
.option-line { margin-top: 18px; padding: 12px 14px; background: var(--cream); border-radius: var(--radius-sm); border: 1px solid var(--line); }
.order-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.order-line .check { padding: 0; flex: 1; min-width: 200px; }
.order-line .btn { flex: none; }

.more { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 10px; }
.more summary { cursor: pointer; font-size: 13px; color: var(--ink-faint); list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "+ "; font-weight: 700; }
.more[open] summary::before { content: "− "; }
.more[open] summary { color: var(--ink-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: #fffdf9; font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
  cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent-deep); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #f6f1e4; }

/* 말투 카드 */
.style-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 560px) { .style-grid { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }
.style-card {
  position: relative; display: grid; gap: 3px; text-align: left;
  padding: 14px 14px 12px 46px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: #fffdf9; cursor: pointer; transition: all .15s;
}
.style-card:hover { border-color: var(--accent); }
.style-card.is-on { border-color: var(--ink); background: #fffaf0; box-shadow: inset 0 0 0 1px var(--ink); }
.style-emoji { position: absolute; left: 13px; top: 14px; font-size: 20px; line-height: 1; }
.style-card b { font-size: 14.5px; letter-spacing: -.01em; }
.style-card small { font-size: 12px; color: var(--ink-soft); line-height: 1.45; }
.style-card small code { background: var(--cream-2); padding: 0 3px; border-radius: 3px; font-size: 11px; }
.style-card em { font-style: normal; font-size: 10.5px; color: var(--ink-faint); margin-top: 2px; }

/* segmented */
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--cream-2); border-radius: 12px; padding: 4px; }
.segmented .seg {
  border: 0; background: transparent; padding: 10px; border-radius: 9px; font-size: 13.5px; font-weight: 700;
  color: var(--ink-soft); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.segmented .seg small { font-size: 10px; font-weight: 700; background: var(--accent-soft); color: var(--accent-deep); padding: 1px 6px; border-radius: 999px; }
.segmented .seg.is-on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px rgba(40, 46, 38, .12); }

/* buttons */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; align-items: center; }
.actions.tight { margin-top: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px; border-radius: 13px; border: 1px solid transparent;
  font-size: 15px; font-weight: 700; letter-spacing: -.01em; cursor: pointer;
  transition: transform .08s, background .15s, box-shadow .15s, opacity .15s;
  min-height: 46px; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: #f6f1e4; box-shadow: 0 8px 18px -12px rgba(34, 43, 37, .8); }
.btn.primary:hover { background: #33403a; }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--ink-soft); }
.btn.ghost:hover { border-color: var(--ink-soft); color: var(--ink); }
.btn.tiny { padding: 7px 11px; min-height: 0; font-size: 12.5px; border-radius: 9px; }
.btn.big { min-height: 54px; font-size: 16.5px; padding: 14px 26px; border-radius: 15px; flex: 1; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.is-loading { pointer-events: none; opacity: .8; }
.btn.is-loading .btn-label::after {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 8px; vertical-align: -1px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.generate-bar { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.generate-bar .btn.ghost { flex: none; }
@media (max-width: 560px) { .generate-bar .btn.big { flex: 1 1 100%; } .generate-bar .btn.ghost { flex: 1; } }

.precheck { margin-top: 12px; display: grid; gap: 6px; }
.precheck p { font-size: 12.5px; color: var(--ink-faint); display: flex; gap: 6px; align-items: flex-start; }
.precheck p.warn { color: var(--warn); }
.precheck p.warn::before { content: "!"; flex: none; width: 15px; height: 15px; border-radius: 50%; background: #f7e7d2; color: var(--warn); font-size: 10px; font-weight: 800; display: grid; place-items: center; margin-top: 1px; }
.precheck p.ok::before { content: "✓"; flex: none; width: 15px; height: 15px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); font-size: 9px; font-weight: 800; display: grid; place-items: center; margin-top: 1px; }

.status-line {
  margin-top: 14px; font-size: 13.5px; padding: 11px 14px; border-radius: var(--radius-sm);
  background: var(--cream-2); color: var(--ink-soft); border: 1px solid var(--line);
}
.status-line.is-error { background: #fdf0ee; border-color: #eecec8; color: var(--danger); }
.status-line.is-ok { background: #eef6ef; border-color: #cfe4d3; color: var(--ok); }

/* ───────────────────────── 사진 ───────────────────────── */

.dropzone {
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm); background: #fffdf9;
  padding: 24px 16px; text-align: center; cursor: pointer; transition: all .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: #f6fbf6; }
.dropzone svg { width: 30px; height: 30px; fill: none; stroke: var(--ink-faint); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dropzone p { margin-top: 8px; font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
.dropzone p span { font-size: 12px; color: var(--ink-faint); }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 9px; margin-top: 12px; }
.photo-grid:empty { margin-top: 0; }
.photo-item {
  position: relative; border-radius: 11px; overflow: hidden; border: 1px solid var(--line);
  aspect-ratio: 1 / 1; background: var(--cream-2);
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-item .idx {
  position: absolute; top: 5px; left: 5px; background: rgba(0, 0, 0, .66); color: #fff;
  font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 1px 7px;
}
.photo-item .del {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%;
  border: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 13px; line-height: 1;
  cursor: pointer; display: grid; place-items: center;
}
.photo-item .move { position: absolute; bottom: 4px; left: 4px; right: 4px; display: flex; gap: 4px; justify-content: center; opacity: 0; transition: opacity .15s; }
.photo-item:hover .move, .photo-item:focus-within .move { opacity: 1; }
@media (hover: none) { .photo-item .move { opacity: 1; } }
.photo-item .move button { border: 0; background: rgba(0, 0, 0, .58); color: #fff; border-radius: 6px; width: 26px; height: 22px; font-size: 12px; cursor: pointer; }
.photo-item.dragging { opacity: .45; }
.photo-item.drop-target { outline: 2px solid var(--accent); outline-offset: 1px; }

.caption-box { margin-top: 14px; padding: 14px; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.caption-head { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin-bottom: 8px; }
.caption-list { display: grid; gap: 7px; }
.caption-row { display: grid; grid-template-columns: 52px 1fr; gap: 8px; align-items: center; }
.caption-row span { font-size: 12px; color: var(--ink-faint); font-weight: 700; }
.caption-row input { padding: 9px 11px; font-size: 13.5px; border-radius: 9px; }

/* ───────────────────────── 출력 ───────────────────────── */

.output { margin-top: 22px; }

.out-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.out-head h2 { font-size: 17px; letter-spacing: -.02em; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.out-head .meta { font-size: 12px; color: var(--ink-faint); font-weight: 400; }

.out-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.out-card + .out-card { margin-top: 14px; }
.out-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.out-card-head h3 { font-size: 14px; color: var(--ink-soft); letter-spacing: -.01em; display: flex; align-items: center; gap: 7px; }
.out-card-head h3 .tag { font-size: 10.5px; font-weight: 700; color: var(--accent-deep); background: var(--accent-soft); border-radius: 999px; padding: 2px 8px; }

/* 체크 패널 */
.check-panel {
  background: #fffdf6; border: 1px solid #ecdfc4; border-radius: var(--radius-sm);
  padding: 13px 15px; margin-bottom: 14px;
}
.check-panel.all-ok { background: #f3f9f2; border-color: #d3e6d3; }
.check-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.check-panel-head b { font-size: 13.5px; color: var(--warn); }
.check-panel.all-ok .check-panel-head b { color: var(--ok); }
.check-summary { font-size: 12px; color: var(--ink-soft); }
.check-list { margin-top: 8px; display: grid; gap: 8px; }
.check-list li { font-size: 12.5px; color: var(--ink-soft); display: flex; gap: 8px; line-height: 1.5; align-items: flex-start; }
.check-list li.danger { color: var(--danger); }
.check-list li.warn { color: var(--warn); }
.check-list li.info, .check-list li.ok { color: var(--ink-soft); }
.badge {
  flex: none; display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .01em;
  border-radius: 5px; padding: 2px 6px; margin-top: 1px; line-height: 1.35;
}
.badge-danger { background: #fbe1dc; color: #a52f26; border: 1px solid #f0c5be; }
.badge-warn { background: #fdf0d8; color: #8f5a15; border: 1px solid #efd9b0; }
.badge-info { background: #e3eefb; color: #2c5c92; border: 1px solid #c9def3; }
.badge-ok { background: var(--accent-soft); color: var(--accent-deep); border: 1px solid #cfe3d5; }

/* 제목 */
.title-list { display: grid; gap: 8px; }
.title-opt {
  display: flex; align-items: flex-start; gap: 10px; text-align: left; width: 100%;
  padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: #fffdf9; font-size: 15px; line-height: 1.45;
}
.title-opt .num {
  flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 800; background: var(--cream-2); color: var(--ink-soft); margin-top: 1px;
}
.title-opt .t { flex: 1; min-width: 0; }
.title-opt .copy { flex: none; font-size: 11.5px; font-weight: 700; color: var(--accent-deep); background: var(--accent-soft); border: 0; border-radius: 8px; padding: 5px 9px; cursor: pointer; }
.title-opt .copy:hover { background: #d5e9da; }
.title-opt .copy.copy-ok { background: var(--ok); color: #fff; }

/* 복사 버튼 줄 */
.copy-row { display: flex; gap: 8px; flex-wrap: wrap; }
.copy-row .btn { flex: 1 1 160px; }
.copy-note { margin-top: 10px; font-size: 12px; color: var(--ink-faint); line-height: 1.55; }
.copy-note b { color: var(--ink-soft); }

/* 네이버 블로그 같은 미리보기 */
.post-preview {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 22px 20px 26px;
}
.post-preview .pv-cat { font-size: 12px; color: var(--accent-deep); font-weight: 700; }
.post-preview .pv-title { margin-top: 6px; font-size: 23px; font-weight: 800; letter-spacing: -.035em; line-height: 1.4; color: #1b1b1b; word-break: keep-all; }
.post-preview .pv-sub { margin-top: 8px; font-size: 12px; color: #999; border-bottom: 1px solid #eee; padding-bottom: 14px; }
.post-preview .pv-body { margin-top: 18px; font-size: 15.5px; line-height: 1.95; color: #333; word-break: keep-all; }
.post-preview .pv-body p { margin: 0 0 15px; white-space: pre-wrap; }
.post-preview .pv-body h3 { margin: 26px 0 12px; font-size: 17.5px; font-weight: 800; letter-spacing: -.02em; color: #1b1b1b; }
.post-preview figure { margin: 18px 0; }
.post-preview figure img { width: auto; max-width: 100%; max-height: 520px; margin: 0 auto; border-radius: 10px; display: block; background: #f4f4f4; }
.post-preview .pv-photo-missing {
  display: grid; gap: 3px; place-items: center; padding: 28px 12px; border: 1.5px dashed #d7d2c6;
  border-radius: 10px; background: #fbfaf6; color: #9a968a; font-size: 13px;
}
.post-preview .pv-photo-missing small { font-size: 11.5px; color: #b0aca0; }
.post-preview figcaption { margin-top: 7px; font-size: 12.5px; color: #999; text-align: center; }
.post-preview .pv-info {
  background: #f8f8f6; border-left: 3px solid #4a7a5c; border-radius: 0 8px 8px 0;
  padding: 13px 15px; margin: 0 0 16px; font-size: 14px; line-height: 1.85; color: #3a3a3a;
}
.post-preview .pv-info p { margin: 0; }
.post-preview .pv-tags { margin-top: 22px; padding-top: 16px; border-top: 1px dashed #e5e5e5; display: flex; flex-wrap: wrap; gap: 6px; }
.post-preview .pv-tags span { font-size: 12.5px; color: #6d8a78; }
.post-preview .pv-disclosure { font-size: 12.5px; color: #888; background: #fafafa; border-radius: 6px; padding: 9px 11px; margin: 0 0 16px; line-height: 1.6; }
.need-check {
  display: inline-block; font-size: 11.5px; font-weight: 800; color: #9a4c12; background: #fde9d2;
  border: 1px solid #f3cfa7; border-radius: 5px; padding: 0 5px; margin: 0 2px; vertical-align: 1px;
}
.risky-mark { background: #ffe0dc; color: #a52f26; border-radius: 3px; padding: 0 2px; }

/* 편집 */
.edit-body { margin-top: 12px; display: grid; gap: 14px; }
.edit-body .section-block { border-top: 1px dashed var(--line); padding-top: 12px; }
.auto-text {
  width: 100%; border: 1px solid var(--line); background: var(--cream); border-radius: var(--radius-sm);
  padding: 11px 12px; font-size: 14.5px; line-height: 1.75; color: var(--ink); resize: vertical;
}
.auto-text:focus { background: #fff; border-color: var(--accent); }
.section-heading {
  width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent;
  padding: 3px 0 8px; font-size: 15.5px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin-bottom: 7px;
}
.section-heading:focus { outline: none; border-bottom-color: var(--accent); }

/* 사진 스트립 */
.photo-strip { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 14px; }
.strip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.strip-item { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fffdf9; }
.strip-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.strip-item .strip-actions { display: flex; gap: 4px; padding: 5px; }
.strip-item .strip-actions button { flex: 1; border: 0; background: var(--cream-2); border-radius: 6px; font-size: 11px; font-weight: 700; color: var(--ink-soft); padding: 5px 0; cursor: pointer; }
.strip-item .strip-actions button:hover { background: var(--accent-soft); color: var(--accent-deep); }

/* 해시태그 */
.hashtags { display: flex; flex-wrap: wrap; gap: 7px; }
.hashtag {
  font-size: 13px; padding: 5px 10px; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent-deep); font-weight: 600; cursor: pointer; border: 0;
}
.hashtag:hover { background: #d3e9d9; }
.copy-ok { color: var(--ok) !important; }

/* 히스토리 */
.history-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.history-list { display: grid; gap: 8px; }
.history-item { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: #fffdf9; }
.history-item .h-main { flex: 1; min-width: 0; }
.history-item b { display: block; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-item small { font-size: 11.5px; color: var(--ink-faint); }
.history-item button { border: 1px solid var(--line-strong); background: transparent; border-radius: 8px; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); padding: 6px 9px; cursor: pointer; }
.history-item button:hover { border-color: var(--accent); color: var(--accent-deep); }
.history-empty { font-size: 13px; color: var(--ink-faint); padding: 14px 2px; }

/* ───────────────────────── modal / toast / foot ───────────────────────── */

.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(28, 32, 28, .48); backdrop-filter: blur(3px); }
.modal-card {
  position: relative; width: min(540px, 100%); max-height: min(88vh, 900px); display: flex; flex-direction: column;
  background: var(--paper); border-radius: 22px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .5); overflow: hidden;
  animation: pop .18s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 8px; }
.modal-head h2 { font-size: 18px; letter-spacing: -.02em; }
.modal-body { padding: 4px 18px 18px; overflow-y: auto; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn { flex: 1; }
.key-row { display: flex; gap: 8px; }
.key-row input { flex: 1; }
.key-row .btn { flex: none; }
.tiny-note { margin-top: 12px; font-size: 11.5px; color: var(--ink-faint); line-height: 1.55; }

.toast-wrap { position: fixed; left: 50%; bottom: calc(20px + var(--safe-bottom)); transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; width: min(440px, calc(100% - 32px)); pointer-events: none; }
.toast {
  background: rgba(34, 43, 37, .96); color: #f7f3e7; padding: 12px 16px; border-radius: 12px;
  font-size: 13.5px; line-height: 1.45; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5);
  animation: toastIn .2s ease; text-align: center;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.app-foot { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 36px; font-size: 11.5px; color: var(--ink-faint); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .card { padding: 16px; border-radius: 16px; }
  .hero h1 { font-size: 20px; }
  .brand-text small { display: none; }
  .post-preview { padding: 18px 15px 22px; max-height: none; }
  .post-preview .pv-title { font-size: 20px; }
  .post-preview figure img { max-height: 420px; }
  .modal { padding: 0; align-items: end; }
  .modal-card { border-radius: 22px 22px 0 0; max-height: 92vh; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
