:root { color-scheme: light; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #242423; background: #e9e9e6; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button, .button { border: 1px solid #3c3c3a; border-radius: 4px; padding: 9px 14px; color: #fff; background: #3c3c3a; cursor: pointer; text-decoration: none; }
button:hover, .button:hover { background: #272726; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #8b7f65; outline-offset: 2px; }
.quiet { color: #333; background: transparent; border-color: #a9a9a5; }
.quiet:hover { background: #deded9; }
.text-button { padding: 4px; color: #666; border: 0; background: transparent; }
.site-header { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 64px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); border-bottom: 1px solid #c7c7c2; background: #e9e9e6e8; backdrop-filter: blur(12px); }
.brand { color: #20201f; font-weight: 700; text-decoration: none; letter-spacing: -.02em; }
nav { display: flex; gap: 24px; }
nav a { color: #555; font-size: 14px; text-decoration: none; }
.account { justify-self: end; display: flex; align-items: center; gap: 10px; }
#account-name { max-width: 180px; overflow: hidden; color: #555; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
main { width: min(1180px, calc(100% - 48px)); margin: auto; padding: 54px 0 90px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 32px; }
h1 { margin: 3px 0 0; font-size: clamp(32px, 5vw, 58px); line-height: 1; letter-spacing: -.045em; font-weight: 650; }
.page-heading p { margin: 10px 0 0; color: #6b6b67; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 700; }
.shader-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.shader-card { overflow: hidden; border: 1px solid #c7c7c2; border-radius: 7px; background: #f4f4f1; }
.shader-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #181817; image-rendering: pixelated; }
.card-copy { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 15px; }
.card-copy h2 { margin: 0 0 3px; font-size: 16px; }
.card-copy p { margin: 0; color: #777; font-size: 13px; }
.card-copy a, .page-heading p a { color: inherit; text-decoration-color: #aaa; text-underline-offset: 2px; }
.card-copy h2 a { text-decoration: none; }
.card-copy h2 a:hover, .card-copy p a:hover, .page-heading p a:hover { color: #111; }
.card-preview { display: block; }
.like { flex: none; padding: 6px 9px; font-size: 12px; }
.card-actions { display: flex; align-items: center; gap: 7px; }
.share { flex: none; padding: 6px 9px; font-size: 12px; }
.shader-detail { width: min(680px, 100%); margin: auto; }
.shader-detail .card-copy > p { margin: 0; color: #666; }
.mine-card { position: relative; }
.preview-link { position: relative; display: block; aspect-ratio: 1; color: inherit; background: #181817; }
.preview-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #aaa; background: linear-gradient(145deg, #292927, #151514); font-size: 13px; text-decoration: none; }
.rendering { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 9px; color: #fff; background: #181817b8; font-size: 13px; font-weight: 650; letter-spacing: .04em; }
.spinner { width: 17px; height: 17px; border: 2px solid #ffffff55; border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mine-card-copy { display: grid; gap: 14px; padding: 15px; }
.mine-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.mine-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { padding: 3px 7px; border-radius: 10px; background: #d5d5d0; color: #666; font-size: 11px; }
.status.completed { background: #d1ded0; color: #355537; }
.status.failed { background: #ead0cc; color: #753b32; }
.row-actions { display: flex; align-items: center; gap: 10px; }
.row-actions a { color: #444; }
.editor { display: grid; gap: 18px; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 28px; }
.editor-preview-panel { position: sticky; top: 92px; display: grid; gap: 12px; }
.editor-preview-panel p { margin: 0; }
.editor-preview-panel #preview-status { margin-top: 5px; color: #6b6b67; font-size: 13px; }
.editor-preview { position: relative; overflow: hidden; aspect-ratio: 1; border: 1px solid #c7c7c2; border-radius: 7px; background: #181817; }
.editor-preview img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.editor label, dialog label { display: grid; gap: 7px; font-size: 13px; font-weight: 650; }
input, textarea, select { width: 100%; border: 1px solid #b8b8b3; border-radius: 5px; padding: 11px; background: #f7f7f4; color: #222; }
textarea { min-height: 430px; resize: vertical; font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; tab-size: 2; }
.snippet-row { display: flex; align-items: end; gap: 18px; }
.snippet-row label { width: min(360px, 100%); }
.snippet-row p { margin: 0 0 11px; color: #76564c; font-size: 13px; }
.editor .animation-toggle { display: flex; align-items: flex-start; gap: 10px; padding: 13px; border: 1px solid #c7c7c2; border-radius: 5px; background: #eeeeea; }
.animation-toggle input { width: auto; margin: 3px 0 0; }
.animation-toggle span { display: grid; gap: 3px; }
.animation-toggle small { color: #6b6b67; font-weight: 400; }
.editor-actions { display: flex; align-items: center; gap: 12px; }
#editor-status, #auth-error { color: #76564c; font-size: 13px; }
dialog { width: min(430px, calc(100% - 32px)); padding: 0; border: 1px solid #aaa; border-radius: 7px; background: #f4f4f1; }
dialog::backdrop { background: #2228; backdrop-filter: blur(3px); }
#auth-form { display: grid; gap: 15px; padding: 24px; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; }
.dialog-heading h2 { margin: 0; }
.dialog-heading button { padding: 4px 8px; border: 0; color: #555; background: transparent; }
.auth-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 38px; }
.pagination span { color: #666; font-size: 13px; }
.empty, .error { grid-column: 1 / -1; padding: 42px 0; color: #6b6b67; }
.error { color: #7b3f35; }
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 10; display: grid; width: min(360px, calc(100% - 40px)); gap: 8px; }
.toast { padding: 14px 16px; border: 1px solid #555; border-radius: 5px; color: #f5f5f2; background: #333; box-shadow: 0 8px 25px #0003; }
[hidden] { display: none !important; }
@media (max-width: 780px) { .site-header { grid-template-columns: 1fr auto; padding: 12px 16px; } nav { grid-column: 1 / -1; grid-row: 2; gap: 16px; margin-top: 10px; overflow-x: auto; } main { width: min(100% - 28px, 600px); padding-top: 34px; } .shader-grid { grid-template-columns: 1fr 1fr; } .editor-layout { grid-template-columns: 1fr; } .editor-preview-panel { position: static; grid-row: 1; width: min(300px, 100%); } }
@media (max-width: 520px) { .shader-grid { grid-template-columns: 1fr; } .page-heading { align-items: flex-start; flex-direction: column; gap: 14px; } textarea { min-height: 330px; } .editor-actions { flex-wrap: wrap; } .snippet-row { align-items: stretch; flex-direction: column; gap: 5px; } .snippet-row p { margin-bottom: 0; } }
