/* noteframe studio — projects: top-bar switcher, quick strip, full Projects panel, changelog.
   Same language as the rest of the studio: near-black, hairlines, mono labels, one accent, 3–4 px corners. */

/* ───────── top bar switcher ───────── */
.st-proj { gap: 8px; flex: 0 1 520px; }
.pj-all { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 3px; background: transparent; color: var(--text); font: 500 12.5px/1 var(--font-ui); cursor: pointer; flex: none; transition: border-color .16s, background .16s; }
.pj-all i { font-size: 15px; color: var(--muted); transition: color .16s; }
.pj-all:hover { border-color: var(--accent-a35); background: var(--accent-a08); }
.pj-all:hover i { color: var(--accent); }
.pj-count { font: 400 10.5px/1 var(--font-mono); color: var(--dim); padding-left: 7px; border-left: 1px solid var(--line); }
.pj-switch { display: flex; align-items: center; min-width: 0; flex: 1 1 auto; border: 1px solid transparent; border-radius: 3px; transition: border-color .16s; }
.pj-switch:hover, .pj-switch:focus-within { border-color: var(--line); }
.pj-switch .st-proj-title { border: 0; max-width: none; flex: 1 1 auto; min-width: 70px; padding: 6px 6px; background: transparent; }
.pj-switch .st-proj-title:focus { background: transparent; }
.pj-nav { width: 26px; height: 30px; display: grid; place-items: center; border: 0; background: none; color: var(--dim); border-radius: 3px; cursor: pointer; flex: none; transition: color .14s, background .14s, transform .14s; }
.pj-nav i { font-size: 12px; }
.pj-nav:hover:not(:disabled) { color: var(--text); background: var(--panel-2); }
.pj-nav:active:not(:disabled) { transform: scale(.92); }
.pj-nav:disabled { opacity: .3; cursor: default; }
.pj-drop[aria-expanded=true] { color: var(--accent); }
.pj-drop[aria-expanded=true] i { transform: rotate(180deg); }
.pj-drop i { transition: transform .2s; }
.pj-new { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 3px; background: transparent; color: var(--text); cursor: pointer; flex: none; transition: border-color .16s, background .16s, color .16s; }
.pj-new:hover { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
@media (max-width: 1280px) { .pj-all-t { display: none; } .pj-count { border-left: 0; padding-left: 0; } }
@media (max-width: 1100px) { .st-cmdk-btn { min-width: 0; } }
@media (max-width: 640px) {
  .pj-nav:not(.pj-drop) { display: none; } .st-proj { gap: 4px; min-width: 0; flex: 1 1 auto; } .pj-count { display: none; } .pj-all { padding: 0 8px; }
  .pj-new, .st-proj .st-save { display: none; }   /* New project lives in the strip; saving shows in the strip too */
  .st-top .k-word { display: none; }
  .pj-switch .st-proj-title { min-width: 40px; }
}
@media (max-width: 420px) { .st-top { gap: 8px; padding: 0 10px 0 12px; } }

/* ───────── quick strip (slides down under the title) ───────── */
.pj-strip { position: fixed; z-index: 60; background: var(--panel); border: 1px solid var(--line-2); border-radius: 4px; box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
  opacity: 0; transform: translateY(-6px); transition: opacity .18s ease, transform .22s cubic-bezier(.2, .8, .2, 1); }
.pj-strip.is-open { opacity: 1; transform: none; }
.pj-strip-body { position: relative; }
.pj-strip-track { display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden; padding: 12px 40px 12px 12px; scroll-snap-type: x proximity; scroll-padding: 12px; scrollbar-width: none; overscroll-behavior-x: contain; }
.pj-strip-track::-webkit-scrollbar { display: none; }
.pj-strip-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 3px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); cursor: pointer; transition: opacity .15s, border-color .15s; }
.pj-strip-arrow.l { left: 6px; } .pj-strip-arrow.r { right: 6px; }
.pj-strip-arrow:hover { border-color: var(--accent-a35); }
.pj-strip-arrow:disabled { opacity: 0; pointer-events: none; }
.pj-chip { flex: 0 0 116px; scroll-snap-align: start; display: grid; gap: 5px; padding: 0; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer;
  animation: pj-rise .32s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 22ms); }
