/* ═════════════════════════════════════════════════════════════
   작업실 디자인 시스템 — 컴포넌트
   tokens.css 다음에 불러온다. 모든 클래스는 ds- 로 시작한다.
   쓰는 법과 견본: /design/ 페이지 (design/README.md)
   ═════════════════════════════════════════════════════════════ */

/* ───────── 공통 ───────── */

.ds-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

:where(.ds-btn, .ds-input, .ds-select, .ds-textarea, .ds-chip, .ds-check input, .ds-switch input, .ds-segmented input, .ds-file button, .ds-date__nav, .ds-date__day):focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ═════════ 버튼 ═════════
   <button class="ds-btn">기본</button>
   변형: --primary(주요 동작, 화면에 하나) --ghost(덜 중요) --danger(되돌리기 어려운 동작)
   크기: --sm --lg / 폭: --block / 아이콘만: --icon
   상태: disabled, aria-busy="true"(처리 중) */

.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: var(--control-md);
  padding: 0 var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: var(--weight-semibold);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
}

.ds-btn:hover {
  border-color: var(--muted);
}

.ds-btn:active {
  transform: translateY(1px);
}

.ds-btn--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.ds-btn--primary:hover {
  border-color: var(--accent-ink);
  background: var(--accent-ink);
}

.ds-btn--ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.ds-btn--ghost:hover {
  border-color: transparent;
  background: var(--surface-2);
  color: var(--text);
}

.ds-btn--danger {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--line-strong));
  color: var(--danger);
}

.ds-btn--danger:hover {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.ds-btn--sm {
  height: var(--control-sm);
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.ds-btn--lg {
  height: var(--control-lg);
  padding: 0 var(--space-6);
  font-size: var(--text-md);
}

.ds-btn--block {
  width: 100%;
}

.ds-btn--icon {
  width: var(--control-md);
  padding: 0;
}

.ds-btn:disabled,
.ds-btn[aria-disabled='true'] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* 처리 중: 글자 앞에 도는 표시 */
.ds-btn[aria-busy='true']::before {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: ds-spin 0.7s linear infinite;
}

@keyframes ds-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ═════════ 입력 칸 묶음 ═════════
   <label class="ds-field">
     <span class="ds-label">제목 <small>선택</small></span>
     <input class="ds-input">
     <span class="ds-hint">도움말</span>
   </label>
   잘못된 값: 입력칸에 aria-invalid="true", 설명은 .ds-hint--error */

.ds-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ds-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--weight-semibold);
}

.ds-label small {
  color: var(--faint);
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
}

.ds-hint {
  color: var(--faint);
  font-size: 12.5px;
}

.ds-hint--error {
  color: var(--danger);
}

/* ═════════ 입력 칸 · 셀렉트 · 여러 줄 ═════════
   <input class="ds-input"> <select class="ds-select"> <textarea class="ds-textarea">
   크기: --sm / 글꼴: .ds-textarea--mono */

.ds-input,
.ds-select,
.ds-textarea {
  width: 100%;
  min-width: 0;
  height: var(--control-md);
  padding: 0 var(--space-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: var(--text-md);
  font-weight: var(--weight-regular);
  line-height: 1.4;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background-color var(--dur-fast);
  appearance: none;
}

.ds-input:hover,
.ds-select:hover,
.ds-textarea:hover {
  border-color: var(--faint);
}

.ds-input:focus,
.ds-select:focus,
.ds-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.ds-input::placeholder,
.ds-textarea::placeholder {
  color: var(--faint);
}

.ds-input:disabled,
.ds-select:disabled,
.ds-textarea:disabled {
  background: var(--surface-2);
  color: var(--faint);
  cursor: not-allowed;
}

.ds-input:read-only:not(:disabled):not(select),
.ds-textarea:read-only:not(:disabled) {
  background: var(--surface-2);
  color: var(--muted);
}

.ds-input[aria-invalid='true'],
.ds-select[aria-invalid='true'],
.ds-textarea[aria-invalid='true'] {
  border-color: var(--danger);
}

.ds-input[aria-invalid='true']:focus,
.ds-textarea[aria-invalid='true']:focus {
  box-shadow: var(--focus-ring-danger);
}

.ds-input--sm,
.ds-select.ds-input--sm {
  height: var(--control-sm);
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.ds-textarea {
  height: auto;
  min-height: 112px;
  padding: 10px var(--space-3);
  line-height: var(--leading);
  resize: vertical;
}

.ds-textarea--mono {
  font-family: var(--font-mono);
  font-size: 14px;
}

/* ═════════ 날짜 고르기 ═════════
   <ds-date name="date" value="2026-10-01" size="sm" required></ds-date>
   브라우저 기본 달력 대신 쓴다. 스크립트: design/date-picker.js */

ds-date {
  position: relative;
  display: block;
  min-width: 0;
}

.ds-date__trigger {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-align: left;
  cursor: pointer;
}

.ds-date__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ds-date__trigger[data-empty] .ds-date__text {
  color: var(--faint);
}

.ds-date__icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--faint);
  transition: color var(--dur-fast);
}

.ds-date__trigger:hover .ds-date__icon,
.ds-date__trigger[aria-expanded='true'] .ds-date__icon {
  color: var(--accent);
}

