@import "./tokens.css";

:root {
  --rail-width: 256px;
  --home-pad-x: 40px;
  --home-pad-top: 48px;
  --sidebar-fg: oklch(14.5% 0 0);
}

html, body { height: 100%; background: #fff; }
body { color: var(--ink); }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg.i, .rail svg, .workspace-rail svg, .home-board svg, .icon-btn svg, .ghost svg, .gear-btn svg {
  width: 14px; height: 14px; fill: none; stroke: currentColor;
  stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--rail-width) 1fr;
  min-height: 100%;
  background: #fff;
}
.app-shell.rail-collapsed { grid-template-columns: 1fr; }

.workspace-rail {
  display: flex;
  flex-direction: column;
  width: var(--rail-width);
  min-height: 100vh;
  padding: 10px 0 12px;
  border-right: 1px solid oklch(14.5% 0 0 / .1);
  background: #fff;
  color: var(--sidebar-fg);
}
.rail-head {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 2px 16px 8px;
  font-size: 14px;
  font-weight: 500;
}
.rail-search {
  position: relative;
  display: block;
  margin: 4px 12px 8px;
}
.rail-search svg {
  position: absolute; left: 10px; top: 9px; width: 14px; height: 14px; color: var(--muted);
}
.rail-search input {
  width: 100%; height: 32px; padding: 4px 12px 4px 32px; border: 0; border-radius: 8px;
  background: oklch(97% 0 0); color: var(--ink); font-size: 12px; outline: none;
}
.rail-search input::placeholder { color: var(--muted); }
.rail-search input:focus { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }

.rail-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 4px;
}
.rail-nav { display: flex; flex-direction: column; gap: 1px; margin: 0 4px 10px; }
.rail-nav-item {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 26px;
  padding: 4px 8px; border: 0; border-radius: 8px; background: transparent;
  color: oklch(14.5% 0 0 / .8); font-size: 12px; font-weight: 400; text-align: left; cursor: pointer;
}
.rail-nav-item svg { width: 14px; height: 14px; flex: 0 0 auto; }
.rail-nav-item.is-active {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent); font-weight: 500;
}
.rail-nav-item:hover { background: oklch(97% 0 0); }
.rail-nav-item.is-active:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }

.rail-section {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 26px; padding: 0 12px; margin-top: 2px;
}
.rail-section span {
  color: var(--muted); font-size: 12px; font-weight: 500;
}
.rail-plus {
  display: inline-grid; place-items: center; width: 24px; height: 24px;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer;
}
.rail-plus:hover { background: oklch(97% 0 0); color: var(--ink); }
.rail-plus svg { width: 13px; height: 13px; }

.rail-projects { padding: 0 4px 8px; }
.rail-project {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 28px;
  padding: 4px 8px; border: 0; border-radius: 8px; background: transparent;
  color: var(--ink); font-size: 14px; font-weight: 500; text-align: left; cursor: pointer;
}
.rail-project img, .rail-project .thumb {
  width: 18px; height: 18px; border-radius: 4px; object-fit: cover; background: oklch(97% 0 0); flex: 0 0 auto;
}
.rail-project:hover { background: oklch(97% 0 0); }
.app-shell .rail-project.is-current { background: transparent; }

.rail-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin: 0 8px 8px; padding: 24px 16px; color: var(--muted); font-size: 12px; text-align: center;
}
.rail-empty .empty-icon {
  display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 10px;
  border-radius: 10px; background: oklch(97% 0 0); color: #b0afb6;
}
.rail-empty .empty-icon svg { width: 18px; height: 18px; }

