main
John Lauer Publish 0.4.2 5527185 7d ago
@font-face { font-family: 'Familjen Grotesk'; font-weight: 600 700; src: url('fonts/familjen-grotesk-700.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Satoshi'; font-weight: 400; src: url('fonts/satoshi-400.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Satoshi'; font-weight: 500 700; src: url('fonts/satoshi-500.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; src: url('fonts/jetbrains-mono-400.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; src: url('fonts/jetbrains-mono-500.woff2') format('woff2'); font-display: swap; }

:root {
  --bg: #0d1117; --surface: #161b22; --elevated: #1c2128; --overlay: #21262d; --border: #30363d; --line: #30363d;
  --text: #e6edf3; --text-body: #c9d1d9; --text-2: #8b949e; --muted: #8b949e; --text-3: #484f58;
  --accent: #00b8b1; --accent-hover: #00d4cb; --accent-bright: #00e6dc; --on-accent: #05221f; --teal: #00b8b1;
  --blue: #64abff; --blue-fill: #0061ef; --purple: #8c6bf7; --green: #3fb950; --red: #f85149; --yellow: #d29922;
  --font-head: 'Familjen Grotesk', sans-serif; --font-body: 'Satoshi', sans-serif; --font-mono: 'JetBrains Mono', monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text-body); font: 400 14px/1.45 var(--font-body); }
.mono { font-family: var(--font-mono); }
a { color: var(--blue); }

/* ---- the 44px three-zone header, edge to edge ---- */
.app-header { height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; flex: none; cursor: default; outline: none; }
.brand-icon { display: inline-flex; color: var(--text); }
.app-name { font: 600 15px var(--font-head); color: var(--text); letter-spacing: -.01em; }
.app-sub { font-size: 13px; color: var(--muted); font-weight: 400; }
.vsep { width: 1px; height: 20px; background: var(--line); flex: none; }
.subject { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex: 1; }
.subject-name { font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subject-meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actions { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.icon-btn { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 1px solid transparent;
  border-radius: 8px; color: var(--muted); cursor: pointer; padding: 0; transition: color .15s ease, border-color .15s ease, background .15s ease; text-decoration: none; }
.icon-btn:hover { color: var(--teal); background: var(--elevated); }
.icon-btn:active { transform: translateY(1px); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon-btn.lg { width: 34px; height: 34px; border-color: var(--border); background: var(--surface); }
.icon-btn img { display: block; }
.popover { position: fixed; z-index: 99990; display: none; background: rgba(22,27,34,.98); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; box-shadow: 0 12px 40px rgba(0,0,0,.55); max-width: min(460px, calc(100vw - 16px)); }
.popover.open { display: block; }
.pop-title { font: 600 15px var(--font-head); color: var(--text); margin-bottom: 8px; }
.pop-row { display: flex; gap: 14px; justify-content: space-between; font-size: 13px; padding: 2px 0; }
.pop-row span:first-child { color: var(--muted); }

/* ---- layout ---- */
main { display: grid; grid-template-columns: minmax(0, 1fr) 280px; height: calc(100% - 44px); }
.stage { display: flex; align-items: center; justify-content: center; padding: 12px 16px; min-height: 0; min-width: 0; }
/* the wiki's <adom-video>: as wide as the stage allows while the whole picture stays on screen */
adom-video { width: min(100%, calc((100dvh - 44px - 24px) * var(--ar, 1.7778))); }
aside { border-left: 1px solid var(--line); padding: 12px 14px; overflow: auto; }
aside h2 { font: 600 12px var(--font-head); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 6px 0 8px; }
.list { list-style: none; margin: 0 0 18px; padding: 0; }
.list li { padding: 6px 8px; border-radius: 8px; cursor: pointer; display: flex; gap: 8px; border: 1px solid transparent; }
.list li:hover { background: var(--elevated); }
.list li.active { background: var(--elevated); border-color: var(--accent); color: var(--text); }
.list li .t { font: 500 12px var(--font-mono); color: var(--accent-bright); flex: none; }
.list li.empty { color: var(--muted); cursor: default; font-size: 13px; }
.list li.gone { opacity: .5; }
.revealed { outline: 2px solid var(--accent); outline-offset: 2px; transition: outline .2s ease; }
.lib-main { display: block; padding: 16px; height: auto; max-width: 980px; }
.lib-intro { color: var(--muted); margin: 0 0 12px; }
.lib-list li { justify-content: space-between; align-items: baseline; }
.lib-title { color: var(--text); font-weight: 500; }
.lib-path { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- shortcuts list ---- */
.sc-pop table { border-collapse: collapse; }
.sc-pop td { padding: 3px 16px 3px 0; font-size: 13px; vertical-align: top; }
.sc-pop td:first-child { font: 500 12px var(--font-mono); color: var(--accent-bright); white-space: nowrap; }
.sc-foot { color: var(--muted); font-size: 12px; margin-top: 8px; }

/* ---- tooltip: body-level, fixed, 99999 ---- */
#global-tooltip { position: fixed; z-index: 99999; left: 0; top: 0; display: none; opacity: 0; pointer-events: none; max-width: min(320px, calc(100vw - 40px));
  background: rgba(22,27,34,.96); color: var(--text); border: 1px solid rgba(0,184,177,.28); border-radius: 10px; padding: 9px 13px;
  font: 400 13px/1.4 var(--font-body); box-shadow: 0 12px 40px rgba(0,0,0,.55); text-transform: none; letter-spacing: 0; transition: opacity .18s ease; }
#global-tooltip.visible { display: block; }
#global-tooltip.shown { opacity: 1; }

/* ---- toasts: bottom center, three types, max three ---- */
.toast-stack { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column-reverse; gap: 10px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; min-width: 280px; max-width: min(520px, calc(100vw - 32px)); background: var(--surface);
  border: 1px solid var(--border); border-left: 3px solid var(--toast-accent, var(--accent)); border-radius: 12px; padding: 12px 14px; box-shadow: 0 18px 50px rgba(0,0,0,.5);
  color: var(--text-body); animation: toast-in 180ms cubic-bezier(.2,.8,.2,1) both; }
.toast.success { --toast-accent: var(--green); } .toast.error { --toast-accent: var(--red); } .toast.info { --toast-accent: var(--accent); }
.toast .ticon { color: var(--toast-accent); display: inline-flex; }
.toast .tmsg { flex: 1; }
.toast .taction { margin-left: auto; color: var(--blue); font-weight: 600; background: none; border: none; cursor: pointer; }
.toast .tclose { background: none; border: none; color: var(--muted); cursor: pointer; display: inline-flex; padding: 2px; }
.toast.leaving { animation: toast-out 140ms ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .toast, .toast.leaving { animation: none; } }

/* ---- dialogs: dim, never blur ---- */
dialog { background: var(--surface); color: var(--text-body); border: 1px solid var(--border); border-radius: 12px; padding: 0; width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 64px); box-shadow: 0 24px 64px rgba(0,0,0,.6); }
dialog::backdrop { background: rgba(0,0,0,.25); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.dlg-head h3 { margin: 0; font: 600 16px var(--font-head); color: var(--text); }
.dlg-body { padding: 8px 16px 12px; overflow: auto; max-height: calc(100vh - 220px); scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.set-row { padding: 10px 0; display: flex; flex-direction: column; gap: 4px; border-bottom: 1px solid var(--overlay); }
.set-name { margin: 0; font: 600 15px var(--font-head); color: #8fd3d4; }
.set-help { margin: 0; font-size: 13px; color: var(--muted); }
.default-hint { font-size: 12px; color: var(--text-2); }
.select { align-self: flex-start; background: var(--overlay); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 5px 8px; font: 400 13px var(--font-body); }
.toggle { background: none; border: none; padding: 2px; cursor: pointer; flex-shrink: 0; align-self: flex-start; transition: transform .06s ease; }
.toggle-track { display: block; width: 32px; height: 18px; background: var(--overlay); border: 1px solid var(--border); border-radius: 9px; position: relative; transition: background .15s ease, border-color .15s ease; }
.toggle:hover .toggle-track { border-color: var(--accent); }
.toggle:active { transform: translateY(1px) scale(.97); }
.toggle.active .toggle-track { background: var(--accent); border-color: var(--accent); }
.toggle-thumb { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; background: var(--text); border-radius: 50%; transition: transform .18s ease, width .12s ease; }
.toggle.active .toggle-thumb { transform: translateX(14px); }
.toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.settings-footer { padding: 12px 16px 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.footer-note { margin: 0; font-size: 12px; color: var(--muted); }
.restore-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; background: var(--overlay); color: var(--text-body); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; cursor: pointer; font: 500 13px var(--font-body); }
.restore-btn.armed { border-color: var(--red); color: var(--red); }

/* ---- fake AI cursor ---- */
.ai-cursor { position: fixed; left: 0; top: 0; z-index: 99998; pointer-events: none; opacity: 0; transition: transform .32s cubic-bezier(.2,.8,.2,1), opacity .2s ease; display: flex; align-items: flex-start; gap: 4px; }
.ai-cursor.on { opacity: 1; }
.ai-label { font: 500 12px var(--font-body); background: var(--accent); color: var(--on-accent); padding: 2px 7px; border-radius: 999px; margin-top: 14px; white-space: nowrap; }
.ai-label:empty { display: none; }

/* ---- responsive and touch ---- */
@media (max-width: 860px) { main { grid-template-columns: 1fr; height: auto; } aside { border-left: none; border-top: 1px solid var(--line); } adom-video { width: 100%; } }
@media (max-width: 720px) { .app-sub, .subject-meta, .vsep { display: none; } }
@media (hover: none), (pointer: coarse) {
  .icon-btn { min-width: 44px; min-height: 44px; }
  .list li { padding: 12px 10px; }
}