/* inbox — 새벽에 들여다보는 개인 수신함. 짙은 잉크 바탕에 호박색 액센트. */

:root {
  --ink:        #0d0f13;
  --ink-raised: #14171d;
  --ink-line:   #222732;
  --paper:      #e7e4dc;
  --paper-dim:  #8b8e97;
  --amber:      #e0a24a;
  --coral:      #e2685f;
  --teal:       #5fb3a8;
  --violet:     #8d84c4;

  --sans: "IBM Plex Sans KR", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --mono: "IBM Plex Mono", "D2Coding", ui-monospace, "SFMono-Regular", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ink);
  /* 종이 결 대신 아주 옅은 빛 번짐 — 새벽 책상 스탠드 */
  background-image:
    radial-gradient(60rem 30rem at 15% -10%, rgba(224, 162, 74, .07), transparent 70%),
    radial-gradient(40rem 24rem at 95% 0%, rgba(95, 179, 168, .05), transparent 70%);
  background-attachment: fixed;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--amber); text-decoration-color: rgba(224, 162, 74, .35); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--amber); }

.muted { color: var(--paper-dim); font-weight: 400; }
.meta {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .02em;
  color: var(--paper-dim);
  margin: .35rem 0 0;
}

/* ── 잠긴 화면 ─────────────────────────────────────── */

.locked {
  min-height: 100dvh;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: .25rem;
  max-width: 26rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  animation: rise .5s cubic-bezier(.2, .7, .3, 1) both;
}
.locked h1 {
  font-family: var(--mono);
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -.055em;
  margin: 0;
}
.locked h1::after {
  content: "_";
  color: var(--amber);
  animation: blink 1.3s steps(1) infinite;
}
.locked > .muted { margin: 0 0 1.75rem; }

.locked-form { display: flex; gap: .5rem; width: 100%; }
.locked-form input[type="password"] {
  flex: 1;
  min-width: 0;
  padding: .7rem .85rem;
  background: var(--ink-raised);
  border: 1px solid var(--ink-line);
  border-radius: 3px;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 13px;
  transition: border-color .15s, box-shadow .15s;
}
.locked-form input:focus {
  outline: 0;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(224, 162, 74, .13);
}
.locked-form input::placeholder { color: #4d525e; }

.locked-form input[type="submit"] {
  padding: .7rem 1.2rem;
  background: var(--amber);
  color: #23180a;
  border: 0;
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: filter .15s, transform .15s;
}
.locked-form input[type="submit"]:hover { filter: brightness(1.1); }
.locked-form input[type="submit"]:active { transform: translateY(1px); }

.error {
  margin: .9rem 0 0;
  color: var(--coral);
  font-family: var(--mono);
  font-size: 12.5px;
}

/* ── 대시보드 ─────────────────────────────────────── */

.board { max-width: 54rem; margin: 0 auto; padding: 0 1.5rem 5rem; }

.board-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: baseline;
  gap: .9rem;
  padding: 1.6rem 0 1rem;
  background: linear-gradient(var(--ink) 72%, transparent);
  backdrop-filter: blur(3px);
}
.board-head h1 {
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -.05em;
  margin: 0;
}
.badge {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--paper-dim);
  border: 1px solid var(--ink-line);
  border-radius: 99px;
  padding: .15rem .6rem;
}
.badge b { color: var(--amber); font-weight: 600; }

form.logout-form { margin-left: auto; }
.logout {
  background: none;
  border: 0;
  padding: .2rem .1rem;
  color: var(--paper-dim);
  font-family: var(--sans);
  font-size: 12.5px;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.logout:hover { color: var(--paper); border-bottom-color: var(--ink-line); }

.board section { margin-top: 2.2rem; }
.board h2 {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--paper-dim);
  margin: 0 0 .9rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--ink-line);
}
.board h2 .muted { font-family: var(--mono); letter-spacing: 0; text-transform: none; }

.captures, .tasks { list-style: none; margin: 0; padding: 0; }

/* 들어온 순서대로 아래로 흐르는 느낌 — 왼쪽에 얇은 기준선 */
.captures li {
  position: relative;
  display: flex;
  gap: .85rem;
  padding: .9rem 0 .9rem 1.1rem;
  border-bottom: 1px solid rgba(34, 39, 50, .55);
  animation: rise .45s cubic-bezier(.2, .7, .3, 1) both;
}
.captures li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.35rem;
  width: 5px;
  height: 5px;
  border-radius: 99px;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(224, 162, 74, .12);
}
.captures li.done::before { background: var(--ink-line); box-shadow: none; }
.captures li.done { color: var(--paper-dim); }
.captures li.done a { color: var(--paper-dim); }

.kind {
  flex: none;
  align-self: start;
  margin-top: .15rem;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .15rem .45rem;
  border-radius: 2px;
  border: 1px solid currentColor;
  opacity: .8;
}
.kind-link { color: var(--amber); }
.kind-memo { color: var(--teal); }

.capture-body { min-width: 0; flex: 1; }
.capture-body a {
  font-family: var(--mono);
  font-size: 12.5px;
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.capture-body p { margin: .2rem 0 0; overflow-wrap: anywhere; }
.summary {
  margin-top: .5rem !important;
  padding-left: .8rem;
  border-left: 2px solid rgba(141, 132, 196, .5);
  color: var(--violet);
  font-size: 14px;
}

.tasks li {
  display: flex;
  align-items: baseline;
  gap: .85rem;
  padding: .55rem 0;
  border-bottom: 1px solid rgba(34, 39, 50, .55);
  animation: rise .45s cubic-bezier(.2, .7, .3, 1) both;
}
.tasks .meta { margin: 0; margin-left: auto; padding-left: .5rem; }

.lane {
  flex: none;
  width: 4.2rem;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--paper-dim);
  border-left: 2px solid var(--ink-line);
  padding-left: .55rem;
}
.lane-urgent  { color: var(--coral);  border-left-color: var(--coral); }
.lane-doing   { color: var(--teal);   border-left-color: var(--teal); }
.lane-backlog { color: var(--paper);  border-left-color: var(--ink-line); }
.lane-later   { color: var(--paper-dim); border-left-color: transparent; }

/* 로드될 때 위에서부터 차례로 — 줄 수가 많아도 8줄까지만 계단식 */
.captures li:nth-child(1), .tasks li:nth-child(1) { animation-delay: .02s; }
.captures li:nth-child(2), .tasks li:nth-child(2) { animation-delay: .05s; }
.captures li:nth-child(3), .tasks li:nth-child(3) { animation-delay: .08s; }
.captures li:nth-child(4), .tasks li:nth-child(4) { animation-delay: .11s; }
.captures li:nth-child(5), .tasks li:nth-child(5) { animation-delay: .14s; }
.captures li:nth-child(6), .tasks li:nth-child(6) { animation-delay: .17s; }
.captures li:nth-child(7), .tasks li:nth-child(7) { animation-delay: .20s; }
.captures li:nth-child(n+8), .tasks li:nth-child(n+8) { animation-delay: .23s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@keyframes blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media (max-width: 34rem) {
  .board { padding: 0 1.1rem 4rem; }
  .tasks li { flex-wrap: wrap; }
  .lane { width: auto; }
  .tasks .meta { margin-left: 0; }
}
