/* Layout: a field-journal side panel beside a live world map; one light look to match the map tiles. */
:root {
  --paper: #fbfaf6;
  --card: #ffffff;
  --ink: #1d2140;
  --muted: #676b82;
  --line: #e6e3da;
  --pink: #ff5c8a;
  --sun: #ffc93d;
  --sea: #2f6fed;
  --mint: #12a274;
  --rust: #e2553b;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--paper); color: var(--ink); font: 15px/1.5 var(--body); }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, textarea:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; }
[hidden] { display: none !important; }

.app { display: grid; grid-template-columns: minmax(330px, 410px) 1fr; height: 100%; }
.panel { overflow-y: auto; border-right: 1px solid var(--line); padding-block: 22px 40px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: 20px; display: flex; flex-direction: column; gap: 18px; }
.mapwrap { position: relative; min-width: 0; }
#map { position: absolute; inset: 0; }

@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 52% 48%; }
  .mapwrap { grid-row: 1; }
  .panel { grid-row: 2; border-right: 0; border-top: 1px solid var(--line); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}

/* brand + type */
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand h1 { font: 800 30px/1 var(--display); letter-spacing: -0.02em; margin: 0; }
.brand h1 span { color: var(--pink); }
.langs { margin-left: auto; align-self: center; width: auto; padding: 5px 8px; font-size: 13px; border-radius: 10px; cursor: pointer; }
.lede { font: 500 19px/1.35 var(--display); margin: 0; text-wrap: balance; }
.small { font-size: 13px; color: var(--muted); }
.label { font: 500 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
h2 { font: 700 17px/1.2 var(--display); margin: 0; }

/* join steps */
.step { display: grid; grid-template-columns: 28px 1fr; gap: 4px 12px; }
.step .n { grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font: 700 14px var(--display); }
.step > div { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn { border: 1.5px solid var(--ink); background: var(--card); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 14px; text-decoration: none; color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.big { padding: 12px 18px; font-size: 16px; width: 100%; }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn.ghost { border-color: var(--line); }
textarea, select, input { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); padding: 10px 12px; font: 14px/1.45 var(--body); color: var(--ink); }
textarea { min-height: 130px; resize: vertical; }
details.prompt { border: 1px dashed var(--line); border-radius: 12px; padding: 8px 12px; background: var(--card); }
details.prompt pre { white-space: pre-wrap; font: 12px/1.5 var(--mono); margin: 8px 0 0; max-height: 220px; overflow: auto; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 420px) { .pair { grid-template-columns: 1fr; } }
.signin { display: flex; flex-direction: column; gap: 10px; }
.signin p { margin: 0; }
.devnote { background: #fff6dd; border: 1px dashed var(--sun); border-radius: 10px; padding: 8px 12px; font-weight: 600; }
#code { font: 600 24px/1 var(--mono); letter-spacing: 0.3em; text-align: center; }
.account { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.footer-links { gap: 16px; }
.footer-links .confirm { flex-basis: 100%; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.error { color: var(--rust); font-weight: 600; font-size: 14px; }

/* my twin */
.twincard { background: var(--card); border: 1.5px solid var(--ink); border-radius: 18px; padding: 16px; display: grid; grid-template-columns: 64px 1fr; gap: 4px 14px; box-shadow: 4px 4px 0 var(--sun); }
.avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 34px; grid-row: span 3; border: 2px solid var(--ink); }
.twincard h2 { font-size: 22px; }
.avatar, .mini, .m-twin { position: relative; overflow: hidden; }
.avatar img, .mini img, .m-twin img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.facebtn { position: relative; grid-row: span 3; padding: 0; border: 0; background: none; border-radius: 50%; align-self: start; }
.facebtn .avatar { grid-row: auto; }
.facebtn .cam { position: absolute; right: -4px; bottom: -4px; width: 26px; height: 26px; border-radius: 50%; background: var(--card);
  border: 1.5px solid var(--ink); display: grid; place-items: center; font-size: 13px; }
.facebtn:hover .avatar { transform: scale(1.04); }
.avatar.big { width: 180px; height: 180px; font-size: 90px; border-width: 3px; }
.facemenu { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.facemenu .btn { width: 100%; }
.facemenu p { margin: 0; }
.making .big { font-size: 80px; }
.selfie.thinking { opacity: 0.5; }
@media (prefers-reduced-motion: no-preference) { .selfie.thinking { animation: think 1.6s ease-in-out infinite; } }
.selfie { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 2px solid var(--ink); }
.making { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.making > img { width: 160px; height: 160px; object-fit: cover; border-radius: 50%; border: 3px solid var(--ink); opacity: 0.6; }
@media (prefers-reduced-motion: no-preference) { .making > img { animation: think 1.6s ease-in-out infinite; } }
@keyframes think { 50% { opacity: 0.25; transform: scale(0.96); } }
.twincard .tag { font-size: 14px; color: var(--muted); }
.status { font-weight: 600; font-size: 14px; }
.stats { grid-column: 1 / -1; display: flex; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; font-variant-numeric: tabular-nums; }
.stats b { font: 700 18px var(--display); display: block; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; padding: 8px 10px; font-weight: 600; color: var(--muted); border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--pink); }
.dot { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--pink); color: #fff; font-size: 11px; line-height: 18px; text-align: center; margin-left: 4px; }

.feed { display: flex; flex-direction: column; gap: 2px; }
.item { display: grid; grid-template-columns: 54px 1fr; gap: 10px; padding: 10px 6px; border-bottom: 1px solid var(--line); border-radius: 8px; text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0; }
button.item:hover { background: #f3f1ea; }
.item .when { white-space: pre-line; font: 500 10.5px/1.3 var(--mono); color: var(--muted); text-transform: uppercase; padding-top: 3px; }
.item.new { background: #fff6dd; }
.item .text { min-width: 0; overflow-wrap: anywhere; }
.dayhead { font: 500 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 14px 2px 6px; }
.feed .moment { font-size: 14px; flex: none; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item.meet { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin: 4px 0; text-align: left; width: 100%; }
.item.meet:hover { border-color: var(--ink); background: var(--card); }
.item.meet .faces { display: flex; }
.item.meet .faces .mini { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--card); box-shadow: 0 0 0 1px var(--line); display: grid; place-items: center; }
.item.meet .faces .mini + .mini { margin-left: -10px; }
.item.meet .body { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; }
.item.meet .top { display: flex; gap: 6px; align-items: baseline; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item.meet .clamp { color: var(--muted); }
.chip { font: 700 13px var(--display); border-radius: 999px; padding: 2px 8px; background: #f0efe9; color: var(--muted); }
.chip.pos { background: #eef8f3; color: var(--mint); } .chip.neg { background: #fdeeea; color: var(--rust); }
.chev { font-size: 22px; color: var(--muted); line-height: 1; }
.item.diary { cursor: pointer; }
.stats .now { display: block; font-size: 12.5px; color: var(--muted); }
.flagchip { display: flex; align-items: center; gap: 4px; margin-top: 2px; padding: 2px 8px 2px 6px; border: 1.5px solid var(--ink); border-radius: 999px;
  background: var(--card); font-size: 16px; line-height: 1.4; cursor: pointer; box-shadow: 2px 2px 0 var(--sun); }
.flagchip:hover { background: #fff6dd; }
.flagchip .more { color: var(--muted); font: 600 13px var(--body); }
.travel-now { margin: 0; font-weight: 600; background: #fff6dd; border-radius: 10px; padding: 8px 12px; }
.item.travel .text { display: flex; flex-direction: column; gap: 6px; }
.metrow { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.metrow .small { margin-right: 4px; }
.metrow .mini { width: 28px; height: 28px; font-size: 15px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; }
.scopes { margin: 12px 0 6px; }
.scopes .chip { cursor: pointer; font-size: 13.5px; }
.scopes .chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.item.go { grid-template-columns: 54px 1fr auto; width: 100%; }
.loadmore { align-self: center; margin-top: 10px; }
.item.diary .text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.item.diary.open .text { -webkit-line-clamp: unset; }
.item.diary.open .clamp { -webkit-line-clamp: unset; }
.item.new { background: #fff6dd; border-radius: 10px; }
.empty { color: var(--muted); font-size: 14px; padding: 12px 0; }

.bond { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
button.bond { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; grid-template-columns: 36px 1fr auto auto; border-radius: 0; }
button.bond:hover { background: #f3f1ea; }
.reltag { margin-left: 8px; font-size: 12px; font-weight: 700; border: 1px solid var(--ink); border-radius: 999px; padding: 1px 8px; vertical-align: 2px; white-space: nowrap; }
.reltag.pal { background: #e3f4ec; }
.reltag.spark { background: #ffe1ea; }
.bond .mini.pal { border: 2.5px solid var(--mint); }
.bond .mini.spark { border: 2.5px solid var(--pink); }
.bond .right { display: flex; align-items: center; gap: 8px; }
details.locals summary .dot { vertical-align: 1px; }
.bond .mini { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; border: 1.5px solid var(--ink); }
details.locals { margin-top: 16px; }
details.locals summary { cursor: pointer; font-weight: 600; color: var(--muted); padding: 6px 0; }
.meter { font: 700 15px var(--display); font-variant-numeric: tabular-nums; }
.meter.pos { color: var(--mint); } .meter.neg { color: var(--rust); }

.namebtn { background: none; border: 0; padding: 0; font: inherit; text-align: left; text-decoration: underline dotted var(--line); text-underline-offset: 5px; }
.namebtn:hover { text-decoration-color: var(--ink); }
.lvl { margin-left: 8px; vertical-align: middle; font: 600 12px var(--body); border: 1.5px solid var(--ink); border-radius: 999px; padding: 2px 8px; background: var(--sun); }
.standing { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 8px; }
.standing .stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; }
.standing .stat b { font: 700 20px var(--display); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; }
.standing .stat b i { font-style: normal; font-size: 16px; }
.standing .stat span { font-size: 12.5px; color: var(--muted); }
.karma { display: flex; flex-direction: column; gap: 16px; }
.levelcard { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; background: var(--card); border: 1.5px solid var(--ink); border-radius: 16px; padding: 14px; }
.levelcard > div { display: flex; flex-direction: column; gap: 6px; }
.tiericon { width: 56px; height: 56px; border-radius: 50%; background: #fff6dd; border: 1.5px solid var(--ink); display: grid; place-items: center; font-size: 28px; }
.tiericon.big { width: 96px; height: 96px; font-size: 52px; }
.meters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .meters { grid-template-columns: 1fr; } }
.meter-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.meter-card p { margin: 0; font-size: 13.5px; }
.meter-card .num { font-variant-numeric: tabular-nums; }
.meter-card.energy .bar i { background: var(--sun); }
.meter-card.rep .bar i { background: var(--mint); }
.checklist { display: flex; flex-direction: column; gap: 6px; }
.check { display: flex; gap: 8px; font-size: 14px; }
.check.done { color: var(--muted); text-decoration: line-through; }
.check.go { background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; text-align: left; align-items: center; }
.check.go:hover { background: #f3f1ea; }
.check .arrow { margin-left: auto; color: var(--muted); }
.kev.new { background: #fff6dd; border-radius: 8px; }
.kev { display: grid; grid-template-columns: 48px 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.levelup { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.levelup .confetti { font-size: 28px; margin: 0; }
.traits { display: grid; gap: 6px; }
.trait { display: grid; grid-template-columns: 82px 1fr 22px; gap: 8px; align-items: center; font-size: 13px; }
.bar { height: 8px; background: #eeebe3; border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--sea); border-radius: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.facts { display: grid; gap: 10px; }
.facts p { margin: 2px 0 0; }

/* map overlay */
.hud { position: absolute; top: max(12px, env(safe-area-inset-top, 0px)); left: 12px; right: 60px; display: flex; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.hud > * { pointer-events: auto; }
.clock { background: var(--ink); color: var(--paper); border-radius: 999px; padding: 8px 14px; font: 600 14px var(--body); font-variant-numeric: tabular-nums; box-shadow: 0 2px 10px rgba(29,33,64,.18); }
.pill { background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 999px; padding: 7px 14px; font: 600 14px var(--body); box-shadow: 0 2px 10px rgba(29,33,64,.12); }
.skip { background: var(--sun); border: 1.5px solid var(--ink); border-radius: 999px; padding: 7px 13px; font-weight: 700; font-size: 14px; }
.legend { position: absolute; bottom: 30px; left: 12px; background: rgba(251,250,246,.94); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font-size: 12.5px; max-width: calc(100% - 24px); }

/* markers */
.m-cluster { width: var(--s); height: var(--s); border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font: 700 15px var(--display); border: 3px solid var(--paper); box-shadow: 0 2px 8px rgba(29,33,64,.3); cursor: pointer; }
/* real players' twins: big with a solid blue ring; yours: pink and biggest; locals: small and dashed */
.m-twin { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; border: 3px solid var(--sea); box-shadow: 0 1px 6px rgba(29,33,64,.35); cursor: pointer; transition: transform .15s; }
.m-twin:hover { transform: scale(1.12); }
.m-twin.npc { width: 30px; height: 30px; font-size: 15px; border: 2px dashed var(--ink); background: var(--paper) !important; }
.m-twin.me { width: 48px; height: 48px; font-size: 26px; border: 3px solid var(--pink); box-shadow: 0 2px 10px rgba(29,33,64,.35); }
.m-place { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--muted); pointer-events: none; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(29,33,64,.45); display: grid; place-items: center; padding: 16px; z-index: 20; }
.sheet { background: var(--paper); border-radius: 20px; max-width: 520px; width: 100%; max-height: 86vh; overflow-y: auto; padding: 22px; border: 1.5px solid var(--ink); box-shadow: 6px 6px 0 var(--pink); display: flex; flex-direction: column; gap: 14px; }
.sheet header { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.close { background: none; border: 1.5px solid var(--line); border-radius: 50%; width: 34px; height: 34px; flex: none; font-size: 16px; }
.pairtitle { font-size: 18px; margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.pairtitle .who { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.pairtitle .mini { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; font-size: 20px; flex: none; }
.pairtitle .x { color: var(--muted); font-weight: 500; }
@media (prefers-reduced-motion: no-preference) { .typing { animation: think 1.2s ease-in-out infinite; } }
/* placeholder lines while a story loads */
.spinner { width: 34px; height: 34px; margin: 28px auto; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--pink); }
@media (prefers-reduced-motion: no-preference) { .spinner { animation: spin .8s linear infinite; } }
@keyframes spin { to { transform: rotate(360deg); } }
.dialogue { display: flex; flex-direction: column; gap: 8px; }
.line { display: flex; gap: 8px; align-items: end; max-width: 88%; }
.line .mini { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; flex: none; border: 1.5px solid var(--ink); }
.line p { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 7px 11px; font-size: 14.5px; }
.line.right { align-self: flex-end; flex-direction: row-reverse; }
.line.right p { background: #eaf0ff; border-radius: 14px 14px 4px 14px; }
.verdict { display: inline-block; font-weight: 700; border-radius: 999px; padding: 3px 10px; font-size: 13px; background: #eef8f3; color: var(--mint); }
.verdict.neg { background: #fdeeea; color: var(--rust); }
.verdict.zero { background: #f0efe9; color: var(--muted); }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 12px; font-weight: 600; z-index: 30; max-width: calc(100% - 32px); }
.confirm { border: 1.5px solid var(--rust); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #fff7f5; }

/* intent on the twin card: what MirrorMaster knows, or a nudge to tell it */
.intent { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 9px 12px; background: #f5f3ff; border: 1px solid var(--line); border-radius: 12px; text-align: left; font-size: 14px; }
.intent .what { flex: 1; min-width: 0; line-height: 1.4; }
.intent .label { display: block; margin: 0 0 2px; }
.intent .chev { margin-left: auto; font-size: 18px; }
.intent.todo { background: #fff4d6; border-color: var(--sun); font-weight: 600; }
.intent:hover { border-color: var(--ink); }

/* matches in People, and why two owners should meet */
.matches { display: flex; flex-direction: column; margin-bottom: 14px; }
button.bond.match .small { color: var(--ink); }
.reltag.strong { background: #ffe1ea; }
.reltag.maybe { background: #fff4d6; }
.whymeet { background: #fff0f5; border: 1.5px solid var(--pink); border-radius: 14px; padding: 10px 14px; }
.whymeet p { margin: 4px 0; }

/* MirrorMaster: a round button in the map's corner and its chat */
.mm-fab { position: absolute; right: 14px; bottom: 44px; width: 58px; height: 58px; border-radius: 50%; background: var(--sun); border: 1.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); font-size: 28px; line-height: 1; display: grid; place-items: center; z-index: 6; }
.mm-fab:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.mm-fab .dot { position: absolute; top: -4px; right: -4px; margin: 0; }
.mm { position: absolute; right: 14px; bottom: 114px; width: min(370px, calc(100% - 28px)); max-height: calc(100% - 180px); min-height: 260px; display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 18px; box-shadow: 5px 5px 0 var(--pink); z-index: 6; }
.mm header { display: flex; justify-content: space-between; align-items: center; font: 700 17px var(--display); }
.mm .knows { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: grid; gap: 2px; }
.mm .msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 80px; }
.mm .msg { max-width: 88%; }
.mm .msg p { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 7px 11px; font-size: 14.5px; }
.mm .msg.me { align-self: flex-end; }
.mm .msg.me p { background: #eaf0ff; border-radius: 14px 14px 4px 14px; }
.mm form { display: flex; gap: 6px; align-items: end; }
.mm textarea { flex: 1; resize: none; min-height: 44px; max-height: 120px; font: inherit; padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); }
.mm .mic, .mm .send { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--card); font-size: 18px; }
.mm .send { background: var(--ink); color: var(--paper); font-weight: 700; }
.mm .send:disabled { opacity: .5; cursor: default; }
.mm .mic.on { background: var(--pink); color: #fff; }
@media (prefers-reduced-motion: no-preference) { .mm .mic.on { animation: think 1.2s ease-in-out infinite; } }
@media (max-width: 760px) {
  .mm-fab { bottom: 34px; width: 50px; height: 50px; font-size: 24px; }
  .mm { position: fixed; left: 12px; right: 12px; bottom: 12px; width: auto; max-height: 75vh; z-index: 15; }
}

/* What MirrorMaster knows: private facts, each can be forgotten */
.facts-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.facts-list li { display: flex; gap: 8px; align-items: start; justify-content: space-between; padding: 6px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.facts-list li.past { color: var(--muted); background: none; }
.facts-list .forget { flex: none; background: none; border: 0; color: var(--muted); font-size: 13px; padding: 2px 4px; }
.facts-list .forget:hover { color: var(--rust); }
.sheet .knows { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 3px; font-size: 14px; }
.mm > .linkbtn { align-self: flex-start; margin-top: -4px; }
.mm .asktools { display: flex; gap: 12px; margin: 4px 0 0 4px; }
