/* 책상을 위에서 내려다본 구도: 위에는 스티커 붙은 홈서버 노트북, 가운데는 출력한 포트폴리오 한 장,
   아래에는 배포 영수증과 엽서. 굵은 장식은 노트북 뚜껑에만 몰고 종이 위는 읽기 좋게 조용히 둠 */
:root {
  --desk: #d5dbe0;
  --desk-grain: #c3cad1;
  --paper: #fcfcfa;
  --paper-rule: #e2e5e7;
  --ink: #15181c;
  --ink-soft: #59616a;
  --pen: #2340c2;
  --marker: #ffe55c;
  --led: #27c35f;
  --led-warn: #e0a020;
  --lid: #bcc3ca;
  --lid-shine: #d9dee2;
  --lid-edge: #9fa8b1;
  --hinge: #8a939c;
  --tape: #17191c;
  --tape-text: #f3f4f5;
  --receipt: #fffef8;
  --receipt-ink: #2b2a27;
  --sticky-1: #ffe36e;
  --sticky-2: #b6efd2;
  --sticky-3: #bdd6ff;
  --sticky-4: #ffc8dc;
  --sticky-ink: #1d1e20;
  --stamp-red: #d6352b;
  --st-white: #ffffff;
  --st-black: #17191c;
  --st-red: #e0234e;
  --st-green: #6db33f;
  --st-orange: #e95420;
  --st-mongo: #013a33;
  --st-mongo-text: #00ed64;
  --st-gold: #e8b931;
  --st-blue: #2b62d9;
  --term-bg: #0e1116;
  --term-bar: #1b2028;
  --term-fg: #d6dde6;
  --term-dim: #7f8a97;
  --term-accent: #7ee2a0;
  --shadow-soft: 0 1px 2px rgb(15 20 25 / .08), 0 10px 28px rgb(15 20 25 / .12);
  --shadow-sticker: 0 1px 1px rgb(15 20 25 / .25), 0 3px 8px rgb(15 20 25 / .18);

  --font-display: "Bagel Fat One", "IBM Plex Sans KR", "Apple SD Gothic Neo", sans-serif;
  --font-body: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "IBM Plex Sans KR", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-hand: "Nanum Pen Script", "Apple SD Gothic Neo", cursive;

  --gutter: clamp(16px, 4vw, 40px);
  --page: 1160px;
  color-scheme: light;
}

/* 스탠드를 끈 밤 책상. 종이와 스티커는 그대로 두고 주변만 어둡게 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --desk: #111417;
    --desk-grain: #1c2025;
    --paper: #1b1f23;
    --paper-rule: #2d3339;
    --ink: #e7eaed;
    --ink-soft: #9ca5ae;
    --pen: #93a9ff;
    --marker: #5a4f12;
    --lid: #3a4047;
    --lid-shine: #4a5159;
    --lid-edge: #2a2f35;
    --hinge: #22272c;
    --tape: #eceef0;
    --tape-text: #121417;
    --receipt: #dcd9cf;
    --sticky-1: #d8c35c;
    --sticky-2: #92c6ac;
    --sticky-3: #9db4dc;
    --sticky-4: #d4a6b8;
    --stamp-red: #ff6b5f;
    --shadow-soft: 0 1px 2px rgb(0 0 0 / .4), 0 12px 32px rgb(0 0 0 / .5);
    --shadow-sticker: 0 1px 1px rgb(0 0 0 / .5), 0 3px 8px rgb(0 0 0 / .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --desk: #111417;
  --desk-grain: #1c2025;
  --paper: #1b1f23;
  --paper-rule: #2d3339;
  --ink: #e7eaed;
  --ink-soft: #9ca5ae;
  --pen: #93a9ff;
  --marker: #5a4f12;
  --lid: #3a4047;
  --lid-shine: #4a5159;
  --lid-edge: #2a2f35;
  --hinge: #22272c;
  --tape: #eceef0;
  --tape-text: #121417;
  --receipt: #dcd9cf;
  --sticky-1: #d8c35c;
  --sticky-2: #92c6ac;
  --sticky-3: #9db4dc;
  --sticky-4: #d4a6b8;
  --stamp-red: #ff6b5f;
  --shadow-soft: 0 1px 2px rgb(0 0 0 / .4), 0 12px 32px rgb(0 0 0 / .5);
  --shadow-sticker: 0 1px 1px rgb(0 0 0 / .5), 0 3px 8px rgb(0 0 0 / .4);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
  margin: 0;
  padding-inline: var(--gutter);
  background-color: var(--desk);
  /* 책상 상판의 잔결 */
  background-image: radial-gradient(var(--desk-grain) 1px, transparent 1.2px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s ease, color .4s ease;
}