.rail-footer {
  margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 8px 12px 4px;
  min-width: 0;
}
.account-chip {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; height: 32px;
  padding: 0 10px; border: 0; border-radius: 8px; background: transparent;
  color: oklch(14.5% 0 0 / .8); font-size: 14px; font-weight: 500; text-align: left; cursor: pointer;
}
.account-chip span:not(.avatar) {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.account-chip:hover { background: oklch(97% 0 0); }
.avatar {
  display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 9px; font-weight: 700;
}
.gear-btn {
  display: inline-grid; place-items: center; width: 28px; height: 28px;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer;
}
.gear-btn:hover { background: oklch(97% 0 0); color: var(--ink); }

.workspace-main {
  min-width: 0;
  background: #f5f5f7;
  background-image: radial-gradient(#d2d2d7 1px, transparent 1px);
  background-size: 18px 18px;
}
.home-board {
  max-width: none;
  margin: 0;
  padding: var(--home-pad-top) var(--home-pad-x) 80px;
}
.home-welcome {
  margin: 0 0 34px;
  font-size: 30px; line-height: 36px; letter-spacing: -.02em; font-weight: 600;
}
.home-quiet h2 { font-weight: 600; color: var(--ink); }
.home-section-row {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 32px; margin: 0 0 18px;
}
.home-section-row h2 {
  margin: 0; font-size: 18px; line-height: 28px; letter-spacing: -.01em; font-weight: 600;
}
.home-new {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 0 12px; border: 1px solid oklch(14.5% 0 0 / .1);
  border-radius: 8px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer;
}
.home-new:hover { background: oklch(97% 0 0); }
.home-new svg { width: 14px; height: 14px; }

.continue-card {
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  min-height: 188px; margin-bottom: 50px; padding: 25px 24px;
  border: 1px solid oklch(14.5% 0 0 / .1); border-radius: 8px; background: #fff;
}
.continue-kicker { margin: 0 0 8px; color: var(--accent); font-size: 12px; font-weight: 500; }
.continue-copy h3 { margin: 0; font-size: 24px; line-height: 32px; letter-spacing: -.02em; font-weight: 600; }
.continue-time { margin: 4px 0 16px; color: var(--muted); font-size: 14px; }
.continue-cta {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px; padding: 0 14px; border: 0; border-radius: 8px;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 500; cursor: pointer;
}
.continue-cta:hover { background: var(--accent-hover); }
.continue-thumbs { display: flex; align-items: center; justify-content: end; gap: 12px; }
.continue-thumbs img, .continue-thumbs .ph {
  width: 112px; height: 112px; object-fit: contain; border-radius: 10px; background: oklch(97% 0 0);
}
.continue-thumbs .ph { display: block; }
.home-empty-copy {
  margin: -6px 0 50px; color: var(--muted); font-size: 14px; line-height: 1.6; max-width: 42em;
}
.text-link {
  border: 0; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer;
}
.text-link:hover { color: var(--ink); }

.learn-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.learn-card {
  overflow: hidden; border: 1px solid oklch(14.5% 0 0 / .1); border-radius: 14px;
  background: #fff; text-align: left; padding: 0 0 14px; cursor: pointer;
}
.learn-card:hover { box-shadow: 0 10px 28px oklch(14.5% 0 0 / .06); }
.learn-thumb {
  position: relative; height: 132px; max-height: 132px; background: #f5f5f7; overflow: hidden;
}
.learn-thumb img { width: 100%; height: 132px; object-fit: contain; display: block; }
.watch-pill {
  position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: 8px; background: #fff; font-size: 12px; font-weight: 500;
  box-shadow: 0 4px 12px oklch(14.5% 0 0 / .08);
}
a.learn-card, a.learn-lesson { color: inherit; text-decoration: none; display: block; }
.learn-card strong { display: block; margin: 10px 12px 2px; font-size: 14px; font-weight: 500; }
.learn-card small { display: block; margin: 0 12px; color: var(--muted); font-size: 12px; }

.route-back {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 34px;
  padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 14px; cursor: pointer;
}
.route-back:hover { color: var(--ink); }
.recents-board h1, .learn-title {
  margin: 0 0 8px; font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -.02em;
}
.learn-intro { max-width: 930px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.learn-intro p { margin: 0 0 12px; }
.learn-intro ul { margin: 0 0 20px; padding-left: 24px; }
.learn-intro li { margin: 4px 0; }
.learn-intro a { color: var(--ink); text-decoration: underline; }
.home-divider { height: 1px; margin: 0 0 34px; background: oklch(14.5% 0 0 / .1); }
.recents-loading { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.recent-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.recent-tile, .recent-skel {
  overflow: hidden; border: 1px solid oklch(14.5% 0 0 / .08); border-radius: 14px;
  background: #fff; cursor: pointer; text-align: left; padding: 0;
}
.recent-skel { cursor: default; min-height: 170px; aspect-ratio: 1; background: oklch(96.5% 0 0); }
.recent-tile .recent-art {
  display: block; height: 168px; background: #f6f5f1;
}
.recent-tile img { width: 100%; height: 168px; object-fit: contain; background: #f6f5f1; display: block; }
.recent-tile span:not(.recent-art) {
  display: block; padding: 8px 10px 10px; font-size: 13px; color: var(--ink);
}
.getting-started { margin: 0 0 16px; font-size: 18px; font-weight: 600; }
.learn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.learn-lesson .learn-thumb:empty {
  background: linear-gradient(180deg, #f4f3f0 0%, #ecebe7 100%);
}
.learn-lesson {
  overflow: hidden; border: 1px solid oklch(14.5% 0 0 / .1); border-radius: 14px;
  background: #fff; text-align: left; min-height: 296px; padding: 0 0 18px; cursor: pointer;
}
.learn-lesson .learn-thumb {
  height: 148px; margin: 16px 16px 14px; border-radius: 10px; background: oklch(97% 0 0);
  display: block; overflow: hidden;
}
.learn-lesson .learn-thumb img {
  width: 100%; height: 100%; object-fit: contain; object-position: center; display: block;
  background: #f6f5f1;
}
.learn-lesson h3 { margin: 0 21px 8px; font-size: 14px; font-weight: 500; }
.learn-lesson p { margin: 0 21px 18px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.learn-lesson small { margin: 0 21px; color: var(--muted); font-size: 11px; }

.toast-region {
  position: fixed; right: 16px; bottom: 16px; z-index: 80;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  max-width: 300px; padding: 10px 13px; border-radius: 12px;
  background: #070434; color: #fff; font-size: 12px;
}

@media (max-width: 980px) {
  .continue-card, .learn-row, .learn-grid, .recent-grid { grid-template-columns: 1fr; }
  .home-board { padding: 28px 16px 48px; }
  .workspace-rail { width: min(18rem, 86vw); }
}

.collection-row, .lookbook-grid, .lib-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.collection-card, .look-card, .lib-card { border:1px solid oklch(14.5% 0 0 / .08); border-radius:12px; background:#fff; overflow:hidden; text-align:left; cursor:pointer; }
.collection-card img, .look-card img { width:100%; height:140px; object-fit:contain; background:#f6f5f1; display:block; }
.lib-card img, .lib-card .sw { width:100%; height:168px; object-fit:cover; background:#f6f5f1; display:block; }
.lib-card[data-kind="reference"] img { object-fit:contain; background:#f3f1ec; padding:18px; box-sizing:border-box; }
.collection-card strong, .look-card span, .lib-card strong { display:block; padding:8px 10px 2px; font-size:13px; }
.collection-card small { display:block; padding:0 10px 10px; font-size:12px; color:#6b6b70; }
.collection-card .ph { display:block; width:100%; height:140px; background:#f6f5f1; }
.lib-bar { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 18px; }
.lib-bar .chip, .inspector .chip { border:1px solid oklch(14.5% 0 0 / .12); border-radius:999px; padding:6px 10px; background:#fff; }
.lib-bar .chip.on { background:var(--accent-soft); color:var(--accent); }
.lib-grid.size-s img { height:88px; }
.lib-grid.size-l img { height:200px; }
.lib-grid.aspect-4-3 img { aspect-ratio:4/3; height:auto; }
.lib-grid.aspect-16-9 img { aspect-ratio:16/9; height:auto; }
.lib-grid.mode-table { grid-template-columns:1fr; }
.lib-grid.mode-table .lib-card { display:grid; grid-template-columns:72px 1fr auto; align-items:center; }
.lib-grid.mode-table img, .lib-grid.mode-table .sw { width:72px; height:72px; }
.rail-mini, .rail-minis { display:flex; gap:6px; align-items:center; flex-wrap:wrap; padding:0 12px 8px; }
.rail-mini { width:100%; border:0; background:transparent; text-align:left; padding:4px 0; cursor:pointer; color:inherit; text-decoration:none; }
.rail-mini img, .rail-dot img, .sw { width:22px; height:22px; border-radius:6px; object-fit:cover; display:inline-block; }
.ctx-on { display:block; }

.lib-add { display:flex; flex-wrap:wrap; gap:8px; margin: 8px 0 4px; }
.lib-card .tiny { display:flex; align-items:center; gap:6px; padding:0 10px 10px; font-size:11px; color:#6b6b70; }
.lib-card button { margin: 0 10px 10px; }

.lib-color-form { display:flex; gap:8px; margin: 8px 0 12px; }
.lib-color-form input { border:1px solid oklch(14.5% 0 0 / .12); border-radius:10px; padding:8px 10px; min-width: 180px; }
.lib-color-form button { border:0; background:var(--accent); color:#fff; border-radius:999px; padding:8px 12px; }

.lib-card .sw { display:block; width:100%; height:168px; border-radius:0; }
.lib-grid.size-s .lib-card .sw { height:88px; }
.lib-grid.size-l .lib-card .sw { height:200px; }
.lib-card small { display:block; padding:0 10px 10px; font-size:11px; color:#8a8984; }
.lib-card .lib-preset { color:#6b6b70; }
.lib-grid.mode-gallery .lib-card button { display:none; }

.wordmark-text { display: inline-flex; align-items: baseline; gap: 6px; }
.wordmark-text b { font-weight: 600; }
.wm-product { font-weight: 500; font-size: 11px; color: var(--muted); }
.wm-beta { font-weight: 500; font-size: 10px; color: var(--muted); opacity: .7; }
.friend-beta { font-size: 10px; color: var(--muted); margin-left: 4px; }
.feedback-entry { display:flex; gap:8px; align-items:center; font-size:12px; color:var(--muted); }
.feedback-entry button { border:0; background:transparent; cursor:pointer; font:inherit; color:var(--muted); padding:0; }
.account-chip .avatar { background: var(--accent); }


.phase-tabs {
  display: flex; gap: 8px; margin: 0 0 24px;
}
.phase-tabs a {
  padding: 6px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 13px;
}
.phase-tabs a.on { background: #1d1d1f; color: #fff; }

.records-cost { font-size: 22px; font-weight: 500; margin: 8px 0 24px; }
.records-pick { display: flex; gap: 8px; align-items: center; margin: 0 0 16px; font-size: 13px; }
.records-pick select { padding: 6px 10px; border-radius: 8px; border: 1px solid oklch(14.5% 0 0 / .12); }
.records-list { list-style: none; padding: 0; margin: 8px 0 28px; }
.records-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid oklch(14.5% 0 0 / .08); font-size: 13px; }

#team-form { display: flex; flex-direction: column; gap: 8px; max-width: 480px; margin: 0 0 24px; }
#team-form textarea { width: 100%; min-height: 88px; border: 1px solid oklch(14.5% 0 0 / .12); border-radius: 12px; padding: 10px; font: inherit; }


