:root {
  --bg: #fbf9f5;
  --card: #ffffff;
  --fg: #2d261e;
  --muted: #736758;
  --border: #e6ded3;
  --stitch: #cbbfae;
  --accent: #b36b22;
  --accent-fg: #ffffff;
  --accent-soft: #f4ece1;
  --accent-hover: #985615;
  --danger: #b93838;
  --ok: #287a52;
  --checker1: #ede6d8;
  --checker2: #fbf9f5;
  --radius: 12px;
  --font: 'ImgKit Gothic', 'Malgun Gothic', 'Apple SD Gothic Neo', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme:dark) {
  :root {
    --bg: #1e1915;
    --card: #27211c;
    --fg: #f3ede6;
    --muted: #a49686;
    --border: #3d342b;
    --stitch: #4f4337;
    --accent: #c67828;
    --accent-fg: #1e1915;
    --accent-soft: #352a20;
    --accent-hover: #d88939;
    --danger: #cf5555;
    --ok: #48a876;
    --checker1: #2a231d;
    --checker2: #201a15;
  }
}

* {
  box-sizing: border-box
}

html {
  -webkit-text-size-adjust: 100%
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  /* 사이트 전체 공통: 상단 양쪽에 걸쳐진 대형 원형 커브 기하학 레이어 (iLoveIMG 스타일) */
  background-image: 
    radial-gradient(circle at 92% -10%, rgba(198, 120, 40, 0.14) 0%, rgba(198, 120, 40, 0.14) 280px, rgba(255, 255, 255, 0.45) 281px, rgba(255, 255, 255, 0.45) 420px, transparent 421px),
    radial-gradient(circle at -4% 15%, rgba(203, 191, 174, 0.22) 0%, rgba(203, 191, 174, 0.22) 240px, transparent 241px);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--fg);
  font: 15px/1.6 var(--font);
}

a {
  color: var(--accent)
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px
}

.muted {
  color: var(--muted)
}

.top {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10
}

.bar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding-top: 6px;
  padding-bottom: 6px
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  color: var(--fg);
  letter-spacing: -.02em
}

.logo-img { display: block; height: 40px; width: auto }

.nav {
  display: flex;
  align-items: center;
  flex: 1;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 상단 바 대분류 항목: 항목 링크는 분류 목록 페이지로 이동, 마우스를 올리거나 포커스하면 소속 도구 드롭다운이 열림 */
.nav-cat {
  position: relative;
}

.nav .nav-cat-link {
  display: block;
  padding: 6px 11px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--muted);
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, color .15s;
}

.nav .nav-cat:hover > .nav-cat-link,
.nav .nav-cat:focus-within > .nav-cat-link {
  background: var(--accent-soft);
  color: var(--accent);
}

/* 현재 페이지가 속한 분류 강조 */
.nav .nav-cat.on > .nav-cat-link,
.nav .nav-cat-link[aria-current] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

/* 드롭다운: 항목 바로 아래. 위쪽 padding 이 항목과 목록 사이 틈을 메워 마우스를 옮겨도 닫히지 않음 */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 8px;
  display: none;
  z-index: 100;
}

.nav-cat:hover .nav-dropdown,
.nav-cat:focus-within .nav-dropdown {
  display: block;
}

.nav-dropdown-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 170px;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(45, 38, 30, 0.16);
}

.nav .nav-dropdown a {
  padding: 7px 10px;
  font-size: 13px;
  border-radius: 6px;
  text-align: left;
  color: var(--fg);
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s;
}

.nav .nav-dropdown a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav .nav-dropdown a[aria-current] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

/* 햄버거 버튼 (모바일 전용) */
.btn-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 7px;
  margin-left: auto;
}

.btn-burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
}

/* 모바일 드로어 메뉴 */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -280px;
  width: 260px;
  height: 100vh;
  background: var(--card);
  border-left: 1px solid var(--border);
  box-shadow: -6px 0 24px rgba(45, 38, 30, 0.15);
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  transition: right .25s ease;
}

.mobile-drawer.open {
  right: 0;
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.drawer-head strong {
  font-size: 16px;
  font-weight: 700;
}

.btn-drawer-close {
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  padding-right: 4px;
}

.drawer-cat-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* 분류 이름 줄 전체가 접기/펼치기 버튼 (누르면 이동하지 않고 목록만 접거나 펼침) */
.drawer-cat-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 8px 2px;
  border: none;
  border-bottom: 1.5px dashed rgba(194, 122, 46, 0.25);
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  margin-bottom: 4px;
}