a { color: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 3px; border-radius: 4px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 8px 14px; background: var(--tape); color: var(--tape-text); }
.skip:focus { top: 12px; }
.mono { font-family: var(--font-mono); }
.hand { font-family: var(--font-hand); font-weight: 400; }

mark {
  padding: 0 .15em;
  margin: 0 -.05em;
  color: inherit;
  /* 형광펜은 글자보다 살짝 낮게, 끝이 고르지 않게 */
  background: linear-gradient(100deg, transparent .2em, var(--marker) .3em, var(--marker) calc(100% - .4em), transparent calc(100% - .2em)) 0 75% / 100% 62% no-repeat;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* 라벨기로 뽑은 테이프. 버튼과 로고에 씀 */
.tape {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 14px;
  border: 0;
  border-radius: 3px;
  background: var(--tape);
  color: var(--tape-text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  text-shadow: 0 1px 0 color-mix(in srgb, var(--tape-text) 25%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tape-text) 10%, transparent), 0 2px 0 color-mix(in srgb, var(--ink) 18%, transparent);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.tape:hover { transform: translateY(-1px) rotate(-.6deg); }
.tape:active { transform: translateY(1px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tape-text) 10%, transparent); }
.tape-lg { min-height: 46px; padding: 6px 20px; font-size: 15px; }

.btn-line {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 6px 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.btn-line:hover { background: var(--ink); color: var(--desk); }

.text-btn {
  padding: 2px 0;
  border: 0;
  border-bottom: 1px dashed currentColor;
  background: none;
  color: var(--ink-soft);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.text-btn:hover { color: var(--ink); }

/* 상단 */
.topbar {
  max-width: var(--page);
  margin: 0 auto;
  padding-block: 18px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
}
.brand { font-family: var(--font-mono); font-size: 13px; letter-spacing: .1em; min-height: 30px; transform: rotate(-1.5deg); }
.topnav { display: flex; flex: 1 1 auto; gap: 4px 18px; flex-wrap: wrap; min-width: 0; }
.topnav a { font-size: 14px; font-weight: 500; color: var(--ink-soft); text-decoration: none; }
.topnav a:hover { color: var(--ink); text-decoration: underline wavy var(--pen) 1px; text-underline-offset: 5px; }

.lamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 4px 10px 4px 6px;
  border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.lamp svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lamp .lamp-shade { fill: var(--ink); }
.lamp .lamp-bulb { fill: var(--marker); stroke: none; }
.lamp[aria-pressed="false"] .lamp-bulb { fill: transparent; stroke: currentColor; stroke-width: 1; }

/* 히어로: 이름과 노트북 */
.hero {
  max-width: var(--page);
  margin: 0 auto;
  padding-block: clamp(40px, 7vw, 88px) clamp(48px, 7vw, 96px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}
.hero-copy { min-width: 0; }
.hero-hello { margin: 0 0 -6px; font-size: 30px; line-height: 1.2; color: var(--pen); transform: rotate(-3deg); transform-origin: left; }
.hero-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(76px, 12vw, 150px);
  line-height: 1;
  letter-spacing: -.01em;
}
.hero-lead { margin: 18px 0 0; max-width: 24em; font-size: clamp(18px, 2.1vw, 22px); font-weight: 500; line-height: 1.6; text-wrap: balance; }
.hero-contact { display: grid; gap: 4px; margin: 22px 0 0; padding: 0; list-style: none; font-family: var(--font-mono); font-size: 14px; }
.hero-contact li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hero-contact a { text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--ink) 30%, transparent); }
.hero-contact a:hover { border-bottom-color: var(--ink); }
.copy {
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
  border-radius: 4px;
  background: none;
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
  line-height: 22px;
  cursor: pointer;
}
.copy:hover { color: var(--ink); border-color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 30px; }

/* 노트북 뚜껑. 스티커 글자 크기는 뚜껑 너비를 따라감 */
.laptop { position: relative; margin: 0; min-width: 0; }
.laptop-hint {
  position: absolute;
  right: 4%;
  top: -46px;
  margin: 0;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  font-size: 24px;
  line-height: 1;
  color: var(--pen);
  transform: rotate(2deg);
}
.laptop-hint svg { width: 46px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; transform: translateY(18px) scaleX(-1); }
.lid {
  position: relative;
  container-type: inline-size;
  width: 100%;
  aspect-ratio: 1.56;
  border-radius: 18px 18px 22px 22px;
  background:
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--lid-shine) 35%, transparent) 0 1px, transparent 1px 3px),
    linear-gradient(150deg, var(--lid-shine), var(--lid) 45%, var(--lid-edge));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--lid-shine) 70%, transparent),
    inset 0 -6px 0 color-mix(in srgb, var(--lid-edge) 80%, transparent),
    0 18px 40px rgb(15 20 25 / .25), 0 2px 4px rgb(15 20 25 / .2);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.hinge {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 0;
  height: 2.2%;
  border-radius: 0 0 6px 6px;
  background: var(--hinge);
}
.led {
  position: absolute;
  right: 4.5%;
  bottom: 5%;
  width: 1.6cqi;
  height: 1.6cqi;
  min-width: 7px;
  min-height: 7px;
  border-radius: 50%;
  background: var(--hinge);
}
.led[data-state="on"] { background: var(--led); box-shadow: 0 0 0 2px color-mix(in srgb, var(--led) 30%, transparent), 0 0 14px var(--led); animation: breathe 3.2s ease-in-out infinite; }
.led[data-state="off"] { background: var(--led-warn); box-shadow: 0 0 10px var(--led-warn); }
@keyframes breathe { 50% { opacity: .35; box-shadow: 0 0 4px var(--led); } }

