@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans+KR:wght@400;500;600;700&display=swap');

/* ==================================================================
   TOKENS
   홈 = 종이(paper). 툴 진입 = 암실(darkroom). 같은 토큰을 갈아끼워서
   한 벌의 디자인 시스템으로 두 가지 분위기를 만든다.
   ================================================================== */
:root {
  --paper: #f0ece1;
  --paper-hi: #f7f4ec;
  --paper-lo: #e6e1d3;
  --ink: #17170f;
  --ink-70: #4d4c40;
  --ink-45: #82806f;
  --rule: #c9c3b1;
  --rule-soft: #ddd7c7;
  --accent: #e0402a;
  --accent-ink: #fff8f2;
  --danger: #e0402a;
  --shadow: rgba(23, 23, 15, 1);

  --sans: "IBM Plex Sans KR", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --bar: 76px;
}

/* AdSense units remain in normal document flow, after useful content and controls. */
.adsense-slot {
  width: 100%;
  min-height: 90px;
  margin: 52px 0 6px;
  padding: 14px 0;
  overflow: hidden;
  border-top: 1px solid var(--stack-line);
}
.adsense-slot > .adsbygoogle { display: block; min-height: 90px; }
@media (max-width: 760px) {
  .adsense-slot { margin-top: 38px; padding: 10px 0; }
}

/* 툴 화면에서는 암실로 전환 */
body:has(#welcome:not([hidden])),
body:has(#workspace:not([hidden])) {
  --paper: #100f0d;
  --paper-hi: #191813;
  --paper-lo: #0a0a08;
  --ink: #f2eee2;
  --ink-70: #a8a495;
  --ink-45: #75736a;
  --rule: #2e2d26;
  --rule-soft: #24231d;
  --accent: #ff5c3d;
  --accent-ink: #150705;
  --shadow: rgba(0, 0, 0, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background .45s ease, color .45s ease;
}

/* 종이 질감 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E");
}
body:has(#welcome:not([hidden]))::before,
body:has(#workspace:not([hidden]))::before { mix-blend-mode: screen; opacity: .22; }

main, .topbar, .action-bar { position: relative; z-index: 1; }

button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.photo-select:focus-visible + .check-indicator { outline: 2px solid var(--accent); outline-offset: 3px; }

.eyebrow {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ==================================================================
   TOPBAR
   ================================================================== */
.topbar {
  height: var(--bar);
  padding: 0 clamp(18px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -.03em;
}
.brand-mark {
  width: 22px; height: 22px;
  background: var(--accent);
  position: relative;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  background: var(--paper);
}
.brand:hover .brand-mark { transform: rotate(45deg); }
.brand-text em { font-style: normal; font-family: var(--mono); font-weight: 400; font-size: 13px; color: var(--ink-45); }

.topbar-meta { display: flex; align-items: center; gap: 10px; }
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--rule);
  padding: 6px 11px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-70);
  white-space: nowrap;
}
.meta-chip svg { width: 14px; height: 14px; fill: none; stroke: var(--accent); stroke-width: 1.8; }
.meta-count b { color: var(--ink); }

/* ==================================================================
   HERO
   ================================================================== */
.hub { border-bottom: 1px solid var(--ink); }
.hub-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .95fr);
  align-items: stretch;
}
.hub-lead {
  padding: clamp(48px, 6vw, 92px) clamp(20px, 4vw, 48px) clamp(44px, 5vw, 76px);
  border-right: 1px solid var(--ink);
  animation: rise .7s cubic-bezier(.2, .8, .2, 1) both;
}
.hub-lead h1 {
  margin: 0;
  font-size: clamp(40px, 6.4vw, 88px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.055em;
}
.hub-lead h1 > span,
.hub-lead h1 > em { display: block; }
.hub-lead h1 em { position: relative; font-style: normal; color: var(--accent); width: fit-content; }
.scribble {
  position: absolute;
  left: -2%;
  bottom: -.12em;
  width: 104%;
  height: .28em;
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: draw .9s .45s cubic-bezier(.2, .8, .2, 1) forwards;
}
.intro {
  max-width: 46ch;
  margin: 30px 0 0;
  color: var(--ink-70);
  font-size: clamp(14px, 1.15vw, 16.5px);
  line-height: 1.85;
}
.hub-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 42px; }
.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: transform .18s, box-shadow .18s;
}
.scroll-cue svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.scroll-cue:hover { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--accent); }
.hub-hint { margin: 0; font-family: var(--mono); font-size: 11.5px; color: var(--ink-45); }

/* 인덱스 카드 */
.hub-card {
  position: relative;
  padding: clamp(28px, 3vw, 40px) clamp(22px, 2.4vw, 34px);
  background: var(--paper-hi);
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow: hidden;
  animation: rise .7s .12s cubic-bezier(.2, .8, .2, 1) both;
}
.hub-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 27px, var(--rule-soft) 27px 28px);
  opacity: .8;
  pointer-events: none;
}
.card-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  color: var(--ink-45);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
  position: relative;
}
.spec { margin: 0; position: relative; }
.spec > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--rule);
}
.spec dt { font-size: 12.5px; color: var(--ink-45); }
.spec dd { margin: 0; font-family: var(--mono); font-size: 13px; font-weight: 500; }
.spec dd b { color: var(--accent); font-size: 17px; }
.card-note { margin: 0; position: relative; font-size: 12.5px; line-height: 1.85; color: var(--ink-70); }
.stamp {
  position: absolute;
  right: -18px;
  bottom: 18px;
  width: 132px;
  height: 132px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 2px;
  transform: rotate(-13deg);
  opacity: .55;
  font-family: var(--mono);
  color: var(--accent);
}
.stamp em { font-style: normal; font-size: 8.5px; letter-spacing: .2em; }
.stamp b { font-size: 17px; letter-spacing: -.02em; }

/* 마퀴 */
.marquee {
  border-top: 1px solid var(--ink);
  background: var(--accent);
  color: var(--accent-ink);
  overflow: hidden;
  padding: 9px 0;
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 20px;
  width: max-content;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  animation: slide 28s linear infinite;
}
.marquee-track i { width: 5px; height: 5px; background: currentColor; flex: none; }

/* ==================================================================
   CATALOG
   ================================================================== */
.tool-list { padding: clamp(48px, 5.5vw, 84px) clamp(18px, 4vw, 48px) 0; }
.list-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
  padding-bottom: 22px;
}
.list-head h2 {
  margin: 0;
  font-size: clamp(30px, 3.6vw, 50px);
  font-weight: 700;
  letter-spacing: -.05em;
}
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1.5px solid var(--ink);
  padding: 9px 2px;
  min-width: min(320px, 100%);
}
.search svg { width: 16px; flex: none; fill: none; stroke: var(--ink-45); stroke-width: 1.9; }
.search input {
  border: 0;
  background: none;
  outline: none;
  width: 100%;
  font-size: 14px;
  padding: 2px 0;
}
.search input::placeholder { color: var(--ink-45); }
.search:focus-within { border-color: var(--accent); }
.search:focus-within svg { stroke: var(--accent); }

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px 0;
  border-top: 1px solid var(--ink);
  position: sticky;
  top: var(--bar);
  background: var(--paper);
  z-index: 10;
}
.chip {
  border: 1px solid var(--rule);
  background: none;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .16s, color .16s, border-color .16s;
}
.chip i { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--ink-45); }
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip.is-active i { color: var(--accent); }

.catalog-group { padding: clamp(34px, 4vw, 58px) 0; border-top: 1px solid var(--rule); }
.catalog-group:first-child { border-top: 0; }
.group-header {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: start;
  gap: 18px;
  margin-bottom: 26px;
}
.group-letter {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
}
.group-titles h2 { margin: 0; font-size: clamp(21px, 2.2vw, 29px); letter-spacing: -.04em; }
.group-titles p { margin: 5px 0 0; font-size: 13px; color: var(--ink-45); }
.group-count { font-family: var(--mono); font-size: 22px; font-weight: 500; }
.group-count i { font-style: normal; font-size: 11px; color: var(--ink-45); margin-left: 3px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 226px;
  padding: 20px;
  border: 1px solid var(--ink);
  background: var(--paper-hi);
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s cubic-bezier(.2, .8, .2, 1);
}
.tool-card:not(.is-slot):hover { transform: translate(-4px, -4px); box-shadow: 7px 7px 0 var(--shadow); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-index { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; color: var(--ink-45); }
.card-status {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  padding: 3px 8px;
  border: 1px solid currentColor;
}
.card-status.is-live { color: var(--accent); }
.card-status.is-wip { color: var(--ink-45); }
.card-title { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.045em; }
.card-desc { margin: 0; font-size: 13.5px; line-height: 1.8; color: var(--ink-70); }
.card-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.card-tags li {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-45);
  border: 1px solid var(--rule);
  padding: 3px 8px;
}
.card-foot { margin-top: auto; padding-top: 6px; display: flex; justify-content: flex-end; }
.open-tool-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 0;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13.5px;
  font-weight: 600;
  transition: background .16s, color .16s, gap .16s;
}
.open-tool-button svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; }
.tool-card:hover .open-tool-button { background: var(--accent); color: var(--accent-ink); gap: 14px; }
.card-soon { font-family: var(--mono); font-size: 11px; color: var(--ink-45); align-self: center; }

.tool-card.is-slot {
  border: 1px dashed var(--rule);
  background: none;
  justify-content: center;
  align-items: flex-start;
  min-height: 226px;
}
.is-slot .card-title { font-size: 18px; color: var(--ink-45); font-weight: 500; }
.is-slot .card-desc { font-size: 12.5px; color: var(--ink-45); }
.is-slot .card-foot { justify-content: flex-start; }
.slot-mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px dashed var(--rule);
  font-family: var(--mono);
  color: var(--ink-45);
}
.catalog-empty { padding: 60px 0; text-align: center; color: var(--ink-45); font-size: 14px; }

.site-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 26px 0;
  border-top: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--ink-45);
}

/* ==================================================================
   TOOL : WELCOME (darkroom)
   ================================================================== */
.welcome {
  min-height: calc(100svh - var(--bar));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, .88fr);
  overflow: hidden;
}
.welcome-copy {
  align-self: center;
  padding: 68px clamp(20px, 5vw, 84px);
  max-width: 760px;
  animation: rise .6s cubic-bezier(.2, .8, .2, 1) both;
}
.welcome h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.055em;
}
.welcome h1 em { font-style: normal; color: var(--accent); }
.back-to-hub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  color: var(--ink-45);
  padding: 0 0 30px;
  font-size: 13px;
}
.back-to-hub svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.back-to-hub:hover { color: var(--accent); }

.primary-button, .danger-button, .secondary-button {
  border: 0;
  min-height: 54px;
  padding: 0 24px;
  font-weight: 600;
  font-size: 14.5px;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.primary-button { background: var(--accent); color: var(--accent-ink); margin-top: 34px; }
.primary-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.primary-button:hover:not(:disabled),
.danger-button:hover { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--shadow); }
.primary-button:disabled { background: var(--rule); color: var(--ink-45); cursor: not-allowed; }
.browser-hint { font-family: var(--mono); font-size: 11px; color: var(--ink-45); margin: 16px 0 0; }