.ds-date__trigger[aria-expanded='true'] {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.ds-date__panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  width: 288px;
  max-width: calc(100vw - 32px);
  padding: var(--space-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}

.ds-date__panel[hidden] {
  display: none;
}

.ds-date--up .ds-date__panel {
  top: auto;
  bottom: calc(100% + 6px);
}

.ds-date__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.ds-date__title {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: var(--weight-semibold);
}

.ds-date__nav {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.ds-date__nav:hover {
  background: var(--surface-2);
  color: var(--text);
}

.ds-date__grid {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.ds-date__grid th {
  padding: 2px 0 6px;
  color: var(--faint);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}

.ds-date__grid th:first-child {
  color: var(--danger);
}

.ds-date__grid td {
  padding: 1px;
  text-align: center;
}

.ds-date__day {
  position: relative;
  width: 100%;
  height: 34px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color var(--dur-fast), color var(--dur-fast);
}

.ds-date__day:hover {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.ds-date__day[data-outside] {
  color: var(--faint);
}

/* 오늘: 숫자 아래 작은 점 */
.ds-date__day[aria-current='date']::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  translate: -50% 0;
}

.ds-date__day[aria-selected='true'] {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: var(--weight-semibold);
}

.ds-date__day[aria-selected='true']::after {
  background: var(--on-accent);
}

.ds-date__foot {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
}

/* 셀렉트: 기본 모양을 지우고 화살표를 그린다 (밝고 어두운 배경 모두에 보이는 회색) */
.ds-select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%238f8b82' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 12px;
  cursor: pointer;
}

/* 펼친 목록까지 꾸밀 수 있는 브라우저 (customizable select) */
@supports (appearance: base-select) {
  .ds-select,
  .ds-select::picker(select) {
    appearance: base-select;
  }

  .ds-select {
    display: flex;
    align-items: center;
    padding-right: var(--space-3);
    background-image: none;
  }

  .ds-select::picker-icon {
    content: '';
    width: 12px;
    height: 12px;
    margin-left: auto;
    background: var(--faint);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
      center / contain no-repeat;
    transition: rotate var(--dur) var(--ease-out);
  }

  .ds-select:open::picker-icon {
    rotate: 180deg;
  }

  .ds-select::picker(select) {
    margin-top: 6px;
    padding: var(--space-1);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-pop);
  }

  .ds-select option {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14.5px;
  }

  .ds-select option:hover,
  .ds-select option:focus-visible {
    outline: none;
    background: var(--accent-soft);
    color: var(--accent-ink);
  }

  .ds-select option:checked {
    font-weight: var(--weight-semibold);
  }

  .ds-select option::checkmark {
    content: '✓';
    order: 1;
    margin-left: auto;
    color: var(--accent);
    font-weight: var(--weight-bold);
  }
}

/* ═════════ 체크박스 · 라디오 · 스위치 ═════════
   <label class="ds-check"><input type="checkbox"> 글자</label>
   <label class="ds-check"><input type="radio" name="x"> 글자</label>
   <label class="ds-switch"><input type="checkbox" role="switch"> 글자</label> */

.ds-check,
.ds-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: var(--text-md);
  cursor: pointer;
}

.ds-check input,
.ds-switch input {
  flex-shrink: 0;
  margin: 0;
  appearance: none;
  cursor: pointer;
  transition: background-color var(--dur-fast), border-color var(--dur-fast);
}

.ds-check input {
  display: grid;
  place-content: center;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
}

.ds-check input[type='radio'] {
  border-radius: 50%;
}

.ds-check input:hover {
  border-color: var(--muted);
}

.ds-check input:checked {
  border-color: var(--accent);
  background: var(--accent);
}

/* 체크 표시 */
.ds-check input[type='checkbox']::after {
  content: '';
  width: 5px;
  height: 9px;
  margin-top: -2px;
  border: solid var(--on-accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform var(--dur-fast) var(--ease-spring);
}

.ds-check input[type='checkbox']:checked::after {
  transform: rotate(45deg) scale(1);
}

/* 라디오 점 */
.ds-check input[type='radio']::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--on-accent);
  transform: scale(0);
  transition: transform var(--dur-fast) var(--ease-spring);
}

.ds-check input[type='radio']:checked::after {
  transform: scale(1);
}

.ds-switch input {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: var(--line-strong);
}

.ds-switch input::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform var(--dur) var(--ease-spring);
}

.ds-switch input:checked {
  background: var(--accent);
}

.ds-switch input:checked::after {
  transform: translateX(16px);
}

.ds-check input:disabled,
.ds-switch input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ═════════ 세그먼트 (둘~넷 중 하나 고르기) ═════════
   <div class="ds-segmented" role="radiogroup" aria-label="종류">
     <label><input type="radio" name="type" value="log" checked><span>작업기록</span></label>
     <label><input type="radio" name="type" value="note"><span>노트</span></label>
   </div> */

.ds-segmented {
  display: inline-flex;
  gap: 2px;
  height: var(--control-md);
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.ds-segmented label {
  position: relative;
  display: flex;
  flex: 1;
}

.ds-segmented input {
  position: absolute;
  inset: 0;
  margin: 0;
  border-radius: 7px;
  opacity: 0;
  cursor: pointer;
}

.ds-segmented span {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-3);
  border-radius: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: var(--weight-semibold);
  white-space: nowrap;
  pointer-events: none;
  transition: background-color var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast);
}

.ds-segmented label:hover span {
  color: var(--text);
}

.ds-segmented input:checked + span {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--line);
}

.ds-segmented input:focus-visible + span {
  box-shadow: var(--focus-ring);
}

/* ═════════ 파일 놓는 곳 ═════════
   <label class="ds-dropzone">
     <input type="file" multiple class="ds-sr-only">
     <strong>끌어다 놓거나 눌러서 고르세요</strong><small>최대 10개</small>
   </label>
   <ul class="ds-file-list"><li class="ds-file">이름 <small>12KB</small><button aria-label="빼기">×</button></li></ul>
   끌어 오는 동안엔 .is-over */

.ds-dropzone {
  display: grid;
  justify-items: center;
  gap: var(--space-1);
  padding: var(--space-6) var(--space-4);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur-fast), background-color var(--dur-fast);
}

