/* Layout: fixed left workspace sidebar + main area (breadcrumb bar, then home cards or a full-height mockup frame) */
:root {
  --bg: #f6f8f7; --panel: #ffffff; --fg: #182321; --muted: #6b7672; --faint: #a1aaa6;
  --line: #e6ebe9; --accent: #06c755; --accent-ink: #04a846; --accent-soft: #e8faef;
  --shadow: 0 1px 2px rgba(24,35,33,.04), 0 4px 16px rgba(24,35,33,.05);
  --font: "DM Sans", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  --side-w: 232px; --radius: 11px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0f1513; --panel: #151d1a; --fg: #e7eeeb; --muted: #9aa6a1; --faint: #6c7873; --line: #24302c; --accent: #18d468; --accent-ink: #3fe083; --accent-soft: #16301f; --shadow: none; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #0f1513; --panel: #151d1a; --fg: #e7eeeb; --muted: #9aa6a1; --faint: #6c7873; --line: #24302c; --accent: #18d468; --accent-ink: #3fe083; --accent-soft: #16301f; --shadow: none; color-scheme: dark; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { word-break: keep-all; margin: 0; background: var(--bg); color: var(--fg); font: 13px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
.shell { display: flex; min-height: 100%; }

.side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 22px 14px 16px; padding-left: max(14px, env(safe-area-inset-left)); overflow-y: auto; z-index: 30; }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--fg); padding: 0 6px 22px; }
.mark { width: 36px; height: 36px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 20px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text b { font-size: 18px; letter-spacing: .02em; }
.brand-text small { font-size: 11px; color: var(--accent-ink); font-weight: 500; }
.brand-text em { font-style: normal; font-size: 8.5px; letter-spacing: .14em; color: var(--faint); margin-top: 3px; }
nav { display: flex; flex-direction: column; gap: 18px; }
.group-label { font-size: 10px; letter-spacing: .14em; color: var(--faint); padding: 0 10px 6px; font-weight: 500; }
.group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius); color: var(--fg); text-decoration: none; font-size: 13px; }
.item svg { width: 17px; height: 17px; flex: none; color: var(--muted); }
.item:hover { background: var(--bg); }
.item[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 500; }
.item[aria-current="page"] svg { color: var(--accent-ink); }
.item:focus-visible, .card:focus-visible, .menu-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.side-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.side-foot code { font-size: 10.5px; background: var(--bg); padding: 1px 5px; border-radius: 5px; }

.main { flex: 1; min-width: 0; margin-left: var(--side-w); display: flex; flex-direction: column; min-height: 100vh; }
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 24px; padding-right: max(24px, env(safe-area-inset-right)); background: var(--panel); border-bottom: 1px solid var(--line); }
.crumb { display: flex; gap: 8px; align-items: center; color: var(--muted); min-width: 0; }
.crumb b { color: var(--fg); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sep { color: var(--faint); }
.open-new { margin-left: auto; font-size: 12px; color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 9px; padding: 5px 10px; white-space: nowrap; }
.open-new:hover { color: var(--fg); }
.menu-btn { display: none; background: none; border: 0; color: var(--fg); padding: 6px; margin-left: -6px; border-radius: 8px; cursor: pointer; }

.home { padding: 40px 32px 56px; padding-right: max(32px, env(safe-area-inset-right)); max-width: 1120px; display: flex; flex-direction: column; gap: 10px; }
.eyebrow { margin: 0; font-size: 10px; letter-spacing: .16em; color: var(--accent-ink); font-weight: 700; }
.home h1 { margin: 0; font-size: 29px; letter-spacing: -.01em; text-wrap: balance; }
.lead { margin: 0 0 18px; color: var(--muted); max-width: 64ch; font-size: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: var(--fg); min-width: 0; transition: border-color .15s; }
.card:hover { border-color: var(--accent); }
.card-top { display: flex; align-items: center; gap: 10px; }
.card-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.card-icon svg { width: 18px; height: 18px; }
.card h2 { margin: 0; font-size: 15px; font-weight: 700; }
.card p { margin: 0; color: var(--muted); font-size: 12.5px; }
.card-meta { display: flex; gap: 8px; align-items: center; margin-top: auto; font-size: 11px; color: var(--faint); }
.tag { background: var(--bg); color: var(--muted); border-radius: 6px; padding: 2px 7px; }
.card.add { border-style: dashed; box-shadow: none; background: transparent; color: var(--muted); }
.card.add code { font-size: 11px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }

.frame-wrap { flex: 1; display: flex; }
.frame-wrap[hidden] { display: none; }
#frame { flex: 1; width: 100%; min-height: calc(100vh - 56px); border: 0; background: var(--bg); }

.scrim { position: fixed; inset: 0; background: rgba(10,15,13,.35); z-index: 25; }
@media (max-width: 860px) {
  .side { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.15); }
  .side.open { transform: none; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .top { padding: 0 16px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .home { padding: 28px 16px 40px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .open-new { display: none; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }
.home[hidden], .scrim[hidden] { display: none; }
/* Frog-LFC logo: frog holding chives */
.mark { width: 46px; height: 40px; border-radius: 0; background: url(logo.svg) center / contain no-repeat; color: transparent; }
.brand-text small { white-space: nowrap; font-size: 10.5px; }
