/* kithouse 화면 · © 2026 박가빈. All rights reserved.
   색은 여기 :root 값만 바꾸면 앱 전체가 바뀌어요. */
:root {
  --bg: #F6F2E9;        /* 바탕 */
  --sheet: #FDFCF8;     /* 아래에서 올라오는 판 (우유) */
  --sheet-in: #F3F0E8;  /* 판 안의 칸 */
  --olive: #6B7A3A;
  --deep: #3D4520;
  --beige: #F3EFE3;
  --ink: #1d1d1f;
  --l2: rgba(60, 60, 67, .6);
  --sep: rgba(61, 69, 32, .12);
  --fill: rgba(107, 122, 58, .1);
  --brick: #B5523B;
  --gold: #E0A100;
  --r-pill: 999px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0; background: #ECE7DC; color: var(--ink);
  font: 16px/1.45 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Noto Sans KR', system-ui, sans-serif;
  word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
h1, h2, h3, b { text-wrap: balance; }
p, span { text-wrap: pretty; }

#app {
  position: fixed; inset: 0; margin: 0 auto; max-width: 520px; background: var(--bg); overflow: hidden;
  box-shadow: 0 0 0 1px rgba(61, 69, 32, .06), 0 20px 60px rgba(61, 69, 32, .08);
}
.scr { position: absolute; inset: 0; display: flex; flex-direction: column; padding-top: var(--sat); }
.scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }

/* 머리 */
.wm { display: flex; align-items: center; gap: 7px; font: 800 24px 'Inter', 'Pretendard Variable', sans-serif; letter-spacing: -.045em; color: var(--deep); padding: 14px 20px 12px; }
.nav { height: 52px; flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 14px; }
.nav .l { justify-self: start; display: flex; align-items: center; gap: 2px; color: var(--olive); font-weight: 600; }
.nav .r { justify-self: end; }
.nav b { font-weight: 600; font-size: 17px; max-width: 58vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.circ { width: 38px; height: 38px; border-radius: 50%; background: var(--fill); display: grid; place-items: center; color: var(--deep); }
.pill { background: var(--olive); color: #fff; font-weight: 600; font-size: 15px; border-radius: var(--r-pill); padding: 8px 17px; }
.pill.light { background: #fff; color: var(--olive); }
.name { font-size: 17px; font-weight: 600; max-width: 56vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 10px; border-radius: 10px; }
.name.empty { color: rgba(60, 60, 67, .45); font-weight: 500; }
.name.empty::after { content: ' ✎'; color: var(--olive); font-size: 15px; }
.name-in { width: 56vw; max-width: 260px; text-align: center; font-size: 17px; font-weight: 600; border: 0; border-bottom: 2px solid var(--olive); background: transparent; outline: 0; padding: 4px 2px; }
.lt-title { font-size: 32px; font-weight: 800; letter-spacing: -.02em; padding: 10px 20px 14px; }

/* 버튼 */
.bigbtn { height: 54px; border-radius: var(--r-pill); background: var(--olive); color: #fff; font-size: 17px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.bigbtn.soft { background: #fff; color: var(--deep); }
.bigbtn:disabled { opacity: .5; }
.ghost { background: #fff; border-radius: var(--r-pill); padding: 10px 17px; font-size: 15px; font-weight: 600; color: var(--olive); white-space: nowrap; }
.fab { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(96px + var(--sab)); background: var(--olive); color: #fff; border-radius: var(--r-pill); padding: 15px 24px; font-size: 17px; font-weight: 600; display: flex; gap: 6px; align-items: center; box-shadow: 0 10px 24px rgba(61, 69, 32, .3); z-index: 4; white-space: nowrap; }
.link { color: var(--olive); font-weight: 600; font-size: 15px; }

/* 탭 */
.tabbar { flex: none; display: flex; justify-content: space-around; padding: 8px 0 calc(8px + var(--sab)); border-top: 1px solid var(--sep); background: rgba(246, 242, 233, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: rgba(61, 69, 32, .45); width: 96px; }
.tabbar button.on { color: var(--olive); }
.tabbar button.tnew { color: var(--olive); }
.tnew span { width: 30px; height: 26px; border-radius: 8px; background: var(--olive); color: #fff; display: grid; place-items: center; transition: transform .2s var(--ease); }
.tnew:active span { transform: scale(.9); }

/* 홈 */
.sech { display: flex; justify-content: space-between; align-items: baseline; padding: 24px 20px 10px; }
.sech b { font-size: 18px; }
.chips { display: flex; gap: 8px; padding: 0 20px 14px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border-radius: var(--r-pill); padding: 8px 15px; font-size: 15px; background: var(--fill); color: var(--deep); font-weight: 500; }
.chip.on { background: var(--deep); color: var(--beige); }
.trow { display: flex; gap: 10px; padding: 0 20px 4px; overflow-x: auto; scrollbar-width: none; }
.trow::-webkit-scrollbar { display: none; }
.trow > button { flex: none; width: 112px; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06); }
.car { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px calc(50% - 100px) 30px; scrollbar-width: none; }
.car::-webkit-scrollbar { display: none; }
.car > button { flex: none; width: 200px; scroll-snap-align: center; border-radius: 18px; overflow: hidden; box-shadow: 0 1px 2px rgba(60, 50, 20, .06), 0 14px 22px -12px rgba(60, 50, 20, .35); transition: transform .45s cubic-bezier(.22, 1, .36, 1), opacity .45s; transform: scale(.86); opacity: .55; }
.car > button.mid { transform: none; opacity: 1; }
.car.big { padding: 10px calc(50% - 125px) 30px; }
.car.big > button { width: 250px; }
.controw { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 24px 0; }
.controw b { font-size: 18px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.controw small { font-size: 13.5px; color: var(--l2); }
.controw > div { min-width: 0; }
.center { text-align: center; }
.sub { font-size: 14.5px; color: var(--l2); margin-top: 2px; }

/* 카드 */
.kc { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #fff; width: 100%; display: block; }
.kc-in { position: absolute; left: 0; top: 0; width: 1080px; height: 1350px; transform-origin: 0 0; }
.k-bg, .k-shade { position: absolute; inset: 0; }
.k-shade { background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .62) 100%); pointer-events: none; }
.k-ph { position: absolute; background-repeat: no-repeat; }
.k-ph.empty { display: grid; place-items: center; color: #8a877e; font: 500 44px 'Noto Sans KR', sans-serif; }
.k-tx { position: absolute; display: flex; flex-direction: column; white-space: pre; }
.k-ln { white-space: pre; }
.k-ln.bx { display: block; }
.k-tiles { position: absolute; display: flex; }
.k-tiles i { font-style: normal; display: grid; place-items: center; color: #111; font-family: 'Noto Sans KR', sans-serif; font-weight: 500; }
.k-tx.ph, .k-tiles.ph { opacity: .72; }
.editing .k-tx.ph:not(.acct), .editing .k-tiles.ph { outline: 3px dashed currentColor; outline-offset: 14px; }
.editing .k-tx, .editing .k-tiles, .editing .k-ph { cursor: pointer; }
.k-tx[contenteditable] { white-space: pre-wrap; outline: 6px solid var(--olive) !important; outline-offset: 14px; opacity: 1; caret-color: var(--olive); cursor: text; display: block; }

/* 아래 판 */
#layer { position: fixed; inset: 0; margin: 0 auto; max-width: 520px; pointer-events: none; z-index: 50; }
.dim { position: absolute; inset: 0; background: rgba(61, 69, 32, .22); opacity: 0; transition: opacity .3s; pointer-events: auto; }
.open .dim { opacity: 1; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--sheet); border-radius: 30px 30px 0 0; box-shadow: 0 -10px 34px rgba(60, 50, 20, .14); padding-bottom: calc(18px + var(--sab)); transform: translateY(105%); transition: transform .42s cubic-bezier(.22, 1, .36, 1); pointer-events: auto; max-height: 88%; display: flex; flex-direction: column; }
.open .sheet { transform: none; }
.sheet.paper { background: var(--bg); }
.grab { width: 38px; height: 5px; border-radius: 3px; background: rgba(61, 69, 32, .18); margin: 8px auto 4px; flex: none; }
.sh { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 6px 20px 12px; flex: none; }
.sh b { font-size: 17px; font-weight: 700; }
.sh .x { justify-self: start; color: var(--olive); font-weight: 600; }
.sh .ok { justify-self: end; color: var(--olive); font-weight: 700; }
.sbody { overflow-y: auto; min-height: 0; }
.cap { font-size: 13px; color: var(--l2); padding: 0 20px 8px; font-weight: 600; }
.seg { display: flex; background: var(--deep); border-radius: var(--r-pill); padding: 3px; margin: 0 20px 14px; }
.seg button { flex: 1; text-align: center; padding: 8px 0; border-radius: var(--r-pill); font-size: 14.5px; font-weight: 600; color: var(--beige); }
.seg button.on { background: var(--beige); color: var(--deep); }

/* 목록 (올리브 알약) */
.group { margin: 0 16px 22px; display: flex; flex-direction: column; gap: 8px; }
.group.card { background: #fff; border-radius: 24px; padding: 18px 16px 16px; }
.row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 20px 0 26px; background: #fff; border-radius: var(--r-pill); font-size: 16.5px; text-align: left; width: 100%; }
.row:has(.ri) { padding-left: 10px; }
.row .v { margin-left: auto; color: var(--l2); display: flex; align-items: center; gap: 6px; font-size: 15.5px; }
.row.red { color: var(--brick); }
.ri { width: 38px; height: 38px; border-radius: 50%; background: var(--deep); color: var(--beige); display: grid; place-items: center; flex: none; }
.chev { color: rgba(61, 69, 32, .35); display: flex; }
.ghdr { font-size: 13px; color: var(--l2); padding: 0 30px 8px; font-weight: 600; }
.gft { font-size: 13px; color: var(--l2); padding: 0 30px; margin: -12px 0 22px; line-height: 1.55; }
.sheet .group { margin: 0 20px 14px; }
.sheet .row { background: var(--sheet-in); }
.dot { width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1) inset; display: inline-block; }
.soon { font-size: 11.5px; font-weight: 700; color: var(--olive); background: var(--fill); border-radius: var(--r-pill); padding: 3px 9px; }
.signin { height: 48px; border-radius: var(--r-pill); display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 15.5px; font-weight: 600; flex: 1; }
.copyright { text-align: center; font-size: 12.5px; color: var(--l2); line-height: 1.7; padding: 4px 20px 28px; }

/* 편집 */
.stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; padding: 6px 0 10px; transition: padding-bottom .45s cubic-bezier(.22, 1, .36, 1); }
.stage .kc { box-shadow: 0 1px 3px rgba(60, 50, 20, .08), 0 16px 30px -14px rgba(60, 50, 20, .35); border-radius: 14px; transition: width .45s cubic-bezier(.22, 1, .36, 1); flex: none; touch-action: none; }
.strip { flex: none; display: flex; gap: 10px; padding: 6px 20px 10px; overflow-x: auto; scrollbar-width: none; transition: opacity .3s, transform .3s; }
.strip::-webkit-scrollbar { display: none; }
.th { flex: none; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11px; color: var(--l2); width: 56px; }
.th .kc { border-radius: 8px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); }
.th.on .kc { box-shadow: 0 0 0 2.5px var(--olive); }
.th.on { color: var(--deep); font-weight: 600; }
.th .add { width: 56px; aspect-ratio: 4 / 5; border-radius: 8px; border: 2px dashed rgba(107, 122, 58, .4); display: grid; place-items: center; color: var(--olive); }
.tools { flex: none; display: flex; justify-content: space-around; padding: 8px 6px calc(8px + var(--sab)); border-top: 1px solid var(--sep); transition: opacity .3s, transform .3s; }
.tools button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--deep); width: 64px; }
.panel-up .strip, .panel-up .tools { opacity: 0; transform: translateY(24px); pointer-events: none; }

/* 고른 글자 */
.selx { position: absolute; border: 2px solid var(--olive); border-radius: 6px; pointer-events: none; z-index: 5; }
.selx .hd { position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2.5px solid var(--olive); pointer-events: auto; touch-action: none; }
.selx .hd.tl { left: -10px; top: -10px; cursor: nwse-resize; } .selx .hd.tr { right: -10px; top: -10px; cursor: nesw-resize; }
.selx .hd.bl { left: -10px; bottom: -10px; cursor: nesw-resize; } .selx .hd.br { right: -10px; bottom: -10px; cursor: nwse-resize; }
.selx .hd.tm { left: 50%; margin-left: -9px; top: -10px; cursor: ns-resize; border-radius: 6px; }
.pmenu { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(100% + 14px); display: flex; gap: 2px; background: var(--deep); color: var(--beige); border-radius: var(--r-pill); padding: 4px 6px; box-shadow: 0 8px 20px rgba(30, 35, 10, .3); white-space: nowrap; pointer-events: auto; }
.pmenu.below { bottom: auto; top: calc(100% + 14px); }
.pmenu button { height: 36px; padding: 0 11px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.tip { position: absolute; left: 50%; top: -44px; transform: translateX(-50%); background: var(--deep); color: var(--beige); font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: var(--r-pill); }

/* 글자 꾸미기 판 */
.kbx { position: absolute; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--sheet); border-radius: 28px 28px 0 0; box-shadow: 0 -10px 30px rgba(40, 40, 20, .12); padding-bottom: calc(14px + var(--sab)); transform: translateY(105%); transition: transform .5s cubic-bezier(.22, 1, .36, 1); }
.panel-up .kbx.on { transform: none; }
.tbar { display: flex; align-items: center; gap: 4px; padding: 12px 10px 8px; border-bottom: 1px solid var(--sep); overflow-x: auto; scrollbar-width: none; }
.tbar::-webkit-scrollbar { display: none; }
.tbar button { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: rgba(61, 69, 32, .55); width: 52px; padding: 4px 0; border-radius: 12px; }
.tbar button.on { color: var(--deep); background: var(--fill); }
.tbar .done { margin-left: auto; flex-direction: row; width: auto; padding: 8px 15px; background: var(--olive); color: #fff; border-radius: var(--r-pill); font-size: 14.5px; }
.tpanel { padding: 14px 20px 6px; }
.tpanel .val { display: flex; justify-content: space-between; font-size: 14px; color: var(--l2); font-weight: 600; }
.tpanel .val b { color: var(--deep); }
.rng { width: 100%; margin: 14px 0; accent-color: var(--olive); height: 28px; }
.one-q { display: flex; gap: 8px; }
.one-q button { flex: 1; padding: 10px 0; border-radius: var(--r-pill); background: var(--sheet-in); font-size: 14.5px; font-weight: 600; color: var(--deep); display: flex; align-items: center; justify-content: center; gap: 4px; }
.one-q button.on { background: var(--deep); color: var(--beige); }
/* 크기·간격: 막대 네 줄 */
/* 스크롤 막대는 숨기고 자연스럽게 내려가게 */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
/* 되돌리기 · 다시하기 */
.urb { width: 36px; height: 38px; display: grid; place-items: center; color: var(--deep); border-radius: 12px; }
.urb:first-of-type { margin-left: 6px; }
.urb:disabled { opacity: .28; }
.urb:not(:disabled):active { background: var(--fill); }
/* 다른 장도 이 위치로: 장 고르기 */
.pp-quick { display: flex; gap: 8px; padding: 0 20px 12px; }
.pp-quick button { padding: 7px 14px; border-radius: var(--r-pill); background: var(--fill); font-size: 13.5px; font-weight: 600; color: var(--deep); }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px 10px; padding: 0 20px 6px; }
.pp { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0; }
.pp-c { position: relative; display: block; width: 100%; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.08); transition: box-shadow .15s; }
.pp-c > .kc { width: 100%; }
.pp.on .pp-c { box-shadow: 0 0 0 3px var(--olive); }
.pp:disabled { opacity: .4; }
.pp-ck { position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.92); color: transparent; display: grid; place-items: center; box-shadow: 0 0 0 1.5px rgba(0,0,0,.18); }
.pp.on .pp-ck { background: var(--olive); color: #fff; box-shadow: none; }
.pp b { font-size: 12.5px; font-weight: 600; color: var(--deep); }
.pp small { font-size: 11px; color: var(--l2); min-height: 14px; }
/* 글 다듬기: 줄바꿈 추천 */
.sp-seg { margin-bottom: 16px; }
.lb-op + .sp-note, .lb-now + .sp-note { padding-top: 4px; }
.lb-now { white-space: pre-line; background: #fff; border-radius: 16px; padding: 14px 16px; font-size: 17px; line-height: 1.55; color: var(--deep); word-break: keep-all; margin: 0 20px 14px; }
.lb-op { display: block; width: calc(100% - 40px); text-align: left; background: #fff; border-radius: 16px; padding: 12px 16px 14px; margin: 0 20px 10px; box-shadow: 0 0 0 1.5px transparent; transition: box-shadow .15s; }
.lb-op:active { box-shadow: 0 0 0 1.5px var(--olive); }
.lb-op small { display: block; font-size: 12px; font-weight: 700; color: var(--olive); margin-bottom: 6px; }
.lb-op span { display: block; white-space: pre-line; font-size: 17px; line-height: 1.55; color: var(--deep); word-break: keep-all; }
.fit-r { display: grid; grid-template-columns: 78px 1fr 48px; align-items: center; gap: 10px; }
.fit-r span { font-size: 13.5px; font-weight: 600; color: var(--l2); word-break: keep-all; }
.fit-r .rng { margin: 4px 0; }
.fit-r b { font-size: 13.5px; color: var(--deep); text-align: right; font-variant-numeric: tabular-nums; }
.fit-reset { display: flex; justify-content: flex-end; padding: 2px 0 4px; }
.fit-reset button, .pos-btns button { font-size: 13.5px; font-weight: 600; color: var(--olive); padding: 8px 12px; border-radius: var(--r-pill); background: var(--sheet-in); display: inline-flex; align-items: center; gap: 5px; }
/* 위치·정렬 */
.pos-row { display: flex; align-items: center; gap: 16px; padding-bottom: 6px; }
.nudge { position: relative; flex: none; width: 108px; height: 108px; }
.nudge button { position: absolute; width: 36px; height: 36px; border-radius: 50%; background: var(--sheet-in); color: var(--deep); display: grid; place-items: center; }
.nudge .n-up { left: 36px; top: 0; transform: rotate(90deg); } .nudge .n-down { left: 36px; bottom: 0; transform: rotate(-90deg); }
.nudge .n-left { left: 0; top: 36px; } .nudge .n-right { right: 0; top: 36px; transform: rotate(180deg); }
.pos-btns { flex: 1; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.pos-btns button { justify-content: center; padding: 11px 12px; }
.pos-btns button[disabled] { opacity: .4; }
.tbar button { width: 62px; }

/* 글꼴 · 색 판 */
.fstrip { display: flex; gap: 10px; overflow-x: auto; padding: 0 20px 12px; scrollbar-width: none; }
.fstrip::-webkit-scrollbar { display: none; }
.fc { flex: none; width: 112px; height: 96px; border-radius: 18px; background: var(--sheet-in); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; position: relative; }
.fc .g { font-size: 20px; height: 30px; line-height: 30px; white-space: nowrap; display: block; color: var(--ink); }
.fc small { font-size: 11.5px; color: var(--l2); max-width: 96px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc.on { background: #fff; box-shadow: 0 0 0 2.5px var(--olive) inset; }
.fc .st { position: absolute; top: 5px; right: 6px; color: rgba(61, 69, 32, .3); padding: 3px; }
.fc .st.on { color: var(--gold); }
.fc .st.on svg { fill: currentColor; }
.empty-msg { margin: 0 20px 12px; padding: 18px; border-radius: 18px; background: var(--sheet-in); font-size: 14px; color: var(--l2); text-align: center; line-height: 1.55; }
.pals { display: flex; gap: 10px; overflow-x: auto; padding: 4px 20px 14px; scrollbar-width: none; }
.pals::-webkit-scrollbar { display: none; }
.pal { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--deep); }
.pal .d { width: 64px; height: 44px; border-radius: 14px; display: flex; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08) inset; }
.pal .d i { flex: 1; }
.pal.on .d { box-shadow: 0 0 0 2.5px var(--olive); }
.colin { position: relative; overflow: hidden; }
.colin input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.lays { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 0 20px 14px; }
.lays button { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--deep); }
.lays .kc { border-radius: 10px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); }
.lays button.on .kc { box-shadow: 0 0 0 2.5px var(--olive); }
.field { margin: 0 20px 14px; display: flex; align-items: center; gap: 4px; background: var(--sheet-in); border-radius: var(--r-pill); padding: 0 18px; height: 54px; }
.field input { flex: 1; border: 0; background: transparent; outline: 0; font-size: 17px; min-width: 0; }
.field span { color: var(--l2); font-weight: 600; }
.hint { font-size: 13.5px; color: var(--l2); padding: 0 20px 12px; line-height: 1.55; }
.btns { display: flex; gap: 8px; padding: 4px 20px 0; }

/* 장 정리 */
.lp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 14px 26px 120px; }
.lp-it { position: relative; border-radius: 14px; touch-action: none; user-select: none; -webkit-user-select: none; transition: transform .18s; }
.lp-it .kc { border-radius: 14px; box-shadow: 0 1px 2px rgba(60, 50, 20, .06), 0 10px 18px -10px rgba(60, 50, 20, .3); pointer-events: none; }
.lp-it.on { transform: scale(1.04) rotate(-1.5deg); }
.lp-it.on .kc { box-shadow: 0 0 0 3px var(--olive), 0 16px 30px rgba(0, 0, 0, .2); }
.lp-it.drag { z-index: 10; transition: none; opacity: .92; }
.lp-it.target .kc { box-shadow: 0 0 0 3px var(--gold); }
.lp-it em { position: absolute; z-index: 2; top: -9px; left: -9px; width: 27px; height: 27px; border-radius: 50%; background: var(--deep); color: var(--beige); font: 700 13px/27px 'Inter', sans-serif; text-align: center; font-style: normal; }
.lp-add { aspect-ratio: 4 / 5; border-radius: 14px; border: 2px dashed rgba(107, 122, 58, .45); display: grid; place-items: center; color: var(--olive); }
.lp-bar { position: absolute; left: 20px; right: 20px; bottom: calc(22px + var(--sab)); display: flex; gap: 8px; }
.lp-bar button { flex: 1; height: 54px; border-radius: var(--r-pill); background: #fff; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--olive); box-shadow: 0 6px 18px rgba(60, 50, 20, .1); }
.lp-bar .del { color: var(--brick); }

/* 저장 */
.saverow { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 12px 24px 16px; scrollbar-width: none; }
.saverow::-webkit-scrollbar { display: none; }
.saverow > div { flex: none; width: min(78%, 330px); scroll-snap-align: center; }
.saverow .kc { border-radius: 14px; box-shadow: 0 1px 3px rgba(60, 50, 20, .08), 0 16px 26px -14px rgba(60, 50, 20, .35); }
.saverow small { display: block; text-align: center; font-size: 12.5px; color: var(--l2); margin-top: 8px; }
.warn { margin: 6px 20px 0; background: #FFF5DC; border-radius: 18px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
.warn b { font-size: 15.5px; display: block; }
.warn span { font-size: 13.5px; color: #6b5a33; }
.warn .ic { color: #C27C00; flex: none; }
.savebtns { margin-top: auto; padding: 14px 20px calc(18px + var(--sab)); display: flex; flex-direction: column; gap: 10px; }

/* 첫 화면 */
.lz { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lz-mark { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lz-house { overflow: visible; }
.lz-wm { display: flex; overflow: hidden; font: 800 42px/1.15 'Inter', 'Pretendard Variable', sans-serif; letter-spacing: -.05em; color: var(--deep); padding: 0 2px; }
.lz-wm span { display: inline-block; transform: translateY(105%); animation: lzUp .5s cubic-bezier(.22, 1, .36, 1) forwards; }
.lz-line { stroke-dasharray: 100; stroke-dashoffset: 100; animation: lzDraw .75s cubic-bezier(.65, 0, .35, 1) .15s forwards; }
.lz-fill { opacity: 0; transform-origin: 30px 59px; animation: lzPop .5s cubic-bezier(.34, 1.56, .64, 1) .8s forwards; }
.lz-det { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.3); animation: lzDet .45s cubic-bezier(.34, 1.56, .64, 1) 1.2s forwards; }
.lz-btn { opacity: 0; transform: translateY(10px); animation: lzBtn .5s ease 1.7s forwards; padding: 0 24px calc(28px + var(--sab)); }
@keyframes lzDraw { to { stroke-dashoffset: 0; } }
@keyframes lzPop { 0% { opacity: 0; transform: scale(.6); } 100% { opacity: 1; transform: none; } }
@keyframes lzDet { to { opacity: 1; transform: none; } }
@keyframes lzUp { to { transform: none; } }
@keyframes lzBtn { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .lz *, .lz-btn { animation: none !important; opacity: 1 !important; transform: none !important; stroke-dashoffset: 0 !important; }
  .sheet, .kbx, .stage, .stage .kc, .strip, .tools { transition: none !important; }
}

/* 알림 */
#toast { position: fixed; left: 50%; bottom: calc(110px + var(--sab)); transform: translate(-50%, 20px); background: var(--deep); color: var(--beige); font-size: 14.5px; font-weight: 600; padding: 11px 18px; border-radius: var(--r-pill); opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; z-index: 80; max-width: calc(100% - 40px); text-align: center; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
.busy { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(246, 242, 233, .7); font-weight: 700; color: var(--deep); }

/* 사진 자르기 */
.crop { position: absolute; inset: 0; background: var(--bg); display: flex; flex-direction: column; padding-top: var(--sat); pointer-events: auto; opacity: 0; transform: translateY(16px); transition: opacity .3s, transform .35s cubic-bezier(.22, 1, .36, 1); }
.open .crop { opacity: 1; transform: none; }
.crop-area { flex: 1; min-height: 0; position: relative; overflow: hidden; touch-action: none; cursor: grab; }
.crop-area:active { cursor: grabbing; }
.crop-img { position: absolute; max-width: none; user-select: none; -webkit-user-select: none; pointer-events: none; }
.crop-frame { position: absolute; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(246, 242, 233, .84); outline: 2px solid #fff; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.55)), linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.55)), linear-gradient(90deg, rgba(255,255,255,.55), rgba(255,255,255,.55)), linear-gradient(90deg, rgba(255,255,255,.55), rgba(255,255,255,.55));
  background-size: 100% 1px, 100% 1px, 1px 100%, 1px 100%; background-position: 0 33.33%, 0 66.66%, 33.33% 0, 66.66% 0; background-repeat: no-repeat; }
.crop-label { position: absolute; left: 50%; transform: translateX(-50%); background: var(--deep); color: var(--beige); font-size: 12.5px; font-weight: 700; padding: 4px 11px; border-radius: var(--r-pill); white-space: nowrap; pointer-events: none; }
.crop-foot { flex: none; padding: 6px 24px calc(18px + var(--sab)); }
/* 영상 길이 고르기 */
.crop-seg { margin: 0 0 12px; }
.vt { background: #fff; border-radius: 18px; padding: 14px 14px 10px; }
.vt-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 600; color: var(--l2); margin-bottom: 10px; }
.vt-top b { font-size: 17px; color: var(--deep); }
.vt-strip { position: relative; height: 54px; border-radius: 10px; overflow: hidden; background: var(--sheet-in); touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; outline: none; }
.vt-strip:focus-visible { box-shadow: 0 0 0 3px rgba(107, 122, 58, .35); }
.vt-th { position: absolute; inset: 0; display: flex; }
.vt-th i { flex: 1; background: var(--sheet-in) center/cover; }
.vt-sh { position: absolute; top: 0; bottom: 0; background: rgba(246, 242, 233, .8); pointer-events: none; }
.vt-sel { position: absolute; top: 0; bottom: 0; border: 3px solid var(--olive); border-left-width: 14px; border-right-width: 14px; border-radius: 10px; pointer-events: none; box-sizing: border-box; }
.vt-sel::before, .vt-sel::after { content: ''; position: absolute; top: 50%; width: 3px; height: 16px; margin-top: -8px; background: var(--beige); border-radius: 2px; }
.vt-sel::before { left: -8.5px; } .vt-sel::after { right: -8.5px; }
.vt-hd { position: absolute; top: 4px; bottom: 4px; width: 3px; margin-left: -1.5px; background: var(--deep); border-radius: 2px; box-shadow: 0 0 0 1.5px #fff; pointer-events: none; }
.vt-ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--l2); margin-top: 6px; }
.vt-bot { display: flex; align-items: center; gap: 10px; margin-top: 10px; background: #fff; border-radius: var(--r-pill); padding: 6px 8px 6px 6px; }
.vt-play { width: 40px; height: 40px; border-radius: 50%; background: var(--deep); color: var(--beige); display: grid; place-items: center; flex: none; }
.vt-pt { flex: 1; font-size: 13.5px; font-weight: 600; color: var(--deep); }
.vt-snd { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--deep); }
.vt-tog { width: 46px; height: 28px; border-radius: 999px; background: rgba(61, 69, 32, .18); position: relative; transition: background .2s; }
.vt-tog::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); transition: transform .2s; }
.vt-tog.on { background: var(--olive); } .vt-tog.on::after { transform: translateX(18px); }
.zoomrow { display: flex; align-items: center; gap: 12px; color: var(--deep); }
.zoomrow .rng { flex: 1; margin: 6px 0; }
.crop-foot .hint { text-align: center; padding: 2px 0 10px; }

/* ---------- 움직임: 화면이 뚝 끊기지 않게 ---------- */
:root { --ease: cubic-bezier(.22, 1, .36, 1); }
#ghost { position: fixed; inset: 0; margin: 0 auto; max-width: 520px; overflow: hidden; pointer-events: none; z-index: 40; }
#ghost:empty { display: none; }
#ghost > .scr { background: var(--bg); }
#ghost > .lay { position: absolute; inset: 0; }
#ghost.out-fwd > * { animation: gOutFwd .36s var(--ease) forwards; }
#ghost.out-back > * { animation: gOutBack .34s var(--ease) forwards; }
#ghost.out-fade > * { animation: gOutFade .3s ease forwards; }
.scr.in-fwd { animation: gInFwd .42s var(--ease); }
.scr.in-back { animation: gInBack .42s var(--ease); }
.scr.in-fade { animation: gInFade .38s var(--ease); }
@keyframes gOutFwd { to { opacity: 0; transform: translateX(-32px); } }
@keyframes gOutBack { to { opacity: 0; transform: translateX(56px); } }
@keyframes gOutFade { to { opacity: 0; transform: scale(.985); } }
@keyframes gInFwd { from { opacity: 0; transform: translateX(44px); } }
@keyframes gInBack { from { opacity: 0; transform: translateX(-24px); } }
@keyframes gInFade { from { opacity: 0; transform: translateY(10px); } }

/* 템플릿 칩을 바꾸면 카드가 하나씩 올라와요 */
.trow.swap > * { animation: gRise .42s var(--ease) both; }
.trow.swap > :nth-child(2) { animation-delay: .04s; }
.trow.swap > :nth-child(3) { animation-delay: .08s; }
.trow.swap > :nth-child(4) { animation-delay: .12s; }
@keyframes gRise { from { opacity: 0; transform: translateY(12px); } }

/* 템플릿 카드 아래 장 이름 */
.trow > button.tcard { width: 112px; border-radius: 0; overflow: visible; box-shadow: none; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--l2); text-align: center; padding-bottom: 4px; }
.tcard .kc { border-radius: 12px; box-shadow: 0 0 0 1px rgba(60, 50, 20, .05), 0 10px 16px -10px rgba(60, 50, 20, .3); }

/* 누르면 살짝 눌리는 느낌 */
.bigbtn, .ghost, .pill, .chip, .circ, .row, .tcard, .tools button, .tabbar button, .th, .signin, .lp-bar button, .lp-add, .pal, .fc, .lays button, .one-q button, .tbar button {
  transition: transform .2s var(--ease), background-color .25s, color .25s, box-shadow .25s;
}
:is(.bigbtn, .ghost, .pill, .chip, .circ, .tcard, .tools button, .tabbar button, .th, .signin, .lp-bar button, .lp-add, .pal, .fc, .lays button, .one-q button, .tbar button):active { transform: scale(.95); }
.row:active { transform: scale(.985); }
.fab { transition: transform .2s var(--ease); }
.fab:active { transform: translateX(-50%) scale(.95); }
.car > button.mid:active { transform: scale(.97); }

@media (prefers-reduced-motion: reduce) {
  #ghost > *, .scr[class*="in-"], .trow.swap > * { animation: none !important; }
  .car > button { transition: none; }
}

/* ---------- 둥근 모서리 · 로고 버튼 ---------- */
.wm { align-self: flex-start; border-radius: 14px; margin: 4px 8px 0; padding: 10px 12px 10px; -webkit-tap-highlight-color: transparent; transform-origin: 30% 50%; transition: transform .42s cubic-bezier(.34, 1.56, .64, 1); }
.wm:focus { outline: none; }
.wm:focus-visible { outline: 2px solid var(--olive); outline-offset: 2px; }
/* 쏙 눌림: 누르는 동안 살짝 작아지고, 떼면 탄력 있게 돌아와요 */
.wm:active { transform: scale(.93); transition-duration: .1s; transition-timing-function: ease-out; }
.wm.hop { animation: wmPress .42s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes wmPress { 0% { transform: scale(1); } 30% { transform: scale(.93); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .wm, .wm:active { transition: none; } .wm.hop { animation: none; } }
/* 컴퓨터처럼 넓은 화면에서는 앱이 둥근 폰 화면처럼 보여요 */
@media (min-width: 600px) and (min-height: 640px) {
  body { background: #E6E0D3; }
  #app, #ghost, #layer { top: 22px; bottom: 22px; border-radius: 36px; overflow: hidden; }
  #app { box-shadow: 0 0 0 1px rgba(61, 69, 32, .07), 0 30px 70px -20px rgba(61, 69, 32, .28); }
  #toast { bottom: 128px; }
}

a { color: inherit; text-decoration: none; }

/* ---------- 내 작업 ---------- */
.lt-title { font-size: 28px; padding: 14px 22px 14px; display: flex; align-items: baseline; gap: 8px; }
.lt-title small { font-size: 15px; font-weight: 600; color: var(--l2); letter-spacing: 0; }
.sech.top { padding-top: 6px; padding-bottom: 0; }
.works { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 14px; padding: 4px 20px 0; }
.wk { min-width: 0; }
.wk-c { display: block; width: 100%; position: relative; border-radius: 16px; transition: transform .2s var(--ease); }
.wk-c:active { transform: scale(.97); }
.wk-c .kc { border-radius: 16px; box-shadow: 0 0 0 1px rgba(60, 50, 20, .05), 0 12px 18px -12px rgba(60, 50, 20, .35); }
.wk-c em { position: absolute; right: 8px; bottom: 8px; font-style: normal; font-size: 11.5px; font-weight: 700; color: #fff; background: rgba(29, 29, 31, .55); padding: 3px 8px; border-radius: var(--r-pill); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.wk-t { display: flex; align-items: flex-start; gap: 4px; padding: 9px 2px 0 4px; }
.wk-t > div { flex: 1; min-width: 0; }
.wk-t b { display: block; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-t small { font-size: 12.5px; color: var(--l2); }
.wk-m { width: 30px; height: 30px; border-radius: 50%; font-size: 18px; line-height: 1; color: var(--l2); flex: none; transition: background-color .2s; }
.wk-m:active { background: var(--fill); }
.works-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 70px 32px 20px; }
.works-empty b { font-size: 18px; margin-top: 10px; }
.works-empty span { font-size: 14.5px; color: var(--l2); margin-bottom: 18px; }
.works-empty .bigbtn { max-width: 260px; }

/* ---------- 내 정보: 한 판에 묶은 목록 ---------- */
.me .ghdr { padding: 0 26px 8px; font-size: 13px; }
.me .gft { padding: 0 26px; margin: -10px 0 26px; font-size: 12.5px; }
.me-head { display: flex; align-items: center; gap: 14px; width: calc(100% - 32px); margin: 0 16px 26px; padding: 16px 16px 16px 16px; background: #fff; border-radius: 24px; text-align: left; box-shadow: 0 0 0 1px rgba(60, 50, 20, .04); transition: transform .2s var(--ease); }
.me-head:active { transform: scale(.985); }
.me-av { width: 54px; height: 54px; border-radius: 18px; background: var(--olive); display: grid; place-items: center; flex: none; }
.me-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.me-id b { font-size: 17.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-id small { font-size: 13px; color: var(--l2); }
.me-head .chev, .li .chev { color: rgba(60, 60, 67, .3); display: flex; }
.list { margin: 0 16px 22px; background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 0 0 1px rgba(60, 50, 20, .04); }
.li { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 0 14px 0 18px; text-align: left; font-size: 16px; position: relative; transition: background-color .15s; }
.li:active { background: rgba(107, 122, 58, .07); }
.li + .li::before { content: ""; position: absolute; top: 0; right: 0; left: 18px; height: 1px; background: var(--sep); }
.li:has(.lic) + .li::before, .li:has(.lic)::before { left: 58px; }
.lic { width: 30px; height: 30px; border-radius: 10px; background: var(--fill); color: var(--olive); display: grid; place-items: center; flex: none; margin-left: -4px; }
.lt { flex: 1; min-width: 0; }
.lv { color: var(--l2); font-size: 15px; display: flex; align-items: center; gap: 4px; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv .dot { width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08) inset; display: inline-block; }
.me .copyright { font-size: 12px; padding: 6px 20px 30px; opacity: .85; }

/* ---------- 플랜 ---------- */
.ptag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--olive); background: var(--fill); border-radius: var(--r-pill); padding: 2px 7px 2px 6px; vertical-align: 2px; margin-left: 6px; }
.tcard { position: relative; }
.tcard .ptag { position: absolute; left: 6px; top: 6px; z-index: 2; margin: 0; background: rgba(253, 252, 248, .92); }
.chip svg { margin-right: 4px; vertical-align: -1px; opacity: .7; }
.fc { position: relative; }
.fc .lk { position: absolute; left: 7px; top: 7px; width: 20px; height: 20px; border-radius: 50%; background: var(--fill); color: var(--olive); display: grid; place-items: center; }
.fc.locked .g { opacity: .55; }
.plan-why { display: flex; align-items: center; gap: 6px; justify-content: center; margin: 2px 20px 6px; font-size: 13.5px; font-weight: 600; color: var(--olive); }
.plan-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 10px 24px 18px; }
.plan-hero b { font-size: 22px; margin-top: 6px; }
.plan-hero span { font-size: 14.5px; color: var(--l2); }
.fine { font-size: 11.5px; color: var(--l2); line-height: 1.6; padding: 12px 26px 4px; text-align: center; }
.planbar { display: flex; align-items: center; gap: 10px; width: calc(100% - 32px); margin: 0 16px 10px; padding: 12px 14px; border-radius: 18px; background: #fff; text-align: left; font-size: 13.5px; color: var(--deep); }
.planbar svg { color: var(--olive); flex: none; }
.planbar span { flex: 1; min-width: 0; line-height: 1.45; }
.planbar em { font-style: normal; font-weight: 700; color: var(--olive); white-space: nowrap; }
.sv { position: relative; }
.sv { container-type: inline-size; }
.sv .wmk { position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 4 / 5; display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 3.9cqw 3.3cqw 0; font: 700 2.41cqw Inter, sans-serif; font-style: normal; color: rgba(255, 255, 255, .75); text-shadow: 0 0 2px rgba(0, 0, 0, .35); pointer-events: none; }

/* ---------- 크기 고르기 ---------- */
.car { align-items: center; }
.fmts { display: flex; gap: 10px; padding: 0 20px 16px; }
.fmts button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 6px 10px; border-radius: 16px; background: var(--sheet-in); transition: transform .2s var(--ease), box-shadow .2s; }
.fmts button.on { box-shadow: 0 0 0 2.5px var(--olive); background: #fff; }
.fmts i { display: block; height: 38px; border-radius: 5px; border: 2px solid currentColor; color: var(--olive); opacity: .75; margin-bottom: 5px; }
.fmts b { font-size: 14.5px; }
.fmts small { font-size: 12px; color: var(--l2); font-family: Inter, sans-serif; }
.fmtseg { margin: 14px 20px 2px; }
.mk-fmt small { font-family: inherit; text-align: center; word-break: keep-all; line-height: 1.3; }
.fmtseg small { font-size: 12px; opacity: .7; font-family: Inter, sans-serif; }
.saverow.story > div { width: min(62%, 260px); }
.svmore { margin: 18px 16px 10px; background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 0 0 1px rgba(60, 50, 20, .04); }
.svmore .lt small { display: block; font-size: 12.5px; color: var(--l2); margin-top: 1px; }
.svmore .li { min-height: 60px; }
.pill.soft { background: var(--fill); color: var(--olive); }

/* ---------- 맞춤법 ---------- */
button.warn { width: calc(100% - 40px); text-align: left; }
.warn.spell { background: #EEF0E2; margin-top: 10px; }
.warn.spell .ic { color: var(--olive); }
.warn.spell span { color: var(--l2); }
.warn .link { align-self: center; color: var(--olive); font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.okline { display: flex; align-items: center; gap: 6px; justify-content: center; font-size: 13.5px; color: var(--olive); padding: 12px 20px 0; font-weight: 600; }
.row.sp { align-items: center; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.sp-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sp-t small { font-size: 12px; color: var(--l2); }
.sp-a, .sp-b { font-size: 15.5px; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; white-space: pre-wrap; }
.sp-a { color: var(--l2); }
.sp-a mark { background: rgba(181, 82, 59, .14); color: var(--brick); text-decoration: line-through; border-radius: 4px; padding: 0 2px; }
.sp-b mark { background: rgba(107, 122, 58, .18); color: var(--deep); font-weight: 700; border-radius: 4px; padding: 0 2px; }
.row.sp .pill { flex: none; }

/* ---------- 인스타 미리보기 ---------- */
.igv { background: var(--bg); }
.igv .seg { margin: 4px 20px 12px; }
.igv .scroll { padding-bottom: calc(24px + var(--sab)); }
.igv .hint { padding: 12px 24px; }
.igp { background: #fff; margin: 0 0 4px; position: relative; box-shadow: 0 0 0 1px rgba(60, 50, 20, .05); }
.igp-h, .igs-h { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 14px; }
.igp-h b, .igs-h b { font-weight: 600; font-family: Inter, 'Pretendard Variable', sans-serif; }
.igp-more { margin-left: auto; font-size: 18px; color: var(--ink); }
.igav { width: 32px; height: 32px; border-radius: 50%; background: var(--olive); display: grid; place-items: center; flex: none; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #d8cfb6; }
.igav.big { width: 78px; height: 78px; }
.igav.big svg { width: 34px; height: 37px; }
.igcar { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.igcar::-webkit-scrollbar { display: none; }
.igcar > .sv { flex: none; width: 100%; scroll-snap-align: start; }
.igcar .kc { border-radius: 0; }
.igp-a { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 10px 12px 4px; color: var(--ink); }
.igp-a > span:first-child { display: flex; gap: 14px; }
.igp-a > span:last-child { justify-self: end; }
.igdots { display: flex; gap: 4px; }
.igdots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(0, 0, 0, .2); transition: background-color .2s; }
.igdots i.on { background: #3897f0; }
.igp-c { padding: 4px 14px 2px; font-size: 14px; line-height: 1.45; word-break: keep-all; }
.igp-c b { font-weight: 600; font-family: Inter, 'Pretendard Variable', sans-serif; margin-right: 4px; }
.igp-t { display: block; padding: 2px 14px 14px; font-size: 11.5px; color: var(--l2); }
.igp-n { position: absolute; right: 12px; top: 62px; z-index: 3; background: rgba(29, 29, 31, .6); color: #fff; font: 600 12px/1 Inter, sans-serif; padding: 6px 9px; border-radius: var(--r-pill); }
.igs { position: relative; width: min(calc(100% - 40px), calc((100dvh - 230px) * 9 / 16)); margin: 0 auto; border-radius: 14px; overflow: hidden; background: #111; }
.igs .igcar .kc { border-radius: 0; }
.igs-bars { position: absolute; z-index: 3; left: 8px; right: 8px; top: 8px; display: flex; gap: 3px; }
.igs-bars i { flex: 1; height: 2.5px; border-radius: 2px; background: rgba(255, 255, 255, .4); }
.igs-bars i.on { background: #fff; }
.igs-h { position: absolute; z-index: 3; left: 0; right: 0; top: 14px; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.igs-h small { opacity: .8; font-size: 12.5px; }
.igs-h .igav { width: 28px; height: 28px; box-shadow: none; }
.igpro { padding: 4px 0 0; }
.igpro-h { display: flex; align-items: center; gap: 18px; padding: 6px 20px 18px; }
.igpro-h b { display: block; font-size: 17px; font-family: Inter, 'Pretendard Variable', sans-serif; }
.igpro-h span { font-size: 13.5px; color: var(--l2); }
.iggrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.igt { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: #E6E2D6; }
.igt.empty { background: #ECE8DD; }
.igt-in { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.igt .kc { border-radius: 0; }
.igt-m { position: absolute; right: 6px; top: 6px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .4)); }
.igt.me::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 3px var(--olive); pointer-events: none; }

/* ---------- 시리즈 폴더 ---------- */
.wk-c.folder { margin-top: 8px; }
.wk-c.folder::before, .wk-c.folder::after { content: ""; position: absolute; left: 8%; right: 8%; top: -8px; height: 30px; border-radius: 14px 14px 0 0; background: #E3DECF; z-index: -1; }
.wk-c.folder::after { left: 4%; right: 4%; top: -4px; background: #D8D2C0; }
.wk-c.folder em { display: flex; align-items: center; gap: 4px; }
.wk { position: relative; z-index: 0; }

/* 내 작업이 비었을 때: 그림과 문구를 화면 가운데에 */
.scroll.is-empty { display: flex; flex-direction: column; }
.scroll.is-empty .works-empty { flex: 1; justify-content: center; padding: 0 32px 7vh; }
.warn.spell.locked .ic { color: var(--l2); }
.warn.spell .ptag { align-self: center; flex: none; }

/* ---------- 플랜 화면 (베이직 · 키트 · 하우스) ---------- */
.pcs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 4px 16px 0; }
.pc { position: relative; text-align: left; background: #fff; border-radius: 20px; padding: 14px 11px 12px; display: flex; flex-direction: column; gap: 1px; min-height: 128px; box-shadow: 0 0 0 1px rgba(60, 50, 20, .06); transition: background-color .3s var(--ease), color .3s, transform .3s var(--ease), box-shadow .3s; }
.pc:active { transform: scale(.97); }
.pc:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }
.pc-dot { width: 18px; height: 18px; border-radius: 50%; border: 1.8px solid rgba(60, 60, 67, .25); margin-bottom: 10px; display: grid; place-items: center; transition: border-color .3s, background-color .3s; }
.pc-nm { font-size: 14px; font-weight: 700; }
.pc-pr { font: 800 17px 'Inter', 'Noto Sans KR', sans-serif; letter-spacing: -.03em; margin-top: 2px; }
.pc-pe { font-size: 11px; color: var(--l2); }
.pc-nt { margin-top: auto; padding-top: 8px; font-size: 11px; line-height: 1.35; color: var(--l2); }
.pc-bd { position: absolute; top: -9px; right: 8px; background: var(--gold); color: #fff; font-size: 10.5px; font-weight: 800; padding: 3px 8px; border-radius: var(--r-pill); white-space: nowrap; box-shadow: 0 4px 10px -4px rgba(224, 161, 0, .6); }
.pc.on { background: var(--deep); color: var(--beige); transform: translateY(-3px); box-shadow: 0 14px 22px -12px rgba(61, 69, 32, .6); }
.pc.on .pc-pe, .pc.on .pc-nt { color: rgba(243, 239, 227, .72); }
.pc.on .pc-dot { border-color: var(--beige); background: var(--beige); }
.pc.on .pc-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--deep); }
.ptab { --lw: 138px; position: relative; margin: 16px 16px 0; background: #fff; border-radius: 22px; padding: 6px 0; box-shadow: 0 0 0 1px rgba(60, 50, 20, .05); }
.ptab-band { position: absolute; top: 6px; bottom: 6px; width: calc((100% - var(--lw)) / 3 - 8px); left: calc(var(--lw) + (100% - var(--lw)) / 3 * var(--i, 1) + 4px); border-radius: 14px; background: var(--fill); transition: left .4s var(--ease); }
.pt-r { position: relative; display: grid; grid-template-columns: var(--lw) repeat(3, 1fr); align-items: center; min-height: 44px; font-size: 13px; text-align: center; }
.pt-r + .pt-r::before { content: ""; position: absolute; top: 0; left: 14px; right: 14px; height: 1px; background: rgba(61, 69, 32, .08); }
.pt-r > span:first-child { text-align: left; padding-left: 14px; white-space: nowrap; display: flex; align-items: center; gap: 7px; font-weight: 500; }
.pt-r > span:first-child svg { color: var(--olive); flex: none; }
.pt-ok { color: var(--olive); font-weight: 800; }
.pt-no { color: rgba(60, 60, 67, .28); font-weight: 700; }
.pfree { text-align: center; font-size: 12px; color: var(--l2); margin: 12px 24px 0; }
.pcta { padding: 16px 16px 0; }
.pcta .bigbtn.soft { background: var(--fill); }
.psub { text-align: center; font-size: 12.5px; font-weight: 700; color: var(--olive); margin-top: 8px; min-height: 18px; }
.plinks { display: flex; justify-content: center; gap: 14px; margin-top: 10px; font-size: 12px; }
.plinks a, .plinks button { color: var(--l2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(60, 60, 67, .25); font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .pc, .ptab-band { transition: none; } }

/* ---------- 홈 (작업대) ---------- */
.hbar { display: flex; align-items: center; justify-content: space-between; padding-right: 16px; }
.hrec { display: flex; align-items: flex-start; gap: 10px; overflow-x: auto; padding: 10px 20px 4px; scrollbar-width: none; }
.hrec::-webkit-scrollbar { display: none; }
.hr-c { flex: none; width: 96px; text-align: left; display: flex; flex-direction: column; transition: transform .2s var(--ease); }
.hr-c:active { transform: scale(.97); }
.hr-k { position: relative; display: block; }
.hr-k .kc { border-radius: 10px; box-shadow: 0 0 0 1px rgba(60, 50, 20, .05), 0 10px 14px -10px rgba(60, 50, 20, .35); }
.hr-k em { position: absolute; right: 5px; bottom: 5px; font-style: normal; font-size: 10.5px; font-weight: 700; color: #fff; background: rgba(29, 29, 31, .55); padding: 2px 6px; border-radius: var(--r-pill); }
.hr-c.folder { padding-top: 6px; }
.hr-c.folder .hr-k::before { content: ""; position: absolute; left: 9%; right: 9%; top: -6px; height: 20px; border-radius: 9px 9px 0 0; background: #E3DECF; z-index: -1; }
.hr-c b { font-size: 12.5px; font-weight: 600; margin-top: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr-c small { font-size: 11px; color: var(--l2); }
.hsticky { position: sticky; top: 0; z-index: 3; background: var(--bg); }
.hsticky .chips { padding-bottom: 12px; }
.hg { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 12px; padding: 4px 20px 0; }
.hg-c { position: relative; text-align: left; display: flex; flex-direction: column; min-width: 0; transition: transform .2s var(--ease); }
.hg-c:active { transform: scale(.98); }
.hg-c .kc { border-radius: 14px; box-shadow: 0 0 0 1px rgba(60, 50, 20, .05), 0 12px 18px -12px rgba(60, 50, 20, .35); }
.hg-c .ptag { position: absolute; left: 8px; top: 8px; z-index: 2; margin: 0; background: rgba(253, 252, 248, .92); }
.hg-c b { font-size: 15px; font-weight: 700; margin-top: 9px; }
.hg-c small { font-size: 12.5px; color: var(--l2); line-height: 1.4; }
.hg-none { grid-column: 1 / -1; text-align: center; color: var(--l2); font-size: 14px; padding: 40px 20px; }
.hg.swap > * { animation: gRise .42s var(--ease) both; }
.hg.swap > :nth-child(2) { animation-delay: .04s; }
.hg.swap > :nth-child(3) { animation-delay: .08s; }
.hg.swap > :nth-child(4) { animation-delay: .12s; }

[hidden] { display: none !important; }

/* ---------- 맞춤법: 고친 글 미리보기 ---------- */
.tbar .tsp { position: relative; }
.tbar .tlk { position: absolute; top: 2px; right: 8px; width: 15px; height: 15px; border-radius: 50%; background: var(--deep); color: var(--beige); display: grid; place-items: center; font-style: normal; }
.sp-lbl { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 2px 22px 8px; font-size: 13.5px; font-weight: 700; color: var(--l2); }
.sp-lbl .link { font-size: 13.5px; }
.sp-txt { margin: 0 20px 10px; background: #fff; border-radius: 16px; padding: 14px 16px; font-size: 16px; line-height: 1.8; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.sp-txt small { display: block; font-size: 12px; color: var(--l2); line-height: 1.4; margin-bottom: 4px; }
mark.sp-o { background: #FBE3B0; color: #7A5410; border-radius: 4px; padding: 0 2px; }
mark.sp-f { background: #DCE6BF; color: #2F3A12; font-weight: 700; border-radius: 4px; padding: 0 2px; }
mark.sp-gap { display: inline-block; width: 7px; height: 1.05em; vertical-align: -.15em; background: #DCE6BF; border-radius: 3px; margin: 0 1px; }
.sp-note { font-size: 12.5px; color: var(--l2); padding: 0 24px 4px; line-height: 1.5; }
.sp-btns { display: flex; flex-direction: column; gap: 8px; padding: 10px 20px 0; }
.sp-btns .bigbtn.soft { background: var(--fill); }
.sp-btns .bigbtn[disabled] { opacity: .45; }
.row.sp-ck { width: 100%; text-align: left; align-items: center; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.sp-box { width: 22px; height: 22px; border-radius: 7px; background: var(--olive); color: #fff; display: grid; place-items: center; flex: none; transition: background-color .2s; }
.sp-ck[aria-pressed="false"] .sp-box { background: none; box-shadow: inset 0 0 0 1.8px rgba(60, 60, 67, .3); }
.sp-pr { display: flex; flex-direction: column; font-size: 15px; line-height: 1.45; min-width: 0; }
.sp-pr b { color: var(--deep); }
.sp-pr small { font-size: 12px; color: var(--l2); }

/* ---------- 장 디자인 ---------- */
.k-rc, .k-ic, .k-pane { position: absolute; pointer-events: none; }
.k-tx.deco { pointer-events: none; }
.k-num { position: absolute; left: 0; border-radius: 50%; display: grid; place-items: center; font-family: 'Inter', sans-serif; font-weight: 800; line-height: 1; -webkit-text-stroke: 0; text-shadow: none; }
.k-ph.empty span { pointer-events: none; }
.lays.dz { display: flex; overflow-x: auto; scrollbar-width: none; padding-top: 4px; }
.lays.dz::-webkit-scrollbar { display: none; }
.lays.dz button { flex: none; width: 92px; position: relative; }
.lays .ptag { position: absolute; left: 5px; top: 5px; z-index: 2; margin: 0; background: rgba(253, 252, 248, .92); }
/* 새 카드뉴스 */
.mk-picked { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 20px 14px; background: #fff; border-radius: 20px; padding: 10px; box-shadow: 0 0 0 1px rgba(60, 50, 20, .06); }
.mk-pk { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--l2); text-align: center; }
.mk-pk .kc { border-radius: 8px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06); transition: box-shadow .25s; }
.mk-pk.on { color: var(--deep); font-weight: 700; }
.mk-pk.on .kc { box-shadow: 0 0 0 2.5px var(--olive); }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px 12px; padding: 0 20px 10px; }
.mk-grid.swap { animation: mkIn .35s cubic-bezier(.22, 1, .36, 1); }
@keyframes mkIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.mk-op { position: relative; display: flex; flex-direction: column; gap: 6px; text-align: left; font-size: 13px; color: var(--ink); }
.mk-op b { font-weight: 600; }
.mk-op .kc { border-radius: 12px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .07); transition: box-shadow .2s; }
.mk-op.on .kc { box-shadow: 0 0 0 3px var(--olive); }
.mk-op .ptag { position: absolute; right: 8px; top: 8px; left: auto; z-index: 2; margin: 0; background: rgba(253, 252, 248, .92); }
.mk-op.on .ptag { display: none; }
.mk-ck { position: absolute; right: 8px; top: 8px; z-index: 2; width: 24px; height: 24px; border-radius: 50%; background: var(--olive); color: #fff; display: grid; place-items: center; }
.mk-go { position: sticky; bottom: 0; z-index: 4; padding: 14px 20px 4px; background: linear-gradient(rgba(253, 252, 248, 0), var(--sheet) 30%); }
@media (prefers-reduced-motion: reduce) { .mk-grid.swap { animation: none; } }

/* ---------- 영상 칸 ---------- */
.k-ph video { display: block; pointer-events: none; }
.k-vb { position: absolute; right: 26px; top: 26px; width: 76px; height: 76px; border-radius: 50%; background: rgba(0, 0, 0, .48); display: grid; place-items: center; pointer-events: none; }
.k-vs { position: absolute; right: 112px; top: 44px; padding: 6px 16px; border-radius: 999px; background: rgba(0, 0, 0, .48); color: #fff; font: 700 30px/1.2 Inter, 'Noto Sans KR', sans-serif; font-style: normal; pointer-events: none; }
.k-vb svg { width: 40px; height: 40px; margin-left: 5px; }
video.crop-img { position: absolute; max-width: none; pointer-events: none; }

/* ---------- 로그인 ---------- */
.login { background: var(--bg); }
.lg-in { flex: 1; display: flex; flex-direction: column; padding: 34px 28px calc(22px + var(--sab)); color: var(--deep); word-break: keep-all; overflow-y: auto; }
.lg-brand { display: flex; align-items: center; gap: 8px; font: 800 21px/1 'Inter', 'Pretendard Variable', sans-serif; letter-spacing: -.04em; }
.lg-badge { align-self: flex-start; font-size: 13px; font-weight: 700; color: #fff; background: #B08D4E; border-radius: 999px; padding: 6px 13px; }
.lg-hd { font-size: 34px; font-weight: 800; line-height: 1.3; letter-spacing: -.035em; margin: 14px 0 0; }
.lg-sub { font-size: 16px; line-height: 1.55; color: #6d6b5c; margin: 12px 0 0; }
.lg-list { margin-top: 26px; padding-top: 10px; border-top: 1px solid rgba(61, 69, 32, .1); }
.lg-li { display: flex; align-items: center; gap: 12px; font-size: 16px; padding: 8px 0; }
.lg-li p { margin: 0; }
.lg-li b { display: block; font-weight: 600; }
.lg-li small { display: block; font-size: 13px; color: #8a8775; margin-top: 2px; }
.lg-li span { width: 30px; height: 30px; border-radius: 50%; background: #EEF0E2; color: var(--olive); display: flex; align-items: center; justify-content: center; flex: none; }
.lg-sp { flex: 1; min-height: 28px; }
.lg-sp.sm { flex: .55; min-height: 16px; }
.lg-btns { width: 86%; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.lg-bt { height: 50px; border-radius: 25px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 16px; font-weight: 600; transition: transform .2s var(--ease); }
.lg-bt:active { transform: scale(.96); }
.lg-bt.ap { background: #111; color: #fff; }
.lg-bt.go { background: #fff; color: #1f1f1f; box-shadow: 0 0 0 1px rgba(60, 50, 20, .14); }
.lg-fine { font-size: 12px; color: #8a8775; text-align: center; line-height: 1.6; margin-top: 18px; }
.lg-fine a { color: inherit; text-decoration: underline; }
