:root {
  /* 마인즈비서와 같은 색·둥글기 값 */
  --radius: 0.625rem;
  --background: oklch(0.985 0.01 92);
  --foreground: oklch(0.255 0.04 208);
  --card: oklch(0.995 0.004 95);
  --primary: oklch(0.329 0.124 278.3);
  --primary-foreground: oklch(0.985 0.004 96);
  --secondary: oklch(0.957 0.018 82);
  --muted: oklch(0.952 0.008 98);
  --muted-foreground: oklch(0.56 0.02 278.3);
  --accent: oklch(0.945 0.022 278.3);
  --accent-foreground: oklch(0.285 0.035 278.3);
  --destructive: oklch(0.577 0.245 27.325);
  --border: oklch(0.89 0.012 96);
  --input: oklch(0.905 0.012 96);
  --ring: oklch(0.55 0.09 278.3);
  --sidebar: oklch(0.988 0.008 95);
  --ok: oklch(0.52 0.104 165); --okbg: oklch(0.95 0.04 165);
  --warn: oklch(0.52 0.12 70); --warnbg: oklch(0.96 0.05 85);
  --err: oklch(0.5 0.2 27); --errbg: oklch(0.95 0.035 25);
  /* 기존 화면에서 쓰던 이름도 같은 값으로 연결 */
  --ink: var(--foreground); --sub: var(--muted-foreground); --line: var(--border); --bg: var(--background); --brand: var(--primary);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; color: var(--foreground); background: var(--background); font-size: 14.5px; line-height: 1.6;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", sans-serif;
  background-image: radial-gradient(circle at top left, rgba(13,110,110,.14), transparent 34%),
    radial-gradient(circle at top right, rgba(201,151,92,.16), transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,.9) 0%, rgba(249,245,237,.95) 100%);
  background-attachment: fixed; }
a { color: var(--primary); }
.surface { border-radius: 1.75rem; border: 1px solid color-mix(in oklch, var(--border) 70%, transparent);
  background: color-mix(in oklch, var(--card) 90%, transparent); box-shadow: 0 28px 80px -42px rgba(13,77,77,.38); backdrop-filter: blur(4px); }

/* ── 왼쪽 사이드바 ── */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 40; }
.sidebar-in { margin: 12px; height: calc(100vh - 24px); display: flex; flex-direction: column; border-radius: 2rem;
  border: 1px solid rgba(255,255,255,.7); background: color-mix(in oklch, var(--sidebar) 85%, transparent);
  box-shadow: 0 28px 70px -38px rgba(13,77,77,.4); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid color-mix(in oklch, var(--border) 70%, transparent); }
.logo { width: 42px; height: 42px; flex: none; border-radius: 14px; background: var(--primary); color: var(--primary-foreground);
  font-size: 12.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; letter-spacing: -.02em;
  box-shadow: 0 18px 36px -24px rgba(13,105,106,.55); }
.brand-text { min-width: 0; display: flex; flex-direction: column; }
.brand-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 12px; color: var(--muted-foreground); }
.sidebar nav { flex: 1; display: flex; flex-direction: column; overflow-y: auto; padding: 0 12px 12px; }
.nav-label { padding: 14px 12px 8px; font-size: 11px; font-weight: 600; letter-spacing: .22em; color: var(--muted-foreground); }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 4px; border-radius: 1rem; border: 1px solid transparent;
  font-size: 14px; color: var(--muted-foreground); text-decoration: none; transition: all .15s; }
.nav-item .ic { color: color-mix(in oklch, var(--primary) 90%, transparent); }
.nav-item:hover { border-color: color-mix(in oklch, var(--primary) 10%, transparent); background: rgba(255,255,255,.7); color: var(--foreground); }
.nav-item.on { border-color: color-mix(in oklch, var(--primary) 15%, transparent); background: color-mix(in oklch, var(--primary) 95%, transparent);
  color: var(--primary-foreground); box-shadow: 0 16px 32px -22px rgba(13,105,106,.7); }