.ds-dropzone:hover,
.ds-dropzone.is-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.ds-dropzone:focus-within {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.ds-dropzone strong {
  color: var(--text);
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
}

.ds-dropzone small {
  color: var(--faint);
  font-size: var(--text-xs);
}

.ds-file-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ds-file-list:empty {
  display: none;
}

.ds-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 4px 4px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 13px;
}

.ds-file small {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
}

.ds-file button {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--faint);
  font: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.ds-file button:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ═════════ 칩 · 태그 · 배지 ═════════
   <span class="ds-chip ds-chip--log">작업기록</span>
   고르는 칩: <button class="ds-chip" aria-pressed="true">전체 <span class="ds-chip__count">7</span></button>
   <a class="ds-tag" href="…">#CSS</a>   <span class="ds-badge">ADMIN</span> */

.ds-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--muted);
  font: inherit;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  line-height: 1.4;
  white-space: nowrap;
}

.ds-chip--log {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.ds-chip--note {
  background: var(--note-soft);
  color: var(--note);
}

.ds-chip--ok {
  background: var(--ok-soft);
  color: var(--ok);
}

/* 버튼으로 쓰는 칩 (필터) */
button.ds-chip {
  padding: 7px 14px;
  border-color: var(--line-strong);
  background: var(--surface);
  font-size: 14px;
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: border-color var(--dur-fast), background-color var(--dur-fast), color var(--dur-fast);
}

button.ds-chip:hover {
  border-color: var(--muted);
  color: var(--text);
}

button.ds-chip[aria-pressed='true'] {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.ds-chip__count {
  color: inherit;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  opacity: 0.6;
}

.ds-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-decoration: none;
  transition: border-color var(--dur-fast), color var(--dur-fast);
}

a.ds-tag:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}

.ds-tag span {
  color: var(--faint);
}

.ds-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: var(--radius-xs);
  background: var(--text);
  color: var(--bg);
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.12em;
}

.ds-badge--count {
  padding: 1px 9px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 13px;
  letter-spacing: 0;
}

/* ═════════ 고무 도장 ═════════
   <span class="ds-stamp ds-stamp--active">진행 중</span>
   --active(진행 중, 점) --paused(멈춤, 점선) --done(완료) --ink(기록 끝 표시, 고정폭 글꼴) --day(작업 일지 DAY 03) */

.ds-stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 2px 9px;
  border: 1.5px solid currentColor;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.02em;
  transform: rotate(-3deg);
}

.ds-stamp--active {
  color: var(--accent-ink);
}

.ds-stamp--active::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.ds-stamp--paused {
  border-style: dashed;
  color: var(--faint);
}

.ds-stamp--done {
  color: var(--note);
}

.ds-stamp--ink {
  padding: 4px 12px;
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: var(--weight-medium);
  transform: rotate(-4deg);
  opacity: 0.85;
}

/* 작업 일지 날짜 도장: DAY 03 */
.ds-stamp--day {
  padding: 3px 10px 1px;
  border-width: 2px;
  color: var(--accent);
  font-family: var(--font-stencil);
  font-size: 16px;
  font-weight: var(--weight-regular);
  letter-spacing: 0.12em;
  transform: rotate(-2deg);
}

/* ═════════ 라벨 테이프 (섹션 제목) ═════════
   <span class="ds-dymo">작업대</span> — 라이트는 검정, 야간은 빨강 테이프 */

.ds-dymo {
  display: inline-block;
  padding: 3px 10px 2px;
  border-radius: var(--radius-xs);
  background: var(--dymo);
  color: #f4f2ee;
  font-size: 13px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.12em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6), 0 -1px 0 rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 1px 2px rgba(0, 0, 0, 0.18);
  transform: rotate(-1deg);
}

/* ═════════ 알림 ═════════
   <div class="ds-alert" role="status">내용</div>
   --ok --danger --draft(점선, 초안 안내) */

.ds-alert {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
}

.ds-alert--ok {
  border-color: color-mix(in srgb, var(--ok) 40%, var(--line));
  background: var(--ok-soft);
}

.ds-alert--danger {
  border-color: color-mix(in srgb, var(--danger) 40%, var(--line));
  background: var(--danger-soft);
}

.ds-alert--draft {
  border: 1px dashed var(--accent);
  background: var(--accent-soft);
}

/* ═════════ 카드 ═════════
   <div class="ds-card">…</div>  --interactive(누를 수 있음, 들림)  --taped(테이프 붙임) */

.ds-card {
  position: relative;
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.ds-card--interactive {
  transition: border-color var(--dur);
}

.ds-card--interactive:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.ds-card--taped::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  width: 78px;
  height: 20px;
  background: var(--tape);
  transform: translateX(-50%) rotate(-2deg);
}

/* ═════════ 대화 상자 ═════════
   <dialog class="ds-dialog" id="x">
     <form method="dialog">
       <div class="ds-dialog__head"><h2>제목</h2><button class="ds-btn ds-btn--ghost ds-btn--icon ds-btn--sm" value="close" aria-label="닫기">×</button></div>
       <div class="ds-dialog__body">…</div>
       <div class="ds-dialog__foot"><button class="ds-btn">취소</button><button class="ds-btn ds-btn--primary">확인</button></div>
     </form>
   </dialog>
   열기: dialog.showModal()  /  넓게: --wide */

.ds-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-pop);
}

.ds-dialog--wide {
  width: min(960px, calc(100vw - 32px));
}

.ds-dialog::backdrop {
  background: rgba(18, 18, 20, 0.45);
  backdrop-filter: blur(2px);
}

.ds-dialog[open] {
  animation: ds-pop var(--dur) var(--ease-out);
}

@keyframes ds-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

.ds-dialog > form {
  display: flex;
  flex-direction: column;
  max-height: inherit;
  margin: 0;
}

