/* Avatarbly brand (Brand Essentials v1.0, as the site avatarbly.com wears it; Jeremy, 2026-10-15: "make these pages
   align with the branding"): Periwinkle accent with ink text on it, Ink text and dark buttons, Cloud page, White cards
   with a hard ink border and a periwinkle offset shadow, Inter, heavy uppercase headings, square corners. */
:root { --bg: #F4F3FF; --card: #ffffff; --ink: #202238; --soft: #62657A; --line: #d9d8ee; --accent: #8183F5; --good: #2b7a3f; --err: #c0392b;
  --shadow: 8px 8px 0 var(--accent); --btn-shadow: 5px 5px 0 var(--ink); --btn-shadow-2: 5px 5px 0 var(--accent); --field: #F4F3FF; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #202238; --card: #2a2d4a; --ink: #F4F3FF; --soft: #b9bbd6; --line: #3a3d60; --field: #202238;
    --btn-shadow: 5px 5px 0 #F4F3FF; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.45 Inter, system-ui, -apple-system, sans-serif; }
main { max-width: 960px; margin: 0 auto; padding: 16px 16px 60px; }
h1, h2, h3 { font-weight: 800; text-transform: uppercase; letter-spacing: -0.03em; line-height: 1.1; }
h1 { font-size: 30px; margin: 10px 0 8px; letter-spacing: -0.04em; }
h2 { font-size: 20px; margin: 28px 0 10px; }
p { margin: 8px 0; }
.soft { color: var(--soft); font-size: 15px; }
.hidden { display: none !important; }
/* the brand header on every page: the logo, home to avatarbly.com; no effects on it */
header.brand { display: flex; align-items: center; justify-content: space-between; padding: 6px 0 14px; }
header.brand a { display: inline-block; line-height: 0; }
header.brand img { width: 220px; height: 56px; display: block; object-fit: contain; object-position: left; }
header.brand img { font-size: 14px; color: var(--soft); }   /* if the logo file doesn't load, its alt text shows, plain: never a typed wordmark */
header.brand a { text-decoration: none; }
/* small labels: uppercase, muted */
.kicker, #voiceStep, #qProgress, #qSection, .detail, #camNote, .shot, .face span, .scale-labels, .timer { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--soft); }
#voiceStep, #qProgress, #qSection { font-size: 12px; margin: 4px 0; }
/* buttons: square, uppercase; primary periwinkle with ink text and a hard ink shadow, secondary ink with cloud text and a periwinkle shadow */
button { font: inherit; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; border: 2px solid var(--ink); border-radius: 0; padding: 12px 18px;
  background: var(--accent); color: #202238; cursor: pointer; box-shadow: var(--btn-shadow); transition: transform .08s, box-shadow .08s; }
button.quiet { background: #202238; color: #F4F3FF; box-shadow: var(--btn-shadow-2); }
a.btn { display: inline-block; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; border: 2px solid var(--ink); padding: 12px 18px; background: var(--accent); color: #202238; text-decoration: none; box-shadow: var(--btn-shadow); }   /* a link dressed as a button (Settings, Download my data) */
@media (prefers-color-scheme: dark) { button { border-color: #F4F3FF; } button.quiet { background: #202238; border-color: #F4F3FF; } }
button:hover:not(:disabled) { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
button.quiet:hover:not(:disabled) { box-shadow: 7px 7px 0 var(--accent); }
button:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--ink); }
button:disabled { opacity: .5; cursor: default; }
/* inputs: a 2 px ink border, square, cloud; a periwinkle focus ring */
input[type=text], textarea, select { font: inherit; width: 100%; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 0; background: var(--field); color: var(--ink); }
input[type=text]:focus, textarea:focus, select:focus { outline: 3px solid var(--accent); outline-offset: 1px; }
label.check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; }
label.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--accent); }
/* cards and panels: white, a 2 px ink border, a hard periwinkle shadow */
.cam { position: relative; width: 100%; max-width: 480px; aspect-ratio: 1; margin: 12px auto 20px; border: 2px solid var(--ink); box-shadow: var(--shadow); overflow: hidden; background: #000; }
.cam video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cam .oval { position: absolute; left: 22%; right: 22%; top: 12%; bottom: 14%; border: 3px dashed rgba(255,255,255,.8); border-radius: 50%; pointer-events: none; }
.cam .say { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px; text-align: center; color: #fff; font-weight: 700; background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.cam.small { max-width: 180px; margin: 8px auto 14px; box-shadow: 4px 4px 0 var(--accent); }
/* the chat under the avatar: AI Jeremy's talk box, in the brand */
#chatBox { background: var(--card); border: 2px solid var(--ink); box-shadow: var(--shadow); padding: 12px 14px 14px; margin: 22px 0 14px; }
#chatBox h2 { margin: 2px 0 10px; }
#chatLog { display: flex; flex-direction: column; gap: 8px; max-height: 40vh; overflow-y: auto; padding: 4px 2px; scroll-behavior: smooth; }
.msg { max-width: 84%; padding: 10px 14px; border: 2px solid var(--ink); font-size: 17px; line-height: 1.38; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.them { align-self: flex-start; background: var(--card); }
.msg.you { align-self: flex-end; background: var(--accent); color: #202238; }
.msg.dots { color: var(--soft); letter-spacing: .2em; }
#chatRow { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
#chatSay { flex: 1; resize: none; min-height: 50px; max-height: 120px; line-height: 1.3; }
#chatSend { width: 50px; height: 50px; padding: 0; font-size: 22px; flex: none; }
#camNote { margin: 0 0 8px; letter-spacing: .04em; text-transform: none; font-weight: 500; font-size: 14px; }
.shots { display: flex; gap: 10px; justify-content: center; margin: 10px 0; }
.shot { width: 30%; max-width: 140px; text-align: center; }
.shot img, .shot .empty { width: 100%; aspect-ratio: 1; object-fit: cover; border: 2px solid var(--ink); background: var(--field); display: block; }
.row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin: 14px 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card { background: var(--card); border: 2px solid var(--ink); box-shadow: var(--shadow); padding: 12px; }
.card img { width: 100%; display: block; background: var(--field); }
.card .ph { width: 100%; aspect-ratio: 1; background: var(--field); display: grid; place-items: center; color: var(--soft); text-align: center; padding: 16px; font-size: 15px; }
.card.tall .ph { aspect-ratio: 2 / 3; }
.card h3 { margin: 10px 0 6px; font-size: 14px; }
.stars { display: flex; gap: 6px; }
.stars button { flex: 1; padding: 8px 0; background: var(--card); color: var(--ink); box-shadow: none; }
.stars button.on { background: var(--accent); color: #202238; }
.scale { display: flex; justify-content: space-between; font-size: 13px; color: var(--soft); margin-top: 4px; }
.note { margin-top: 8px; font-size: 15px; }
.me { display: flex; gap: 14px; align-items: center; }
.me img { width: 110px; height: 110px; object-fit: cover; border: 2px solid var(--ink); }
table { width: 100%; border-collapse: collapse; background: var(--card); border: 2px solid var(--ink); box-shadow: var(--shadow); font-size: 15px; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--accent); color: #202238; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
.wrap { overflow-x: auto; padding: 0 10px 12px 0; }
.err { color: var(--err); font-weight: 600; }
.tabs { display: flex; gap: 0; margin: 14px 0; border: 2px solid var(--ink); }
.tabs button { flex: 1; border: 0; border-right: 2px solid var(--ink); background: var(--card); color: var(--ink); padding: 10px; box-shadow: none; }
.tabs button:last-child { border-right: 0; }
.tabs button.on { background: var(--ink); color: var(--bg); }
.tabs button:hover:not(:disabled) { transform: none; box-shadow: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { background: var(--card); color: var(--ink); padding: 9px 14px; font-size: 13px; box-shadow: none; }
.chips button.on { background: var(--accent); color: #202238; }
.chips button:hover:not(:disabled) { transform: none; box-shadow: none; }
.slot { background: var(--card); border: 2px solid var(--ink); box-shadow: var(--shadow); padding: 12px; margin: 16px 0 22px; }
.slot h3 { margin: 0 0 8px; font-size: 14px; }
.slot .other { margin-top: 8px; }
.slot .photo { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 15px; }
.slot .photo img { width: 64px; height: 64px; object-fit: cover; border: 2px solid var(--ink); }
.slot .photo label, .slot .photo .remove { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; cursor: pointer; font-weight: 600; }
.slot .photo input { display: none; }
.slot.off { opacity: .45; }
.detail { margin: -2px 0 8px; }
.faces { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 14px 0 22px; }
.face { background: var(--card); border: 2px solid var(--ink); padding: 4px; text-align: center; cursor: pointer; box-shadow: 4px 4px 0 var(--line); }
.face img, .face .ph { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--field); }
.face .ph { display: grid; place-items: center; color: var(--soft); font-size: 14px; padding: 8px; }
.face span { display: block; padding: 8px 0 4px; line-height: 1.25; letter-spacing: .06em; font-size: 11px; }
.face.on { box-shadow: 6px 6px 0 var(--accent); transform: translate(-2px, -2px); }
.face.off { cursor: default; }
.center { text-align: center; }
.field { display: flex; flex-direction: column; gap: 10px; }
.field label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--soft); }
.pic img, .pic .ph { width: 100%; max-width: 420px; display: block; margin: 12px auto 22px; border: 2px solid var(--ink); box-shadow: var(--shadow); background: var(--field); }
.pic .ph { aspect-ratio: 2 / 3; display: grid; place-items: center; color: var(--soft); }
#preview label { font-size: 15px; color: var(--soft); }
.radios { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.radios label { display: flex; gap: 10px; align-items: center; font-size: 17px; }
.radios input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.face { -webkit-tap-highlight-color: transparent; }
.line { font-size: 24px; line-height: 1.35; font-weight: 600; margin: 18px 0; }
.describe { width: 100%; display: block; border: 2px solid var(--ink); box-shadow: var(--shadow); margin-bottom: 20px; }
.timer { font-variant-numeric: tabular-nums; min-height: 1.4em; font-size: 15px; letter-spacing: .06em; }
#rec.on, #micRec.on { background: var(--err); color: #fff; }
.meter { width: 100%; max-width: 320px; height: 12px; margin: 8px auto; border: 2px solid var(--ink); background: var(--card); overflow: hidden; }
.meter div { height: 100%; width: 0; background: var(--accent); transition: width .08s linear; }
.meter.hot div { background: var(--err); }
.good { color: var(--good); font-weight: 700; }
.tiers { display: grid; gap: 18px; margin: 16px 0 22px; }
.tiers .tier { text-align: left; display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; background: var(--card); color: var(--ink); font: inherit; text-transform: none; letter-spacing: 0; box-shadow: var(--shadow); }
.tiers .tier b { font-size: 18px; text-transform: uppercase; letter-spacing: -0.02em; font-weight: 800; }
.tiers .tier.on { background: var(--accent); color: #202238; }
.tiers .tier.on .soft { color: #202238; }
.tiers .tier:hover:not(:disabled) { transform: translate(-2px, -2px); box-shadow: 10px 10px 0 var(--accent); }
.scale { display: flex; gap: 8px; justify-content: center; margin: 14px 0 4px; }
.scale button { width: 50px; height: 50px; padding: 0; font-size: 18px; background: var(--card); color: var(--ink); box-shadow: none; }
.scale button.on { background: var(--accent); color: #202238; }
.scale button:hover:not(:disabled) { transform: none; box-shadow: none; }
.scale-labels { display: flex; justify-content: space-between; max-width: 290px; margin: 0 auto 10px; }
#profileBox ul { padding-left: 20px; }
.tips { margin: 8px 0 12px; padding-left: 20px; }
.tips li { margin: 4px 0; }
audio { width: 100%; margin: 12px 0; }
.render { list-style: none; padding: 0; margin: 8px 0; font-size: 17px; max-height: 124px; overflow: hidden; }
.render li { padding: 8px 0; color: var(--soft); }
.render li:last-child { color: var(--ink); font-weight: 600; }
canvas.avatar, img.avatar { width: 100%; height: 62vh; display: block; background: #faf6ec; border: 2px solid var(--ink); box-shadow: var(--shadow); margin-bottom: 18px; }   /* the drawings' cream, in both modes, so the card is one picture */
img.avatar { object-fit: contain; }   /* a share link's landing: the picture, framed, until Play */
/* chatting: the picture shorter and pinned at the top; the chat log scrolls inside itself under it */
body.chatting canvas.avatar { height: 34vh; position: sticky; top: 0; z-index: 2; }
body.chatting #chatLog { max-height: 26vh; }
textarea { resize: vertical; }
#shareUrl { font-size: 14px; }
/* a visitor's page: the small footer */
footer.made { margin: 36px 0 0; padding-top: 14px; border-top: 2px solid var(--ink); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--soft); text-align: center; }
footer.made a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

/* notes, to-dos and calendar (the plan cards, 2026-10-16) */
.lists section { margin: 10px 0; }
.lists h3 { margin: 0 0 4px; font-size: 1rem; }
.lists ul, #memoryList { list-style: none; padding: 0; margin: 0; }
.lists li, #memoryList li { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid rgba(0,0,0,.06); }
.lists li span, #memoryList li span { flex: 1; }
.lists li.done span { text-decoration: line-through; opacity: .6; }
.addRow { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.addRow input { flex: 1; min-width: 120px; }
button.small { padding: 2px 8px; font-size: .85rem; }
.checkins label { display: block; margin: 6px 0; }
.checkins label label { display: inline; margin: 0 6px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0; }
.chip { font-size: .85rem; padding: 2px 10px; border-radius: 999px; border: 1px solid rgba(0,0,0,.2); background: transparent; }
.chip.on { background: #8183F5; color: #fff; border-color: #8183F5; }
#briefText { white-space: pre-wrap; font: inherit; font-size: .95rem; background: rgba(0,0,0,.04); padding: 10px; border-radius: 8px; max-height: 60vh; overflow: auto; }

/* the microphone boost (Jeremy, 2026-10-17: a quiet phone mic kept saying "Too quiet") */
.gain { width: 100%; max-width: 320px; margin: 6px auto; text-align: center; font-size: .9em; }
.gain label { display: block; }
.gain input { width: 100%; }