.drawer-cat-title:hover {
  background: var(--accent-soft);
}

/* 화살표: 펼침 상태는 아래(▾), 접힘 상태는 오른쪽으로 회전 */
.drawer-cat-arrow {
  flex: none;
  width: 28px;
  text-align: center;
  font-size: 16px;
  line-height: 1;
  transition: transform .2s;
}

.drawer-cat-group:not(.open) .drawer-cat-arrow {
  transform: rotate(-90deg);
}

/* 접힌 분류는 도구 목록을 숨김 */
.drawer-cat-links {
  display: none;
  flex-direction: column;
  gap: 2px;
}

.drawer-cat-group.open .drawer-cat-links {
  display: flex;
}

.drawer-cat-links a {
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  color: var(--fg);
  transition: background .15s, color .15s;
}

.drawer-cat-links a:hover,
.drawer-cat-links a[aria-current] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(45, 38, 30, 0.4);
  backdrop-filter: blur(2px);
  z-index: 190;
  display: none;
}

.drawer-backdrop.open {
  display: block;
}

@media (max-width: 820px) {
  .nav-desktop {
    display: none;
  }
  .btn-burger {
    display: flex;
  }
}

.lang {
  font-size: 13px;
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--fg)
}

/* 모든 페이지 대제목 상단 배너 박스 (기하학적 원형 커브 레이어 복원) */
.page-header,
.home-hero {
  position: relative;
  margin: 32px 0 28px;
  padding: 34px 36px 30px;
  background: linear-gradient(135deg, #f4eee2 0%, #ede3d2 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 4px 18px rgba(45, 38, 30, 0.05);
  overflow: hidden;
}

/* 우측 대형 반투명 원형 커브 레이어 1 */
.page-header::before,
.home-hero::before {
  content: "";
  position: absolute;
  top: -90px;
  right: -90px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: rgba(198, 120, 40, 0.14);
  pointer-events: none;
  z-index: 0;
}

/* 우측 안쪽으로 겹쳐지는 두 번째 둥근 커브 레이어 2 (스크린샷 일치) */
.page-header::after,
.home-hero::after {
  content: "";
  position: absolute;
  top: -40px;
  right: 120px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  pointer-events: none;
  z-index: 0;
}

.page-header h1,
.home-hero h1 {
  position: relative;
  font-size: 32px;
  letter-spacing: -.03em;
  margin: 0 0 10px;
  font-weight: 800;
  color: #241c14;
  z-index: 1;
}

.page-header .lead,
.home-hero .lead {
  position: relative;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
  z-index: 1;
}

h1 {
  font-size: 32px;
  letter-spacing: -.03em;
  margin: 0 0 10px;
  font-weight: 800;
  color: #241c14;
}

h2 {
  font-size: 18px;
  margin: 32px 0 10px
}

h3 {
  margin: 0 0 4px;
  font-size: 16px
}

.lead {
  color: var(--muted);
  margin: 0 0 20px
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  margin: 20px 0
}

.card {
  position: relative;
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-decoration: none;
  color: var(--fg);
  box-shadow: 0 2px 6px rgba(45, 38, 30, 0.04);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}

/* 바둑판 카드 안쪽 스티치 라인 */
.card::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1.2px dashed var(--stitch);
  border-radius: 8px;
  pointer-events: none;
  transition: border-color .15s;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(45, 38, 30, 0.08);
}

.card:hover::before {
  border-color: rgba(179, 107, 34, 0.55);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 2px 8px rgba(45, 38, 30, 0.04);
}

/* 드롭존: 가죽 작업대 위의 스티칭(Saddle Stitch) 홈 트레이 */
.drop {
  border: 2px dashed var(--stitch);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 44px 16px;
  text-align: center;
  cursor: pointer;
  box-shadow: inset 0 2px 5px rgba(45, 38, 30, 0.05);
  transition: border-color .15s, background .15s, box-shadow .15s
}

.drop:hover,
.drop.over {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 2px 8px rgba(179, 107, 34, 0.08);
}

.drop:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px
}

.drop strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--fg);
}

.drop small {
  color: var(--muted)
}

.drop.compact {
  padding: 14px
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start
}

@media (max-width:820px) {
  .layout {
    grid-template-columns: minmax(0, 1fr)
  }
}

.layout>* {
  min-width: 0
}

