Spaces:
Running
Running
File size: 7,327 Bytes
5b0cfb6 319e4ce 5b0cfb6 319e4ce 5b0cfb6 319e4ce f744bff 833c04e | 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 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | :root {
--bg: #fbfbf9; --panel: #f3f2ee; --fg: #1d1d1b; --muted: #6b6a65; --line: #e2e0da; --accent: #2f6f4f;
--accent-fg: #fff; --user: #ebe9e3; --think: #f6f5f1; --err: #a33;
font: 15px/1.55 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
:root { --bg: #161615; --panel: #1e1e1c; --fg: #e8e6e1; --muted: #9a988f; --line: #2f2e2b; --accent: #5fae86;
--accent-fg: #0d1a13; --user: #262624; --think: #1b1b19; --err: #e07a7a; }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); }
#app { display: flex; height: 100%; }
#side { width: 270px; flex: none; background: var(--panel); border-right: 1px solid var(--line); padding: 16px;
overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.brand b { font-size: 18px; display: block; }
.brand .sub { color: var(--muted); font-size: 12.5px; }
.field { display: grid; grid-template-columns: 1fr auto; gap: 4px; font-size: 13px; color: var(--muted); }
.field > input, .field > select, .field > small { grid-column: 1 / -1; }
.field output { color: var(--fg); font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.field small { font-size: 11.5px; }
select, textarea { font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
select { padding: 6px 8px; }
input[type=range] { accent-color: var(--accent); width: 100%; }
#about { margin-top: auto; font-size: 12px; color: var(--muted); }
#about a { color: inherit; }
main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
header { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line);
font-size: 13px; color: var(--muted); position: relative; min-height: 45px; }
#bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--line); }
#bar > div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
#menu { display: none; }
#log { flex: 1; overflow-y: auto; padding: 20px 16px 8px; }
#log > * { max-width: 760px; margin-left: auto; margin-right: auto; }
#empty { color: var(--muted); text-align: center; margin-top: 15vh; }
#empty b { color: var(--fg); font-size: 20px; display: block; margin-bottom: 6px; }
.msg { margin-bottom: 18px; white-space: pre-wrap; word-wrap: break-word; }
.msg.user { background: var(--user); border-radius: 14px; padding: 10px 14px; width: fit-content;
max-width: 85%; margin-left: auto; margin-right: 0; }
.msg .imgs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.msg .imgs img { max-height: 160px; max-width: 100%; border-radius: 8px; display: block; }
.msg details { background: var(--think); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px;
margin-bottom: 8px; color: var(--muted); font-size: 13.5px; }
.msg summary { cursor: pointer; user-select: none; }
.msg .stats { color: var(--muted); font-size: 12px; margin-top: 4px; }
.msg.err { color: var(--err); }
.msg .base-prompt { color: var(--muted); }
.cursor::after { content: "▍"; color: var(--accent); }
#composer { padding: 10px 16px 16px; }
#composer > * { max-width: 760px; margin: 0 auto; }
#composer .row { display: flex; gap: 8px; align-items: flex-end; background: var(--panel); border: 1px solid var(--line);
border-radius: 14px; padding: 6px; }
#input { flex: 1; border: 0; background: transparent; resize: none; padding: 8px 6px; max-height: 200px; outline: none; }
#attach { display: flex; gap: 8px; flex-wrap: wrap; }
#attach:not(:empty) { margin-bottom: 8px; }
#attach .thumb { position: relative; }
#attach img { height: 64px; border-radius: 8px; display: block; }
#attach button { position: absolute; top: -6px; right: -6px; border: 0; border-radius: 50%; width: 20px; height: 20px;
background: var(--fg); color: var(--bg); cursor: pointer; font-size: 12px; line-height: 20px; padding: 0; }
.btn { font: inherit; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 10px;
padding: 7px 14px; cursor: pointer; }
.btn.wide { width: 100%; }
.btn.icon { padding: 6px 10px; font-size: 17px; line-height: 1; border: 0; background: transparent; }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn:disabled { opacity: .45; cursor: default; }
body.drag #composer .row { border-color: var(--accent); }
@media (max-width: 760px) {
#side { position: fixed; inset: 0 auto 0 0; z-index: 5; transform: translateX(-100%); transition: transform .2s;
box-shadow: 0 0 30px rgba(0,0,0,.2); }
#app.open #side { transform: none; }
#menu { display: inline-block; }
.msg.user { max-width: 92%; }
}
.msg pre { background: var(--think); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; overflow-x: auto;
white-space: pre; font-size: 13px; }
.msg code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; }
/* canvas (base model) */
#canvas { flex: 1; overflow-y: auto; padding: 22px 16px 12px; }
#canvas > * { max-width: 760px; margin-left: auto; margin-right: auto; }
#cimgs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
#cimgs .thumb { position: relative; }
#cimgs img { height: 96px; border-radius: 8px; display: block; }
#cimgs .thumb button { position: absolute; top: -6px; right: -6px; border: 0; border-radius: 50%; width: 20px; height: 20px;
background: var(--fg); color: var(--bg); cursor: pointer; font-size: 12px; line-height: 20px; padding: 0; }
.addimg { font-size: 13px; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.addimg:hover { color: var(--fg); border-color: var(--muted); }
.paper { position: relative; }
.mirror, #ed { font: 19px/1.7 "Iowan Old Style", Charter, "Palatino Linotype", Georgia, ui-serif, serif; padding: 0; margin: 0;
border: 0; letter-spacing: 0; white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; tab-size: 4; }
.mirror { color: transparent; min-height: 55vh; pointer-events: none; }
.mirror .ghost { color: var(--muted); opacity: .75; }
#ed { position: absolute; inset: 0; width: 100%; height: 100%; resize: none; outline: none; overflow: hidden;
background: transparent; color: var(--fg); caret-color: var(--accent); }
#ed::placeholder { color: var(--muted); }
#canvasbar { display: flex; gap: 12px; align-items: center; justify-content: flex-end; padding: 8px 16px 14px;
font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); }
#canvasbar .hint { display: flex; gap: 8px; align-items: center; }
kbd { font: 11px ui-sans-serif, system-ui, sans-serif; background: var(--panel); border: 1px solid var(--line);
border-radius: 4px; padding: 1px 5px; color: var(--fg); }
#canvasbar .touch { display: none; gap: 6px; }
#canvasbar .btn { padding: 4px 10px; font-size: 12.5px; }
@media (hover: none) { #canvasbar .touch { display: flex; } #canvasbar .hint { display: none; } }
body.drag #canvas .paper { outline: 1px dashed var(--accent); outline-offset: 6px; }
@media (max-width: 760px) { .mirror, #ed { font-size: 17px; } }
|