/* 糯米窝 · 共享 theme —— 四间房共用这一份。改一处，全屋变。
   字体自托管在 public/，与 main.py 无关，现成的 /public 挂载就发出去。
   2026 起这份文件即 design-system，色彩语言升级整合在这里，部署时文件名仍叫 theme.css。 */

@font-face{font-family:"Voice Serif";src:url('/public/cormorant.woff2') format('woff2');font-weight:600;font-display:swap;}
@font-face{font-family:'ChatCustomFont';src:url('/public/chatfont.ttf?v=2') format('truetype');font-display:swap;}
@font-face{font-family:"Newsreader";src:url('/public/newsreader.ttf') format('truetype-variations');font-weight:200 800;font-style:normal;font-display:swap;}
@font-face{font-family:"Newsreader";src:url('/public/newsreader-italic.ttf') format('truetype-variations');font-weight:200 800;font-style:italic;font-display:swap;}

*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent;}

/* 点击不闪灰方块／蓝轮廓／长按菜单。只罩控件、图标、图片；正文气泡仍可选中、可复制 */
button,.header-btn,.send-btn,.plus-btn,.pin-btn,.pin-entry,.sidebar-new,.conv-item,.conv-edit,
.pin-item-unpin,.pin-panel-x,.msg-image,.msg-avatar,summary,.ip-x,.nav-item,.nav-item *{
  -webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;
  user-select:none;-webkit-user-select:none;outline:none;}
.msg-avatar,.msg-image,.nav-item svg{-webkit-user-drag:none;}
button:focus,summary:focus{outline:none;}
:focus-visible{outline:2px solid rgba(210,114,76,.5);outline-offset:2px;}

:root{
--paper:#F8F6F1;--surface:#FFFCF6;--surface-me:var(--color-oat);--surface-2:#F6EFE2;--letter:#F7EFDF;
--ink:#2B2826;--text:#2B2826;--text2:#7A756F;--text3:#A89B8C;
--hearth:#B56247;--accent:#B56247;--hearth-bg:rgba(181,98,71,.12);
--line:rgba(60,48,32,.08);--line-soft:rgba(60,48,32,.05);
--shadow:0 1px 2px rgba(60,48,32,.05),0 10px 26px rgba(60,48,32,.055);
--bar:rgba(241,235,224,.86);
--en:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
--cn:'Newsreader','ChatCustomFont',system-ui,-apple-system,"PingFang SC","Noto Sans SC",sans-serif;
--voice:"Voice Serif",Georgia,serif;
--danger:oklch(0.63 0.22 22);
}

/* ── 色彩设计语言 · 2026 update ──
   --paper / --ink / --text / --text2 / --text3 / --hearth / --accent / --hearth-bg
   已经在上面那段 :root 里直接改成新值了，所有页面不用动就跟着变。
   下面这组新变量先加进来留着，--linen/--oat/--wood/--clay 目前还没有任何页面在用，
   需要的话告诉我接到哪个元素上。 */
:root{
/* 主色阶：Warm Cream → Deep Terracotta */
--color-cream:#F8F6F1; /* 纸 · 主背景，同 --paper */
--color-linen:#F4F0E9; /* 亚麻 · 卡片浮层 */
--color-oat:#E9DED2; /* 燕麦 · 气泡底色 */
--color-wood:#DCC9B7; /* 原木 · 分割线/边框 */
--color-clay:#C97B63; /* 陶土 · 次要强调 */
--color-terracotta:#B56247; /* 赤陶 · 主强调/按钮，同 --hearth/--accent */

/* 文字 */
--color-text-primary:#2B2826; /* 同 --ink/--text */
--color-text-secondary:#7A756F; /* 同 --text2 */
--color-text-muted:#A89B8C; /* 同 --text3 */
}

/* 墙的肌理：素而不平。给需要的元素加 class="wall"（该元素需 position:relative）*/
.wall::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;opacity:.5;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");}
.wall>*{position:relative;z-index:1;}

/* dock —— 共享导航条，index / memory / space 共用，当前房间炉火 */
.nav{display:flex;justify-content:space-around;background:var(--surface);border-top:1px solid var(--line);
  padding:9px 20px calc(9px + env(safe-area-inset-bottom));}
.nav-item{display:flex;flex-direction:column;align-items:center;gap:5px;cursor:pointer;text-decoration:none;
  color:var(--text3);font-family:var(--cn);font-size:10px;letter-spacing:.12em;}
.nav-item svg{width:23px;height:23px;stroke-width:1.6;}
.nav-item.active{color:var(--hearth);}

@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;}}

/* 旧页面别名：archive / settings 沿用 --bg/--accent/--surface2，指到新值，连 theme 即整体暖过来 */
:root{ --bg:var(--paper); --accent:var(--hearth); --surface2:var(--surface-me); }

/* 页面转场淡入 */
body {
  animation: pageFadeIn 0.5s ease;
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