.sticker {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: rotate(var(--r));
  display: inline-flex;
  align-items: center;
  font-size: 3.3cqi;
  line-height: 1.1;
  white-space: nowrap;
  cursor: grab;
  touch-action: none;
  /* 칼선 따라 남은 흰 테두리 */
  box-shadow: 0 0 0 .32em var(--st-white), var(--shadow-sticker);
  transition: transform .18s ease, box-shadow .18s ease;
}
.sticker:hover { transform: rotate(var(--r)) scale(1.03); }
.sticker.is-lifted { cursor: grabbing; transform: rotate(calc(var(--r) - 3deg)) scale(1.08); box-shadow: 0 0 0 .32em var(--st-white), 0 14px 26px rgb(15 20 25 / .3); transition: none; }

.st-hello {
  flex-direction: column;
  align-items: stretch;
  width: 9.2em;
  border-radius: .7em;
  overflow: hidden;
  background: var(--st-white);
  color: var(--st-black);
  text-align: center;
}
.st-hello b { padding: .35em 0 0; background: var(--st-red); color: var(--st-white); font-family: var(--font-body); font-weight: 700; font-size: 1.15em; letter-spacing: .12em; }
.st-hello i { padding: 0 0 .35em; background: var(--st-red); color: var(--st-white); font-style: normal; font-size: .62em; letter-spacing: .08em; }
.st-hello em { padding: .1em 0 .2em; font-family: var(--font-hand); font-style: normal; font-size: 2.3em; line-height: 1.05; color: var(--st-blue); }