.nav-item.on .ic { color: var(--primary-foreground); }
.nav-item span { flex: 1; }
.ic { width: 18px; height: 18px; flex: none; }
.badge { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: #f43f5e; color: #fff; font-size: 11px; font-weight: 600; text-align: center; }
.nav-spacer { flex: 1; min-height: 8px; }
.hsel { margin: 0 0 4px; border-radius: 1rem !important; background: rgba(255,255,255,.7) !important; font-weight: 600; }
.userbox { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid color-mix(in oklch, var(--border) 70%, transparent); }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; background: color-mix(in oklch, var(--primary) 10%, transparent); color: var(--primary);
  font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.user-text { flex: 1; min-width: 0; } .user-text p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-name { font-size: 14px; font-weight: 500; } .user-role { font-size: 12px; color: var(--muted-foreground); }

/* ── 본문 영역 ── */
.has-shell .content { margin-left: 272px; }
main { max-width: 1120px; margin: 0 auto; padding: 28px 28px 80px; }
.mobilebar, .scrim { display: none; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 4px 0 18px; color: var(--foreground); }
h2 { font-size: 16px; font-weight: 600; margin: 0 0 12px; letter-spacing: -.01em; }
h3 { font-size: 14.5px; font-weight: 600; margin: 16px 0 6px; }
.card { background: color-mix(in oklch, var(--card) 90%, transparent); border: 1px solid color-mix(in oklch, var(--border) 70%, transparent);
  border-radius: 1.5rem; padding: 20px 22px; margin-bottom: 16px; box-shadow: 0 18px 48px -36px rgba(13,77,77,.28); backdrop-filter: blur(4px); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid > .card { margin-bottom: 0; } .grid { margin-bottom: 16px; }
.stats { display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr); margin-bottom: 16px; }
.stat { background: color-mix(in oklch, var(--card) 90%, transparent); border: 1px solid color-mix(in oklch, var(--border) 70%, transparent);
  border-radius: 1.5rem; padding: 18px 20px; box-shadow: 0 18px 48px -36px rgba(13,77,77,.28); }
.stat .label { font-size: 13px; color: var(--muted-foreground); margin: 0 0 6px; }
.stat .value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 0; line-height: 1.2; }
.stat .value small { font-size: 14px; font-weight: 500; color: var(--muted-foreground); margin-left: 2px; }
.stat .desc { font-size: 12px; color: var(--muted-foreground); margin: 6px 0 0; }
.stat.alert .value { color: var(--err); }
.muted { color: var(--muted-foreground); } .small { font-size: 12.5px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: 10px 12px; border-bottom: 1px solid color-mix(in oklch, var(--border) 70%, transparent); vertical-align: top; }
table.list th { font-size: 12.5px; color: var(--muted-foreground); font-weight: 500; }
table.list tr:last-child td { border-bottom: 0; }
.tablewrap { overflow-x: auto; }
button, .btn { font: inherit; font-size: 13.5px; font-weight: 500; border: 1px solid var(--border); background: var(--card); color: var(--foreground);
  border-radius: calc(var(--radius) + 2px); padding: 7px 14px; cursor: pointer; text-decoration: none; display: inline-block; transition: all .15s; }
button:hover, .btn:hover { background: var(--accent); color: var(--accent-foreground); }
button.primary, .btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
button.primary:hover, .btn.primary:hover { background: color-mix(in oklch, var(--primary) 90%, white); color: var(--primary-foreground); }
button.danger { color: var(--destructive); border-color: color-mix(in oklch, var(--destructive) 30%, var(--border)); }
button.danger:hover { background: var(--errbg); color: var(--destructive); }
button.link { border: 0; background: none; color: var(--primary); padding: 0; text-decoration: underline; }
button.link:hover { background: none; }
button:disabled { opacity: .5; cursor: not-allowed; }
.iconbtn { width: 38px; height: 38px; border-radius: 1rem; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--foreground); }
input[type=text], input[type=password], input[type=number], input[type=date], select, textarea { font: inherit; font-size: 14px;
  border: 1px solid var(--input); border-radius: calc(var(--radius) + 2px); padding: 8px 12px; width: 100%; background: rgba(255,255,255,.8); color: var(--foreground); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklch, var(--ring) 22%, transparent); }
