:root {
  color-scheme: dark;
  font-family: Geist, Inter, system-ui, sans-serif;
  --bg: #101014; --panel: #18181e; --panel-hi: #1e1e26; --line: #2b2b35;
  --white: #f5f4f8; --muted: #a4a3b1; --violet: #b3a2ff; --purple: #a68fff;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--white); }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button { display: inline-flex; align-items: center; justify-content: center; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 4px; }
p { line-height: 1.58; margin: 0; }
h1, h2, h3 { margin: 0; }
img { display: block; max-width: 100%; }
svg { width: 18px; height: 18px; display: block; }
[data-icon] { display: inline-grid; place-items: center; flex: none; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { position: fixed; top: 10px; left: 10px; padding: 10px; z-index: 5; background: var(--panel); }
.shell { width: min(1200px, calc(100% - 80px)); margin-inline: auto; }
.top { border-bottom: 1px solid #24242c; }
.top-inner { height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; font-size: 14px; font-weight: 650; line-height: 1.24; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font: 9px var(--mono); letter-spacing: .16em; }
.monogram { display: grid; grid-auto-flow: column; place-content: center; align-items: baseline; width: 37px; height: 37px; border-radius: 9px; background: #211934; color: #d7ccff; border: 1px solid #3c2e57; letter-spacing: -.08em; font-size: 16px; font-weight: 800; }
.monogram span { color: #b294ff; }
.nav { display: flex; gap: 6px; }
.nav a { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 570; }
.nav a[aria-current] { background: #242033; color: #cebeff; }
.nav a:hover { color: var(--white); }
.nav svg { width: 15px; height: 15px; }
.top-action { justify-self: end; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; padding: 8px 14px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 680; white-space: nowrap; }
.button svg { width: 17px; height: 17px; }
.primary { color: #171123; background: #b29aff; border-color: #baa6ff; }
.primary:hover { background: #c9b8ff; }
.secondary { color: var(--white); background: var(--panel-hi); border-color: var(--line); }
.secondary:hover { border-color: #62547c; }
.button:disabled { opacity: .55; cursor: wait; }
.hero { position: relative; isolation: isolate; display: flex; align-items: center; min-height: 292px; margin: 35px 0 44px; padding: 35px 43px; border-radius: 17px; overflow: hidden; border: 1px solid #302642; background: linear-gradient(104deg, #18141f 12%, #1c1629 60%, #281b42); }
.hero-copy { z-index: 1; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: #cabcfa; font: 11px var(--mono); text-transform: uppercase; letter-spacing: .16em; }
.eyebrow > span { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: #b79aff; box-shadow: 0 0 13px #ab86ff; }
.hero h1 { margin: 16px 0 13px; font-size: clamp(43px, 6.1vw, 80px); font-weight: 680; letter-spacing: -.081em; line-height: .99; }
.hero em { color: #c1abff; font-style: normal; }
.hero h1 em span:last-child { color: #ab89ff; }
.hero-copy > p:last-child { max-width: 425px; color: #bcafcd; font-size: 15px; }
.hero-art { position: absolute; inset: 0 0 0 50%; overflow: hidden; }
.mesh { position: absolute; inset: 0; background-image: linear-gradient(to right, #bfa5ff0d 1px, transparent 1px), linear-gradient(to bottom, #bfa5ff0d 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(90deg, transparent, #000 50%); }
.art-orbit { position: absolute; display: block; border-radius: 48%; width: 365px; height: 168px; right: 13%; top: 21%; border: 1px solid #bfa8ff76; transform: rotate(-32deg); box-shadow: inset 0 0 19px #8b5bfa3f, 0 0 22px #9b77ee39; }
.orbit-two { transform: rotate(31deg); border-color: #bfa8ff4d; }
.orbit-three { width: 282px; height: 135px; right: calc(13% + 42px); top: calc(21% + 16px); transform: rotate(79deg); border-color: #bfa8ff54; }
.art-core { position: absolute; right: calc(13% + 126px); top: calc(21% + 26px); width: 112px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 34% 26%, #eee1ff 0%, #b296f8 7%, #774fb1 34%, #2e2053 65%, #191429 100%); box-shadow: 0 0 44px #9259ec78, inset 0 0 9px #e0cbff63; }
.art-spark { color: #d7c3ff; position: absolute; font: 24px var(--mono); }
.spark-one { top: 15%; right: 23%; }.spark-two { top: 70%; right: 17%; opacity: .58; }.spark-three { top: 23%; right: 68%; font-size: 15px; opacity: .55; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 20px; }
.section-head h2 { font-size: clamp(25px, 3vw, 34px); line-height: 1.1; letter-spacing: -.048em; font-weight: 660; }
#result-count { color: var(--muted); margin-top: 5px; font-size: 13px; }
.search { display: flex; align-items: center; gap: 9px; color: var(--muted); border: 1px solid var(--line); background: var(--panel); border-radius: 9px; padding: 10px 11px; }
.search svg { width: 16px; height: 16px; }
.search input { background: transparent; border: 0; color: var(--white); outline: none; width: min(22vw, 220px); min-width: 130px; font-size: 13px; }
.search:focus-within { border-color: var(--violet); }
.toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; }
.filter { color: var(--muted); background: transparent; border: 1px solid var(--line); padding: 7px 12px; border-radius: 8px; font-size: 12px; line-height: 1.3; }
.filter[aria-pressed=true] { color: #ddcfff; background: #272037; border-color: #4d3b69; }
.filter:hover { border-color: #756397; }
.sort select { border: 0; background: var(--bg); color: var(--muted); padding: 6px 1px; font-size: 12px; }
#load-status { color: var(--muted); font-size: 14px; }
.cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.card { position: relative; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; display: block; transition: border-color .2s, transform .2s; }
.card:hover { border-color: #66528c; transform: translateY(-3px); }
.thumb { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9.6; overflow: hidden; background: #241d35; border-bottom: 1px solid #ffffff10; color: var(--violet); }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.thumb-fallback { background: radial-gradient(ellipse at 65% 34%, #42306a, #221e31 70%); }
.thumb-fallback svg { width: 36px; height: 36px; }
.card-body { padding: 16px 16px 18px; }
.card-meta { display: flex; justify-content: space-between; gap: 8px; align-items: center; color: var(--muted); margin-bottom: 9px; }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 5px; padding: 3px 7px; background: #272333; color: #d1beff; font-size: 10px; font-weight: 650; }
.badge.muted { color: #c7c7d0; background: #292931; }
.badge.green { color: #a7dcc3; background: #23342c; }
.card h3 { overflow-wrap: anywhere; font-size: 19px; letter-spacing: -.035em; }
.card-summary { color: var(--muted); font-size: 13px; min-height: 42px; margin: 6px 0 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 28px; }
.chips { display: flex; gap: 5px; min-width: 0; flex-wrap: wrap; }
.chip { color: #b8b5c4; background: #222229; border: 1px solid #2e2d36; font: 10px var(--mono); padding: 4px 6px; border-radius: 5px; overflow-wrap: anywhere; }
.card-arrow { width: 28px; height: 28px; display: grid; place-items: center; color: #c7b4fd; margin-left: auto; flex: none; }
.idea-card .card-body { padding: 20px; }
.idea-card .card-summary { min-height: 62px; -webkit-line-clamp: 3; }
.empty { padding: 43px 20px; text-align: center; border: 1px dashed #403750; border-radius: 12px; background: #17151d; }
.empty p { margin: 8px 0 16px; color: var(--muted); font-size: 14px; }
.footer { margin-top: 40px; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 17px 0 22px; border-top: 1px solid #272730; }
.footer-brand { color: var(--muted); font-size: 12px; }
.footer-brand .monogram { width: 28px; height: 28px; font-size: 13px; }
.text-button { background: none; border: 0; color: var(--muted); padding: 8px 4px; margin-left: 10px; font-size: 12px; }
.text-button:hover { color: var(--violet); }
dialog { border: 1px solid #3f344f; border-radius: 16px; background: #191820; color: var(--white); padding: 0; width: min(690px, calc(100vw - 28px)); max-height: min(90dvh, 920px); }
dialog::backdrop { background: #090810bb; backdrop-filter: blur(4px); }
#login { max-width: 420px; }
.dialog-top { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 22px; border-bottom: 1px solid var(--line); background: #191820; }
.dialog-top h2 { font-size: 20px; letter-spacing: -.025em; }
.icon-button { width: 32px; height: 32px; flex: none; color: var(--muted); background: #22212b; border: 1px solid #31303d; border-radius: 7px; }
.icon-button:hover { color: var(--white); border-color: var(--violet); }
#detail-content, #entry-form, #login-form { padding: 22px; }
#detail-title { font-size: clamp(27px, 5vw, 42px); line-height: 1.05; letter-spacing: -.045em; margin-bottom: 10px; overflow-wrap: anywhere; }
.detail-lead { color: var(--muted); margin: 12px 0 17px; }
.detail-image { margin-bottom: 19px; width: 100%; border: 1px solid var(--line); border-radius: 9px; }
.detail-part { padding: 14px 0; border-top: 1px solid var(--line); }
.detail-part h3 { margin-bottom: 6px; font-size: 16px; }
.detail-part p, .detail-part li { color: #c6c2cf; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-part ul { padding-left: 20px; margin: 7px 0; }
.detail-part a { color: #cbbaff; text-decoration: underline; text-underline-offset: 3px; }
.facts { display: grid; grid-template-columns: minmax(95px, 1fr) minmax(0, 3fr); gap: 8px 12px; margin: 0; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { color: var(--white); margin: 0; overflow-wrap: anywhere; }
.facts .implementation { white-space: pre-wrap; }
.detail-links, .dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dialog-actions { justify-content: flex-end; padding-top: 15px; border-top: 1px solid var(--line); margin-top: 17px; }
.danger { color: #ffb4b8; }
.field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.field { display: grid; gap: 6px; margin-bottom: 13px; min-width: 0; color: var(--white); font-size: 13px; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #373442; background: #131219; color: var(--white); border-radius: 7px; padding: 9px 10px; }
.field textarea { resize: vertical; min-height: 72px; }
.field small, .form-note { color: var(--muted); font-size: 12px; }
.field input[type=checkbox] { width: auto; margin: 0 8px 0 0; }
.field.check { display: flex; align-items: center; }
.form-error { color: #ffb1b9; font-size: 13px; min-height: 1.1em; }
#upload-preview { max-width: 210px; max-height: 120px; object-fit: contain; margin: 0 0 12px; border-radius: 8px; }
.toast { background: #252034; border: 1px solid #655181; border-radius: 9px; color: #e8dcff; position: fixed; z-index: 3; bottom: 18px; right: 18px; padding: 11px 15px; font-size: 14px; max-width: calc(100vw - 36px); }
@media (max-width: 885px) {
  .shell { width: calc(100% - 42px); }
  .hero { padding-inline: 31px; }
  .hero-art { left: 36%; opacity: .62; }
  .cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 550px) {
  .shell { width: calc(100% - 28px); }
  .top-inner { display: grid; height: auto; padding: 10px 0 0; grid-template-columns: 1fr 1fr; }
  .nav { grid-row: 2; grid-column: 1 / -1; margin-bottom: 6px; }
  .nav a { flex: 1; justify-content: center; padding: 8px 10px; }
  .top-action { grid-row: 1; grid-column: 2; }
  .hero { min-height: 247px; margin: 17px 0 27px; padding: 24px 17px; }
  .hero-art { left: 16%; opacity: .31; }
  .hero h1 { max-width: 365px; }
  .hero-copy > p:last-child { font-size: 14px; }
  .section-head { align-items: stretch; flex-direction: column; margin-bottom: 13px; }
  .search input { width: 100%; }
  .cards { grid-template-columns: 1fr; }
  .toolbar { gap: 5px; }
  .filter { padding-inline: 8px; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .dialog-top, #detail-content, #entry-form, #login-form { padding-inline: 15px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