.st-dymo {
  padding: .35em .8em;
  border-radius: .2em;
  background: var(--st-black);
  color: var(--st-white);
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: .14em;
  text-shadow: 0 .06em 0 rgb(255 255 255 / .35);
}
.st-spring { padding: .45em .95em; border-radius: 999px; background: var(--st-green); color: var(--st-white); font-weight: 700; }
.st-award {
  flex-direction: column;
  justify-content: center;
  width: 6.6em;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--st-gold) 55%, var(--st-white)), var(--st-gold) 60%);
  color: var(--st-black);
  text-align: center;
  white-space: normal;
}
.st-award b { font-family: var(--font-display); font-weight: 400; font-size: 1.25em; }
.st-award small { font-size: .62em; font-weight: 600; line-height: 1.25; }
.st-pipe {
  gap: .4em;
  padding: .4em .8em;
  border-radius: .3em;
  background: var(--st-white);
  color: var(--st-black);
  font-family: var(--font-mono);
  font-weight: 600;
}
.st-pipe i { font-style: normal; color: var(--st-red); }
.st-nest {
  justify-content: center;
  width: 5.4em;
  aspect-ratio: 1.15;
  background: var(--st-red);
  color: var(--st-white);
  font-weight: 700;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  box-shadow: none;
  filter: drop-shadow(0 0 .12em var(--st-white)) drop-shadow(0 0 .1em var(--st-white)) drop-shadow(0 2px 3px rgb(15 20 25 / .3));
}
.st-nest.is-lifted { box-shadow: none; }
.st-ubuntu { padding: .4em .9em; border-radius: .4em; background: var(--st-orange); color: var(--st-white); font-weight: 600; }
.st-mongo { padding: .4em .8em; border-radius: .4em; background: var(--st-mongo); color: var(--st-mongo-text); font-family: var(--font-mono); font-weight: 600; }
.st-opic { flex-direction: column; padding: .3em .55em; border-radius: .25em; background: var(--st-blue); color: var(--st-white); font-size: 2.6cqi; font-weight: 600; text-align: center; }
.st-opic b { font-family: var(--font-display); font-weight: 400; font-size: 1.7em; line-height: 1; }

.laptop-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-soft);
}
.laptop-caption > span { min-width: 0; font-variant-numeric: tabular-nums; }

/* 출력한 포트폴리오 한 장 */
.sheet {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) clamp(20px, 6vw, 72px) clamp(32px, 5vw, 60px);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  transition: background-color .4s ease;
}
.clip {
  position: absolute;
  left: 50%;
  top: -14px;
  width: 92px;
  height: 30px;
  transform: translateX(-50%);
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(var(--st-black), color-mix(in srgb, var(--st-black) 80%, var(--lid-shine)));
  box-shadow: 0 3px 6px rgb(15 20 25 / .3);
}
.clip::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: -12px;
  height: 16px;
  border: 3px solid var(--hinge);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}
.sheet-pdf { position: absolute; right: clamp(16px, 4vw, 40px); top: 18px; font-size: 12px; min-height: 28px; transform: rotate(1.5deg); }

.block + .block { margin-top: 56px; padding-top: 44px; border-top: 1px solid var(--paper-rule); }
.block-title {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 36px);
  line-height: 1.15;
  letter-spacing: -.01em;
}

.about { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.about-item { min-width: 0; }
.about-item h3 { margin: 0 0 4px; font-size: 30px; line-height: 1.1; color: var(--pen); }
.about-item p { margin: 0; font-size: 15px; }

.entry { position: relative; }
.entry + .entry { margin-top: 40px; padding-top: 36px; border-top: 1px dashed var(--paper-rule); }
.entry-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; }
.entry h3 { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.4; letter-spacing: -.01em; text-wrap: balance; }
.period { font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.period.is-live { padding: 0 8px; background: var(--marker); color: var(--ink); }
.role { margin: 4px 0 10px; font-size: 14.5px; color: var(--ink-soft); }
.desc { margin: 0 0 8px; }
.points { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.points li { position: relative; padding-left: 20px; }
.points li::before { content: ""; position: absolute; left: 2px; top: .85em; width: 9px; height: 2px; border-radius: 2px; background: var(--ink-soft); }
.pen { font-family: var(--font-hand); font-size: 1.3em; line-height: 1; color: var(--pen); white-space: nowrap; }

.stack { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 0; margin: 16px 0 0; padding: 0; list-style: none; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft); }
.stack::before { content: "TECH"; margin-right: 10px; padding: 0 6px; border: 1px solid currentColor; border-radius: 3px; font-size: 10.5px; letter-spacing: .1em; }
.stack li + li::before { content: "/"; margin: 0 8px; opacity: .5; }

.code-link { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--pen); text-decoration: none; }
.code-link::after { content: " \2197"; }
.code-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* 수상 도장 */
.stamp {
  position: absolute;
  right: -6px;
  top: 30px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100px;
  aspect-ratio: 1;
  padding: 14px;
  border: 3px double var(--stamp-red);
  border-radius: 50%;
  color: var(--stamp-red);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  transform: rotate(-14deg);
  opacity: .88;
  mix-blend-mode: multiply;
}
:root[data-theme="dark"] .stamp { mix-blend-mode: normal; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stamp { mix-blend-mode: normal; } }
.entry:has(.stamp) :is(.role, .desc) { padding-right: 116px; }