textarea { min-height: 90px; resize: vertical; line-height: 1.7; }
label { display: block; font-size: 12.5px; color: var(--muted-foreground); margin: 12px 0 4px; font-weight: 500; }
label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; color: var(--foreground); font-size: 14px; }
label.check input { margin-top: 4px; accent-color: var(--primary); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .row > .grow { flex: 1; min-width: 180px; }
.flash, .banner { padding: 11px 16px; border-radius: 1rem; margin-bottom: 12px; white-space: pre-line; border: 1px solid transparent; }
.flash.info { background: var(--okbg); color: var(--ok); border-color: color-mix(in oklch, var(--ok) 18%, transparent); }
.flash.warn, .banner.warn { background: var(--warnbg); color: var(--warn); border-color: color-mix(in oklch, var(--warn) 18%, transparent); }
.flash.error { background: var(--errbg); color: var(--err); border-color: color-mix(in oklch, var(--err) 18%, transparent); }
.banner { margin: 12px 28px 0; text-align: center; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 500; padding: 2px 9px; border-radius: 999px; background: var(--muted); color: var(--muted-foreground); white-space: nowrap; }
.tag.approved, .tag.published, .tag.ok, .tag.final, .tag.info { background: var(--okbg); color: var(--ok); }
.tag.review, .tag.unsure, .tag.medium, .tag.warn, .tag.planned { background: var(--warnbg); color: var(--warn); }
.tag.planned { background: var(--accent); color: var(--accent-foreground); }
.tag.failed, .tag.rejected, .tag.high, .tag.error, .tag.blocked { background: var(--errbg); color: var(--err); }
.status-list { list-style: none; padding: 0; margin: 0; }
.status-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid color-mix(in oklch, var(--border) 70%, transparent); }
.status-list li:last-child { border: 0; }
.cal { width: 100%; border-collapse: separate; border-spacing: 6px; table-layout: fixed; }
.cal th { font-size: 12px; color: var(--muted-foreground); padding: 4px; font-weight: 500; }
.cal td { border: 1px solid color-mix(in oklch, var(--border) 70%, transparent); border-radius: 1rem; vertical-align: top; height: 108px; padding: 8px; background: rgba(255,255,255,.75); font-size: 12.5px; }
.cal td.other { background: transparent; color: color-mix(in oklch, var(--muted-foreground) 50%, transparent); border-style: dashed; }
.cal td.today { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in oklch, var(--primary) 18%, transparent); }
.cal .d { font-size: 12px; color: var(--muted-foreground); font-weight: 600; }
.cal a.item { display: block; margin-top: 4px; text-decoration: none; color: var(--foreground); line-height: 1.4; }
.cal a.item:hover { color: var(--primary); }
.issue { border-left: 4px solid var(--border); padding: 10px 14px; margin: 10px 0; background: color-mix(in oklch, var(--muted) 60%, transparent); border-radius: 0 1rem 1rem 0; }
.issue.high { border-color: var(--err); } .issue.medium { border-color: var(--warn); }
.issue q { font-weight: 600; quotes: none; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.photo { border: 1px solid color-mix(in oklch, var(--border) 70%, transparent); border-radius: 1.1rem; overflow: hidden; background: var(--card); font-size: 12px; font-weight: 400; color: var(--foreground); margin: 0; }
.photo img { width: 100%; height: 124px; object-fit: cover; display: block; background: var(--muted); }
.photo .cap { padding: 8px 10px; word-break: break-all; display: block; }
/* 홈페이지 미리보기는 실제 게시글 모습 그대로(흰 바탕) */
.previewbox { border: 1px solid var(--border); border-radius: 1.25rem; background: #fff; padding: 24px; color: #222; }
.card > .previewbox { max-width: 760px; margin: 0 auto; }
.previewbox img { max-width: 100%; height: auto; }
.phone { max-width: 390px; margin: 0 auto; border: 10px solid #22302c; border-radius: 34px; background: #fff; padding: 18px 16px; color: #222; }
.phone h1.ptitle, .previewbox h1.ptitle { font-size: 1.45em; line-height: 1.4; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid #e3e8e6; color: #111827; letter-spacing: 0; }
details { margin: 8px 0; } summary { cursor: pointer; font-weight: 600; }
#busy { position: fixed; inset: 0; background: rgba(250,247,240,.78); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 90; text-align: center; }
#busy[hidden] { display: none; }
.busybox { padding: 30px 40px; }
.spin { width: 38px; height: 38px; border: 4px solid var(--border); border-top-color: var(--primary); border-radius: 50%; margin: 0 auto 12px; animation: sp 1s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.login { max-width: 400px; margin: 12vh auto; border-radius: 1.75rem; padding: 28px 30px; }
code { background: var(--muted); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }
hr { border: 0; border-top: 1px solid var(--border); }

/* ── 좁은 화면: 사이드바를 접고 위쪽 막대 표시 ── */
@media (max-width: 900px) {
  .has-shell .content { margin-left: 0; }
  .mobilebar { display: block; position: sticky; top: 0; z-index: 30; padding: 12px 14px 0; }
  .mobilebar-in { display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 16px; }
  .mb-title { margin: 0; font-size: 14px; font-weight: 600; } .mb-sub { margin: 0; font-size: 12px; color: var(--muted-foreground); }
  .sidebar { transform: translateX(-105%); transition: transform .2s; width: 290px; }
  #navtoggle:checked ~ .sidebar { transform: none; }
  #navtoggle:checked ~ .scrim { display: block; position: fixed; inset: 0; background: rgba(20,30,40,.35); z-index: 35; }
  main { padding: 18px 14px 60px; }
  .banner { margin: 12px 14px 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat .desc { display: none; }
  .cal { border-spacing: 3px; } .cal td { height: auto; min-height: 62px; font-size: 11px; padding: 4px; border-radius: .6rem; }
}

/* ── 원고 화면 위쪽 작업 상자: 다른 카드와 같은 톤의 가로 단계 표시 ── */
.workbox { padding: 6px 0 0; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.step { padding: 18px 22px 20px; border-left: 1px solid color-mix(in oklch, var(--border) 70%, transparent); min-width: 0; }
.step:first-child { border-left: 0; }
.step-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; color: var(--muted-foreground); }
.step.cur .step-title { color: var(--foreground); }
.step-no { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--muted); color: var(--muted-foreground);
  font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.step-no.cur { background: var(--primary); color: var(--primary-foreground); }
.step-no.done { background: var(--okbg); color: var(--ok); }
.step-desc { margin: 0 0 12px; font-size: 12.5px; line-height: 1.55; color: var(--muted-foreground); }
.step label.check { margin: 0 0 4px; color: var(--muted-foreground); }
.step form { margin: 0; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px 22px 16px;
  border-top: 1px solid color-mix(in oklch, var(--border) 70%, transparent); background: color-mix(in oklch, var(--muted) 45%, transparent);
  border-radius: 0 0 1.5rem 1.5rem; }
.tools form { margin: 0; }
summary.bigsum { font-size: 16px; font-weight: 600; padding: 2px 0; }
@media (max-width: 900px) {
  .step { border-left: 0; border-top: 1px solid color-mix(in oklch, var(--border) 70%, transparent); }
  .step:first-child { border-top: 0; }
}

[hidden] { display: none !important; }

/* 네이버 블로그용 원고 읽어 보기 */
.blogtext { margin-top: 10px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--background); max-width: 720px; line-height: 1.75; }
.blogtext h3 { margin: 18px 0 6px; font-size: 15px; }
.blogtext p { margin: 0 0 10px; }