.ds-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--line);
}

.ds-dialog__head h2 {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
}

.ds-dialog__body {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
  overflow: auto;
}

.ds-dialog__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  background: var(--surface-2);
}

/* ═════════ 차고 자리: 작업대 · 선반 ═════════
   <div class="ds-bench">…올려 둘 것…</div>  아래에 상판과 다리가 붙는다 (진행 중인 것)
   --shelf(벽 선반: 얇은 판, 다리 없음 — 출고한 것) */

.ds-bench {
  position: relative;
  padding-bottom: 62px;
}

/* 상판 */
.ds-bench::before {
  content: '';
  position: absolute;
  right: calc(-1 * var(--space-4));
  bottom: 46px;
  left: calc(-1 * var(--space-4));
  height: 16px;
  border-radius: var(--radius-xs);
  background: var(--bench);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.14), 0 1px 0 rgba(0, 0, 0, 0.1);
}

/* 다리 */
.ds-bench::after {
  --leg: linear-gradient(var(--bench), color-mix(in srgb, var(--bench) 70%, #000) 160%);
  content: '';
  position: absolute;
  right: calc(-1 * var(--space-4));
  bottom: 0;
  left: calc(-1 * var(--space-4));
  height: 46px;
  background: var(--leg) 8% 0 / 12px 100% no-repeat, var(--leg) 92% 0 / 12px 100% no-repeat;
}

.ds-bench--shelf {
  padding-bottom: 18px;
}

.ds-bench--shelf::before {
  right: calc(-1 * var(--space-2));
  bottom: 0;
  left: calc(-1 * var(--space-2));
  height: 10px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.14);
}

.ds-bench--shelf::after {
  content: none;
}

/* ═════════ 방수포 (잠시 덮어 둔 것) ═════════
   덮을 것(position: relative; overflow: hidden) 안 맨 끝에
   <span class="ds-tarp" aria-hidden="true"></span>
   오른쪽을 덮는다. 덮인 것에 마우스를 올리면 살짝 들춰진다. */

.ds-tarp {
  position: absolute;
  inset: -4px -4px -4px 58%;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.22), transparent 22%),
    repeating-linear-gradient(104deg, transparent 0 22px, var(--tarp-fold) 22px 25px, transparent 25px 40px),
    linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.12)), var(--tarp);
  clip-path: polygon(14% 0, 100% 0, 100% 100%, 22% 100%, 8% 82%, 18% 64%, 4% 44%, 16% 26%, 2% 10%);
  transform-origin: top right;
  pointer-events: none;
  transition: transform var(--dur-slow) var(--ease-out);
}

/* 묶어 둔 끈 */
.ds-tarp::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 58%;
  width: 4px;
  background: repeating-linear-gradient(180deg, var(--accent) 0 6px, var(--accent-ink) 6px 9px);
  opacity: 0.85;
}

:hover > .ds-tarp,
:focus-visible > .ds-tarp {
  transform: translate(14px, -10px) rotate(4deg);
}

/* ═════════ 출고 박스 · 배송 라벨 (끝낸 것) ═════════
   <a class="ds-crate" href="…">
     <span class="ds-crate__side">THIS SIDE UP ↑↑</span>
     <h3>제목</h3><p>설명</p>
     <span class="ds-ship-label"><strong>SHIPPED</strong><span>2026.08.20 · 기록 9개</span></span>
   </a> */

.ds-crate {
  position: relative;
  display: block;
  padding: var(--space-8) var(--space-5) var(--space-5);
  border-radius: var(--radius-xs);
  background: linear-gradient(180deg, transparent 0 12px, rgba(255, 255, 255, 0.18) 12px 26px, transparent 26px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.06), transparent 30%, transparent 70%, rgba(0, 0, 0, 0.08)), var(--cardboard);
  color: var(--cardboard-ink);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), var(--shadow-md);
  transition: transform var(--dur) var(--ease-out);
}

.ds-crate h3 {
  margin: 6px 0 4px;
  font-size: 17px;
  font-weight: var(--weight-heavy);
  letter-spacing: -0.02em;
}

.ds-crate p {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--leading);
  opacity: 0.8;
}

.ds-crate__side {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  opacity: 0.6;
}