.pj-chip b { font: 500 12.5px/1.2 var(--font-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-chip .mono { font: 400 10.5px/1 var(--font-mono); color: var(--dim); }
.pj-chip-th { position: relative; aspect-ratio: 9 / 13; border-radius: 3px; overflow: hidden; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; transition: box-shadow .16s, transform .2s cubic-bezier(.2, .8, .2, 1); }
.pj-chip:hover .pj-chip-th { box-shadow: inset 0 0 0 1px var(--line-2); transform: translateY(-2px); }
.pj-chip:focus-visible { outline: none; }
.pj-chip:focus-visible .pj-chip-th { box-shadow: 0 0 0 1px var(--bg), 0 0 0 2px var(--accent); }
.pj-chip.is-current .pj-chip-th { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 1px var(--accent); }
.pj-chip.is-current .mono { color: var(--accent); }
.pj-chip-new .pj-chip-th { border: 1px dashed var(--line-2); box-shadow: none; color: var(--muted); font-size: 20px; }
.pj-chip-new:hover .pj-chip-th { border-color: var(--accent); color: var(--accent); background: var(--accent-a08); }
.pj-chip-new.is-full .pj-chip-th { color: var(--dim); }
.pj-strip-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line); }
.pj-strip-foot .mono { font: 400 10.5px/1 var(--font-mono); color: var(--dim); }
.pj-link { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 0; color: var(--accent); font: 400 11.5px/1 var(--font-mono); cursor: pointer; }
.pj-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* previews (shared by strip + panel) */
.pj-chip-th img, .pj-card-th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s ease, transform .5s cubic-bezier(.2, .8, .2, 1); }
.is-loaded > img { opacity: 1; }
.is-still > img { filter: saturate(.55) brightness(.55); }
.pj-empty-ico { color: var(--dim); font-size: 22px; opacity: 0; }
.is-empty .pj-empty-ico, .is-still .pj-empty-ico { opacity: 1; }
.is-still .pj-empty-ico { position: relative; z-index: 1; color: var(--text); opacity: .0; }

/* ───────── full panel ───────── */
.pj-panel { position: fixed; inset: 0; z-index: 90; display: grid; place-items: stretch; }
.pj-backdrop { position: absolute; inset: 0; background: rgba(3, 4, 4, .82); opacity: 0; transition: opacity .24s ease; }
.pj-sheet { position: relative; margin: 28px auto; width: min(1180px, calc(100vw - 40px)); max-height: calc(100vh - 56px); max-height: calc(100dvh - 56px); display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 6px; box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
  opacity: 0; transform: translateY(14px) scale(.985); transition: opacity .22s ease, transform .32s cubic-bezier(.2, .8, .2, 1); }