.side {
  display: flex;
  flex-direction: column;
  gap: 12px
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px
}

.field>label,
.lbl {
  font-size: 13px;
  color: var(--muted)
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap
}

.row>* {
  flex: 1;
  min-width: 0
}

.row.fit>* {
  flex: 0 0 auto
}

input[type=number],
input[type=text],
select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--fg);
  font: inherit;
  box-shadow: inset 0 1px 2px rgba(45, 38, 30, 0.06);
  transition: border-color .15s, box-shadow .15s;
}

input[type=number]:focus,
input[type=text]:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(179, 107, 34, 0.15);
}

input[type=range] {
  width: 100%;
  accent-color: var(--accent)
}

input[type=color] {
  width: 44px;
  height: 34px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg)
}

.chk {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  margin-bottom: 8px
}

/* 황동(Brass) 질감 + 가죽 스티치(Stitch) 외곽선 액션 버튼 */
.btn {
  position: relative;
  display: inline-block;
  padding: 10px 22px;
  border-radius: 9px;
  border: 1px solid #9c5914;
  background: linear-gradient(180deg, #c67828 0%, #a85e19 100%);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 3px 8px rgba(45, 38, 30, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: filter .15s, transform .1s, box-shadow .1s;
  letter-spacing: -0.01em;
}

/* 실로 꿰맨 선명한 안쪽 바느질 스티치 라인 */
.btn::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1.5px dashed rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  pointer-events: none;
  transition: border-color .15s;
}

.btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(45, 38, 30, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn:hover::before {
  border-color: rgba(255, 255, 255, 0.85);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(45, 38, 30, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn:disabled::before {
  display: none;
}

.btn.secondary {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--fg);
  box-shadow: 0 1px 4px rgba(45, 38, 30, 0.05);
}

.btn.secondary::before {
  border: 1.5px dashed rgba(179, 107, 34, 0.4);
}

.btn.secondary:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

.btn.secondary:hover::before {
  border-color: rgba(179, 107, 34, 0.7);
}

.btn.small {
  padding: 6px 12px;
  font-size: 13px;
}

.btn.block {
  display: block;
  width: 100%
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap
}

/* 칩 버튼 스티치 디테일 */
.chip {
  position: relative;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1.5px dashed var(--stitch);
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}

.chip:hover,
.chip.on {
  border-style: solid;
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(179, 107, 34, 0.15);
}

.checker {
  background-image: linear-gradient(45deg, var(--checker1) 25%, transparent 25%, transparent 75%, var(--checker1) 75%), linear-gradient(45deg, var(--checker1) 25%, var(--checker2) 25%, var(--checker2) 75%, var(--checker1) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px
}

.stage {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  padding: 12px;
  overflow: hidden
}

.stage img,
.stage canvas,
.stage video {
  max-width: 100%;
  max-height: 70vh;
  display: block
}

.info {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 0;
  word-break: break-all
}

.msg {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--accent-soft);
  font-size: 14px;
  margin: 0 0 10px
}

.msg.err {
  background: color-mix(in srgb, var(--danger) 14%, transparent);
  color: var(--danger)
}

.msg.ok {
  background: color-mix(in srgb, var(--ok) 14%, transparent);
  color: var(--ok)
}

[hidden] {
  display: none !important
}

/* crop */
.cropwrap {
  position: relative;
  display: inline-block;
  touch-action: none;
  user-select: none;
  line-height: 0;
  overflow: hidden;
  max-width: 100%
}

.cropwrap img {
  max-width: 100%;
  max-height: 70vh;
  display: block;
  pointer-events: none
}

.sel {
  position: absolute;
  border: 2px solid #fff;
  outline: 1px solid rgba(0, 0, 0, .5);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .5);
  cursor: move
}

.sel i {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 3px
}

.sel i[data-h=nw] {
  left: -8px;
  top: -8px;
  cursor: nwse-resize
}

.sel i[data-h=ne] {
  right: -8px;
  top: -8px;
  cursor: nesw-resize
}

.sel i[data-h=sw] {
  left: -8px;
  bottom: -8px;
  cursor: nesw-resize
}

.sel i[data-h=se] {
  right: -8px;
  bottom: -8px;
  cursor: nwse-resize
}

/* lists */
.list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none
}

.item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card)
}

.item img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  flex: none
}

.item .nm {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px
}

.item .nm small {
  display: block;
  color: var(--muted)
}