.ds-ship-label {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  margin-top: var(--space-4);
  padding: var(--space-2) var(--space-3);
  border-radius: 2px;
  background: var(--label);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  transform: rotate(-2deg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ds-ship-label strong {
  color: var(--label-red);
  font-family: var(--font-stencil);
  font-size: 17px;
  font-weight: var(--weight-regular);
  letter-spacing: 0.14em;
}

/* ═════════ 기념 명판 (끝낸 것만 받는 동판) ═════════
   <div class="ds-plaque">
     <span class="ds-plaque__kicker">HISTORIC GARAGE</span>
     <h3 class="ds-plaque__title">제목</h3>   (선택)
     <p>언제 어디서 시작되어 언제 나갔다.</p>
     <small class="ds-plaque__foot">LEE'S GARAGE · EST. 2026</small>
   </div> */

.ds-plaque {
  --screw: var(--brass-ink) 0 3px, var(--brass-dark) 3.5px 4.6px, transparent 5px;
  width: min(100%, 440px);
  margin-inline: auto;
  padding: 30px 34px 26px;
  border-radius: 8px;
  background: radial-gradient(circle at 16px 16px, var(--screw)), radial-gradient(circle at calc(100% - 16px) 16px, var(--screw)),
    radial-gradient(circle at 16px calc(100% - 16px), var(--screw)),
    radial-gradient(circle at calc(100% - 16px) calc(100% - 16px), var(--screw)),
    linear-gradient(150deg, var(--brass-light) 0%, color-mix(in srgb, var(--brass) 70%, var(--brass-dark)) 42%, var(--brass) 68%, var(--brass-dark) 100%);
  color: var(--brass-ink);
  text-align: center;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5), 0 -1px 0 rgba(255, 240, 200, 0.18);
  box-shadow: inset 0 0 0 2px rgba(255, 235, 190, 0.32), inset 0 0 0 9px rgba(0, 0, 0, 0.12),
    inset 0 0 0 10px rgba(255, 235, 190, 0.2), 0 18px 30px -16px rgba(0, 0, 0, 0.6);
}

.ds-plaque__kicker {
  display: block;
  font-family: var(--font-stencil);
  font-size: 13px;
  letter-spacing: 0.3em;
  opacity: 0.85;
}

.ds-plaque__title {
  margin: 14px 0 12px;
  font-size: var(--text-2xl);
  font-weight: var(--weight-heavy);
  letter-spacing: -0.02em;
}

.ds-plaque p {
  margin: 14px 0 0;
  font-size: 14.5px;
  line-height: 1.75;
}

.ds-plaque__title + p {
  margin-top: 0;
}

.ds-plaque__foot {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  opacity: 0.75;
}

.ds-plaque__foot::before {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  margin: 18px auto 12px;
  background: rgba(255, 235, 190, 0.45);
}

/* ═════════ 작업 일지 · 설계도면 (글 머리 바탕) ═════════
   <header class="ds-logbook">…</header>    줄 쳐진 공책 + 빨간 여백선 (작업기록)
   <header class="ds-blueprint">…
     <div class="ds-title-block">
       <div class="ds-title-block__head">LEE'S GARAGE — DRAWING</div>
       <div><small>도면 번호</small>N-002</div> …
     </div>
   </header>                                 파란 도면 + 표제란 (노트) */

.ds-logbook {
  position: relative;
  isolation: isolate;
  padding: var(--space-8) var(--space-5) var(--space-8) 44px;
}

.ds-logbook::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 26px;
  width: 1px;
  background: linear-gradient(var(--margin-line) 70%, transparent);
}

.ds-logbook::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(transparent 0 31px, var(--logline) 31px 32px);
  -webkit-mask-image: linear-gradient(#000 70%, transparent);
  mask-image: linear-gradient(#000 70%, transparent);
}

.ds-blueprint {
  position: relative;
  padding: 30px 30px 26px;
  border-radius: var(--radius-lg);
  background: linear-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1px) 0 0 / 100px 100px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.13) 1px, transparent 1px) 0 0 / 100px 100px,
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 20px 20px, var(--blueprint);
  color: var(--on-accent);
}

.ds-blueprint::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-xs);
  pointer-events: none;
}

.ds-title-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(100%, 360px);
  margin: 26px 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.7);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.5;
}

.ds-title-block > div {
  padding: 6px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
}

.ds-title-block > div:nth-child(odd):not(.ds-title-block__head) {
  border-left: 1px solid rgba(255, 255, 255, 0.4);
}

/* 홀로 남은 마지막 칸은 한 줄을 다 쓴다 */
.ds-title-block > div:last-child:nth-child(even) {
  grid-column: 1 / -1;
}

.ds-title-block > .ds-title-block__head {
  grid-column: 1 / -1;
  border-top: 0;
  font-family: var(--font-stencil);
  font-size: 12.5px;
  letter-spacing: 0.16em;
}

.ds-title-block small {
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  opacity: 0.65;
}

/* ═════════ 과정 상자 (막힘 · 해결 · 다음) ═════════
   글 본문에서 마크다운 > [!막힘] · > [!해결] · > [!다음] 으로 만든다.
   <aside class="ds-callout ds-callout--stuck"><p class="ds-callout__label">막힌 곳</p><p>…</p></aside>
   --stuck(위에 공사장 테이프) --fixed(초록 바탕) --next(포스트잇 체크리스트)
   왼쪽에 굵은 색 선을 긋는 강조는 쓰지 않는다 */

.ds-callout {
  position: relative;
  margin: 1.6em 0;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.ds-callout > :first-child {
  margin-top: 0;
}

.ds-callout > :last-child {
  margin-bottom: 0;
}

.ds-callout > p:not(.ds-callout__label) {
  margin: 0.6em 0;
}

.ds-callout .ds-callout__label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 4px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
}

.ds-callout--stuck {
  padding-top: 22px;
}