/* 기술: 포스트잇 네 장 */
.stickies { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.sticky {
  min-width: 0;
  padding: 16px 18px 20px;
  background: var(--sticky-1);
  color: var(--sticky-ink);
  box-shadow: 0 1px 1px rgb(15 20 25 / .12), 0 8px 14px -6px rgb(15 20 25 / .3);
  transform: rotate(-1.6deg);
}
.sticky:nth-child(2) { background: var(--sticky-2); transform: rotate(1.2deg) translateY(6px); }
.sticky:nth-child(3) { background: var(--sticky-3); transform: rotate(-.6deg); }
.sticky:nth-child(4) { background: var(--sticky-4); transform: rotate(2deg) translateY(4px); }
.sticky h3 { margin: 0 0 6px; font-size: 30px; line-height: 1.1; }
.sticky ul { margin: 0; padding: 0; list-style: none; font-size: 14.5px; line-height: 1.65; }

/* 이력 */
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--paper-rule); }
.timeline li:first-child { padding-top: 0; }
.timeline li:last-child { border-bottom: 0; padding-bottom: 0; }
.when { font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); padding-top: 3px; font-variant-numeric: tabular-nums; }
.note { margin-left: 8px; font-size: 13.5px; color: var(--ink-soft); }

/* 영수증과 엽서 */
.desk-row {
  max-width: var(--page);
  margin: 0 auto;
  padding-block: clamp(56px, 8vw, 104px) 40px;
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.desk-title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(26px, 3vw, 32px); line-height: 1.2; }
.desk-lead { margin: 6px 0 22px; font-size: 14.5px; color: var(--ink-soft); }

.receipt {
  --zig: 12px;
  position: relative;
  padding: 26px 24px 40px;
  background: var(--receipt);
  color: var(--receipt-ink);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  transform: rotate(1.2deg);
  filter: drop-shadow(0 10px 18px rgb(15 20 25 / .2));
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--zig) 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--zig) 100%;
}
.receipt p { margin: 0; }
.r-head { text-align: center; font-weight: 600; letter-spacing: .2em; padding-bottom: 14px; border-bottom: 1px dashed currentColor; }
.r-head span { font-family: var(--font-body); letter-spacing: .3em; font-weight: 500; }
.r-sub { margin-top: 14px !important; padding-top: 12px; border-top: 1px dashed currentColor; font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: .1em; }
.r-rows { margin: 12px 0 0; display: grid; gap: 2px; }
.r-sub + .r-rows { margin-top: 6px; }
.r-rows div { display: flex; justify-content: space-between; gap: 12px; }
.r-rows dt { font-family: var(--font-body); }
.r-rows dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; min-width: 0; }
.r-load dd { display: inline-flex; align-items: center; gap: 8px; }
.spark { width: 60px; height: 16px; }
.spark polyline { fill: none; stroke: currentColor; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.r-steps { margin: 6px 0 0; padding-left: 1.6em; font-family: var(--font-body); }
.r-path { margin-top: 14px !important; padding-top: 12px; border-top: 1px dashed currentColor; font-size: 11.5px; line-height: 1.5; }
.r-foot { margin-top: 14px !important; text-align: center; font-family: var(--font-body); font-size: 12px; letter-spacing: .1em; }
.barcode {
  display: block;
  height: 34px;
  margin: 10px auto 0;
  width: 78%;
  background: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 4px, currentColor 4px 5px, transparent 5px 8px, currentColor 8px 11px, transparent 11px 12px);
}