.item .acts {
  display: flex;
  gap: 4px;
  flex: none
}

.bar-prog {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0
}

.bar-prog>div {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .1s
}

.sub {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 10px;
}

.sub .field {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.sub .field > label {
  margin-bottom: auto;
  line-height: 1.3;
}

.sub .field > input,
.sub .field > select {
  margin-top: 4px;
}

.sub > .chk {
  align-self: flex-end;
  margin-bottom: 8px;
}

.about ol {
  padding-left: 20px
}

.about li {
  margin-bottom: 4px
}

.sr {
  position: absolute;
  left: -9999px
}

.idle {
  opacity: .5;
  filter: grayscale(.3)
}

.idle .stage {
  min-height: 140px
}

.idle {
  margin-top: 16px
}

#toasts {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
  width: min(92vw, 420px);
  pointer-events: none
}

.toast {
  pointer-events: auto;
  cursor: pointer;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--border);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
  font-size: 14px;
  animation: toast-in .2s ease-out
}

.toast.err {
  border-color: var(--danger);
  color: var(--danger)
}

.toast.ok {
  border-color: var(--ok);
  color: var(--ok)
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px
}

.thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer
}

.thumb canvas {
  max-width: 100%;
  height: auto;
  border-radius: 4px
}

.thumb input {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1
}

.thumb.off {
  opacity: .45
}

/* feat-section */

.feat-section {
  margin-bottom: 44px
}

.feat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px
}

.feat-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em
}

.feat-controls {
  display: flex;
  gap: 8px
}

.feat-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s
}

.feat-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.05)
}

.feat-track-wrap {
  position: relative;
  overflow: hidden;
  margin: 0 -16px;
  padding: 12px 16px 20px
}

.feat-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 4px 16px;
  user-select: none;
  cursor: grab
}

.feat-track::-webkit-scrollbar {
  display: none
}

.feat-track.grabbing {
  cursor: grabbing;
  scroll-behavior: auto
}

.feat-card {
  position: relative;
  flex: 0 0 205px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--fg);
  padding: 26px 18px 22px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(45, 38, 30, 0.05);
  transition: transform .2s cubic-bezier(.2, 0, 0, 1), box-shadow .2s, border-color .2s;
}

/* 대표 기능 카드 안쪽 가죽 바느질 스티치 라인 */
.feat-card::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1.5px dashed var(--stitch);
  border-radius: 13px;
  pointer-events: none;
  transition: border-color .2s;
}

.feat-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 14px 28px rgba(45, 38, 30, 0.1);
}

.feat-card:hover::before {
  border-color: rgba(179, 107, 34, 0.65);
}

/* 통가죽 패치 느낌의 엠보싱 타일 */
.feat-icon {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35),
              inset 0 -2px 3px rgba(0, 0, 0, 0.2),
              0 6px 14px rgba(45, 38, 30, 0.12);
  transition: transform .2s ease;
}

.feat-card:hover .feat-icon {
  transform: scale(1.06) translateY(-2px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4),
              inset 0 -2px 3px rgba(0, 0, 0, 0.22),
              0 10px 20px rgba(45, 38, 30, 0.16);
}

.feat-title {
  font-size: 16.5px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -.02em;
  display: block;
}

.feat-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
  word-break: keep-all
}

/* 하단 바둑판 그리드 고도화 */
.grid-section {
  margin-bottom: 40px
}

.grid-section h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -.02em
}

/* 제목 줄 높이를 두 줄 기준(21.6px x 2)으로 고정해서, 제목이 한 줄이든 두 줄이든 아래 설명이 모든 카드에서 같은 위치에서 시작하게 */
.card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  margin-bottom: 8px
}

/* 제목이 한 줄이면 아이콘(36px) 높이 안에서 세로 가운데, 두 줄이면 위쪽부터 시작해서 아이콘 위치가 모든 카드에서 같게 */
.card-head h3 {
  margin: 0;
  min-height: 36px;
  display: flex;
  align-items: center;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600
}

.card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0
}

/* ==========================================
   전역 작업대 (Shared Workbench) 바 스타일
   가죽 공방 웜 앰버 테마 및 스티치 디테일
   ========================================== */
.workbench-bar {
  margin: 14px 0 20px;
  background: var(--card);
  border: 1.5px dashed rgba(194, 122, 46, 0.45);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(45, 38, 30, 0.06);
  padding: 10px 14px;
}

.workbench-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.workbench-thumb-box {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: 10px 10px;
}