/* 상자 위쪽에 비스듬히 붙인 공사장 테이프 */
.ds-callout--stuck::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 18px;
  width: 92px;
  height: 12px;
  border-radius: 2px;
  background: repeating-linear-gradient(-45deg, var(--caution) 0 7px, #1d1d20 7px 14px);
  transform: rotate(-2deg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.ds-callout--stuck .ds-callout__label {
  color: var(--caution-ink);
}

.ds-callout--stuck .ds-callout__label::before {
  content: '⚠';
}

.ds-callout--fixed {
  border-color: color-mix(in srgb, var(--ok) 30%, var(--line));
  background: var(--ok-soft);
}

.ds-callout--fixed .ds-callout__label {
  color: var(--ok);
}

.ds-callout--fixed .ds-callout__label::before {
  content: '✓';
}

.ds-callout--next {
  width: fit-content;
  max-width: 100%;
  padding: 16px 22px;
  border: 0;
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-lift);
  transform: rotate(-0.8deg);
}

.ds-callout--next .ds-callout__label {
  color: var(--paper-ink);
  font-family: var(--font-hand);
  font-size: 22px;
  font-weight: var(--weight-regular);
  letter-spacing: 0;
}

.ds-callout.ds-callout--next ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ds-callout.ds-callout--next li::before {
  content: '☐ ';
  color: var(--paper-ink);
}

/* ═════════ 틀 썸네일 (프로젝트가 무엇인지) ═════════
   종류에 맞는 틀 안에 결과물을 보여 준다. 글자 크기는 틀 너비에 맞춰 저절로 커진다(컨테이너 쿼리).
   <span class="ds-frame ds-frame--web">
     <span class="ds-frame__bar"><i></i><i></i><i></i><span class="ds-frame__url">labdawn.com</span></span>
     <span class="ds-frame__body"><img src="…" alt=""></span>
   </span>
   --web(브라우저 창) --cli(터미널: .ds-frame__line · <b>$</b> · .ds-frame__cursor) --app(앱 창: .ds-frame__screen)
   --flush(테두리·모서리 없이 — 카드 맨 위에 꽉 차게) */

.ds-frame {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.ds-frame--flush {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.ds-frame__bar {
  display: flex;
  flex: none;
  align-items: center;
  gap: clamp(3px, 1cqw, 6px);
  height: clamp(14px, 4.2cqw, 26px);
  padding: 0 clamp(6px, 1.8cqw, 12px);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.ds-frame__bar i {
  width: clamp(4px, 1.3cqw, 8px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--line-strong);
}

.ds-frame__url {
  flex: 1;
  min-width: 0;
  margin-left: clamp(3px, 1cqw, 8px);
  padding: 0 clamp(4px, 1.2cqw, 10px);
  overflow: hidden;
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: clamp(8px, 2.1cqw, 12px);
  line-height: 1.5;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ds-frame__body {
  position: relative;
  flex: 1;
  min-height: 0;
}

.ds-frame__body img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
}

/* 터미널: 테마와 상관없이 어두운 창 */
.ds-frame--cli {
  border-color: #2c2c31;
  background: #17171a;
}

.ds-frame--cli .ds-frame__bar {
  border-color: #2c2c31;
  background: #222226;
}

.ds-frame--cli .ds-frame__bar i {
  background: #3a3a40;
}

.ds-frame--cli .ds-frame__body {
  display: flex;
  flex-direction: column;
  gap: 0.25em;
  padding: 0.9em 1.1em;
  color: #c9c8c2;
  font-family: var(--font-mono);
  font-size: clamp(9px, 2.7cqw, 15px);
  line-height: 1.4;
}

.ds-frame__line {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ds-frame__line b {
  color: #ff7a3d;
  font-weight: var(--weight-medium);
}

.ds-frame__line--comment {
  color: #7d7c76;
  white-space: normal;
}

.ds-frame__cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  vertical-align: -0.15em;
  background: #ecebe8;
  animation: ds-blink 1.1s steps(1) infinite;
}

@keyframes ds-blink {
  50% {
    opacity: 0;
  }
}

/* 앱 창: 대표 화면 한 마디 */
.ds-frame--app .ds-frame__body {
  display: grid;
  place-items: center;
  padding: 0 8%;
  background: radial-gradient(circle at 50% 120%, var(--accent-soft), transparent 70%), var(--surface);
}

.ds-frame__screen {
  color: var(--accent);
  font-family: var(--font-stencil);
  font-size: clamp(18px, 9cqw, 64px);
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-align: center;
}

/* ═════════ 작업 줄자 (프로젝트를 어떻게 만들어 왔는지) ═════════
   시작 ~ 지금(또는 출고)을 눈금 한 줄로, 작업기록 날마다 핀.
   <span class="ds-tape ds-tape--active">
     <span class="ds-tape__track">
       <i class="ds-tape__pin" style="--x: 40%"></i> …
       <span class="ds-tape__now"></span>              (진행 중)
       <span class="ds-tape__rest" style="--from: 60%"></span>  (멈춘 뒤 — 방수포 빗금)
       <span class="ds-tape__flag">SHIPPED</span>       (완료)
     </span>
     <span class="ds-tape__labels"><span>09.28</span><span>DAY 05 · 기록 4</span><span>지금</span></span>
   </span> */

.ds-tape {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ds-tape__track {
  position: relative;
  height: 22px;
  border-bottom: 1px solid var(--line-strong);
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 10%) 0 100% / 100% 9px no-repeat,
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 2%) 0 100% / 100% 5px no-repeat;
}

.ds-tape__pin {
  position: absolute;
  bottom: 3px;
  left: var(--x);
  width: 9px;
  height: 9px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transform: translateX(-50%);
}

.ds-tape__pin::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1px;
  height: 4px;
  background: currentColor;
  color: var(--accent);
}

.ds-tape--paused .ds-tape__pin,
.ds-tape--done .ds-tape__pin {
  background: var(--muted);
}

.ds-tape--paused .ds-tape__pin::after,
.ds-tape--done .ds-tape__pin::after {
  color: var(--muted);
}

.ds-tape__now {
  position: absolute;
  right: -1px;
  bottom: 0;
  width: 2px;
  height: 20px;
  background: var(--accent);
}

.ds-tape__now::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  transform: translateX(-50%);
}

.ds-tape__rest {
  position: absolute;
  right: 0;
  bottom: 0;
  left: var(--from);
  height: 14px;
  border-radius: 2px 2px 0 0;
  background: repeating-linear-gradient(-45deg, var(--tarp) 0 4px, transparent 4px 8px);
  opacity: 0.8;
}

.ds-tape__flag {
  position: absolute;
  right: 0;
  bottom: 6px;
  padding: 1px 5px;
  border-radius: 2px;
  background: var(--label);
  color: var(--label-red);
  font-family: var(--font-stencil);
  font-size: 10px;
  letter-spacing: 0.12em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transform: translateX(30%) rotate(-3deg);
}

.ds-tape__labels {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.ds-tape__labels > :nth-child(2) {
  color: var(--muted);
}

.ds-tape__labels b {
  color: var(--accent);
  font-family: var(--font-stencil);
  font-weight: var(--weight-regular);
  letter-spacing: 0.06em;
}

/* ═════════ 종이 썸네일 (이미지 없는 글) ═════════
   <span class="ds-sheet ds-sheet--log"><span class="ds-sheet__no">#02</span><span class="ds-sheet__title">이 블로그 만들기</span><span class="ds-stamp ds-stamp--day">DAY 03</span></span>
   <span class="ds-sheet ds-sheet--note"><span class="ds-sheet__title">N-002</span><span class="ds-sheet__sub">마크다운</span></span>
   --log(줄 쳐진 작업 일지) --note(파란 도면) */

.ds-sheet {
  position: relative;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-align: center;
}

.ds-sheet--log {
  background: repeating-linear-gradient(transparent 0 23px, var(--logline) 23px 24px), var(--surface);
}

.ds-sheet--log::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 22px;
  width: 1px;
  background: var(--margin-line);
}

.ds-sheet--log .ds-sheet__title {
  color: var(--muted);
  font-family: var(--font-hand);
  font-size: 22px;
  line-height: 1;
}

.ds-sheet__no {
  position: absolute;
  top: 10px;
  right: 12px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.ds-sheet--note {
  border-color: transparent;
  background: linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px) 0 0 / 60px 60px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px) 0 0 / 60px 60px,
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 12px 12px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 12px 12px, var(--blueprint);
  color: var(--on-accent);
}