.postcard {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  transform: rotate(-.8deg);
}
.pc-message { display: block; min-width: 0; padding: 22px 22px 24px 26px; border-right: 1px solid var(--paper-rule); }
.pc-message textarea {
  display: block;
  width: 100%;
  min-height: 236px;
  padding: 0;
  border: 0;
  resize: vertical;
  background: repeating-linear-gradient(transparent 0 31px, var(--paper-rule) 31px 32px);
  background-attachment: local;
  color: var(--ink);
  font-family: var(--font-hand);
  font-size: 25px;
  line-height: 32px;
}
.pc-message textarea::placeholder { color: color-mix(in srgb, var(--ink-soft) 70%, transparent); }
.pc-message textarea:focus { outline: none; }
.pc-message:focus-within { box-shadow: inset 0 0 0 2px var(--pen); }
.pc-side { position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 22px 24px 24px; }
.pc-stamp {
  align-self: flex-end;
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 72px;
  height: 81px;
  padding: 4px;
  background: var(--sticky-3);
  color: var(--sticky-ink);
  /* 우표 톱니: 가운데는 꽉 채우고 테두리에만 반원 구멍. 크기는 구멍 간격(9px)의 배수 */
  -webkit-mask: linear-gradient(#000 0 0) content-box, radial-gradient(circle 3.2px, #0000 96%, #000) -4.5px -4.5px / 9px 9px;
  mask: linear-gradient(#000 0 0) content-box, radial-gradient(circle 3.2px, #0000 96%, #000) -4.5px -4.5px / 9px 9px;
}
.pc-stamp-lid { margin-top: 8px; width: 44px; height: 28px; border-radius: 4px; background: linear-gradient(150deg, var(--lid-shine), var(--lid)); box-shadow: inset -6px -5px 0 -3px var(--led); }
.pc-stamp small { font-size: 10px; font-weight: 600; }
.pc-postmark {
  position: absolute;
  right: 54px;
  top: 30px;
  display: grid;
  place-items: center;
  width: 86px;
  aspect-ratio: 1;
  border: 2px solid var(--stamp-red);
  border-radius: 50%;
  color: var(--stamp-red);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.1;
  text-align: center;
  opacity: 0;
  transform: rotate(-18deg) scale(1.6);
  pointer-events: none;
}
.pc-postmark small { font-family: var(--font-mono); font-size: 10px; font-weight: 500; }
.postcard.is-sent .pc-postmark { opacity: .9; transform: rotate(-18deg) scale(1); transition: transform .25s cubic-bezier(.2, 1.6, .4, 1), opacity .1s; }
.pc-to { margin: 0; font-size: 14px; color: var(--ink-soft); }
.pc-to b { margin-left: 6px; font-family: var(--font-hand); font-size: 26px; font-weight: 400; color: var(--ink); }
.pc-field { display: grid; gap: 2px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.pc-field em { font-style: normal; font-weight: 400; }
.pc-field input {
  width: 100%;
  padding: 2px 0 4px;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 35%, transparent);
  background: none;
  color: var(--ink);
  font-family: var(--font-hand);
  font-size: 24px;
  line-height: 1.2;
}
.pc-field input:focus { outline: none; border-bottom: 2px solid var(--pen); }
.pc-side .tape { align-self: flex-start; margin-top: auto; }
.pc-side .tape:disabled { opacity: .6; cursor: default; transform: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.7em; margin: 14px 0 0; font-size: 14px; color: var(--ink-soft); }
.form-status[data-state="ok"] { color: var(--ink); font-weight: 600; }
.form-status[data-state="error"] { color: var(--stamp-red); }

/* 하이파이브: 오락실 버튼 */
.hi5 { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; margin-top: 36px; }
.hi5-btn {
  position: relative;
  width: 116px;
  aspect-ratio: 1;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--st-red) 70%, var(--st-white)), var(--st-red) 62%);
  color: var(--st-white);
  font-family: var(--font-display);
  font-size: 17px;
  box-shadow: 0 9px 0 color-mix(in srgb, var(--st-red) 60%, var(--st-black)), 0 16px 22px rgb(15 20 25 / .3);
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease;
  -webkit-tap-highlight-color: transparent;
}
.hi5-btn:active, .hi5-btn.is-pressed { transform: translateY(7px); box-shadow: 0 2px 0 color-mix(in srgb, var(--st-red) 60%, var(--st-black)), 0 6px 10px rgb(15 20 25 / .3); }
.hi5-text { min-width: 0; }
.hi5-text p { margin: 0; }
.hi5-text .hand { font-size: 26px; line-height: 1.2; color: var(--pen); }
.hi5-count { font-size: 15px; }
.hi5-count b { font-family: var(--font-mono); font-size: 18px; font-variant-numeric: tabular-nums; }
.hi5-status { min-height: 1.6em; font-size: 13px; color: var(--ink-soft); }
.clap {
  position: absolute;
  left: 50%;
  top: 0;
  font-family: var(--font-hand);
  font-size: 34px;
  color: var(--ink);
  pointer-events: none;
  animation: clap .8s ease-out forwards;
}
@keyframes clap {
  from { opacity: 1; transform: translate(calc(-50% + var(--dx)), 0) rotate(var(--rot)) scale(.7); }
  to { opacity: 0; transform: translate(calc(-50% + var(--dx) * 2), -70px) rotate(var(--rot)) scale(1.15); }
}