.pj-panel.is-open .pj-backdrop { opacity: 1; }
.pj-panel.is-open .pj-sheet { opacity: 1; transform: none; }
.pj-panel.is-closing .pj-sheet { opacity: 0; transform: translateY(8px) scale(.99); transition-duration: .18s; }
.pj-head { display: flex; align-items: flex-end; gap: 20px; padding: 22px 24px 16px; border-bottom: 1px solid var(--line); flex: none; }
.pj-title { display: grid; gap: 6px; flex: 1; min-width: 0; }
.pj-eyebrow { font: 400 10.5px/1 var(--font-mono); color: var(--dim); }
.pj-title h2 { margin: 0; font: 500 30px/1 var(--font-display); letter-spacing: -.02em; }
.pj-cloud { display: inline-flex; align-items: center; gap: 6px; font: 400 11px/1 var(--font-mono); color: var(--muted); }
.pj-cloud i { color: var(--good); font-size: 14px; }
.pj-usage { display: grid; justify-items: end; gap: 7px; min-width: 190px; }
.pj-usage .mono { font: 400 11px/1 var(--font-mono); color: var(--muted); }
.pj-meter { width: 190px; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.pj-meter i { display: block; height: 100%; background: var(--accent); border-radius: 2px; transform-origin: left; animation: pj-grow .7s cubic-bezier(.2, .8, .2, 1) both; }
.pj-meter.is-near i { background: var(--warn); }
.pj-meter.is-full i { background: var(--bad); }
.pj-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 3px; background: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.pj-close:hover { color: var(--text); background: var(--panel-2); }
.pj-head { padding-right: 64px; }
.pj-tools { display: flex; align-items: center; gap: 10px; padding: 12px 24px; border-bottom: 1px solid var(--line); flex: none; flex-wrap: wrap; }
.pj-search-wrap { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 3px; min-width: 240px; flex: 0 1 320px; color: var(--dim); transition: border-color .15s; }
.pj-search-wrap:focus-within { border-color: var(--accent-a35); }
.pj-search { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--text); font: 400 13.5px/1 var(--font-ui); outline: none; }
.pj-search::-webkit-search-cancel-button { filter: invert(.6); }
.pj-sort { display: inline-flex; border: 1px solid var(--line-2); border-radius: 3px; padding: 2px; }
.pj-sort button { height: 28px; padding: 0 11px; border: 0; border-radius: 2px; background: none; color: var(--muted); font: 400 12px/1 var(--font-ui); cursor: pointer; }
.pj-sort button[aria-checked=true] { background: var(--panel-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.pj-btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 3px; border: 1px solid var(--line-2); background: none; color: var(--text); font: 500 13px/1 var(--font-ui); cursor: pointer; }
.pj-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pj-btn.primary:hover { background: var(--accent-2); }
.pj-btn.is-locked { background: transparent; color: var(--muted); border-color: var(--line-2); }
.pj-tools .grow { flex: 1; }
.pj-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 20px 24px 26px; min-height: 0; flex: 1 1 auto; }
.pj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 22px 16px; }
.pj-card { display: grid; gap: 9px; min-width: 0; }
.pj-grid.is-in .pj-card { animation: pj-rise .42s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 28ms); }
.pj-card-open { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 4px; }
.pj-card-th { position: relative; aspect-ratio: 9 / 14; border-radius: 4px; overflow: hidden; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center;
  transition: box-shadow .18s, transform .28s cubic-bezier(.2, .8, .2, 1); }