.ds-sheet--note::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 3px;
}

.ds-sheet--note .ds-sheet__title {
  font-family: var(--font-stencil);
  font-size: 26px;
  letter-spacing: 0.14em;
}

.ds-sheet__sub {
  font-family: var(--font-mono);
  font-size: 11.5px;
  opacity: 0.8;
}

/* ═════════ 도면 카드 (메인 도면함 — 노트) ═════════
   <a class="ds-drawing" href="…">
     <span class="ds-drawing__no">N-002</span><strong>제목</strong><span class="ds-drawing__desc">요약</span>
     <span class="ds-drawing__foot"><span>분류 마크다운</span><span>2026.09.29</span></span>
   </a> */

.ds-drawing {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 196px;
  padding: 24px 24px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 16px 16px, var(--blueprint);
  color: var(--on-accent);
  box-shadow: var(--shadow-md);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}

.ds-drawing::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 3px;
  pointer-events: none;
}

a.ds-drawing:hover {
  transform: rotate(-0.6deg);
}

.ds-drawing__no {
  font-family: var(--font-stencil);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  opacity: 0.8;
}

.ds-drawing strong {
  font-size: 18px;
  font-weight: var(--weight-heavy);
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.ds-drawing__desc {
  font-size: 13.5px;
  line-height: 1.6;
  opacity: 0.82;
}

.ds-drawing__foot {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  font-family: var(--font-mono);
  font-size: 11.5px;
  opacity: 0.85;
}

/* ═════════ 진열대 (대표 작업) ═════════
   <div class="ds-bench ds-bench--shelf"><div class="ds-showcase">
     <a class="ds-showcase__item ds-card ds-card--interactive"><span class="ds-pick">PICK 01</span>…썸네일…
       <span class="ds-showcase__body"><span class="ds-showcase__kind">프로젝트</span><strong>제목</strong>…</span></a>
   </div></div>
   첫 번째는 두 칸을 차지하고 썸네일이 옆에 선다 (넓은 화면) */

.ds-showcase {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  padding-top: var(--space-3);
}

.ds-showcase__item {
  position: relative;
  display: grid;
  align-content: start;
  gap: var(--space-3);
  padding: var(--space-3);
  color: inherit;
  text-decoration: none;
}

.ds-showcase__item:first-child {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--space-5);
}

.ds-showcase__body {
  display: grid;
  gap: 6px;
  padding: 0 var(--space-2) var(--space-2);
}

.ds-showcase__item:first-child .ds-showcase__body {
  padding: var(--space-2) var(--space-2) var(--space-2) 0;
}

.ds-showcase__kind {
  color: var(--faint);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}

.ds-showcase__body strong {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
}

.ds-showcase__item:first-child .ds-showcase__body strong {
  font-size: var(--text-2xl);
}

.ds-showcase__desc {
  color: var(--muted);
  font-size: 14.5px;
  line-height: var(--leading);
}

.ds-showcase__result {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-top: var(--space-1);
  font-size: 14px;
  line-height: var(--leading);
}

.ds-showcase__result .ds-chip {
  flex-shrink: 0;
}

/* 걸이표 — 진열한 물건에 매단 작은 표 (구멍 + 끈) */
.ds-pick {
  position: absolute;
  z-index: 2;
  top: -10px;
  right: 18px;
  padding: 4px 10px 4px 18px;
  border-radius: 3px 6px 6px 3px;
  background: var(--paper);
  color: #6b4a00;
  font-family: var(--font-stencil);
  font-size: 11px;
  letter-spacing: 0.12em;
  box-shadow: 0 4px 10px -6px rgba(60, 40, 0, 0.6);
  transform: rotate(4deg);
}

.ds-pick::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 6px;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

@media (max-width: 700px) {
  .ds-showcase {
    grid-template-columns: 1fr;
  }

  .ds-showcase__item:first-child {
    grid-template-columns: 1fr;
  }

  .ds-showcase__item:first-child .ds-showcase__body {
    padding: 0 var(--space-2) var(--space-2);
  }
}

/* ═════════ 클립보드 (요즘) ═════════
   <div class="ds-clipboard"><span class="ds-clipboard__clip"></span>
     <div class="ds-clipboard__paper"><p class="ds-clipboard__head">…</p><dl><div><dt>집중</dt><dd>…</dd></div></dl>
     <p class="ds-clipboard__foot">10.01 기준</p></div></div> */

