File size: 5,785 Bytes
dd53693 6b5ce6d 4a0e872 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | :root {
--bg: #12141a; --panel: #191c24; --line: #2a2f3b; --text: #e8eaf0; --dim: #969cab; --accent: #ffb454;
--chip: #242936; --user: #2b3550; --ok: #7ee0a1; --warn: #ffb454;
font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--text); }
#app { display: flex; height: 100dvh; }
#view { position: relative; flex: 1; min-width: 0; background: #0c0e13; }
#canvas { display: block; width: 100%; height: 100%; touch-action: none; }
#state { position: absolute; left: 12px; top: 12px; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 24px); pointer-events: none; }
#state span { background: rgba(14, 16, 22, .72); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .1); padding: 4px 9px; border-radius: 999px; font-size: 12px; }
#state b { font-weight: 600; color: var(--accent); margin-right: 4px; }
#tools { position: absolute; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
button { font: inherit; color: var(--text); background: rgba(24, 27, 36, .82); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .5; cursor: default; }
#panel { width: 390px; max-width: 100%; display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid var(--line); }
#panel header { padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
h1 { margin: 0; font-size: 19px; letter-spacing: .2px; }
#status { margin: 4px 0 0; font-size: 12.5px; color: var(--dim); line-height: 1.4; }
#log { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { font-size: 14px; line-height: 1.45; max-width: 100%; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--user); padding: 8px 12px; border-radius: 14px 14px 4px 14px; }
.msg.bot { align-self: stretch; }
.msg.bot p { margin: 0 0 6px; }
.msg.bot .note { color: var(--warn); }
.msg.bot .meta { font-size: 11.5px; color: var(--dim); }
.tokens { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 6px; }
.tokens code { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--chip); border-radius: 5px; padding: 2px 6px; color: #cfd6e6; }
.tokens code.s { color: var(--accent); background: #2f2a20; }
.hint { color: var(--dim); font-size: 13.5px; }
#examples { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px; border-top: 1px solid var(--line); max-height: 132px; overflow-y: auto; }
#examples button { font-size: 12px; padding: 5px 9px; border-radius: 999px; background: var(--chip); text-align: left; }
#form { display: flex; gap: 8px; padding: 12px 16px 16px; }
#prompt { flex: 1; min-width: 0; font: inherit; font-size: 15px; color: var(--text); background: #0f1117; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
#prompt:focus { outline: none; border-color: var(--accent); }
#send { background: var(--accent); color: #1c1407; border-color: var(--accent); font-weight: 600; }
@media (max-width: 820px) {
#app { flex-direction: column; }
#view { flex: none; height: 46dvh; }
#panel { width: 100%; flex: 1; min-height: 0; border-left: 0; border-top: 1px solid var(--line); }
#panel header { padding: 10px 16px 8px; }
#examples { max-height: 76px; }
}
/* ---------------------------------------------------------------- tabs and hand editor */
#tabs { display: flex; gap: 4px; margin-top: 10px; }
#tabs button { flex: 1; background: transparent; border-radius: 8px; }
#tabs button[aria-selected="true"] { background: var(--chip); border-color: var(--accent); color: var(--accent); }
.tab { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#panel[data-tab="chat"] #editor, #panel[data-tab="edit"] #chat { display: none; }
#editor { overflow-y: auto; padding: 4px 16px 16px; gap: 0; }
.ed-sec { padding: 12px 0; border-bottom: 1px solid var(--line); }
.ed-sec:last-child { border-bottom: 0; }
.ed-sec h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--dim); }
.ed-sec .hint { margin: 0; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--dim); min-width: 0; }
.field select { font: inherit; font-size: 13.5px; color: var(--text); background: #0f1117; border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; min-width: 0; }
.field select:focus { outline: none; border-color: var(--accent); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 10px; }
.row .field { flex: 1; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.sw { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.sw.none { background: var(--chip); color: var(--dim); font-size: 13px; line-height: 1; }
.sw.on { border-color: var(--accent); }
.ent-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ent { display: inline-flex; align-items: center; gap: 6px; background: var(--chip); border-radius: 999px; padding: 5px 11px; }
.ent small { color: var(--dim); }
.ent.on { border-color: var(--accent); color: var(--accent); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
button.danger:hover { border-color: #ff6b6b; color: #ff8a8a; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.check input { accent-color: var(--accent); width: 15px; height: 15px; }
.ed-sec .row + .hint { margin-top: 10px; }
|