.contact-sheet { position: relative; min-height: 100%; background: var(--paper-lo); overflow: hidden; }
.contact-sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 63px, rgba(255,255,255,.035) 63px 64px),
              repeating-linear-gradient(0deg, transparent 0 63px, rgba(255,255,255,.035) 63px 64px);
}
.frame { position: absolute; background-size: cover; box-shadow: 0 30px 70px rgba(0,0,0,.55); animation: float 7s ease-in-out infinite; }
.frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(140deg, rgba(255,92,61,.18), transparent 45%, rgba(0,0,0,.6)); }
.frame span { position: absolute; left: 11px; bottom: 9px; z-index: 1; font: 500 10px var(--mono); color: #fff; letter-spacing: .1em; }
.frame-a { width: 42%; aspect-ratio: 4/5; left: 11%; top: 11%; transform: rotate(-7deg); background: linear-gradient(145deg, #6c6355, #23201c 46%, #8b8375); }
.frame-b { width: 46%; aspect-ratio: 4/5; right: 6%; top: 21%; transform: rotate(5deg); background: linear-gradient(30deg, #1d1a17, #746a5c 52%, #26231e); animation-delay: -2s; }
.frame-c { width: 39%; aspect-ratio: 4/5; left: 25%; bottom: -17%; transform: rotate(-1deg); background: linear-gradient(155deg, #9c8f78, #35312a 48%, #131110); animation-delay: -4s; }
.focus-ring {
  position: absolute; width: 52%; aspect-ratio: 1; border: 1px solid rgba(255,92,61,.35);
  border-radius: 50%; left: 21%; top: 23%;
  box-shadow: 0 0 0 70px rgba(255,92,61,.03), 0 0 90px rgba(255,92,61,.09);
}

/* ==================================================================
   TOOL : WORKSPACE
   ================================================================== */
.workspace { max-width: 1680px; margin: auto; padding: 48px clamp(18px, 4vw, 56px) 150px; }
.workspace-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}
.workspace-head .eyebrow { margin-bottom: 10px; }
.workspace h2 { margin: 0; font-size: clamp(26px, 2.8vw, 42px); font-weight: 700; letter-spacing: -.05em; }
.workspace-actions { display: flex; gap: 18px; flex: none; }
.text-button { background: none; border: 0; border-bottom: 1px solid var(--ink-45); padding: 5px 0; font-size: 13px; }
.text-button:hover { color: var(--accent); border-color: var(--accent); }

.progress-area { margin-top: 34px; }
.progress-copy { display: flex; justify-content: space-between; color: var(--ink-70); font-size: 13.5px; }
.progress-copy span:last-child { font-family: var(--mono); }
.progress-track { height: 3px; background: var(--rule); margin-top: 13px; overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .25s ease; }

.result-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 32px 0 38px; }
.summary { display: flex; align-items: baseline; gap: 7px; color: var(--ink-45); font-size: 13px; }
.summary strong { font: 500 25px var(--mono); color: var(--ink); }
.summary i { height: 16px; width: 1px; background: var(--rule); margin: 0 9px; }
.threshold-control { display: flex; align-items: center; gap: 11px; font-size: 13px; color: var(--ink-45); }
select { background: var(--paper-hi); border: 1px solid var(--rule); padding: 9px 30px 9px 12px; }

.group { border-top: 1px solid var(--rule); padding: 26px 0 40px; animation: rise .42s ease-out both; }
.group-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.group-head h3 { margin: 0; font: 500 12px var(--mono); letter-spacing: .1em; color: var(--ink-45); }
.match-badge { font-family: var(--mono); font-size: 11px; color: var(--accent); border: 1px solid currentColor; padding: 3px 8px; }
.results-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 34px; align-items: start; }
.groups { min-width: 0; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.photo { position: relative; min-width: 0; }
.photo-select { position: absolute; opacity: 0; pointer-events: none; }
.photo-visual { display: block; position: relative; background: var(--paper-hi); border: 1px solid var(--rule); transition: transform .18s, border-color .18s, background .18s; }
.photo-preview-button { width: 100%; padding: 0; text-align: left; cursor: zoom-in; }
.photo-preview-button:hover { transform: translateY(-3px); border-color: var(--ink-45); }
.photo-image { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #08080a; }
.delete-check { position: absolute; top: 10px; right: 10px; z-index: 2; width: 30px; height: 30px; cursor: pointer; }
.check-indicator {
  width: 30px; height: 30px; display: grid; place-items: center;
  background: rgba(10,10,8,.78); border: 1px solid rgba(255,255,255,.5); transition: .18s;
}
.check-indicator::after {
  content: ""; width: 7px; height: 12px;
  border: solid var(--accent-ink); border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0); transition: transform .16s;
}
.photo:has(.photo-select:checked) .photo-visual { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.photo-select:checked + .check-indicator { background: var(--accent); border-color: var(--accent); }
.photo-select:checked + .check-indicator::after { transform: rotate(45deg) scale(1); }
.photo.active .photo-visual { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.photo-meta { display: block; padding: 12px 12px 14px; }
.photo-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.photo-detail { display: flex; justify-content: space-between; margin-top: 6px; color: var(--ink-45); font: 10px var(--mono); }
.exact-tag { color: var(--accent); }

.inspector { position: sticky; top: calc(var(--bar) + 18px); min-height: 430px; border-left: 1px solid var(--rule); padding-left: 26px; }
.inspector-empty { min-height: 380px; display: grid; align-content: center; justify-items: start; }
.inspector-empty > span { color: var(--accent); font: 34px var(--mono); }
.inspector-empty h3 { margin: 14px 0 6px; font-size: 18px; }
.inspector-empty p { margin: 0; color: var(--ink-45); font-size: 13px; line-height: 1.75; }
.inspector .eyebrow { margin-bottom: 13px; }
.inspector-image-button { display: block; width: 100%; padding: 0; border: 1px solid var(--rule); background: var(--paper-lo); position: relative; overflow: hidden; cursor: zoom-in; }
.inspector-image-button img { width: 100%; aspect-ratio: 4/3; display: block; object-fit: contain; transition: transform .25s; }
.inspector-image-button:hover img { transform: scale(1.03); }
.inspector-image-button span { position: absolute; right: 9px; bottom: 9px; background: rgba(10,10,8,.8); color: #f2eee2; padding: 6px 9px; font: 10px var(--mono); }
.inspector h3 { font-size: 20px; margin: 17px 0; overflow-wrap: anywhere; letter-spacing: -.03em; }
.file-details { margin: 0; }
.file-details div { display: grid; grid-template-columns: 60px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--rule); font-size: 12px; }
.file-details dt { color: var(--ink-45); }
.file-details dd { margin: 0; color: var(--ink-70); font-family: var(--mono); overflow-wrap: anywhere; }
.inspector-action { width: 100%; margin-top: 18px; }
.inspector-action.is-selected { background: var(--accent); color: var(--accent-ink); }

.empty-state { padding: 92px 20px; text-align: center; border-top: 1px solid var(--rule); }
.empty-icon { width: 56px; height: 56px; border: 1px solid var(--accent); color: var(--accent); display: grid; place-items: center; margin: auto; font-size: 23px; }
.empty-state h3 { font-size: 23px; margin: 20px 0 8px; letter-spacing: -.03em; }
.empty-state p { margin: 0; color: var(--ink-45); }

/* ==================================================================
   OVERLAYS
   ================================================================== */
.action-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translate(-50%, 120px);
  width: min(620px, calc(100% - 28px));
  background: var(--ink);
  color: var(--paper);
  padding: 11px 12px 11px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  z-index: 30;
  box-shadow: 0 22px 60px rgba(0,0,0,.4);
  animation: actionIn .3s cubic-bezier(.2, .8, .2, 1) forwards;
}
.action-bar p { margin: 0; font-size: 13.5px; }
.action-bar strong { color: var(--accent); }
.danger-button { background: var(--danger); color: var(--accent-ink); }
.action-bar .danger-button { min-height: 44px; font-size: 13.5px; }

dialog {
  width: min(560px, calc(100% - 28px));
  background: var(--paper-hi);
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 0;
  box-shadow: 12px 12px 0 var(--shadow);
}
dialog::backdrop { background: rgba(6,6,5,.72); backdrop-filter: blur(5px); }
.dialog-body { padding: 32px; }
.dialog-body h2 { margin: 0 0 10px; font-size: 26px; letter-spacing: -.04em; }
.dialog-body > p:not(.eyebrow, .warning) { color: var(--ink-70); font-size: 14px; margin: 0; }
.delete-list { max-height: 180px; overflow: auto; border-block: 1px solid var(--rule); padding: 10px 0; margin: 22px 0 12px; }
.delete-list div { padding: 7px 4px; font: 11.5px var(--mono); color: var(--ink-70); overflow-wrap: anywhere; }
.warning { color: var(--accent); font-size: 12px; margin: 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }
.secondary-button { background: var(--paper-lo); color: var(--ink); border: 1px solid var(--rule); }
.secondary-button:hover { border-color: var(--ink); }

.toast {
  position: fixed;
  top: calc(var(--bar) + 14px);
  left: 50%;
  transform: translate(-50%, -20px);
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: .25s;
  font-size: 13px;
  box-shadow: 6px 6px 0 var(--accent);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.preview-dialog { width: min(94vw, 1500px); height: min(92vh, 980px); max-width: none; max-height: none; }
.preview-shell { height: 100%; padding: 22px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 15px; }
.preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.preview-head .eyebrow { margin-bottom: 5px; }
.preview-head h2 { margin: 0; font-size: 19px; overflow-wrap: anywhere; letter-spacing: -.03em; }
.preview-close { width: 42px; height: 42px; border: 1px solid var(--rule); background: none; font-size: 25px; line-height: 1; flex: none; }
.preview-close:hover { border-color: var(--accent); color: var(--accent); }
.preview-stage { min-height: 0; display: grid; place-items: center; background: var(--paper-lo); overflow: auto; }
.preview-stage img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.preview-meta { margin: 0; color: var(--ink-45); font: 11px var(--mono); }

/* ==================================================================
   ANIMATION
   ================================================================== */
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes actionIn { to { transform: translate(-50%, 0); } }
@keyframes slide { to { transform: translateX(-33.333%); } }

/* ==================================================================
   RESPONSIVE
   ================================================================== */
@media (max-width: 980px) {
  .hub-inner { grid-template-columns: 1fr; }
  .hub-lead { border-right: 0; border-bottom: 1px solid var(--ink); }
  .welcome { grid-template-columns: 1fr; }
  .contact-sheet { min-height: 44vh; }
  .results-layout { grid-template-columns: 1fr; }
  .inspector { position: relative; top: auto; border-left: 0; border-top: 1px solid var(--rule); padding: 26px 0 0; }
}

@media (max-width: 620px) {
  :root { --bar: 62px; }
  .privacy-note { display: none; }
  .hub-lead { padding: 40px 20px 46px; }
  .hub-lead h1 { font-size: 38px; }
  .hub-actions { gap: 14px; }
  .hub-card { padding: 26px 20px 34px; }
  .stamp { width: 108px; height: 108px; right: -14px; }
  .tool-list { padding-inline: 18px; }
  .list-head { align-items: stretch; }
  .group-header { grid-template-columns: 30px 1fr auto; gap: 12px; }
  .card-grid { grid-template-columns: 1fr; }
  .tool-card, .tool-card.is-slot { min-height: 0; }
  .welcome-copy { padding: 42px 20px 50px; }
  .welcome h1 { font-size: 36px; }
  .workspace { padding: 34px 18px 140px; }
  .workspace-head, .result-toolbar { flex-direction: column; align-items: flex-start; }
  .photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-detail { display: block; line-height: 1.6; }
  .action-bar { bottom: 10px; padding-left: 16px; }
  .action-bar p { font-size: 12px; }
  .dialog-body { padding: 24px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .scribble { stroke-dashoffset: 0; }
}

/* ==================================================================
   SSULTOOL OS — SYSTEM CATALOG
   배너 대신 바로 열리는 앱 보관함. 애니메이션 공방의 온기와
   정밀 기계의 구조감을 섞은 독자적인 인터페이스입니다.
   ================================================================== */
:root {
  --os-night: #0a1020;
  --os-night-2: #121c33;
  --os-panel: #edf1f5;
  --os-panel-2: #dfe5ec;
  --os-ink: #152033;
  --os-muted: #657187;
  --os-line: #b8c1ce;
  --os-gold: #ffc94a;
  --os-coral: #ff705d;
  --os-blue: #6cc8ff;
  --spring: cubic-bezier(.18, .9, .22, 1.22);
}

.topbar {
  color: #f7f4eb;
  background: rgba(10, 16, 32, .96);
  border-bottom-color: rgba(255,255,255,.12);
  backdrop-filter: blur(18px);
}
.topbar .brand-mark { background: var(--os-gold); border-radius: 5px 5px 8px 5px; }
.topbar .brand-mark::after { background: var(--os-night); border-radius: 2px; }
.topbar .brand-text em, .topbar .meta-chip { color: #aab4c8; }
.topbar .meta-chip { border-color: rgba(255,255,255,.16); }
.topbar .meta-chip svg { stroke: var(--os-gold); }
.topbar .meta-count b { color: #fff; }
.drawer-toggle {
  position: static;
  margin-left: auto;
  transform: none;
  height: 38px;
  padding: 0 14px 0 10px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  color: #f8f5ed;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 600;
  transition: background .2s, transform .3s var(--spring);
}
.drawer-toggle:hover, .drawer-toggle[aria-expanded="true"] { background: rgba(255,201,74,.18); transform: translateX(-50%) scale(1.04); }
.drawer-grid { width: 17px; display: grid; grid-template-columns: repeat(2, 6px); gap: 3px; }
.drawer-grid i { width: 6px; height: 6px; border-radius: 2px; background: var(--os-gold); transition: transform .3s var(--spring); }
.drawer-toggle:hover .drawer-grid i:nth-child(1) { transform: translate(-2px,-2px) rotate(-10deg); }
.drawer-toggle:hover .drawer-grid i:nth-child(4) { transform: translate(2px,2px) rotate(10deg); }

.drawer-backdrop { position: fixed; inset: var(--bar) 0 0; z-index: 48; background: rgba(3,7,16,.66); backdrop-filter: blur(7px); }
.app-drawer {
  position: fixed;
  z-index: 49;
  left: 18px;
  right: 18px;
  top: calc(var(--bar) + 10px);
  max-width: 1500px;
  max-height: calc(100svh - var(--bar) - 28px);
  margin: auto;
  overflow: auto;
  padding: clamp(24px, 3vw, 42px);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 0 0 28px 28px;
  background: rgba(14,22,41,.98);
  color: #f5f2e9;
  box-shadow: 0 34px 100px rgba(0,0,0,.55);
  transform: translateY(-28px) scale(.98);
  opacity: 0;
  transition: transform .32s var(--spring), opacity .22s;
}
.app-drawer.is-open { transform: translateY(0) scale(1); opacity: 1; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,.13); }
.drawer-head .eyebrow { color: var(--os-gold); margin-bottom: 6px; }
.drawer-head h2 { margin: 0; font-size: clamp(26px, 3vw, 42px); letter-spacing: -.05em; }
.drawer-head > button { width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; color: #fff; background: none; font-size: 26px; }
.drawer-content { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; padding: 22px 0; }
.drawer-group { min-width: 0; padding: 16px; border: 1px solid rgba(255,255,255,.11); border-radius: 16px; background: rgba(255,255,255,.035); }
.drawer-group > header { display: grid; grid-template-columns: 27px 1fr auto; gap: 10px; align-items: center; margin-bottom: 14px; }
.drawer-group header div { display: flex; flex-direction: column; }
.drawer-group header b { font-size: 13px; }
.drawer-group header small { font: 9px var(--mono); color: #79869d; }
.drawer-group header > i { font: normal 10px var(--mono); color: #77849a; }
.drawer-group .folder-icon { transform: scale(.82); transform-origin: left center; }
.drawer-apps { display: grid; gap: 7px; }
.drawer-app { width: 100%; min-height: 74px; padding: 10px; border: 0; border-radius: 12px; background: rgba(255,255,255,.06); color: #f7f4eb; display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; text-align: left; transition: transform .25s var(--spring), background .2s; }
.drawer-app:hover { transform: translateY(-3px) scale(1.015); background: rgba(255,201,74,.13); }
.drawer-app > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.drawer-app b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-app small { color: #8e9ab0; font-size: 10px; }
.drawer-app em { color: var(--os-gold); font-style: normal; }
.drawer-app-icon { width: 42px; height: 42px; position: relative; border-radius: 12px; background: var(--os-gold); display: grid; place-items: center; box-shadow: inset 0 -5px 0 rgba(0,0,0,.1); }
.drawer-app-icon i { position: absolute; border: 2px solid var(--os-night); border-radius: 50%; }
.drawer-app-icon i:nth-child(1) { width: 25px; height: 25px; }
.drawer-app-icon i:nth-child(2) { width: 15px; height: 15px; }
.drawer-app-icon i:nth-child(3) { width: 5px; height: 5px; background: var(--os-night); }
.drawer-empty { margin: 0; color: #6f7a8f; font-size: 11px; }
.drawer-foot { margin: 0; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.1); color: #8b97aa; font: 10px var(--mono); letter-spacing: .08em; }
.drawer-open { overflow: hidden; }

.tool-list {
  min-height: calc(100svh - var(--bar));
  padding: clamp(14px, 2vw, 28px);
  background:
    radial-gradient(circle at 82% 15%, rgba(108,200,255,.11), transparent 25%),
    radial-gradient(circle at 12% 82%, rgba(255,112,93,.08), transparent 24%),
    var(--os-night);
}
.tool-list::before { content: ""; position: fixed; inset: var(--bar) 0 0; pointer-events: none; opacity: .18; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 32px 32px; }
.os-window { position: relative; max-width: 1580px; min-height: calc(100svh - var(--bar) - clamp(28px, 4vw, 56px)); margin: auto; display: grid; grid-template-rows: 50px 1fr 36px; overflow: hidden; border: 1px solid rgba(255,255,255,.25); border-radius: 22px; background: var(--os-panel); color: var(--os-ink); box-shadow: 0 30px 90px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.08); animation: windowLaunch .68s var(--spring) both; }
.window-titlebar { padding: 0 18px; background: var(--os-night-2); color: #aab4c8; display: grid; grid-template-columns: 100px 1fr 100px; align-items: center; border-bottom: 1px solid rgba(255,255,255,.11); }
.window-titlebar p { margin: 0; text-align: center; font: 10px var(--mono); letter-spacing: .13em; }
.window-lamps { display: flex; gap: 7px; }
.window-lamps i { width: 10px; height: 10px; border-radius: 50%; background: #40506b; box-shadow: inset 0 -2px 0 rgba(0,0,0,.25); }
.window-lamps i:first-child { background: var(--os-coral); }
.window-lamps i:nth-child(2) { background: var(--os-gold); }
.window-lamps i:last-child { background: #68d391; }
.window-clock { justify-self: end; font: 10px var(--mono); }
.system-pulse { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #68d391; box-shadow: 0 0 0 0 rgba(104,211,145,.6); animation: pulse 2s infinite; }

.window-body { min-height: 0; display: grid; grid-template-columns: 230px minmax(0,1fr); }
.folder-tree { padding: 28px 14px 18px; background: var(--os-panel-2); border-right: 1px solid var(--os-line); display: flex; flex-direction: column; }
.tree-label { padding: 0 11px 12px; color: var(--os-muted); font: 10px var(--mono); letter-spacing: .15em; }
.filters { position: static; display: grid; gap: 4px; padding: 0; border: 0; background: transparent; }
.chip { width: 100%; height: 43px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--os-ink); display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; text-align: left; }
.chip b { font-size: 12px; font-weight: 600; }
.chip i { justify-self: end; color: var(--os-muted); font: normal 10px var(--mono); }
.chip:hover { border: 0; background: rgba(255,255,255,.55); }
.chip.is-active { color: var(--os-ink); border: 0; background: #fff; box-shadow: 0 5px 16px rgba(36,53,80,.1); }
.chip.is-active i { color: var(--os-coral); }
.folder-icon { width: 24px; height: 18px; display: inline-block; position: relative; border-radius: 4px 5px 5px 5px; background: var(--os-gold); box-shadow: inset 0 -3px 0 rgba(0,0,0,.08); }
.folder-icon::before { content: ""; position: absolute; width: 10px; height: 5px; left: 2px; top: -3px; border-radius: 3px 3px 0 0; background: #eab12c; }
.tree-status { margin-top: auto; padding: 18px 12px 8px; border-top: 1px solid var(--os-line); display: grid; grid-template-columns: 1fr auto; align-items: end; }
.tree-status span { grid-column: 1/-1; font: 9px var(--mono); color: var(--os-muted); letter-spacing: .12em; }
.tree-status strong { font: 600 34px var(--mono); line-height: 1; color: var(--os-coral); }
.tree-status small { font: 9px var(--mono); color: var(--os-muted); }

.catalog-workspace { min-width: 0; padding: clamp(24px, 3vw, 42px); overflow: auto; }
.list-head { margin: 0 0 30px; padding: 0 0 24px; border-bottom: 1px solid var(--os-line); display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.breadcrumb { display: flex; align-items: center; gap: 7px; margin: 0 0 9px; color: var(--os-muted); font: 9px var(--mono); letter-spacing: .1em; }
.breadcrumb i { font-style: normal; color: var(--os-coral); }
.list-title h1 { margin: 0; color: var(--os-ink); font-size: clamp(30px, 3vw, 48px); line-height: 1; letter-spacing: -.055em; }
.list-intro { margin: 10px 0 0; color: var(--os-muted); font-size: 12px; }
.search { width: min(280px, 100%); height: 42px; flex: none; border: 1px solid var(--os-line); border-radius: 12px; background: #fff; }
.search input { color: var(--os-ink); }
.search kbd { margin-right: 10px; padding: 2px 6px; border: 1px solid var(--os-line); border-radius: 5px; color: var(--os-muted); font: 10px var(--mono); background: var(--os-panel); }

.catalog-group { display: grid; grid-template-columns: 170px minmax(0,1fr); gap: 22px; padding: 28px 0; border-top: 1px solid var(--os-line); }
.catalog-group:first-child { border-top: 0; padding-top: 0; }
.group-header { position: sticky; top: 0; display: block; margin: 0; align-self: start; }
.group-letter { width: auto; height: auto; display: inline-block; padding: 5px 8px; border-radius: 6px; color: var(--os-night); background: var(--os-gold); font: 600 9px var(--mono); }
.group-titles { margin-top: 13px; }
.group-titles > p { margin: 0 0 3px; color: var(--os-coral); font: 9px var(--mono); letter-spacing: .12em; }
.group-titles h2 { color: var(--os-ink); font-size: 23px; }
.group-note { margin-top: 8px; }
.group-note p { margin: 0; color: var(--os-muted); font-size: 11px; line-height: 1.6; }
.group-count { display: flex; align-items: baseline; gap: 6px; margin-top: 20px; color: var(--os-muted); }
.group-count b { color: var(--os-ink); font: 500 20px var(--mono); }
.group-count i { margin: 0; font: normal 8px var(--mono); letter-spacing: .08em; }
.port-stack { display: grid; gap: 10px; min-width: 0; }
.tool-port { --pointer-x: 0px; --pointer-y: 0px; }
.tool-port.is-tool { min-height: 196px; position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: 88px 140px minmax(230px,1fr) 124px; gap: 18px; align-items: center; padding: 24px 22px 24px 28px; border: 1px solid #aab5c4; border-radius: 18px; background: rgba(255,255,255,.72); box-shadow: 0 8px 24px rgba(31,47,72,.08); transition: transform .3s var(--spring), box-shadow .25s, border-color .25s; }
.tool-port.is-tool::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; background: radial-gradient(circle at calc(50% + var(--pointer-x)) calc(50% + var(--pointer-y)), rgba(108,200,255,.22), transparent 48%); transition: opacity .25s; }
.tool-port.is-tool:hover { transform: translateY(-4px) scale(1.006); border-color: #7d8da5; box-shadow: 0 18px 38px rgba(26,43,70,.16); }
.tool-port.is-tool:hover::before { opacity: 1; }
.port-rail { position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--os-night-2); display: grid; align-content: space-around; justify-items: center; }
.port-rail span { position: absolute; inset: 0; background: linear-gradient(var(--os-coral), var(--os-gold)); transform: scaleY(0); transform-origin: bottom; transition: transform .45s var(--spring); }
.tool-port:hover .port-rail span { transform: scaleY(1); }
.port-rail i { width: 3px; height: 3px; z-index: 1; border-radius: 50%; background: #fff; }
.port-meta { align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; }
.port-id { color: var(--os-muted); font: 9px var(--mono); letter-spacing: .08em; }
.card-status { width: fit-content; display: inline-flex; align-items: center; gap: 6px; padding: 5px 7px; border-radius: 7px; font: 8px var(--mono); letter-spacing: .08em; }
.card-status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: pulseDot 1.8s infinite; }
.card-status.is-live { color: #16845f; background: rgba(38,184,132,.1); }
.tool-machine { width: 126px; height: 126px; position: relative; display: grid; place-items: center; transform: translate(var(--pointer-x), var(--pointer-y)); transition: transform .18s ease-out; }
.tool-machine svg { width: 70px; fill: none; stroke: var(--os-ink); stroke-width: 2; stroke-linejoin: round; z-index: 2; filter: drop-shadow(0 6px 5px rgba(15,25,42,.13)); }
.machine-ring { position: absolute; border-radius: 50%; border: 1px solid #9aa8ba; }
.ring-a { inset: 5px; border-style: dashed; animation: gearSpin 16s linear infinite; }
.ring-b { inset: 22px; border-color: var(--os-coral); border-style: dotted; animation: gearSpin 9s linear reverse infinite; }
.scan-line { position: absolute; left: 18px; right: 18px; height: 1px; top: 20%; background: var(--os-blue); box-shadow: 0 0 8px var(--os-blue); animation: scan 3.3s ease-in-out infinite alternate; }
.port-copy { min-width: 0; }
.card-title { margin: 0; color: var(--os-ink); font-size: clamp(23px, 2.2vw, 34px); }
.card-desc { max-width: 680px; margin-top: 9px; color: var(--os-muted); font-size: 12.5px; line-height: 1.7; }
.card-tags { margin-top: 15px; }
.card-tags li { color: #59667a; border: 0; border-radius: 10px; background: #dce3eb; padding: 5px 8px; font-size: 8.5px; }
.port-action { justify-self: end; }
.open-tool-button { width: 104px; height: 104px; padding: 0; border-radius: 50%; background: var(--os-night-2); color: #fff; display: grid; grid-template-rows: 1fr 32px; gap: 0; overflow: hidden; box-shadow: 0 8px 0 #050914, 0 15px 24px rgba(13,22,40,.2); transition: transform .32s var(--spring), box-shadow .25s, background .2s; }
.open-tool-button .button-label { align-self: end; padding-bottom: 5px; }
.button-arrow { width: 100%; height: 32px; display: grid; place-items: center; background: var(--os-gold); color: var(--os-night); }
.button-arrow svg { width: 18px; }
.tool-port:hover .open-tool-button { gap: 0; background: var(--os-coral); color: #fff; transform: translateY(-5px) rotate(-3deg); box-shadow: 0 13px 0 #050914, 0 20px 30px rgba(13,22,40,.25); }
.open-tool-button:active { transform: translateY(5px); box-shadow: 0 3px 0 #050914; }
.tool-port.is-slot { min-height: 62px; padding: 0 16px; display: grid; grid-template-columns: 80px 1fr auto 48px; gap: 12px; align-items: center; border: 1px dashed #b7c0cc; border-radius: 14px; color: var(--os-muted); background: rgba(255,255,255,.28); }
.slot-line { height: 1px; background: repeating-linear-gradient(90deg, #aab5c4 0 5px, transparent 5px 10px); }
.tool-port.is-slot p { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 10px; }
.tool-port.is-slot strong { color: #7c899c; font: 9px var(--mono); letter-spacing: .08em; }
.slot-socket { width: 28px; height: 28px; border: 1px solid #aab5c4; border-radius: 50%; display: grid; place-items: center; }
.slot-socket i { width: 8px; height: 8px; border: 1px solid #aab5c4; border-radius: 50%; }
.site-foot { padding: 0 18px; min-height: 36px; border: 0; background: var(--os-night-2); color: #8895aa; display: flex; align-items: center; justify-content: space-between; font: 8px var(--mono); letter-spacing: .1em; }

@keyframes windowLaunch { from { opacity: 0; transform: translateY(22px) scale(.975); } }
@keyframes gearSpin { to { transform: rotate(360deg); } }
@keyframes scan { from { transform: translateY(0); } to { transform: translateY(74px); } }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(104,211,145,0); } 100% { box-shadow: 0 0 0 0 rgba(104,211,145,0); } }
@keyframes pulseDot { 50% { opacity: .35; } }

@media (max-width: 1100px) {
  .drawer-content { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .window-body { grid-template-columns: 190px minmax(0,1fr); }
  .tool-port.is-tool { grid-template-columns: 74px 105px minmax(180px,1fr) 86px; gap: 13px; padding-inline: 22px 16px; }
  .tool-machine { width: 100px; height: 100px; }
  .open-tool-button { width: 78px; height: 78px; grid-template-rows: 1fr 25px; }
  .button-arrow { height: 25px; }
}

@media (max-width: 760px) {
  .drawer-toggle { position: static; transform: none; margin-left: auto; }
  .drawer-toggle:hover, .drawer-toggle[aria-expanded="true"] { transform: scale(1.03); }
  .topbar-meta { display: none; }
  .app-drawer { left: 8px; right: 8px; }
  .drawer-content { grid-template-columns: 1fr; }
  .tool-list { padding: 8px; }
  .os-window { border-radius: 15px; min-height: calc(100svh - var(--bar) - 16px); }
  .window-titlebar { grid-template-columns: 65px 1fr 65px; padding-inline: 12px; }
  .window-titlebar p { font-size: 8px; }
  .window-body { grid-template-columns: 1fr; }
  .folder-tree { padding: 14px; border-right: 0; border-bottom: 1px solid var(--os-line); }
  .tree-label, .tree-status { display: none; }
  .filters { display: flex; overflow-x: auto; scrollbar-width: none; }
  .chip { width: auto; min-width: max-content; grid-template-columns: 22px auto auto; height: 38px; }
  .folder-icon { transform: scale(.75); transform-origin: center; }
  .catalog-workspace { padding: 22px 16px; }
  .list-head { align-items: stretch; flex-direction: column; gap: 18px; }
  .search { width: 100%; }
  .catalog-group { grid-template-columns: 1fr; gap: 15px; }
  .group-header { position: static; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
  .group-titles { margin: 0; }
  .group-titles > p, .group-note { display: none; }
  .group-count { margin: 0; }
  .tool-port.is-tool { min-height: 0; grid-template-columns: 1fr 72px; padding: 20px 16px 18px 24px; }
  .port-meta { grid-column: 1; grid-row: 1; align-self: center; flex-direction: row; justify-content: flex-start; align-items: center; gap: 9px; }
  .port-meta .card-status { width: auto; min-height: 0; flex: none; padding: 4px 7px; }
  .tool-machine { display: none; }
  .port-copy { grid-column: 1 / -1; grid-row: 2; margin-top: 8px; }
  .port-action { grid-column: 2; grid-row: 1; }
  .open-tool-button { width: 62px; height: 62px; grid-template-rows: 1fr 21px; font-size: 11px; }
  .button-arrow { height: 21px; }
  .tool-port.is-slot { grid-template-columns: 65px 1fr 32px; }
  .tool-port.is-slot p span { display: none; }
  .slot-socket { width: 24px; height: 24px; }
  .site-foot span:nth-child(2) { display: none; }
}

/* ==================================================================
   WEB-NATIVE REFINEMENT
   OS는 정보 구조의 은유로만 사용하고, 표현은 웹사이트 수준으로 절제합니다.
   ================================================================== */
:root {
  --web-bg: #f6f5f0;
  --web-surface: #ffffff;
  --web-ink: #171a1f;
  --web-muted: #6f747c;
  --web-line: #deded8;
  --web-soft: #efeee9;
  --web-accent: #ed5a43;
}

body { background: var(--web-bg); }
body::before { opacity: .08; mix-blend-mode: multiply; }
.topbar {
  height: 68px;
  color: var(--web-ink);
  background: rgba(246,245,240,.93);
  border-bottom: 1px solid var(--web-line);
  backdrop-filter: blur(14px);
}
.topbar .brand-mark { width: 20px; height: 20px; border-radius: 6px; background: var(--web-accent); }
.topbar .brand-mark::after { inset: 6px; border-radius: 2px; background: var(--web-bg); }
.topbar .brand-text em { color: #8a8e94; }
.topbar .meta-chip { color: #73777e; border-color: var(--web-line); background: rgba(255,255,255,.55); }
.topbar .meta-chip svg { stroke: var(--web-accent); }
.topbar .meta-count b { color: var(--web-ink); }
.drawer-toggle {
  height: 36px;
  color: var(--web-ink);
  border-color: var(--web-line);
  border-radius: 9px;
  background: var(--web-surface);
  box-shadow: 0 2px 8px rgba(26,28,31,.04);
}
.drawer-toggle:hover, .drawer-toggle[aria-expanded="true"] { background: #fff; transform: translateY(-1px); box-shadow: 0 7px 22px rgba(26,28,31,.09); }
.drawer-grid i { width: 5px; height: 5px; background: var(--web-accent); }

.drawer-backdrop { inset: 68px 0 0; background: rgba(25,27,30,.22); backdrop-filter: blur(3px); }
.app-drawer {
  top: 68px;
  left: 0;
  right: 0;
  max-width: none;
  max-height: min(72vh, 620px);
  padding: 30px clamp(24px, 5vw, 72px);
  border: 0;
  border-bottom: 1px solid var(--web-line);
  border-radius: 0;
  color: var(--web-ink);
  background: rgba(255,255,255,.98);
  box-shadow: 0 26px 60px rgba(31,33,36,.14);
  transform: translateY(-16px);
}
.drawer-head { padding-bottom: 18px; border-bottom-color: var(--web-line); }
.drawer-head .eyebrow { color: var(--web-accent); }
.drawer-head h2 { font-size: 30px; }
.drawer-head > button { width: 38px; height: 38px; color: var(--web-ink); border-color: var(--web-line); font-size: 22px; }
.drawer-content { grid-template-columns: repeat(4,minmax(0,1fr)); padding: 18px 0; gap: 0; }
.drawer-group { padding: 4px 22px 12px; border: 0; border-left: 1px solid var(--web-line); border-radius: 0; background: transparent; }
.drawer-group:first-child { border-left: 0; padding-left: 0; }
.drawer-group header b { color: var(--web-ink); }
.drawer-group header small, .drawer-group header > i { color: #92969d; }
.drawer-app { min-height: 62px; padding: 8px; border-radius: 10px; color: var(--web-ink); background: var(--web-soft); }
.drawer-app:hover { transform: translateY(-2px); background: #e8e7e1; }
.drawer-app small { color: var(--web-muted); }
.drawer-app em { color: var(--web-accent); }
.drawer-app-icon { width: 38px; height: 38px; border-radius: 10px; background: #f3d36d; box-shadow: none; }
.drawer-empty { color: #9a9da2; }
.drawer-foot { padding-top: 12px; color: #92969d; border-top-color: var(--web-line); }

.tool-list { min-height: calc(100svh - 68px); padding: 0; background: var(--web-bg); }
.tool-list::before { display: none; }
.os-window {
  max-width: none;
  min-height: calc(100svh - 68px);
  display: block;
  margin: 0;
  overflow: visible;
  color: var(--web-ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  animation: pageEnter .4s ease-out both;
}
.window-titlebar, .site-foot { display: none; }
.window-body { max-width: 1380px; min-height: calc(100svh - 68px); margin: 0 auto; display: grid; grid-template-columns: 220px minmax(0,1fr); }
.folder-tree { padding: 54px 24px; background: transparent; border-right: 1px solid var(--web-line); }
.tree-label { color: #95989d; }
.filters { gap: 2px; }
.chip { height: 42px; border-radius: 8px; color: var(--web-ink); }
.chip:hover { background: rgba(255,255,255,.7); }
.chip.is-active { background: var(--web-surface); box-shadow: 0 3px 14px rgba(28,30,33,.06); }
.chip.is-active i { color: var(--web-accent); }
.folder-icon { width: 22px; height: 16px; border-radius: 3px 4px 4px; background: #efca58; box-shadow: none; }
.folder-icon::before { background: #ddb548; }
.tree-status { border-top-color: var(--web-line); }
.tree-status strong { color: var(--web-accent); }

.catalog-workspace { padding: 52px clamp(28px, 5vw, 72px) 80px; overflow: visible; }
.list-head { margin-bottom: 20px; padding-bottom: 28px; border-bottom-color: var(--web-line); }
.breadcrumb { color: #94979c; }
.breadcrumb i { color: var(--web-accent); }
.list-title h1 { color: var(--web-ink); font-size: clamp(34px, 4vw, 52px); }
.list-intro { color: var(--web-muted); font-size: 13px; }
.search { height: 42px; border-color: var(--web-line); border-radius: 9px; background: var(--web-surface); box-shadow: none; }
.search input { color: var(--web-ink); }
.search kbd { color: #92969d; border-color: var(--web-line); background: var(--web-bg); }

.catalog-group { grid-template-columns: 150px minmax(0,1fr); gap: 24px; padding: 32px 0; border-top-color: var(--web-line); }
.group-header { position: static; }
.group-letter { color: var(--web-accent); background: transparent; padding: 0; }
.group-titles > p { color: var(--web-accent); }
.group-titles h2, .group-count b { color: var(--web-ink); }
.group-note p, .group-count { color: var(--web-muted); }
.port-stack { gap: 0; }
.tool-port.is-tool {
  min-height: 148px;
  display: grid;
  grid-template-columns: 92px minmax(0,1fr) auto;
  gap: 24px;
  padding: 28px 0;
  border: 0;
  border-top: 1px solid var(--web-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.tool-port.is-tool:first-child { border-top: 0; }
.tool-port.is-tool::before, .port-rail, .tool-machine { display: none; }
.tool-port.is-tool:hover { transform: translateX(4px); border-color: var(--web-line); box-shadow: none; }
.port-meta { align-self: start; min-height: 90px; padding-top: 4px; }
.port-id { color: #989ba0; }
.card-status { color: #357d65; background: #e4f1ec; border-radius: 12px; }
.card-status.is-live { color: #357d65; background: #e4f1ec; }
.port-copy { align-self: center; }
.card-title { color: var(--web-ink); font-size: clamp(24px, 2.6vw, 34px); }
.card-desc { color: var(--web-muted); font-size: 13px; }
.card-tags { margin-top: 12px; }
.card-tags li { color: #777b82; border-radius: 10px; background: var(--web-soft); }
.port-action { align-self: center; }
.open-tool-button {
  width: auto;
  height: 44px;
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  grid-template-rows: none;
  gap: 0;
  overflow: hidden;
  border-radius: 9px;
  color: #fff;
  background: var(--web-ink);
  box-shadow: none;
}
.open-tool-button .button-label { align-self: center; padding: 0 16px; }
.button-arrow { width: 40px; height: 44px; color: #fff; background: var(--web-accent); }
.tool-port:hover .open-tool-button { color: #fff; background: var(--web-ink); transform: translateY(-2px); box-shadow: 0 7px 18px rgba(23,26,31,.15); }
.open-tool-button:active { transform: translateY(0); box-shadow: none; }
.tool-port.is-slot { min-height: 50px; padding: 0; grid-template-columns: 78px 1fr auto 34px; border: 0; border-top: 1px dashed var(--web-line); border-radius: 0; color: #999ca1; background: transparent; }
.slot-line { background: repeating-linear-gradient(90deg,#d4d4cf 0 4px,transparent 4px 9px); }
.slot-socket { width: 24px; height: 24px; border-color: #c9c9c4; }

@keyframes pageEnter { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 760px) {
  .topbar { height: 62px; }
  .drawer-backdrop { inset: 62px 0 0; }
  .app-drawer { top: 62px; padding: 24px 20px; }
  .drawer-content { grid-template-columns: 1fr; }
  .drawer-group { padding: 12px 0; border-left: 0; border-top: 1px solid var(--web-line); }
  .drawer-group:first-child { border-top: 0; }
  .tool-list, .os-window { min-height: calc(100svh - 62px); }
  .window-body { min-height: calc(100svh - 62px); grid-template-columns: 1fr; }
  .folder-tree { padding: 14px 18px; border-right: 0; border-bottom: 1px solid var(--web-line); }
  .catalog-workspace { padding: 30px 20px 60px; }
  .catalog-group { grid-template-columns: 1fr; }
  .tool-port.is-tool { grid-template-columns: 1fr auto; gap: 12px; padding: 22px 0; }
  .port-meta { min-height: 0; grid-column: 1; grid-row: 1; align-self: center; }
  .port-copy { grid-column: 1 / -1; grid-row: 2; margin: 0; }
  .port-action { grid-column: 2; grid-row: 1; }
  .tool-port.is-slot { grid-template-columns: 62px 1fr 28px; }
}

.brand-tagline {
  margin-left: 24px;
  padding-left: 24px;
  border-left: 1px solid var(--web-line);
  color: #85898f;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: -.01em;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .brand-tagline { display: none; }
}

/* ==================================================================
   SSULTOOL SHELL — A THIRD OS
   익숙한 운영체제를 모사하지 않고, 웹 안에서 동작하는 고유 작업 환경.
   ================================================================== */
.third-os {
  --shell-desktop: #0a1220;
  --shell-bar: #121e33;
  --shell-panel: #edf2f7;
  --shell-panel-hi: #f8fafc;
  --shell-side: #dce5ee;
  --shell-ink: #142137;
  --shell-muted: #68768a;
  --shell-line: #bcc8d6;
  --shell-accent: #ffbd3e;
  --shell-coral: #ff6b57;
  --shell-green: #43c58f;
  background: var(--shell-desktop);
}
.third-os::before { opacity: .12; mix-blend-mode: screen; }
.third-os .topbar {
  height: 68px;
  justify-content: flex-start;
  color: #f8f5eb;
  background: rgba(10,18,32,.96);
  border-bottom-color: rgba(255,255,255,.1);
}
.third-os .topbar .brand-mark { background: var(--shell-accent); }
.third-os .topbar .brand-mark::after { background: var(--shell-desktop); }
.third-os .topbar .brand-text em { color: #8592a7; }
.third-os .brand-tagline { color: #8996aa; border-left-color: rgba(255,255,255,.13); }
.third-os .drawer-toggle { color: #f8f5eb; border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.06); box-shadow: none; }
.third-os .drawer-toggle:hover,
.third-os .drawer-toggle[aria-expanded="true"] { background: rgba(255,189,62,.14); box-shadow: none; }
.third-os .drawer-grid i { background: var(--shell-accent); }

.third-os .tool-list {
  min-height: calc(100svh - 68px);
  padding: clamp(16px, 2.2vw, 32px);
  background:
    radial-gradient(circle at 88% 10%, rgba(83,126,188,.12), transparent 28%),
    var(--shell-desktop);
}
.third-os .tool-list::before { display: block; opacity: .13; background-size: 38px 38px; }
.third-os .os-window {
  max-width: 1580px;
  min-height: calc(100svh - 68px - clamp(32px,4.4vw,64px));
  margin: auto;
  display: grid;
  grid-template-rows: 50px minmax(0,1fr) 34px;
  overflow: hidden;
  color: var(--shell-ink);
  background: var(--shell-panel);
  border: 1px solid rgba(255,255,255,.56);
  border-radius: 22px 22px 17px 17px;
  box-shadow: 0 28px 90px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.05);
  animation: shellOpen .52s cubic-bezier(.18,.8,.22,1) both;
}
.third-os .window-titlebar {
  min-height: 50px;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 140px 1fr 140px;
  align-items: center;
  color: #9cabc1;
  background: var(--shell-bar);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.third-os .window-titlebar p { margin: 0; text-align: center; font: 9px var(--mono); letter-spacing: .17em; }
.third-os .shell-sigil { display: flex; align-items: center; gap: 10px; }
.third-os .shell-sigil > span {
  width: 24px; height: 24px; position: relative; display: grid; place-items: center;
  clip-path: polygon(25% 0,75% 0,100% 25%,100% 75%,75% 100%,25% 100%,0 75%,0 25%);
  background: var(--shell-accent);
}
.third-os .shell-sigil i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--shell-bar); }
.third-os .shell-sigil i:first-child { transform: translate(-5px,3px); }
.third-os .shell-sigil i:last-child { transform: translate(5px,-3px); }
.third-os .shell-sigil b { color: #718198; font: 8px var(--mono); letter-spacing: .12em; }
.third-os .window-clock { justify-self: end; color: #c0cada; font: 9px var(--mono); }
.third-os .system-pulse { width: 6px; height: 6px; background: var(--shell-green); }
.third-os .site-foot {
  min-height: 34px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #77869c;
  background: var(--shell-bar);
  border: 0;
  font: 8px var(--mono);
  letter-spacing: .1em;
}

.third-os .window-body { max-width: none; min-height: 0; margin: 0; grid-template-columns: 220px minmax(0,1fr); }
.third-os .folder-tree { padding: 32px 14px 20px; background: var(--shell-side); border-right: 1px solid var(--shell-line); }
.third-os .tree-label { color: #738197; }
.third-os .chip { color: var(--shell-ink); }
.third-os .chip:hover { background: rgba(255,255,255,.45); }
.third-os .chip.is-active { background: #fff; box-shadow: 0 6px 18px rgba(38,55,80,.1); }
.third-os .chip.is-active i { color: var(--shell-coral); }
.third-os .folder-icon { background: var(--shell-accent); }
.third-os .folder-icon::before { background: #e6a92d; }
.third-os .tree-status { border-top-color: var(--shell-line); }
.third-os .tree-status strong { color: var(--shell-coral); }

.third-os .catalog-workspace { padding: clamp(28px,3.3vw,50px); overflow: auto; }
.third-os .list-head { margin-bottom: 28px; padding-bottom: 26px; border-bottom-color: var(--shell-line); }
.third-os .breadcrumb { color: #8190a4; }
.third-os .breadcrumb i { color: var(--shell-coral); }
.third-os .list-title h1 { color: var(--shell-ink); font-size: clamp(36px,4vw,54px); }
.third-os .list-intro { color: var(--shell-muted); }
.third-os .search { border-color: var(--shell-line); background: #fff; }
.third-os .search input { color: var(--shell-ink); }
.third-os .search:focus-within { border-color: #8799b1; box-shadow: 0 0 0 3px rgba(104,123,151,.1); }

.third-os .catalog-group { grid-template-columns: 170px minmax(0,1fr); gap: 22px; padding: 30px 0; border-top-color: var(--shell-line); }
.third-os .group-letter { display: inline-block; padding: 5px 8px; color: var(--shell-ink); background: var(--shell-accent); border-radius: 5px; }
.third-os .group-titles > p { color: var(--shell-coral); }
.third-os .group-titles h2,
.third-os .group-count b { color: var(--shell-ink); }
.third-os .group-note p,
.third-os .group-count { color: var(--shell-muted); }
.third-os .port-stack { gap: 10px; }
.third-os .tool-port.is-tool {
  min-height: 186px;
  display: grid;
  grid-template-columns: 82px 132px minmax(230px,1fr) 108px;
  gap: 18px;
  padding: 24px 20px 24px 28px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #aebdce;
  border-radius: 18px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 9px 24px rgba(36,53,78,.08);
}
.third-os .tool-port.is-tool:first-child { border-top: 1px solid #aebdce; }
.third-os .tool-port.is-tool::before {
  display: block;
  content: "";
  position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: radial-gradient(circle at 48% 40%, rgba(104,182,229,.15), transparent 45%);
  transition: opacity .25s;
}
.third-os .tool-port.is-tool:hover { transform: translateY(-3px); border-color: #8499b2; box-shadow: 0 17px 34px rgba(31,48,73,.14); }
.third-os .tool-port.is-tool:hover::before { opacity: 1; }
.third-os .port-rail { display: grid; width: 7px; background: var(--shell-bar); }
.third-os .port-rail span { background: var(--shell-coral); }
.third-os .port-meta { min-height: auto; align-self: stretch; }
.third-os .port-id { color: #8190a3; }
.third-os .card-status { color: #2c8b68; background: #e4f4ed; }
.third-os .tool-machine { width: 120px; height: 120px; display: grid; transform: none; }
.third-os .tool-machine svg { width: 62px; stroke: var(--shell-ink); }
.third-os .machine-ring { border-color: #b3c1d0; }
.third-os .ring-a { animation-duration: 24s; }
.third-os .ring-b { border-color: rgba(255,107,87,.6); animation-duration: 16s; }
.third-os .scan-line { background: #63bde8; box-shadow: 0 0 7px rgba(99,189,232,.5); animation-duration: 4.5s; }
.third-os .card-title { color: var(--shell-ink); font-size: clamp(25px,2.4vw,34px); }
.third-os .card-desc { color: var(--shell-muted); }
.third-os .card-tags li { color: #657489; background: #e2e8ef; }
.third-os .open-tool-button {
  width: 88px; height: 88px; min-height: 88px; padding: 0;
  display: grid; grid-template-rows: 1fr 26px; gap: 0;
  border-radius: 50%; color: #fff; background: var(--shell-bar);
  box-shadow: 0 7px 0 #07101d, 0 13px 23px rgba(16,29,49,.16);
}
.third-os .open-tool-button .button-label { align-self: end; padding: 0 0 5px; }
.third-os .button-arrow { width: 100%; height: 26px; color: var(--shell-ink); background: var(--shell-accent); }
.third-os .tool-port:hover .open-tool-button { color: #fff; background: var(--shell-bar); transform: translateY(-3px); box-shadow: 0 10px 0 #07101d, 0 17px 28px rgba(16,29,49,.2); }
.third-os .tool-port.is-slot {
  min-height: 58px; padding: 0 15px;
  grid-template-columns: 78px 1fr auto 34px;
  border: 1px dashed #adbdce; border-radius: 13px;
  color: #7f8ea2; background: rgba(255,255,255,.25);
}
.third-os .slot-line { background: repeating-linear-gradient(90deg,#aab9ca 0 5px,transparent 5px 10px); }

.third-os .app-drawer { color: #eef3fb; background: rgba(18,30,51,.985); border-bottom-color: rgba(255,255,255,.12); }
.third-os .drawer-head { border-bottom-color: rgba(255,255,255,.12); }
.third-os .drawer-head h2,
.third-os .drawer-head > button { color: #f5f7fb; }
.third-os .drawer-head > button { border-color: rgba(255,255,255,.18); }
.third-os .drawer-head .eyebrow { color: var(--shell-accent); }
.third-os .drawer-group { border-left-color: rgba(255,255,255,.12); }
.third-os .drawer-group header b { color: #f2f5fa; }
.third-os .drawer-app { color: #f2f5fa; background: rgba(255,255,255,.06); }
.third-os .drawer-app:hover { background: rgba(255,189,62,.12); }
.third-os .drawer-app small,
.third-os .drawer-empty,
.third-os .drawer-foot { color: #8d9bb0; }
.third-os .drawer-foot { border-top-color: rgba(255,255,255,.1); }

@keyframes shellOpen { from { opacity: 0; transform: translateY(18px) scale(.985); } }

@media (max-width: 1000px) {
  .third-os .tool-port.is-tool { grid-template-columns: 76px 100px minmax(180px,1fr) 84px; gap: 12px; }
  .third-os .tool-machine { width: 96px; height: 96px; }
  .third-os .open-tool-button { width: 72px; height: 72px; min-height: 72px; grid-template-rows: 1fr 22px; }
  .third-os .button-arrow { height: 22px; }
}

@media (max-width: 760px) {
  .third-os .tool-list { min-height: calc(100svh - 62px); padding: 8px; }
  .third-os .os-window { min-height: calc(100svh - 78px); border-radius: 15px; grid-template-rows: 40px minmax(0,1fr); }
  .third-os .window-titlebar { min-height: 40px; padding: 0 11px; grid-template-columns: 70px 1fr 54px; }
  .third-os .shell-sigil b { display: none; }
  .third-os .shell-sigil > span { width: 20px; height: 20px; }
  .third-os .window-titlebar p { font-size: 7px; letter-spacing: .1em; }
  .third-os .site-foot { display: none; }
  .third-os .window-body { grid-template-columns: 1fr; }
  .third-os .folder-tree { padding: 12px; border-right: 0; border-bottom: 1px solid var(--shell-line); }
  .third-os .catalog-workspace { padding: 25px 16px 56px; }
  .third-os .catalog-group { grid-template-columns: 1fr; }
  .third-os .tool-port.is-tool { min-height: 0; grid-template-columns: 1fr 72px; padding: 20px 15px 18px 23px; }
  .third-os .tool-machine { display: none; }
  .third-os .port-meta { grid-column: 1; grid-row: 1; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; }
  .third-os .port-copy { grid-column: 1 / -1; grid-row: 2; }
  .third-os .port-action { grid-column: 2; grid-row: 1; }
  .third-os .tool-port.is-slot { grid-template-columns: 62px 1fr 28px; }
}
/* ==================================================================
   GLOBAL FOOTER — Synapse Entertainment
   ================================================================== */
.global-footer {
  position: relative;
  z-index: 1;
  color: #dfe6f0;
  border-top: 1px solid rgba(255,255,255,.12);
  background: #08101d;
}
.footer-main {
  width: min(calc(100% - clamp(40px,8vw,120px)), 1460px);
  min-height: 250px;
  margin: 0 auto;
  padding: 58px 0 50px;
  display: grid;
  grid-template-columns: minmax(300px,1fr) minmax(500px,1.35fr);
  gap: clamp(64px,9vw,150px);
}
.footer-company { align-self: start; }
.footer-brand {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f4f6fa;
  text-decoration: none;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.04em;
}
.footer-brand em { color: #8794a8; font: normal 12px var(--mono); letter-spacing: -.03em; }
.footer-brand-mark {
  width: 24px;
  height: 24px;
  position: relative;
  border-radius: 7px;
  background: var(--shell-accent,#ffbd3e);
  transition: transform .25s ease;
}
.footer-brand-mark::after { content: ""; position: absolute; inset: 7px; border-radius: 2px; background: #08101d; }
.footer-brand:hover .footer-brand-mark { transform: rotate(45deg); }
.footer-company > p {
  max-width: 390px;
  margin: 22px 0 0;
  color: #8290a4;
  font-size: 13px;
  line-height: 1.85;
}
.footer-nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 38px; }
.footer-nav section { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; }
.footer-nav h2 { margin: 0 0 9px; color: #f2f5f9; font-size: 12px; letter-spacing: -.01em; }
.footer-nav a,
.footer-nav button,
.footer-nav span {
  margin: 0;
  padding: 0;
  border: 0;
  color: #7f8da1;
  background: none;
  font-size: 11.5px;
  line-height: 1.65;
  text-align: left;
  text-decoration: none;
}
.footer-nav a,
.footer-nav button { transition: color .2s; }
.footer-nav a:hover,
.footer-nav button:hover { color: var(--shell-accent,#ffbd3e); }
.footer-bottom {
  min-height: 48px;
  padding: 0 clamp(20px,4vw,60px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #566479;
  border-top: 1px solid rgba(255,255,255,.075);
  font: 8px var(--mono);
  letter-spacing: .09em;
}
.footer-bottom p { margin: 0; display: flex; align-items: center; gap: 8px; }
.footer-bottom strong { color: #68768a; font-weight: 600; }

@media (max-width: 900px) {
  .footer-main { padding: 46px 0; grid-template-columns: 1fr; gap: 42px; }
  .footer-nav { gap: 24px; }
}

@media (max-width: 620px) {
  .footer-main { width: auto; padding: 40px 22px; }
  .footer-company > p br { display: none; }
  .footer-nav { grid-template-columns: 1fr 1fr; gap: 34px 24px; }
  .footer-nav section:last-child { grid-column: auto; }
  .footer-bottom { min-height: 66px; padding: 14px 22px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 7px; }
}

/* ==================================================================
   STACK LIBRARY — selected third-OS direction
   ================================================================== */
.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

.stack-library {
  --stack-paper: #f7f5f1;
  --stack-sheet: #f7f5f1;
  --stack-side: #f7f5f1;
  --stack-ink: #171715;
  --stack-muted: #77756f;
  --stack-line: #d6d2c9;
  --stack-accent: #d4372d;
  --stack-ready: #b8db16;
  background: var(--stack-paper);
  color: var(--stack-ink);
}
.stack-library::before { opacity: .08; mix-blend-mode: multiply; }
.stack-library .topbar {
  height: 92px;
  padding: 0 42px;
  justify-content: flex-start;
  color: var(--stack-ink);
  border-bottom: 1px solid var(--stack-line);
  background: rgba(251,250,247,.96);
  backdrop-filter: blur(12px);
}
.stack-library .brand { gap: 11px; font-size: 26px; letter-spacing: -.055em; }
.stack-library .topbar .brand-mark {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 6px;
  background: #ffbd3e;
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
}
.stack-library .topbar .brand-mark::after { inset: 6px; border-radius: 2px; background: var(--stack-sheet); }
.stack-library .brand:hover .brand-mark { transform: rotate(45deg); }
.stack-library .brand-text { display: flex; align-items: baseline; white-space: nowrap; }
.stack-library .brand-text em { color: inherit; font: inherit; }
.brand-word {
  width: 2em;
  height: 1.16em;
  display: inline-block;
  position: relative;
  overflow: visible;
  transition: width .72s cubic-bezier(.2,.82,.2,1);
}
.brand-long {
  position: absolute;
  inset: 0 auto auto 0;
  display: flex;
  align-items: baseline;
  white-space: nowrap;
}
.brand-long { pointer-events: none; }
.brand-long i {
  display: inline-block;
  font-style: normal;
}
.brand-long .brand-insert {
  color: #ad5148;
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  transform: translateX(-.3em);
  transform-origin: left center;
  filter: blur(1.5px);
  transition:
    opacity .2s ease,
    clip-path .42s cubic-bezier(.22,.78,.2,1),
    transform .46s cubic-bezier(.22,.78,.2,1),
    filter .32s ease;
}
.brand-long .brand-anchor {
  opacity: 1;
  filter: none;
  transform-origin: center center;
  transition: transform .72s cubic-bezier(.22,.82,.22,1);
}
.brand-long .brand-anchor-ssul { transform: translateX(-200%); }
.brand-long .brand-anchor-tool { transform: translateX(-600%); }
@media (hover:hover) and (pointer:fine) {
  .stack-library .brand:hover .brand-word { width: 6.7em; }
  .stack-library .brand:hover .brand-long .brand-insert {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translateX(0);
    filter: blur(0);
    transition-delay: calc(var(--letter) * 42ms + 80ms);
  }
  .stack-library .brand:hover .brand-long .brand-anchor {
    transform: translateX(0);
    transition-delay: 0ms;
  }
}
.stack-library .brand:focus-visible .brand-word { width: 6.7em; }
.stack-library .brand:focus-visible .brand-long .brand-insert { opacity: 1; clip-path: inset(0); transform: none; filter: none; transition-delay: calc(var(--letter) * 42ms + 80ms); }
.stack-library .brand:focus-visible .brand-long .brand-anchor { transform: translateX(0); transition-delay: 0ms; }
.stack-library .brand-tagline {
  max-width: 270px;
  margin-left: 20px;
  padding-left: 20px;
  overflow: hidden;
  color: #8d8a83;
  border-left: 1px solid var(--stack-line);
  font-size: 11.5px;
  opacity: 1;
  transform: translateX(0);
  filter: blur(0);
  transition:
    max-width .58s cubic-bezier(.2,.8,.2,1),
    margin-left .58s cubic-bezier(.2,.8,.2,1),
    padding-left .58s cubic-bezier(.2,.8,.2,1),
    opacity .34s ease .24s,
    transform .4s ease,
    filter .34s ease .24s,
    border-color .3s ease;
}
@media (hover:hover) and (pointer:fine) {
  .stack-library .brand:hover + .brand-tagline {
    max-width: 0;
    margin-left: 0;
    padding-left: 0;
    opacity: 0;
    transform: translateX(14px);
    filter: blur(2px);
    border-left-color: transparent;
    transition:
      max-width .48s cubic-bezier(.2,.8,.2,1) .26s,
      margin-left .48s cubic-bezier(.2,.8,.2,1) .26s,
      padding-left .48s cubic-bezier(.2,.8,.2,1) .26s,
      opacity .36s ease,
      transform .4s ease,
      filter .36s ease,
      border-color .28s ease .18s;
  }
}
.stack-library .brand:focus-visible + .brand-tagline {
  max-width: 0;
  margin-left: 0;
  padding-left: 0;
  opacity: 0;
  transform: translateX(14px);
  filter: blur(2px);
  border-left-color: transparent;
}
.header-search {
  width: min(420px,35vw);
  height: 48px;
  margin-left: auto;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #86837c;
  border: 1px solid var(--stack-line);
  border-radius: 5px;
  background: rgba(255,255,255,.42);
  transition: border-color .2s, background .2s;
}
.header-search:focus-within { border-color: #9e9a91; background: #fff; }
.header-search .material-symbols-outlined { font-size: 19px; }
.header-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: none; font-size: 14px; }
.header-search input::placeholder { color: #99968e; }
.header-search kbd { color: #8f8c85; background: none; font: 12px var(--mono); }

.stack-library .tool-list {
  min-height: calc(100svh - 92px);
  padding: 30px 0 0;
  overflow: hidden;
  background: var(--stack-paper);
}
.stack-window { position: relative; min-height: calc(100svh - 122px); }
.stack-backs {
  position: absolute;
  inset: 0 0 36px 230px;
  z-index: 4;
  pointer-events: none;
}
.stack-backs span {
  position: absolute;
  height: 100%;
  border: 1px solid var(--stack-line);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  background: transparent;
}
.stack-backs span:first-child { inset: -14px 7px auto 14px; }
.stack-backs span:last-child { inset: -7px 3px auto 7px; background: transparent; }
.stack-body {
  position: relative;
  z-index: 3;
  min-height: calc(100svh - 158px);
  display: grid;
  grid-template-columns: 220px minmax(560px,1fr);
  border-top: 0;
  background: transparent;
}
.stack-index {
  min-width: 0;
  width: 100%;
  padding: 28px 0 36px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--stack-line);
  background: var(--stack-side);
}
.stack-index > p {
  margin: 0 40px 36px;
  color: #929087;
  font: 600 10px var(--mono);
  letter-spacing: .1em;
}
.stack-library .filters { display: grid; gap: 2px; }
.stack-library .chip {
  width: 100%;
  min-height: 68px;
  padding: 0 28px 0 42px;
  display: grid;
  grid-template-columns: 40px 1fr 20px;
  align-items: center;
  gap: 9px;
  position: relative;
  border: 0;
  border-radius: 0;
  color: var(--stack-ink);
  background: transparent;
  text-align: left;
}
.stack-library .chip::before {
  content: "";
  position: absolute;
  left: 0;
  width: 4px;
  height: 0;
  background: var(--stack-accent);
  transition: height .2s ease;
}
.stack-library .chip > i { color: inherit; font: normal 600 16px var(--sans); }
.stack-library .chip > b { font-size: 14px; }
.stack-library .chip > small { color: #a09d95; font: 10px var(--mono); text-align: right; }
.stack-library .chip:hover { color: var(--stack-accent); background: rgba(212,55,45,.025); }
.stack-library .chip.is-active { color: var(--stack-accent); background: transparent; box-shadow: none; }
.stack-library .chip.is-active::before { height: 42px; }
.stack-library .chip-ai-directory {
  margin-bottom: 10px;
  color: var(--stack-accent);
}
.stack-library .chip-ai-directory::after {
  content: "";
  position: absolute;
  left: 40px;
  right: 40px;
  bottom: -6px;
  height: 1px;
  background: var(--stack-line);
}
.stack-library .chip-ai-directory:hover { color: var(--stack-accent); background: rgba(212,55,45,.035); }
.stack-index > small {
  margin: auto 40px 0;
  padding-top: 24px;
  color: #9b988f;
  border-top: 1px solid var(--stack-line);
  font: 8px var(--mono);
  letter-spacing: .08em;
}
.stack-index > small b { color: var(--stack-accent); font-size: 15px; }

.stack-stage {
  min-width: 0;
  position: relative;
  z-index: 3;
  margin-left: 10px;
  padding: 58px clamp(38px,5vw,74px) 76px;
  border: 1px solid var(--stack-line);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  background: var(--stack-sheet);
}
.stack-heading { padding-bottom: 38px; border-bottom: 1px solid var(--stack-line); }
.stack-heading h1 { margin: 0; font-size: clamp(34px,3.2vw,47px); letter-spacing: -.07em; line-height: 1.08; }
.stack-heading p { margin: 14px 0 0; color: var(--stack-muted); font-size: 13px; }
.stack-library .catalog { padding: 48px 0 0; }
.catalog-ad-layout { min-width: 0; }
.stack-library.is-ai-directory .catalog-ad-layout { display: none; }

@media (min-width: 1440px) {
  .catalog-ad-layout {
    display: grid;
    grid-template-columns: minmax(640px, 1fr) 328px;
    gap: 34px;
    align-items: start;
  }
  .catalog-ad-layout .catalog { min-width: 0; }
  .adsense-slot-catalog {
    width: 328px;
    min-height: 600px;
    margin: 48px 0 0;
    padding: 0 0 0 28px;
    border-top: 0;
    border-left: 1px solid var(--stack-line);
  }
  .adsense-slot-catalog > .adsbygoogle {
    width: 300px;
    min-height: 600px;
  }
}
.stack-library .catalog-group { display: block; padding: 0; border: 0; }
.stack-library .group-header {
  min-height: 35px;
  margin-bottom: 23px;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
}
.stack-library .group-letter,
.stack-library .group-note,
.stack-library .group-titles > p,
.stack-library .group-count > i { display: none; }
.stack-library .group-titles h2 { margin: 0; color: var(--stack-ink); font-size: 22px; letter-spacing: -.045em; }
.stack-library .group-count { display: flex; align-items: center; gap: 3px; margin-left: 4px; color: var(--stack-accent); }
.stack-library .group-count b { font: 500 11px var(--mono); }
.stack-library .group-count b::after { content: "개"; margin-left: 2px; font-family: var(--sans); }
.stack-library .port-stack { display: grid; gap: 10px; }
.stack-tool-row {
  width: 100%;
  min-height: 92px;
  padding: 0 25px;
  display: grid;
  grid-template-columns: 46px minmax(145px,190px) minmax(190px,1fr) 72px 24px;
  align-items: center;
  gap: 18px;
  color: var(--stack-ink);
  text-decoration: none;
  border: 1px solid #cbc7be;
  border-radius: 6px;
  background: rgba(255,255,255,.2);
  text-align: left;
  transition: border-color .2s, background .2s, transform .2s ease;
}
.stack-tool-row:hover { border-color: #aaa69d; background: #fff; transform: translateY(-2px); }
.stack-tool-row:disabled { opacity: .62; cursor: not-allowed; }
.stack-tool-row:disabled:hover { border-color: var(--stack-line); background: rgba(255,255,255,.2); transform: none; }
.stack-tool-row .tool-number { padding-right: 20px; border-right: 1px solid var(--stack-line); font: 500 14px var(--mono); }
.stack-tool-row > strong { font-size: 16px; letter-spacing: -.025em; }
.stack-tool-row .tool-description { color: #85817a; font-size: 12.5px; line-height: 1.55; }
.tool-ready { display: flex; align-items: center; gap: 7px; color: #6d6a64; font-size: 11px; white-space: nowrap; }
.tool-ready i { width: 8px; height: 8px; border-radius: 50%; background: #bbb; }
.tool-ready.is-live i { background: var(--stack-ready); }
.tool-ready.is-wip i { background: #d0a428; }
.tool-chevron { justify-self: end; font-size: 22px; }
.stack-library .catalog-empty { padding: 40px 0; color: #8d8981; text-align: left; }

.stack-library .site-foot {
  min-height: 36px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8b877f;
  border-top: 1px solid var(--stack-line);
  background: #f1efe9;
  font: 8px var(--mono);
  letter-spacing: .1em;
}
.stack-library .system-pulse { background: var(--stack-ready); }

.stack-library .global-footer { color: #3f3d39; border-top-color: #d2cec5; background: #eeece6; }
.stack-library .footer-brand { color: #171715; }
.stack-library .footer-brand-mark { background: var(--stack-accent); }
.stack-library .footer-brand-mark::after { background: #eeece6; }
.stack-library .footer-brand em,
.stack-library .footer-company > p,
.stack-library .footer-nav a,
.stack-library .footer-nav button,
.stack-library .footer-nav span { color: #74716a; }
.stack-library .footer-nav h2 { color: #25241f; }
.stack-library .footer-bottom { color: #858179; border-top-color: #d2cec5; }
.stack-library .footer-bottom strong { color: #66625b; }

@media (max-width: 1080px) {
  .stack-library .brand-tagline { display: none; }
  .stack-body { grid-template-columns: 180px minmax(480px,1fr); }
  .stack-backs { left: 190px; }
  .stack-library .chip { padding-left: 25px; grid-template-columns: 36px 1fr 18px; }
  .stack-index > p,
  .stack-index > small { margin-left: 25px; margin-right: 25px; }
}

@media (max-width: 760px) {
  .stack-library .topbar { height: auto; min-height: 112px; padding: 18px 20px; flex-wrap: wrap; gap: 8px 0; }
  .stack-library .brand { font-size: 21px; }
  .stack-library .brand-tagline { display: none; }
  .header-search { order: 3; width: 100%; height: 42px; margin: 6px 0 0; }
  .stack-library .tool-list { min-height: calc(100svh - 112px); padding-top: 14px; }
  .stack-window { min-height: auto; }
  .stack-backs { display: none; }
  .stack-body { display: block; min-height: 0; border-top: 1px solid var(--stack-line); }
  .stack-index { width: 100%; padding: 17px 0; border-right: 0; border-bottom: 1px solid var(--stack-line); }
  .stack-index > p,
  .stack-index > small { display: none; }
  .stack-library .filters { padding: 0 14px; display: flex; overflow-x: auto; scrollbar-width: none; }
  .stack-library .chip { width: auto; min-width: max-content; min-height: 44px; padding: 0 12px; display: flex; gap: 7px; }
  .stack-library .chip::before { inset: auto 12px 0; width: auto; height: 2px; transform: scaleX(0); }
  .stack-library .chip.is-active::before { height: 2px; transform: scaleX(1); }
  .stack-library .chip > i { font-size: 11px; }
  .stack-library .chip > b { font-size: 12px; }
  .stack-library .chip > small { display: none; }
  .stack-stage { margin-left: 0; padding: 34px 20px 48px; border: 0; border-radius: 0; }
  .stack-heading { padding-bottom: 26px; }
  .stack-heading h1 { font-size: 32px; }
  .stack-library .catalog { padding-top: 32px; }
  .stack-tool-row { min-height: 116px; padding: 18px; grid-template-columns: 36px 1fr 24px; gap: 10px 12px; }
  .stack-tool-row .tool-number { grid-column: 1; padding-right: 12px; }
  .stack-tool-row > strong { grid-column: 2; }
  .stack-tool-row .tool-description { grid-column: 1 / -1; grid-row: 2; }
  .tool-ready { grid-column: 2; grid-row: 3; }
  .tool-chevron { grid-column: 3; grid-row: 1; }
  .stack-library .site-foot { min-height: 34px; padding: 0 18px; }
  .stack-library .site-foot span:nth-child(2) { display: none; }
}

/* ==================================================================
   00 AI DIRECTORY
   ================================================================== */
.stack-library.is-ai-directory .header-search { visibility: hidden; pointer-events: none; }
.ai-directory {
  min-height: calc(100svh - 92px);
  padding: 44px clamp(24px, 5.4vw, 86px) 96px;
  background: var(--stack-paper);
}
.ai-directory-shell {
  width: min(1480px, 100%);
  min-height: 760px;
  margin: 0 auto;
  padding: clamp(44px, 5vw, 72px) clamp(28px, 5vw, 78px) 76px;
  position: relative;
  isolation: isolate;
  border: 1px solid var(--stack-line);
  border-radius: 6px 6px 0 0;
  background: var(--stack-sheet);
}
.ai-directory-shell::before,
.ai-directory-shell::after {
  content: "";
  position: absolute;
  z-index: -2;
  height: 28px;
  border: 1px solid var(--stack-line);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: var(--stack-paper);
}
.ai-directory-shell::before { inset: -15px 12px auto 12px; }
.ai-directory-shell::after { inset: -8px 6px auto 6px; z-index: -1; }
.ai-directory-head { padding-bottom: 38px; border-bottom: 1px solid var(--stack-line); }
.ai-directory-head .back-to-hub {
  margin-bottom: 42px;
  color: #74716a;
  font-size: 12px;
}
.ai-title-row {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(320px, .9fr);
  align-items: end;
  justify-content: space-between;
  gap: 50px;
}
.ai-title-row > div { display: flex; align-items: baseline; gap: 18px; }
.ai-index { color: var(--stack-accent); font: 500 15px var(--mono); }
.ai-title-row h1 { margin: 0; font-size: clamp(42px, 5vw, 68px); letter-spacing: -.075em; line-height: .92; }
.ai-title-row > p {
  max-width: 520px;
  margin: 0;
  justify-self: end;
  color: var(--stack-muted);
  font-size: 13px;
  line-height: 1.85;
}
.ai-directory-controls {
  margin-top: 34px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.ai-search {
  width: min(540px, 100%);
  height: 50px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #858179;
  border: 1px solid #c9c5bb;
  border-radius: 5px;
  background: rgba(255,255,255,.35);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.ai-search:focus-within { border-color: #99958b; background: #fff; box-shadow: 0 0 0 3px rgba(23,23,21,.045); }
.ai-search .material-symbols-outlined { font-size: 19px; }
.ai-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: none; font: 13px var(--sans); }
.ai-search input::placeholder { color: #9a978f; }
.ai-search kbd { color: #96938c; font: 11px var(--mono); }
.ai-directory-controls > p { margin: 0 0 0 auto; display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.ai-sort-label { margin-right: 8px; color: #9b978f; font: 8px var(--mono); letter-spacing: .1em; }
.ai-directory-controls > p strong { color: var(--stack-accent); font: 500 25px var(--mono); }
.ai-directory-controls > p span { color: #858179; font-size: 11px; }
.ai-category-filters {
  margin: 24px 0 30px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.ai-filter {
  min-width: max-content;
  height: 39px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #6d6a64;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  font: 600 11.5px var(--sans);
  transition: color .2s, border-color .2s, background .2s;
}
.ai-filter small { color: #a19e96; font: 9px var(--mono); }
.ai-filter:hover { color: var(--stack-ink); border-color: #d5d1c8; }
.ai-filter.is-active { color: #fff; border-color: var(--stack-ink); background: var(--stack-ink); }
.ai-filter.is-active small { color: #aaa79f; }
.ai-site-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--stack-line);
  border-left: 1px solid var(--stack-line);
}
.ai-site-card {
  min-width: 0;
  min-height: 142px;
  padding: 20px;
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0,1fr) 24px;
  grid-template-rows: auto 1fr auto;
  gap: 10px 14px;
  color: var(--stack-ink);
  border-right: 1px solid var(--stack-line);
  border-bottom: 1px solid var(--stack-line);
  background: rgba(255,255,255,.12);
  text-decoration: none;
  transition: background .2s, transform .22s ease, box-shadow .22s ease;
  animation: aiCardIn .34s both;
  animation-delay: calc(min(var(--card-order), 18) * 18ms);
}
.ai-site-card:hover {
  z-index: 2;
  background: #fff;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(39,35,28,.08);
}
.ai-card-number { grid-column: 1 / -1; color: #aaa69e; font: 8px var(--mono); letter-spacing: .08em; }
.ai-site-icon {
  width: 40px;
  height: 40px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d8d4cb;
  border-radius: 10px;
  background: #fff;
}
.ai-site-icon img { width: 24px; height: 24px; position: relative; z-index: 1; object-fit: contain; }
.ai-icon-fallback { position: absolute; color: #77736b; font: 700 15px var(--sans); }
.ai-site-copy { min-width: 0; display: grid; gap: 6px; align-content: start; }
.ai-site-copy strong { overflow: hidden; font-size: 15px; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.ai-site-copy > span { color: #7d7972; font-size: 11.5px; line-height: 1.55; }
.ai-site-meta { grid-column: 2 / -1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ai-site-meta small { color: var(--stack-accent); font-size: 9.5px; }
.ai-site-meta i { overflow: hidden; color: #a09c94; font: normal 8px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.ai-external { width: 20px; height: 20px; color: #8c8982; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: color .2s, transform .2s; }
.ai-site-card:hover .ai-external { color: var(--stack-accent); transform: translate(2px,-2px); }
.ai-directory-empty { padding: 90px 20px; border-top: 1px solid var(--stack-line); text-align: center; }
.ai-directory-empty .material-symbols-outlined { display: block; margin-bottom: 15px; color: #aaa69e; font-size: 30px; }
.ai-directory-empty strong { font-size: 16px; }
.ai-directory-empty p { margin: 9px 0 0; color: #8c8982; font-size: 12px; }
@keyframes aiCardIn { from { opacity: 0; transform: translateY(7px); } }

@media (prefers-reduced-motion: reduce) {
  .ai-site-card { animation: none; transition: none; }
}

@media (max-width: 1040px) {
  .ai-site-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .stack-library.is-ai-directory .topbar { min-height: 64px; }
  .stack-library.is-ai-directory .header-search { display: none; }
  .ai-directory { min-height: calc(100svh - 64px); padding: 24px 0 64px; }
  .ai-directory-shell { min-height: 0; padding: 36px 20px 50px; border-right: 0; border-left: 0; border-radius: 0; }
  .ai-directory-shell::before,
  .ai-directory-shell::after { display: none; }
  .ai-directory-head .back-to-hub { margin-bottom: 32px; }
  .ai-title-row { grid-template-columns: 1fr; gap: 20px; }
  .ai-title-row h1 { font-size: 46px; }
  .ai-title-row > p { justify-self: start; }
  .ai-directory-controls { align-items: stretch; flex-direction: column; gap: 14px; }
  .ai-directory-controls > p { margin-left: 0; }
  .ai-category-filters { margin-right: -20px; padding-right: 20px; }
  .ai-site-grid { grid-template-columns: 1fr; }
  .ai-site-card { min-height: 134px; }
}

/* AI 모음은 별도 페이지가 아니라 Stack Library의 우측 프레임 안에서 열립니다. */
.stack-library.is-ai-directory .stack-stage {
  padding-top: 52px;
}
.stack-library.is-ai-directory .chip-ai-directory.is-active::before { height: 42px; }
.stack-library.is-ai-directory .chip-ai-directory.is-active { color: var(--stack-accent); }
.stack-library.is-ai-directory .ai-directory {
  min-height: 0;
  padding: 0;
  background: transparent;
}
.stack-library.is-ai-directory .ai-directory-shell {
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0 0 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.stack-library.is-ai-directory .ai-directory-shell::before,
.stack-library.is-ai-directory .ai-directory-shell::after { display: none; }
.stack-library.is-ai-directory .ai-directory-head { padding-bottom: 32px; }
.stack-library.is-ai-directory .ai-title-row h1 { font-size: clamp(38px, 4vw, 52px); }
.stack-library.is-ai-directory .ai-title-row > p { font-size: 12.5px; }
.stack-library.is-ai-directory .ai-directory-controls { margin-top: 28px; }
.stack-library.is-ai-directory .ai-category-filters {
  margin: 18px 0 14px;
  flex-wrap: wrap;
  overflow: visible;
}
.stack-library.is-ai-directory .ai-filter { padding-inline: 11px; font-size: 11px; }
.stack-library.is-ai-directory .ai-site-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.stack-library.is-ai-directory .ai-site-card { min-height: 132px; }
.ai-image-subfilters {
  min-height: 54px;
  margin: 0 0 24px;
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 7px;
  border-top: 1px solid var(--stack-line);
  border-bottom: 1px solid var(--stack-line);
}
.ai-image-subfilters[hidden] { display: none; }
.ai-subfilter-label {
  margin-right: 10px;
  color: #9b978f;
  font: 8px var(--mono);
  letter-spacing: .11em;
}
.ai-subfilter {
  min-width: max-content;
  height: 32px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #77736c;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  font: 600 11px var(--sans);
}
.ai-subfilter small { color: #aaa69e; font: 8px var(--mono); }
.ai-subfilter:hover { border-color: #cfcbc2; color: var(--stack-ink); }
.ai-subfilter.is-active { color: var(--stack-ink); border-color: #bdb9b0; background: rgba(255,255,255,.55); }

@media (min-width: 1560px) {
  .stack-library.is-ai-directory .ai-site-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .stack-library.is-ai-directory .stack-stage { padding-top: 34px; }
  .stack-library.is-ai-directory .ai-directory { padding: 0; }
  .stack-library.is-ai-directory .ai-directory-shell { padding: 0 0 20px; }
  .stack-library.is-ai-directory .ai-title-row { gap: 16px; }
  .stack-library.is-ai-directory .ai-title-row h1 { font-size: 40px; }
  .stack-library.is-ai-directory .ai-site-grid { grid-template-columns: 1fr; }
  .ai-image-subfilters { align-items: flex-start; flex-wrap: wrap; }
  .ai-subfilter-label { width: 100%; margin: 0 0 2px; }
}