.workbench-thumb-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.workbench-info {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.workbench-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.workbench-badge {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  background: var(--accent);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: -0.2px;
}

.workbench-name {
  font-size: 13.5px;
  color: var(--fg);
  font-weight: 700;
  word-break: break-all;
}

.workbench-details {
  font-size: 12px;
  color: var(--muted);
}

.workbench-warn {
  font-size: 11.5px;
  color: #b85d19;
  background: rgba(184, 93, 25, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
  margin-top: 4px;
  font-weight: 600;
}

.workbench-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
}

.workbench-actions .btn.small {
  padding: 6px 12px;
  font-size: 12.5px;
}
/* 추가 예정 기능 메뉴('(x) 이름'): 이동하지 않는 링크. 흐리게 표시해 구현된 메뉴와 구분 */
.nav-planned,
.nav .nav-dropdown a.nav-planned,
.drawer-cat-links a.nav-planned {
  opacity: .55;
  font-style: italic;
}

/* 증명사진 얼굴 위치 가이드: 선택 사각형 안에 점선 타원(머리)과 가운데 세로선. 클릭/드래그를 방해하지 않도록 pointer-events 없음 */
.sel.guide::after {
  content: "";
  position: absolute;
  left: 21%;
  top: 11%;
  width: 58%;
  height: 66%;
  border: 2px dashed rgba(255, 255, 255, .9);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(0, 0, 0, .35);
  pointer-events: none;
}

/* 업로드 영역 아래 '작업대에서 가져오기' 버튼 (업로드 영역이 숨겨지면 같이 숨김) */
.wb-pick {
  margin-top: 8px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#drop[hidden] + .wb-pick {
  display: none;
}

/* 버튼 앞 아이콘: 글자 크기에 맞춰 크기를 정하고 글자와 간격을 둠 */
.btn .ico {
  width: 1.15em;
  height: 1.15em;
  margin-right: 6px;
  vertical-align: -0.2em;
  flex: none;
}

/* 작업대 미지원 페이지(data-wb="none"): 바 내용을 흐리게 + 블러 처리하고 그 위에 안내 문구를 크고 굵게 덮어 표시 */
.workbench-bar { position: relative; }

.workbench-bar[data-wb="none"] .workbench-inner {
  filter: blur(5px);
  opacity: .45;
  pointer-events: none;
  user-select: none;
}

.workbench-unsupported { display: none; }

.workbench-bar[data-wb="none"] .workbench-unsupported {
  display: flex;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  text-align: center;
  font-size: clamp(18px, 3.2vw, 28px);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--fg);
  text-shadow: 0 0 10px var(--card), 0 0 4px var(--card);
}

