/* 海岛以外各页共用的底：跟海岛同一片海。海岛页自己有一套，不引这份。
   各页 <style> 里的 --paper 已是海的颜色（#f3efe6，跟海岛页 --sea 同色）；这里只补几块浮在海上的颜色、海的水色和顶上的入口。
   字体、字号、琥珀色（--ink）不在这里动。 */
:root {
  --paper-raised: #f8f5ee;   /* 浮在海上的一片：输入框、胶囊 */
  --panel: #efe9dd;          /* 底部面板、一节一节的浅片：跟海岛底部面板同色 */
  --said: #e8e2d6;           /* 原话里他说的那块底：只比海深一点，几乎没有颜色 */
}
html { background: var(--paper); }
body { background: transparent; }

/* 海不是纯色：两团很淡的水色慢慢漂，跟海岛页同一个做法。只是底，点不到。
   软边是画好的渐变（四周各多出 150px 给它淡出），不用 filter: blur：模糊跟着漂一直重算，iPhone 发烫 */
body::before, body::after {
  content: ""; position: fixed; z-index: -1; pointer-events: none; margin: -150px;
  opacity: .6; background: radial-gradient(closest-side, rgb(var(--c) / .85) 0%, rgb(var(--c) / .8) 18%, rgb(var(--c) / .64) 36%, rgb(var(--c) / .4) 54%, rgb(var(--c) / .16) 72%, rgb(var(--c) / .04) 88%, rgb(var(--c) / 0) 100%); animation: sea-drift 47s linear infinite;
}
body::before { left: -10%; top: 8%; width: calc(70% + 300px); height: calc(46% + 300px); --c: 233 225 209; }
body::after { right: -12%; top: 42%; width: calc(64% + 300px); height: calc(40% + 300px); --c: 229 220 203; animation-duration: 59s; animation-direction: reverse; }
@keyframes sea-drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(24px, -16px); } }
@media (prefers-reduced-motion: reduce) { body::before, body::after { animation: none; } }

/* 顶上去别的页的入口：跟海岛「回到对话」同款的浅色小胶囊。
   各页给这几个链接的留白和淡色被这里盖过（!important），胶囊里是正文颜色。能点的范围仍是 44px 高（ADR-0006「点的目标要装得下一根手指」），上下各 5px 透明边，看上去的胶囊是 34px */
.corner-link, .bar > a, .bar > span > a {
  min-height: 44px; padding: 0 11px !important; border-block: 5px solid transparent; border-radius: 99px;
  background: var(--paper-raised); background-clip: padding-box; color: var(--text) !important;
}
.bar > span { display: inline-flex; gap: 8px; }

/* 只放图标的圆按钮：跟海岛页顶上那几个同一套（浅色圆片、细线圆头）。读屏读 aria-label。
   写成 .bar .icon-btn 是为了盖过上面胶囊那一条 */
.icon-btn, .bar .icon-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; min-height: 44px; padding: 0 !important; margin: 0;
  border: 1px solid #ddd5c6; border-radius: 99px; background: rgba(248, 245, 238, .88); background-clip: border-box;
  box-shadow: 0 2px 10px rgba(60, 54, 48, .10); color: var(--text) !important; font: inherit; cursor: pointer;
  text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn[aria-expanded="true"] { background: var(--panel); }

/* 右上角三道横线收着「设置」「我们的约定」（ADR-0018 第 13 条），点开一张小卡（public/conversation/corner-menu.js）。
   卡外面一层透明的，点它只收起卡 */
.corner-menu { position: relative; z-index: 7; }
#menu-shade { position: fixed; inset: 0; z-index: 6; }
#menu {
  position: absolute; top: 50px; right: 0; min-width: 150px; padding: 6px 0;
  border: 1px solid #ddd5c6; border-radius: 14px; background: var(--paper-raised); box-shadow: 0 8px 24px rgba(60, 54, 48, .14);
}
#menu a, .bar #menu a {
  display: flex; align-items: center; min-height: 46px; padding: 0 18px !important; border: 0; border-radius: 0; background: none;
  font-size: calc(15px * min(var(--text-scale, 1), 1.25)); color: var(--text) !important; text-decoration: none; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
#menu a + a { border-top: 1px solid #ddd5c6; }