.ds-clipboard {
  position: relative;
  max-width: 560px;
  padding: 26px 14px 14px;
  border-radius: 14px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--bench) 88%, #fff), var(--bench));
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12), 0 14px 26px -16px rgba(60, 40, 10, 0.55);
  transform: rotate(-0.6deg);
}

.ds-clipboard__clip {
  position: absolute;
  top: -8px;
  left: 50%;
  width: 110px;
  height: 30px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(#cfd2d6, #8f949a);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), 0 3px 6px rgba(0, 0, 0, 0.25);
  transform: translateX(-50%);
}

.ds-clipboard__clip::after {
  content: '';
  position: absolute;
  top: 9px;
  left: 50%;
  width: 22px;
  height: 8px;
  border-radius: 4px;
  background: var(--bench);
  transform: translateX(-50%);
}

.ds-clipboard__paper {
  padding: var(--space-5) var(--space-5) var(--space-4);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.ds-clipboard__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 var(--space-3);
}

.ds-clipboard__head .stencil {
  color: var(--accent);
  font-size: 18px;
}

.ds-clipboard__head .hand {
  color: var(--muted);
  font-size: 20px;
}

.ds-clipboard dl {
  display: grid;
  gap: var(--space-2);
  margin: 0;
}

.ds-clipboard dl > div {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px dashed var(--line);
}

.ds-clipboard dl > div:last-child {
  border-bottom: 0;
}

.ds-clipboard dt {
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: var(--weight-bold);
  line-height: 1.9;
}

.ds-clipboard dd {
  margin: 0;
  font-size: var(--text-md);
  line-height: 1.85;
}

.ds-clipboard__foot {
  margin: var(--space-3) 0 0;
  color: var(--faint);
  font-size: 18px;
  text-align: right;
}

.ds-clipboard__foot.is-stale {
  color: var(--danger);
}

/* ═════════ 흐름 4칸 (사례 요약: 문제 → 접근 → 결과 → 내 역할) ═════════
   <ol class="ds-steps"><li class="ds-steps__item ds-steps__item--problem"><span class="ds-steps__no">01</span><strong>문제</strong><p>…</p></li>…</ol>
   칸 사이에 화살표. 좁은 화면에선 세로로 */

.ds-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-5);
  margin: var(--space-6) 0 0;
  padding: 0;
  list-style: none;
}

.ds-steps__item {
  --c: var(--muted);
  position: relative;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-top: 3px solid var(--c);
  border-radius: 4px 4px var(--radius-md) var(--radius-md);
  background: var(--surface);
}

.ds-steps__item:not(:last-child)::after {
  content: '→';
  position: absolute;
  top: 50%;
  right: calc(-1 * var(--space-5) + 2px);
  color: var(--faint);
  font-size: 16px;
  transform: translateY(-50%);
}

.ds-steps__item--problem {
  --c: var(--danger);
}

.ds-steps__item--approach {
  --c: var(--note);
}

.ds-steps__item--result {
  --c: var(--ok);
}

.ds-steps__item--role {
  --c: var(--accent);
}

.ds-steps__no {
  color: var(--c);
  font-size: 13px;
  letter-spacing: 0.1em;
}

.ds-steps__item strong {
  font-size: var(--text-sm);
}

.ds-steps__item p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: var(--leading);
}

@media (max-width: 700px) {
  .ds-steps {
    grid-template-columns: 1fr;
  }

  .ds-steps__item:not(:last-child)::after {
    content: '↓';
    top: auto;
    right: 50%;
    bottom: calc(-1 * var(--space-5) + 2px);
    transform: translateX(50%);
  }
}

/* ═════════ A4 종이 (한 장 요약) ═════════
   <article class="ds-paper">…</article> — 화면에선 그림자 진 A4, 인쇄하면 그대로 한 장
   --thumb: 줄만 그은 작은 미리보기 (<i> 여러 개가 글줄) */

.ds-paper {
  width: min(100%, 210mm);
  min-height: 297mm;
  margin-inline: auto;
  padding: 18mm 18mm 14mm;
  background: #fff;
  color: #19191d;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 24px 48px -24px rgba(20, 15, 5, 0.4);
}

.ds-paper--thumb {
  display: grid;
  align-content: start;
  gap: 7px;
  width: 100%;
  min-height: 0;
  aspect-ratio: 210 / 297;
  padding: 16% 14%;
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px -12px rgba(20, 15, 5, 0.45);
}

.ds-paper--thumb i {
  height: 5px;
  border-radius: 3px;
  background: #e4e1da;
}

.ds-paper--thumb i:first-child {
  width: 55%;
  height: 9px;
  background: #19191d;
}

.ds-paper--thumb i:nth-child(2) {
  width: 35%;
  background: #f0611f;
}

.ds-paper--thumb i:nth-child(4) {
  width: 80%;
}

.ds-paper--thumb i:nth-child(6) {
  width: 65%;
}

/* ═════════ 키 · 줄자 ═════════
   <kbd class="ds-kbd">⌘S</kbd>   <hr class="ds-ruler"> */

.ds-kbd {
  padding: 1px 6px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.ds-ruler {
  height: 9px;
  margin: var(--space-8) 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: repeating-linear-gradient(90deg, var(--faint) 0 1px, transparent 1px 50px) 0 0 / 100% 9px no-repeat,
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 10px) 0 0 / 100% 5px no-repeat;
  opacity: 0.8;
}

@media (prefers-reduced-motion: reduce) {
  .ds-btn,
  .ds-card--interactive,
  .ds-tarp,
  .ds-crate,
  .ds-drawing,
  .ds-check input::after,
  .ds-switch input::after {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ds-frame__cursor {
    animation: none;
  }
}