/* 동작 버튼이 있는 토스트(예: 작업대 비우기 + '작업 취소'): 문구와 버튼을 한 줄에 배치 */
.toast.has-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toast-action {
  flex: none;
  padding: 4px 10px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.toast-action:hover {
  background: var(--accent-soft);
}

/* 모자이크·블러 도구: 이미지 위 드래그 영역 윤곽(점선). 클릭/드래그를 방해하지 않도록 pointer-events 없음 */
.marks { position: absolute; inset: 0; pointer-events: none; }
.mark { position: absolute; border: 2px dashed #fff; outline: 1px solid rgba(0, 0, 0, .6); box-sizing: border-box; }
.mark.ell { border-radius: 50%; }
#wrap canvas { cursor: crosshair; }

/* ---- GIF 분석기 / 화면 녹화 공용 보조 스타일 ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.stat { background: var(--accent-soft); border-radius: 8px; padding: 8px 10px; min-width: 0; }
.stat small { display: block; color: var(--muted); font-size: .78rem; }
.stat strong { display: block; word-break: break-all; font-size: .95rem; }
.warnlist { margin: 0; padding-left: 1.2em; line-height: 1.7; }
.swatches { display: flex; flex-wrap: wrap; gap: 2px; }
.swatch { width: 18px; height: 18px; border: 1px solid var(--border); border-radius: 3px; }
.tablewrap { overflow: auto; max-height: 420px; }
.tbl { border-collapse: collapse; width: 100%; font-size: .85rem; }
.tbl th, .tbl td { border-bottom: 1px solid var(--border); padding: 5px 8px; text-align: left; white-space: nowrap; }
.tbl th { position: sticky; top: 0; background: var(--card); }
.rec-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); margin-right: 6px; }
.rec-big { font-size: 2.4rem; font-weight: 700; text-align: center; padding: 10px 0; }

/* ---- 푸터: 가죽색 띠 ---- */
.foot { --foot-bg: #4a3624; --foot-fg: #e8dccb; --foot-muted: #b9a68d; --foot-line: rgba(232, 220, 203, .16); --foot-accent: #e3b070;
  margin-top: 64px; padding: 44px 0 28px; background: var(--foot-bg); color: var(--foot-fg); font-size: 14px;
  border-top: 4px solid #b36b22; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06) }
@media (prefers-color-scheme:dark) { .foot { --foot-bg: #15110d; --foot-line: rgba(243, 237, 230, .12); border-top-color: #c67828 } }
/* 푸터 상단 가죽 스티치(바늘땀) 효과: 주황 상단선 아래에 점선 한 줄 */
.foot { position: relative; --foot-stitch: #d9c29b }
.foot::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 12px;
  height: 2px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--foot-stitch) 0 10px, transparent 10px 18px);
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .3));
  pointer-events: none
}
@media (prefers-color-scheme:dark) { .foot { --foot-stitch: #9a7448 } }
@media (max-width: 520px) { .foot::before { left: 8px; right: 8px; top: 9px } }

.foot a { color: var(--foot-fg); text-decoration: none; opacity: .88 }
.foot a:hover { color: #fff; opacity: 1; text-decoration: underline }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(5, 1fr); gap: 28px 24px }
.foot-brand p { margin: 8px 0 0; color: var(--foot-muted); line-height: 1.6; font-size: 13px }
.foot .foot-logo { font-size: 20px; font-weight: 700; color: #fff; opacity: 1 }
.foot-col { display: flex; flex-direction: column; gap: 8px; min-width: 0 }
.foot .foot-h { color: var(--foot-accent); font-weight: 700; margin-bottom: 4px; opacity: 1 }
.foot-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--foot-line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px }
.foot-note { margin: 0; color: var(--foot-muted); font-size: 12px }
@media (max-width: 900px) { .foot-grid { grid-template-columns: repeat(3, 1fr) } .foot-brand { grid-column: 1 / -1 } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: repeat(2, 1fr) } .foot { padding-top: 32px } }

/* ---- 화면 녹화: 공유 미리보기 위의 녹화 영역 선택 ---- */
.recwrap { position: relative; display: inline-block; line-height: 0; max-width: 100%; overflow: hidden; touch-action: none; user-select: none }
.recwrap video { max-width: 100%; max-height: 60vh }
.selbox { position: absolute; border: 2px solid var(--accent); box-shadow: 0 0 0 9999px rgba(0, 0, 0, .5); cursor: move; box-sizing: border-box }
.selbox i { position: absolute; width: 14px; height: 14px; background: var(--accent); border: 2px solid #fff; border-radius: 3px; box-sizing: border-box }
.selbox i[data-h="nw"] { left: -8px; top: -8px; cursor: nwse-resize } .selbox i[data-h="ne"] { right: -8px; top: -8px; cursor: nesw-resize }
.selbox i[data-h="sw"] { left: -8px; bottom: -8px; cursor: nesw-resize } .selbox i[data-h="se"] { right: -8px; bottom: -8px; cursor: nwse-resize }
a.btn[aria-disabled="true"] { opacity: .5; pointer-events: none }

/* GIF·영상 모자이크: 현재 시각에 적용되지 않는 영역 윤곽은 흐리게 */
.mark.off { opacity: .35 }

/* GIF·영상 모자이크: 영역 10색(빨강, 주황, 노랑, 초록, 파랑, 시안, 보라, 흰색, 마젠타, 무지개). 적용 중인 영역은 밝게(발광), 아닌 영역은 흐리게 */
.rc0 { --c: #ff4d4d } .rc1 { --c: #ff9d2e } .rc2 { --c: #ffe94d } .rc3 { --c: #45e68a } .rc4 { --c: #4da6ff }
.rc5 { --c: #36eaff } .rc6 { --c: #b784ff } .rc7 { --c: #ffffff } .rc8 { --c: #ff4df2 } .rc9 { --c: #ffffff }
.mark { border: 2px solid var(--c, #fff); box-shadow: 0 0 9px var(--c, #fff), inset 0 0 5px var(--c, #fff); outline: 1px solid rgba(0, 0, 0, .55) }
.mark.sel { border-width: 3px }
.mark.off { opacity: .3; box-shadow: none; filter: saturate(.55) brightness(.75) }
.mark.rc9 { border-color: transparent; box-shadow: none }
.mark.rc9::before { content: ''; position: absolute; inset: -2px; border-radius: inherit; padding: 2px; box-sizing: border-box; pointer-events: none;
  background: linear-gradient(90deg, #ff4d4d, #ff9d2e, #ffe94d, #45e68a, #36eaff, #4da6ff, #b784ff, #ff4df2);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude }
.mark i { position: absolute; width: 12px; height: 12px; background: var(--c, #fff); border: 2px solid #222; border-radius: 3px; box-sizing: border-box }
.mark.rc9 i { background: linear-gradient(90deg, #ff4d4d, #ffe94d, #45e68a, #4da6ff, #ff4df2) }
.mark i.h-nw { left: -7px; top: -7px } .mark i.h-ne { right: -7px; top: -7px } .mark i.h-sw { left: -7px; bottom: -7px } .mark i.h-se { right: -7px; bottom: -7px }
.rdot { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; background: var(--c, #fff); border: 1px solid rgba(0, 0, 0, .45); vertical-align: -1px }
.rc9 .rdot { background: conic-gradient(#ff4d4d, #ffe94d, #45e68a, #4da6ff, #ff4df2, #ff4d4d) }

/* ---- 이미지 비교 / 색상 추출 ---- */
.cmpwrap, .pickwrap { line-height: 0; max-width: 100%; display: inline-block; touch-action: none }
.cmpwrap canvas, .pickwrap canvas { max-width: 100%; height: auto; display: block }
.cmpwrap { cursor: ew-resize }
.pickwrap { cursor: crosshair }
.swatchbig { height: 64px; border-radius: 10px; border: 1px solid var(--border); margin-bottom: 10px }
.pal { display: flex; flex-wrap: wrap; gap: 6px }
.sw { border: 1px solid rgba(0, 0, 0, .25); border-radius: 8px; width: 76px; height: 44px; cursor: pointer; padding: 0; position: relative }
.sw span { position: absolute; inset: auto 0 3px 0; font-size: 10.5px; line-height: 1; text-align: center; font-family: ui-monospace, Consolas, monospace }
.sw:hover { outline: 2px solid var(--accent); outline-offset: 1px }
#hex, #rgb, #hsl { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--fg); font: inherit; font-family: ui-monospace, Consolas, monospace }
#ncol { width: auto; min-width: 70px }

/* ---- 사이드 패널 정렬 정리 (전수 점검 결과 반영) ---- */
/* 같은 줄 버튼: 높이를 맞추고, 글자가 줄바꿈되지 않게 하며, 자리가 모자라면 버튼째 다음 줄로 내려가 같은 폭으로 늘어난다 */
.row > .btn { min-width: max-content; white-space: nowrap; align-self: stretch; display: inline-flex; align-items: center; justify-content: center; text-align: center }
.row:not(.fit) > .btn { flex: 1 1 0 }
/* 설명 문구 바로 뒤에 오는 입력/버튼 줄은 위쪽 간격을 둔다 */
p.info + .row, p.info + .sub, p.info + .field, p.info + .chk, p.info + .btn, p.info + .chips { margin-top: 10px }
/* 두 칸(.sub) 안: 색 선택칸을 숫자/선택 입력칸과 같은 높이로, 체크박스는 입력칸 높이의 가운데에 */
.sub .field > input[type=color] { width: 100%; height: 42px; padding: 3px }
.sub > .chk { margin-bottom: 11px }

#vqwrap { margin-bottom: 10px }

/* ---- 상세 설명: 페이지 안에서 접었다 펼치는 영역. 모달이 아니라서 펼쳐 둔 채로 보면서 따라 할 수 있다 ---- */
.guide-details { margin: 16px 0; border: 1px solid var(--border); border-radius: 12px; background: var(--card) }
.guide-details > summary { display: flex; align-items: center; gap: 10px; padding: 14px 18px; font-weight: 700; font-size: 15.5px; color: var(--accent); cursor: pointer; list-style: none; border-radius: 12px }
.guide-details > summary::-webkit-details-marker { display: none }
.guide-details > summary::before { content: "+"; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border: 1.5px solid var(--accent); border-radius: 50%; font-size: 16px; line-height: 1 }
.guide-details[open] > summary::before { content: "\2212" }
.guide-details > summary:hover { background: var(--accent-soft) }
.guide-details[open] > summary { border-bottom: 1px solid var(--border); border-radius: 12px 12px 0 0 }
.guide-body { padding: 6px 18px 20px; line-height: 1.7; font-size: 14.5px }
.guide-body h3 { margin: 18px 0 6px; font-size: 15.5px; color: var(--accent) }
.guide-body p { margin: 6px 0 }
.guide-body ol, .guide-body ul { margin: 6px 0; padding-left: 22px }
.guide-body li { margin-bottom: 4px }

/* 법적 문서(개인정보처리방침, 이용약관) */
.legal { max-width: 820px; line-height: 1.75 }
.legal h2 { margin: 28px 0 8px; font-size: 18px }
.legal ul, .legal ol { padding-left: 22px }
.legal li { margin-bottom: 4px }
.legal table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 14px }
.legal th, .legal td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top }
.legal th { background: var(--accent-soft) }
/* 아직 채우지 않은 항목 표시 */
mark.todo { background: #ffe066; color: #3a2e00; padding: 0 3px; border-radius: 3px }

/* 함께 쓰는 도구(내부 링크 카드) */
.related { margin: 36px 0 8px }
.related h2 { font-size: 18px; margin: 0 0 4px }

/* SNS 크기 안내 표 */
.legal.sizes { max-width: none }
.size-table { overflow-x: auto }
.size-table td:nth-child(2) { white-space: nowrap }
.size-table td .btn { white-space: nowrap }

/* 광고 칸. 평소(mode 'off')에는 ads.js 가 칸을 없애고, 켜져 있으면(html[data-ads]) 화면 폭에 맞는 크기의 자리를 미리 잡아 둔다. */
.ad-slot { display: none; box-sizing: border-box; margin: 24px auto; max-width: 100%; text-align: center; overflow: hidden }
html[data-ads] .ad-slot { display: block }
.ad-slot--leader { width: 320px; height: 100px }
.ad-slot--rect { width: 300px; height: 250px }
@media (min-width: 821px) {
  .ad-slot--leader { width: 728px; height: 90px }
  .ad-slot--rect { width: 336px; height: 280px }
}
@media (min-width: 1100px) { .ad-slot--leader { width: 970px } }

/* 미리보기 모양: 반투명 네모 + 위치 이름 + 크기 글자(화면 폭마다 CSS 가 채움) */
html[data-ads="preview"] .ad-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 2px dashed rgba(179, 107, 34, .6);
  border-radius: 8px;
  background: rgba(179, 107, 34, .12);
  color: var(--accent);
  font-size: 12px
}
.ad-tag { position: absolute; top: 4px; left: 8px; font-size: 11px; opacity: .8 }
.ad-where { font-weight: 700; font-size: 13px }
.ad-size { font-variant-numeric: tabular-nums }
.ad-slot--leader .ad-size::after { content: "320 x 100" }
.ad-slot--rect .ad-size::after { content: "300 x 250" }
@media (min-width: 821px) {
  .ad-slot--leader .ad-size::after { content: "728 x 90" }
  .ad-slot--rect .ad-size::after { content: "336 x 280" }
}
@media (min-width: 1100px) { .ad-slot--leader .ad-size::after { content: "970 x 90" } }
@media (prefers-color-scheme: dark) {
  html[data-ads="preview"] .ad-slot { background: rgba(198, 120, 40, .16); border-color: rgba(198, 120, 40, .65) }
}

/* PC 좌우 세로 광고: 본문 양옆 여백에 두고 스크롤을 따라온다. 폭 1440px 이상, 높이 700px 이상인 화면에서만 보인다 */
main.wrap { position: relative }
.ad-rail { display: none }
@media (min-width: 1440px) and (min-height: 700px) {
  html[data-ads] .ad-rail { display: block; position: absolute; top: 0; bottom: 0; width: 160px }
  .ad-rail--left { right: 100%; margin-right: 12px }
  .ad-rail--right { left: 100%; margin-left: 12px }
  .ad-rail-in { position: sticky; top: 84px; padding-top: 24px }
  .ad-slot--sky { width: 160px; height: 600px; margin: 0 }
  .ad-slot--sky .ad-size::after { content: "160 x 600" }
}
@media (min-width: 1760px) and (min-height: 700px) {
  html[data-ads] .ad-rail { width: 300px }
  .ad-slot--sky { width: 300px }
  .ad-slot--sky .ad-size::after { content: "300 x 600" }
}