.pj-card-open:hover .pj-card-th { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--line-2), 0 16px 34px rgba(0, 0, 0, .45); }
.pj-card-open:hover .pj-card-th img { transform: scale(1.035); }
.pj-card-open:focus-visible { outline: none; }
.pj-card-open:focus-visible .pj-card-th { box-shadow: 0 0 0 1px var(--bg), 0 0 0 2px var(--accent); }
.pj-card.is-current .pj-card-th { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 1px var(--accent); }
.pj-badge { position: absolute; left: 8px; top: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 7px; border-radius: 3px; background: var(--accent); color: var(--accent-ink); font: 500 10.5px/1 var(--font-mono); }
.pj-badge i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent-ink); animation: st-blink 1.6s infinite; }
.pj-info { display: grid; gap: 5px; min-width: 0; }
.pj-row { display: flex; align-items: center; gap: 4px; min-width: 0; }
.pj-name { flex: 1; min-width: 0; font: 500 13.5px/1.25 var(--font-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-rename { flex: 1; min-width: 0; height: 26px; padding: 0 6px; border: 1px solid var(--accent-a35); border-radius: 3px; background: var(--panel); color: var(--text); font: 500 13.5px/1 var(--font-ui); outline: none; }
.pj-more { width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 3px; background: none; color: var(--dim); cursor: pointer; flex: none; }
.pj-more:hover, .pj-more[aria-expanded=true] { color: var(--text); background: var(--panel-2); }
.pj-meta { display: flex; justify-content: space-between; gap: 8px; font: 400 10.5px/1.2 var(--font-mono); color: var(--dim); min-width: 0; }
.pj-meta span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pj-when { flex: none; }
.pj-none { grid-column: 1 / -1; display: grid; justify-items: center; gap: 8px; padding: 70px 20px; color: var(--muted); text-align: center; animation: pj-rise .35s ease both; }
.pj-none i { font-size: 30px; color: var(--dim); }
.pj-none b { color: var(--text); font-weight: 500; }
.pj-note { margin: 26px 0 0; max-width: 720px; font: 400 12px/1.6 var(--font-ui); color: var(--dim); }
.pj-menu { position: fixed; z-index: 95; min-width: 170px; padding: 4px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 4px; box-shadow: 0 14px 40px rgba(0, 0, 0, .55);
  opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top right; transition: opacity .14s ease, transform .18s cubic-bezier(.2, .8, .2, 1); }
.pj-menu.is-open { opacity: 1; transform: none; }
.pj-menu button { display: flex; align-items: center; gap: 9px; width: 100%; height: 32px; padding: 0 10px; border: 0; border-radius: 3px; background: none; color: var(--text); font: 400 13px/1 var(--font-ui); cursor: pointer; text-align: left; }
.pj-menu button:hover, .pj-menu button:focus-visible { background: var(--panel-2); outline: none; }
.pj-menu button i { color: var(--muted); font-size: 15px; }
.pj-menu button.danger, .pj-menu button.danger i { color: var(--bad); }
.pj-menu button.is-locked { color: var(--dim); }
.pj-menu-sep { height: 1px; background: var(--line); margin: 4px 2px; }

@media (max-width: 720px) {
  .pj-sheet { margin: 0; width: 100vw; max-height: none; height: 100vh; height: 100dvh; border-radius: 0; border: 0; }
  .pj-head { flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px 16px 14px; }
  .pj-title h2 { font-size: 26px; }
  .pj-usage { justify-items: start; min-width: 0; }
  .pj-tools { padding: 10px 16px; }
  .pj-search-wrap { min-width: 0; flex: 1 1 100%; }
  .pj-scroll { padding: 16px 16px 30px; }
  .pj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
}
@media (max-height: 640px) and (min-width: 721px) { .pj-sheet { margin: 10px auto; max-height: calc(100dvh - 20px); } .pj-head { padding-top: 14px; padding-bottom: 12px; } .pj-title h2 { font-size: 24px; } }

/* missing file row (added on another device) */
.st-file.missing { border-style: dashed; opacity: .85; }
.st-file.missing > i:first-child { color: var(--warn); }
.st-file.missing .meta { color: var(--warn); }

/* ───────── changelog ───────── */
.nf-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; position: relative; }
.nf-log-item { position: relative; padding: 0 0 22px 22px; border-left: 1px solid var(--line-2); margin-left: 5px; }
.nf-log-item:last-child { padding-bottom: 4px; border-left-color: transparent; }
.nf-log-item::before { content: ""; position: absolute; left: -5px; top: 3px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.nf-log-item:first-child::before { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-a14); }
.nf-log-head { display: flex; align-items: center; gap: 10px; }
.nf-log-when { font: 400 11px/1.2 var(--font-mono); color: var(--muted); }
.nf-log-tag { font: 500 9.5px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; padding: 3px 5px; border-radius: 2px; border: 1px solid var(--line-2); color: var(--muted); }
.nf-log-tag.is-new { color: var(--accent); border-color: var(--accent-a35); }
.nf-log-tag.is-fix { color: var(--warn); border-color: rgba(224, 161, 90, .35); }
.nf-log-tag.is-launch { color: var(--good); border-color: rgba(127, 214, 168, .35); }
.nf-log-item h3 { margin: 8px 0 6px; font: 500 15px/1.3 var(--font-ui); color: var(--text); }
.nf-log-item ul { margin: 0; padding-left: 16px; display: grid; gap: 4px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.nf-log-item li::marker { color: var(--dim); }

@keyframes pj-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pj-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .pj-strip, .pj-sheet, .pj-backdrop, .pj-menu, .pj-card-th, .pj-chip-th, .pj-card-th img { transition: none !important; }
  .pj-chip, .pj-grid.is-in .pj-card, .pj-meter i, .pj-none { animation: none !important; }
}
.pj-search:focus, .pj-search:focus-visible, .pj-rename:focus-visible { outline: none; box-shadow: none; }
.pj-search-wrap:focus-within { border-color: var(--accent); }
