/* Reference-inspired paper and ink, retaining the compact chat layout. */
:root{color-scheme:light;--ink:#242629;--muted:#808087;--accent:#37865d;--surface:#fffdfa;--line:#eee9e3}
body{background:#e8e3dd}
.shell,.view-day.shell{background-color:#f3efe9;background-image:linear-gradient(120deg,#fffdf8a6,#f2eee6a6),url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1ODAgMTEwMCIgZmlsbD0ibm9uZSI+PGRlZnM+PGZpbHRlciBpZD0iYmx1ciI+PGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iNSIvPjwvZmlsdGVyPjxmaWx0ZXIgaWQ9InBhcGVyIj48ZmVUdXJidWxlbmNlIGJhc2VGcmVxdWVuY3k9Ii43IiBudW1PY3RhdmVzPSIzIiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PGZlQ29sb3JNYXRyaXggdHlwZT0ic2F0dXJhdGUiIHZhbHVlcz0iMCIvPjxmZUNvbXBvbmVudFRyYW5zZmVyPjxmZUZ1bmNBIHR5cGU9ImxpbmVhciIgc2xvcGU9Ii4wNDUiLz48L2ZlQ29tcG9uZW50VHJhbnNmZXI+PC9maWx0ZXI+PGxpbmVhckdyYWRpZW50IGlkPSJtaXN0IiB4Mj0iMCIgeTI9IjEiPjxzdG9wIHN0b3AtY29sb3I9IiNhMWE5OWEiIHN0b3Atb3BhY2l0eT0iLjI0Ii8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjYTFhOTlhIiBzdG9wLW9wYWNpdHk9IjAiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cGF0aCBkPSJNMzAwIDE5MCAzNTAgMTQyIDM4NSAxNjIgNDMwIDgxIDQ1NiAxMDYgNDczIDk4IDUzNSAxNjggNTgwIDEzNVYzNjBIMzAwWiIgZmlsbD0idXJsKCNtaXN0KSIgZmlsdGVyPSJ1cmwoI2JsdXIpIi8+PHBhdGggZD0ibTM2MCAxODMgNjUtODMgMjAgNDAgMTItMTkgNjMgNjcgNjAtMzB2MTMySDM2MFoiIGZpbGw9IiM4ZjliOGEiIG9wYWNpdHk9Ii4wOSIvPjxwYXRoIGQ9Ik0wIDY3NSA3MCA2MDggOTggNjQ0IDE2NSA1NjMgMTk4IDYwNyAyNDMgNTkwIDI5MCA2OTBWODkwSDBaIiBmaWxsPSJ1cmwoI21pc3QpIiBmaWx0ZXI9InVybCgjYmx1cikiLz48cGF0aCBkPSJNMzQwIDkxMCAzODAgODUwIDM5OCA4NzUgNDQ4IDc3OCA0NzcgODE5IDUwOCA4MDAgNTgwIDg2MHYyNDBIMzQwWiIgZmlsbD0idXJsKCNtaXN0KSIvPjxwYXRoIGQ9Ik0tMjAgNDgwcTc1IDIwIDEwNC04ME0yNCA0NzFxLTQtNDggMjctNzZNNTIgNDUybDcxLTEzIiBzdHJva2U9IiM4NThmN2EiIHN0cm9rZS13aWR0aD0iNCIgb3BhY2l0eT0iLjA5Ii8+PGcgZmlsbD0iIzg1OTQ3YiIgb3BhY2l0eT0iLjA4Ij48ZWxsaXBzZSBjeD0iNjYiIGN5PSI0MDIiIHJ4PSIzNSIgcnk9IjE1Ii8+PGVsbGlwc2UgY3g9IjIyIiBjeT0iNDMwIiByeD0iMzgiIHJ5PSIxNiIvPjxlbGxpcHNlIGN4PSIxMTMiIGN5PSI0MzgiIHJ4PSIzNSIgcnk9IjEzIi8+PC9nPjxwYXRoIGZpbGw9IiM4ZTg4N2IiIGZpbHRlcj0idXJsKCNwYXBlcikiIGQ9Ik0wIDBoNTgwdjExMDBIMHoiLz48L3N2Zz4K");background-size:100% 100%,100% auto;background-repeat:no-repeat;box-shadow:0 0 60px #5a4a3212;color:#242629}
.heading h1{font-family:Georgia,'Times New Roman',serif;font-size:34px;letter-spacing:-1px;font-weight:500;line-height:1.15;color:#202124}
.view-day .heading h1{font-family:Georgia,'Times New Roman',serif;font-size:25px;font-weight:500;letter-spacing:-.6px}
.heading .date{background:#e8e2d66b;color:#79766f;border-radius:5px;font-size:11px}
.summary,.stat-card,.memory-panel,.companion,.small-card{background:#fffdfae8;border:1px solid #ffffffa6;border-radius:20px;box-shadow:0 5px 18px #64503d09}
.nutrition-widget.collapsed .widget-handle{background:#fffdfae8;border-color:#ffffffa6;color:#676c65;box-shadow:0 3px 10px #64503d08}
.nutrition-widget:not(.collapsed) .summary{padding:12px 14px}
.nutrition-widget:not(.collapsed) .calories{color:#24292e;font-weight:700}
.nutrition-widget .calories small{color:#62656a}
.nutrition-widget progress{height:7px;border-radius:8px}
progress::-webkit-progress-bar{background:#ecebe7}progress::-webkit-progress-value{background:linear-gradient(90deg,#76b48c,#52a071);border-radius:8px}progress::-moz-progress-bar{background:#62a87d}
.nutrition-widget .macros>div{border-radius:2px;border-bottom-width:4px;padding-bottom:5px}
.nutrition-widget .macros>div:nth-child(1){border-color:#75aeda}.nutrition-widget .macros>div:nth-child(2){border-color:#edbd55}.nutrition-widget .macros>div:nth-child(3){border-color:#e8788d}
.nutrition-widget .macros span,.nutrition-widget .macros strong{color:#44494e}
.nutrition-widget .calorie-bottom{color:#818188}.burn-strip{border-color:#ece7df;color:#927850}
.chat-scroll .message{background:#fffdfae8;border:1px solid #fffaf3;border-radius:18px;box-shadow:0 4px 16px #65524208;color:#34373d;line-height:1.6}
.chat-scroll .message.user{background:#e5ece1e8;border-color:#e5ece1;color:#3c5142;border-radius:18px 18px 5px 18px}
.speaker{color:#5b8568;letter-spacing:.3px}.chat-scroll{scrollbar-color:#c3c6bd transparent}
.answer-hints button{background:#fffdfaab;border-color:#e4ded5;color:#6d776c}
.view-day #chat{background:#fffdfaf2;border-color:#fffaf5;border-radius:24px;box-shadow:0 4px 20px #65513b0d}
.view-day textarea{color:#34373d}.view-day textarea::placeholder{color:#969499}
.view-day .composer-bottom .quiet{background:#eeece8;color:#83858d}
.chat-mic,.view-day .send,.bottom-nav .voice{background:linear-gradient(135deg,#79b98e,#338657);color:#fff}
.view-day .local-note{color:#88857f}
.shell .bottom-nav{background:#faf8f3ed;border-top-color:#e5ded5;box-shadow:none}
.bottom-nav button{color:#818691}.bottom-nav [aria-current]{color:#286d4d}
.bottom-nav .voice{border-color:#faf8f3;box-shadow:0 3px 9px #357c4920}
.bottom-nav .voice:hover{background:#428d61}
.stat-card h2,.memory-panel h2{color:#282c30;font-size:17px;font-weight:600}
.stat-card .weight{color:#242b31}.stat-card p,.fine{color:#818087}
.bar{background:#85b493}.bar.current{background:#286e4b}.bar-track{background:repeating-linear-gradient(to top,#dddcd655 0,#dddcd655 1px,transparent 1px,transparent 40px);border-color:#dedbd5}
.chart-column{color:#555b60}.chart-column small{color:#85858b}
.week-dots .filled{background:#59a476}.week-dots span{background:#dfdedb}
.food-row,.chat-food-card{background:#fffdfae0;border-color:#f0e9df;box-shadow:0 3px 12px #65524206}
.chat-food-card{border-radius:13px;padding:12px;margin-top:10px}.chat-food-card strong{color:#438158}
.companion h2{font-family:Georgia,'Times New Roman',serif;font-weight:500;font-size:29px;color:#292d30}
.profile-facts{background:#edeedf}.memory-item,.activity-profile{border-color:#e9e4da}
.primary-button,.chips .primary-button{background:#40835b}.pill{background:#eeebe4;color:#7b7c74}
@media(max-width:360px){.heading h1{font-size:30px}.view-day .heading h1{font-size:24px}}/* Companion replies and explicit food record cards. */
.chat-scroll .message.assistant{position:relative;margin-left:46px;max-width:calc(100% - 46px);overflow:visible}
.assistant-avatar{position:absolute;left:-46px;top:4px;width:36px;height:36px;border-radius:50%;overflow:hidden;background:#f3e9d9;box-shadow:0 1px 4px #6a543b18}
.assistant-avatar img{position:absolute;width:82px;max-width:none;height:82px;left:-23px;top:-3px}
.chat-scroll .chat-food-card{display:block;background:#fffdfa;border:1px solid #ece4d8;border-top:3px solid #528363;border-radius:10px;padding:15px;margin-top:14px;box-shadow:none}
.chat-food-card .food-saved{color:#63806a;font-size:10px;letter-spacing:0;line-height:1.5}
.chat-food-card h3{font-size:17px;line-height:1.35;margin:12px 0 16px;color:#292e30}
.chat-food-card img{float:right;width:60px;height:60px;object-fit:cover;border-radius:10px;margin:10px 0 8px 10px}
.food-energy{font-size:28px;font-weight:700;letter-spacing:-.7px;line-height:1.2;color:#303536;font-variant-numeric:tabular-nums}
.food-energy small{font-size:12px;font-weight:400;letter-spacing:0}
.chat-food-card .food-range,.draft .food-range{font-size:11px;color:#857d72;margin:7px 0}
.chat-food-card .food-macros{font-size:12px;color:#70766e;margin:10px 0}
.chat-food-card .text-button{min-height:38px;padding:6px 12px;border:1px solid #e3e3d7;border-radius:9px;margin-top:6px;font-size:12px}
.chat-scroll .draft{background:#fffdfa;border:1px solid #ece4d8;border-top:3px solid #a45f43;border-radius:10px;padding:18px;box-shadow:0 4px 14px #69533c07}
.draft .section-label{color:#927257;font-size:11px;letter-spacing:0}.draft h3{font-size:19px;line-height:1.4;margin:12px 0 20px}.draft .fine{font-size:12px;line-height:1.6}.draft .chips{margin-bottom:0}.draft .chips button{border-radius:10px;min-height:40px}
/* Single-row composer matching the compact reference. */
.view-day #chat{display:grid;grid-template-columns:38px minmax(0,1fr) 38px 38px;align-items:center;gap:2px;padding:7px 9px;min-height:56px;border:1px solid #e6dacc;border-radius:29px;background:#fffdfa;box-shadow:none}
.view-day #chat .composer-bottom,.view-day #chat .composer-bottom>div{display:contents}
.view-day #chat textarea{grid-column:2;grid-row:1;width:100%;min-width:0;min-height:32px;height:32px;margin:0;padding:5px 3px;line-height:22px;font-size:15px;color:#443c36;background:transparent;border:0;resize:none}
.view-day #chat textarea::placeholder{color:#85776b;opacity:1}
.view-day #chat [data-action="photo"]{grid-column:1;grid-row:1}
.view-day #chat [data-action="manual"]{display:none}
.view-day #chat .chat-mic{grid-column:3;grid-row:1}
.view-day #chat .send{grid-column:4;grid-row:1;font-size:25px;font-weight:400;line-height:1}
.view-day #chat .quiet,.view-day #chat .chat-mic,.view-day #chat .send{width:38px;height:40px;min-width:38px;min-height:40px;padding:8px;display:grid;place-items:center;background:transparent;color:#51453c;border:0;border-radius:20px;box-shadow:none}
.view-day #chat [data-action="manual"]{display:none}
.view-day #chat .quiet svg,.view-day #chat .chat-mic svg{width:20px;height:20px;stroke-width:1.55}
.view-day #chat button:hover{background:#f2ece4}
.view-day #chat .chat-mic.listening{background:#e0eddf;color:#33754e}
.view-day #chat #photo-preview{grid-column:1/-1;grid-row:2}
.view-day #chat #photo-preview:empty{display:none}
.view-day #chat #voice-status{grid-column:1/-1;grid-row:3}
.view-day #chat:focus-within{border-color:#aa9580}
.view-day #chat textarea{max-height:142px;overflow-y:hidden}
.view-day #chat .quiet,.view-day #chat .chat-mic,.view-day #chat .send{align-self:end}
.view-day #chat .send svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;display:block}
.message-day{position:relative;padding-bottom:12px;display:flow-root}
.chat-date{position:sticky;top:4px;z-index:2;display:flex;justify-content:center;margin:8px 0 12px;pointer-events:none}
.chat-date span{padding:5px 12px;border-radius:18px;background:#e4dfd6ed;color:#716b63;font-size:11px;line-height:16px;box-shadow:0 1px 4px #5746320a;backdrop-filter:blur(8px)}
.message-time{display:block;text-align:right;margin-top:5px;font-size:10px;line-height:14px;color:#969087;font-variant-numeric:tabular-nums}
.message.user .message-time{color:#7f8b7c}
/* Dates separate days; the latest-message control stays within the history area. */
.chat-date{position:static;backdrop-filter:none}
.chat-history{position:relative;display:flex;flex:1;min-height:0;flex-direction:column}
.jump-latest{position:absolute;right:6px;bottom:12px;width:42px;height:42px;min-height:42px;display:grid;place-items:center;padding:10px;z-index:3;border-radius:50%;background:#fffdfaf5;border:1px solid #ded8cd;color:#665f54;box-shadow:0 3px 12px #57463220}
.jump-latest svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.jump-latest:hover{background:#eee8de}
/* Time shares the last text line instead of reserving a separate footer. */
.chat-scroll .message .message-copy{display:flow-root;margin:3px 0 0;overflow-wrap:anywhere;white-space:pre-wrap}
.message-copy .message-time{display:block;float:right;margin:0 0 0 10px;line-height:22.4px;font-size:10px;white-space:nowrap;position:relative;top:2px}
.chat-scroll .message{padding-top:10px;padding-bottom:10px}
.chat-scroll .message.user{width:fit-content;min-width:72px}
.heading .date,.chat-date button{display:inline-flex;align-items:center;justify-content:center;gap:6px}
.heading .date svg,.chat-date svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:none}
.chat-date{pointer-events:auto}
.chat-date button{min-height:30px;padding:5px 12px;border-radius:18px;background:#e4dfd6ed;color:#716b63;font-size:11px;line-height:16px}
.message-calendar{width:min(320px,100%)}.calendar-title,.calendar-month{display:flex;align-items:center;justify-content:space-between;gap:8px}.calendar-title h2{font-size:18px;margin:0}.calendar-title button{font-size:26px}.calendar-month{margin:12px 0}.calendar-month strong{font-size:14px;text-transform:capitalize}.calendar-month button{font-size:26px;width:40px}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;text-align:center}.calendar-grid>span{font-size:11px;color:#8c8478;padding:5px 0}.calendar-grid button{position:relative;height:38px;min-height:38px;padding:4px;border-radius:10px;font-size:13px}.calendar-grid button:not(:disabled){background:#e7eee2;color:#385e42;font-weight:600}.calendar-grid button:disabled{color:#b0a99f;opacity:1;cursor:default}.calendar-grid button[aria-current]{outline:1px solid #779171}.calendar-grid i{position:absolute;bottom:3px;left:calc(50% - 2px);width:4px;height:4px;border-radius:50%;background:#508159}.calendar-undated{font-size:12px;color:#66735c;text-decoration:underline}.message-calendar .fine{font-size:12px;line-height:1.5}
/* Expanded daily nutrition summary on the statistics screen. */
.stats-daily{margin:0 0 16px}
.stats-daily .summary{padding:20px;border-radius:20px}
.stats-daily .calorie-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;font-size:15px;color:#343a37}
.stats-daily .calorie-top .pill{font-size:10px;letter-spacing:0}
.stats-daily .calories{font-size:38px;line-height:1.15;letter-spacing:-1px;font-weight:700;color:#282e31;margin:0 0 13px;font-variant-numeric:tabular-nums}
.stats-daily .calories small{font-size:18px;font-weight:400;letter-spacing:0;color:#73766f}
.stats-daily .calories small span{font-size:13px}
.stats-daily progress{height:10px;border-radius:10px;display:block;width:100%}
.stats-daily .calorie-bottom{display:flex;flex-wrap:wrap;justify-content:space-between;gap:5px;margin-top:9px;font-size:11px;line-height:1.5;color:#7e8078}
.stats-daily .macros{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:20px}
.stats-daily .macros>div,.stats-daily .macros>div:first-child{display:flex;flex-direction:column;gap:6px;padding:0 0 8px;border-bottom-width:4px;border-radius:2px}
.stats-daily .macros span{font-size:12px;color:#777d73}
.stats-daily .macros strong{font-size:22px;line-height:1.25;color:#384139;margin:0}
.stats-daily .macros small{font-size:12px;font-weight:400}
.stats-daily .burn-strip{font-size:12px;margin-top:17px;padding-top:12px;border-top:1px solid #e7e4db;display:flex;justify-content:space-between;gap:10px}
@media(max-width:360px){.stats-daily .summary{padding:16px}.stats-daily .calories{font-size:34px}.stats-daily .macros{gap:10px}.stats-daily .macros strong{font-size:20px}}
/* Reference layout: two full-width cards, a paired row and companion. */
.stats-overview{display:grid;gap:12px;margin-bottom:18px}
.stats-overview .stat-card{margin:0;padding:16px;border-radius:18px}
.stats-overview h2{font-size:15px;line-height:20px;margin:0 0 8px}
.stats-overview .week-chart{height:132px;margin:12px 0 8px;gap:9px}
.stats-overview .bar-track{height:94px}
.stats-overview .fine{font-size:10px;line-height:1.45;margin:8px 0 0}
.stats-overview .weight{font-size:32px;margin:8px 0}
.stats-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px;min-width:0}
.stats-pair .stat-card{min-width:0;padding:14px 12px}
.stats-pair h2{font-size:13px;letter-spacing:-.2px}
.stats-pair .weight{font-size:28px;white-space:nowrap}
.stats-pair .weight span{font-size:12px}
.stats-pair .week-dots{gap:5px;margin:12px 0}
.stats-pair .week-dots span{width:12px;height:12px;flex:1;max-width:17px;aspect-ratio:1}
.macro-visual{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.macro-ring{width:70px;height:70px;border-radius:50%;padding:9px;flex:none}
.macro-ring>div{height:100%;border-radius:50%;background:#fffdfa;display:flex;flex-direction:column;justify-content:center;align-items:center}
.macro-ring strong{font-size:15px}.macro-ring small{font-size:9px;color:#777}
.macro-legend{display:flex;flex-direction:column;gap:6px;font-size:10px;color:#70746c}
.macro-legend span{white-space:nowrap}.macro-legend i{display:inline-block;width:6px;height:6px;border-radius:50%;margin-right:4px}
.legend-0{background:#75aeda}.legend-1{background:#edbd55}.legend-2{background:#e8788d}
.stats-overview .stats-companion{display:flex;align-items:center;gap:12px;text-align:left;width:100%;padding:12px}
.stats-avatar{width:62px;height:68px;overflow:hidden;border-radius:14px;position:relative;flex:none;background:#eee7db}
.stats-avatar img{position:absolute;width:120px;max-width:none;left:-29px;top:-4px}
.stats-companion>span:nth-child(2){display:flex;flex-direction:column;gap:5px;flex:1}
.stats-companion strong{font-size:15px;color:#353b36}.stats-companion span span{font-size:11px;color:#818078}.stats-companion small{font-size:10px;color:#588064}.stats-companion>span:last-child{font-size:25px;color:#8b8c82}
/* Closer reference proportions and visual details. */
.view-stats .heading{padding-top:18px;padding-bottom:14px}
.stats-overview{gap:10px}
.stats-overview .stat-card{background:#fffdf9e6;box-shadow:0 5px 18px #57432d09;border:1px solid #fffdf5;border-radius:18px;padding:15px}
.stat-title{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.stats-overview h2{display:flex;align-items:center;gap:7px;font-size:15px;font-weight:600;color:#262b30;letter-spacing:-.3px}
.stats-icon{width:19px;height:19px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.stat-goal{font-size:10px;color:#85848a;line-height:1.4;text-align:left;white-space:nowrap}.stat-goal strong{display:block;color:#41464c;font-size:11px;font-weight:400}
.stats-overview .week-chart{height:118px;margin-top:8px;margin-bottom:0}.stats-overview .bar-track{height:80px}.stats-overview .weekly-card .fine{font-size:9px;margin-top:5px}
.stats-overview .weight-card .weight{font-size:35px;line-height:1.1;margin:8px 0 10px;color:#222a31}
.weight-track{height:9px;border-radius:8px;background:#e8e5df}
.weight-caption{display:flex;justify-content:space-between;gap:8px;font-size:9px;color:#85848a;margin-top:6px}
.weight-empty{height:67px;margin-top:14px;background:repeating-linear-gradient(to bottom,#dadbd655 0,#dadbd655 1px,transparent 1px,transparent 22px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;color:#85877f;font-size:11px}.weight-empty small{font-size:9px}
.stats-pair{grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr);gap:10px}
.stats-pair .stat-card{padding:12px 10px}.stats-pair h2{font-size:11px;gap:4px;white-space:nowrap}.stats-pair .stats-icon{width:16px;height:16px}.rhythm-card .stats-icon{color:#e48641}
.stats-pair .weight{font-size:28px;margin:9px 0}.stats-pair .weight span{font-size:11px}.stats-pair .week-dots{gap:4px;margin:10px 0}.stats-pair .week-dots span{height:12px}.stats-pair .fine{font-size:9px}
.macro-visual{flex-wrap:nowrap;gap:7px;margin-top:10px}.macro-ring{width:65px;height:65px;padding:9px}.macro-ring strong{font-size:14px}.macro-legend{font-size:9px;gap:6px}.macro-legend span{white-space:normal;line-height:1.3}.macro-legend small{font-size:8px;color:#96938c}.macro-legend i{width:5px;height:5px;margin-right:3px}
.stats-overview .stats-companion{padding:10px;gap:10px}.stats-companion strong{font-size:14px}.stats-companion span span{font-size:10px;line-height:1.45}.stats-avatar{width:65px;height:72px}
@media(max-width:350px){.stats-pair{grid-template-columns:1fr 1fr}.stats-pair h2{white-space:normal}.macro-visual{flex-wrap:wrap}.macro-legend{font-size:10px}}
/* Shared compact headers and a settings sheet in the app palette. */
.shell .heading,.view-stats .heading{min-height:52px;padding:10px 2px 8px;margin:0;gap:8px}
.shell .heading h1,.view-day .heading h1{font-family:Georgia,'Times New Roman',serif;font-size:25px;font-weight:500;line-height:28px;letter-spacing:-.6px}
.header-actions{display:flex;align-items:center;gap:5px;flex:none}
.header-actions .date{font-size:10px;padding:5px 7px;min-height:32px}
.settings-trigger{display:grid;place-items:center;width:36px;min-height:36px;padding:8px;color:#777970;border-radius:50%}
.settings-trigger svg,.settings-panel svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round}
.settings-trigger:hover{background:#e8e3d9}
.companion h2{font-family:Arial,Helvetica,sans-serif;font-size:22px;font-weight:600;letter-spacing:-.3px}
.settings-modal{width:min(430px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:22px!important;border-radius:24px!important;background:#f7f4ee!important;color:#343b35}
.settings-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.settings-head h1{font-family:Georgia,'Times New Roman',serif;font-size:25px;line-height:28px;font-weight:500;margin:0}.settings-head button{font-size:27px;color:#74766d;width:36px}
.settings-caption{font-size:12px;color:#8a857b;margin:5px 0 20px}
.settings-list{background:#fffdf9;border:1px solid #eee8de;border-radius:18px;overflow:hidden}
.settings-list>button,.settings-list>label{display:flex;align-items:center;gap:13px;padding:17px 14px;width:100%;text-align:left;margin:0;border-bottom:1px solid #eee9df;color:#48544a;min-height:70px}
.settings-list>:last-child{border-bottom:0}.settings-list>button:hover{background:#f0f2e9}.settings-list svg{flex:none}.settings-list span{flex:1;font-size:15px;line-height:1.4}.settings-list small{display:block;color:#929086;font-size:11px;margin-top:4px}.settings-list b{font-weight:400;color:#a2a096;font-size:21px}
.settings-list input{width:34px;height:20px;accent-color:#4d8962;flex:none}
.settings-about{display:flex;align-items:flex-start;gap:12px;margin:23px 3px 0;color:#818278}.settings-about svg{flex:none}.settings-about strong{font-size:13px;font-weight:500}.settings-about p{font-size:11px;line-height:1.6;margin:5px 0}
@media(max-width:360px){.header-actions .date{padding:4px;font-size:9px}.header-actions{gap:0}.shell .heading h1{font-size:23px}.settings-modal{padding:16px!important}}
.settings-list input[role="switch"]{appearance:none;width:36px;height:22px;min-width:36px;border:0;border-radius:14px;background:#d9d9d0;padding:0;position:relative;cursor:pointer}
.settings-list input[role="switch"]::after{content:'';position:absolute;width:16px;height:16px;left:3px;top:3px;border-radius:50%;background:white;box-shadow:0 1px 3px #0002;transition:transform .15s}
.settings-list input[role="switch"]:checked{background:#568b68}.settings-list input[role="switch"]:checked::after{transform:translateX(14px)}
@media(prefers-reduced-motion:reduce){.settings-list input[role="switch"]::after{transition:none}}
.runner-card{display:grid;grid-template-columns:76px 1fr;gap:16px;padding:20px;background:#fdf8ee;border:1px solid #e4dccd;border-radius:20px;margin-bottom:16px}
.runner-card-art{background:linear-gradient(#9bcac1 55%,#71917b 55%,#71917b 72%,#b39462 72%);display:grid;place-items:center;border-radius:12px;image-rendering:pixelated;min-height:110px}.runner-card-art span{color:#fff3cf;background:#334c50;padding:8px;font:26px Georgia;box-shadow:4px 4px 0 #d6ad6a}
.runner-tag{font-size:9px;letter-spacing:1.5px;color:#8a7b60}.runner-card h2{font-size:19px;margin:6px 0}.runner-card p{font-size:12px;color:#868276;line-height:1.5;margin:7px 0 12px}.runner-card button{font-size:13px;padding:9px 18px}
.runner-modal{width:min(640px,calc(100vw - 20px));padding:20px!important;border-radius:22px!important;max-height:calc(100dvh - 20px);background:#f8f1e3!important}
.runner-header{display:flex;align-items:center;justify-content:space-between;height:auto;border:0;margin-bottom:15px}.runner-header h2{font-size:21px;margin:5px 0}.runner-close{font-size:27px;width:40px;color:#6a6c5f}
.runner-scores,.runner-coins{display:flex;justify-content:space-between;gap:10px;font-size:12px;color:#7d786b;margin:8px 0}.runner-scores strong{font-size:20px;color:#334b45;margin-left:5px}.runner-coins strong{color:#aa7738}.runner-form{font-size:11px;color:#617866;margin:14px 0 8px}
.runner-panel canvas{width:100%;height:auto;display:block;image-rendering:pixelated;border:3px solid #3c5555;border-radius:4px;touch-action:none;cursor:pointer}
.runner-status{font-size:13px;line-height:1.5;min-height:40px;color:#576450;margin:12px 0}.runner-controls{display:flex;gap:10px}.runner-controls button{flex:1;border-radius:12px;padding:10px;font-size:14px;touch-action:manipulation}.runner-controls button+button{border:1px solid #d7ceba;color:#6d7465}
.runner-help,.runner-storage{font-size:11px;line-height:1.6;color:#8c8574;margin:14px 0 0}.runner-storage{color:#aa6044}
@media(max-height:500px){.runner-modal{max-width:500px;padding:10px!important}.runner-header{margin-bottom:3px}.runner-help{display:none}.runner-panel canvas{max-height:45dvh;width:auto;max-width:100%;margin:auto}.runner-status{min-height:0;margin:4px}.runner-form{margin:4px}}
.runner-panel .runner-status{min-height:22px;margin:10px 0;font-size:12px}.runner-panel .runner-controls{margin-top:8px}.runner-modal{padding:18px!important}.runner-header{margin-bottom:10px}.runner-coins{justify-content:flex-start;gap:5px}.runner-coins>span{margin-left:auto}
/* Profile dashboard adapted from the supplied mobile recording. */
.view-memory .layout>aside{display:none}
.profile-dashboard{display:flex;flex-direction:column;gap:12px;padding-bottom:20px}
.profile-identity,.profile-streak,.profile-metrics>section,.profile-progress,.profile-goals,.profile-activity-card,.profile-memory{border:1px solid #e8e2d7;background:#fffdf9e8;border-radius:18px;box-shadow:0 4px 15px #66523806}
.profile-identity{display:flex;align-items:center;gap:13px;padding:18px;margin-top:6px}.profile-initial{width:52px;height:52px;border-radius:50%;display:grid;place-items:center;background:#dce9d2;color:#527144;font-size:24px;flex:none}.profile-identity>div{flex:1;min-width:0}.profile-identity h2{font-size:18px;margin:0 0 5px;overflow-wrap:anywhere}.profile-identity p{font-size:12px;margin:0 0 4px;color:#658064}.profile-identity small{font-size:11px;color:#969081}.profile-identity button{font-size:24px;color:#839078}
.profile-section-title{display:flex;justify-content:space-between;align-items:center;margin-top:6px;gap:8px}.profile-section-title h2{font-size:16px;font-weight:600;margin:0}.profile-section-title button{font-size:11px;color:#54815e;padding:0;min-height:28px}
.profile-streak{text-align:center;padding:17px;background:linear-gradient(145deg,#f8f4e8,#eff2e4)}.streak-emblem{width:36px;height:36px;background:#e8dec3;border-radius:50%;margin:0 auto 8px;display:grid;place-items:center;color:#ba8546}.streak-emblem svg{width:23px;height:23px}.profile-streak>strong{font-size:18px}.profile-streak p{font-size:12px;line-height:1.5;color:#858475;margin:7px 0 14px}.profile-streak button{font-size:13px;border-radius:12px;padding:10px 19px}
.profile-metrics{display:grid;grid-template-columns:1fr 1fr;gap:12px}.profile-metrics>section{padding:15px;display:flex;flex-direction:column;gap:5px}.profile-metrics strong{font-size:22px;color:#34463a}.profile-metrics span{font-size:11px;color:#85887d;line-height:1.5}
.profile-progress{text-align:center;padding:18px}.profile-progress>span{font-size:12px;color:#8d887e}.profile-progress>strong{display:block;font-size:29px;margin:5px 0 13px}.profile-progress strong small{font-size:15px;font-weight:400}.profile-weight-line{height:7px;border-radius:9px;background:#e8e6dd}.profile-progress p{font-size:12px;margin:10px 0}.profile-progress>small{font-size:10px;color:#9a9488}
.profile-goals>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 16px;border-bottom:1px solid #eee8df;font-size:13px}.profile-goals>div:last-child{border:0}.profile-goals span{color:#818579}.profile-goals strong{font-weight:500;color:#435b44}
.profile-activity-card{padding:18px}.profile-activity-card h2{font-size:16px;margin:0 0 8px}.profile-activity-card p{font-size:12px;line-height:1.6;color:#878678}.profile-activity-card .text-button{font-size:12px}.profile-activity-card .activity-profile{border:0;margin:0;padding:0}
.profile-memory>summary{padding:17px;font-size:13px;color:#536b50;cursor:pointer}.profile-memory>summary span{color:#989582;margin-left:7px}.profile-memory .memory-panel{border:0;box-shadow:none;padding:16px;background:transparent}.profile-memory .memory-panel h2{font-size:16px}.profile-memory .memory-panel>p{font-size:12px;line-height:1.6}.profile-memory .profile-facts{font-size:12px}

/* A quiet afterword, separate from the practical reply. */
.message.assistant .samurai-quote{display:flex;align-items:flex-start;gap:7px;margin:8px 0 2px;padding:0;max-width:100%;color:#777168;font-size:13px;line-height:1.45}
.samurai-quote em{font-style:italic;overflow-wrap:anywhere}
.samurai-quote>span{flex-shrink:0;font-size:15px}

.meal-question{margin:14px 0;padding-top:12px;border-top:1px solid #e7e2d9}.meal-question strong{display:block;font-size:15px;font-weight:600;margin-bottom:10px}.meal-question .chips{gap:8px}.meal-question button{min-height:42px;white-space:normal}.meal-clarification button:disabled{opacity:.5;cursor:wait}