/* 아래쪽 */
.footer {
  max-width: var(--page);
  margin: 0 auto;
  padding-block: 28px 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 15%, transparent);
  font-size: 13px;
  color: var(--ink-soft);
}
.footer p { margin: 0; }
.sep { margin: 0 6px; opacity: .5; }
kbd { display: inline-block; min-width: 1.6em; padding: 0 4px; border: 1px solid currentColor; border-radius: 4px; font-family: var(--font-mono); font-size: 12px; text-align: center; line-height: 1.4; }

/* 숨은 터미널 */
.term {
  width: min(720px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 48px));
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--term-bg);
  color: var(--term-fg);
  box-shadow: 0 30px 80px rgb(0 0 0 / .5);
  overflow: hidden;
}
.term[open] { display: flex; flex-direction: column; }
.term::backdrop { background: rgb(10 12 15 / .55); backdrop-filter: blur(2px); }
.term-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 8px 16px; background: var(--term-bar); font-family: var(--font-mono); font-size: 12px; color: var(--term-dim); }
.term-close { padding: 2px 10px; border: 1px solid color-mix(in srgb, var(--term-fg) 25%, transparent); border-radius: 4px; background: none; color: var(--term-fg); font: inherit; cursor: pointer; }
.term-body { flex: 1; min-height: 280px; overflow-y: auto; padding: 14px 16px 18px; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.6; }
.term-out { white-space: pre-wrap; word-break: break-all; }
.term-out .t-cmd { color: var(--term-fg); }
.term-out .t-dim { color: var(--term-dim); }
.term-out .t-ok { color: var(--term-accent); }
.term-line { display: flex; gap: 8px; align-items: baseline; }
.term-prompt { flex: none; color: var(--term-accent); }
.term-line input { flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: var(--term-fg); font: inherit; caret-color: var(--term-accent); }
.term-line input:focus { outline: none; }

/* 좁은 화면 */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .laptop { margin-top: 36px; }
  .stickies { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desk-row { grid-template-columns: minmax(0, 1fr); }
  .receipt { max-width: 380px; }
}
@media (max-width: 720px) {
  .topnav { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .topnav a { white-space: nowrap; }
  .about { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .note { display: block; margin-left: 0; }
  .postcard { grid-template-columns: minmax(0, 1fr); transform: none; }
  .pc-message { border-right: 0; border-bottom: 1px solid var(--paper-rule); }
  .pc-message textarea { min-height: 190px; }
  .pc-stamp { position: absolute; right: 18px; top: 18px; }
  .pc-postmark { right: 40px; top: 24px; }
  .pc-to { padding-right: 90px; }
  .stamp { position: static; display: inline-grid; width: auto; aspect-ratio: auto; margin-bottom: 10px; padding: 4px 12px; border-radius: 6px; transform: rotate(-2deg); }
  .entry:has(.stamp) :is(.role, .desc) { padding-right: 0; }
  .sheet-pdf { position: static; display: inline-flex; margin-bottom: 20px; }
}
@media (max-width: 480px) {
  .stickies { grid-template-columns: minmax(0, 1fr); }
  .laptop-hint { font-size: 20px; top: -36px; }
  .sticker { box-shadow: 0 0 0 .26em var(--st-white), var(--shadow-sticker); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 인쇄할 때는 종이 한 장만 */
@media print {
  body { background: #fff; padding: 0; }
  .topbar, .hero .laptop, .hero-actions, .desk-row, .footer, .term, .clip, .sheet-pdf, .copy { display: none !important; }
  .sheet { box-shadow: none; padding: 0; }
  .hero { display: block; padding: 0 0 24px; }
}
