/* ===== 共用外壳 · 宣纸朱砂 =====
 * 色板见 tokens.css。此处只放多站共用之物：
 * 纸纹、暗纹层、页壳、眉首、横规、素钮、版脚、归门厅之链。
 *
 * 只此一条界限：单站用得上的件，一概不许放进来 ——
 * 时辰选单、起卦朱印、提示条曾都在此，八字页与门厅一条也用不上；
 * 其中 .alert 还引着 @keyframes slip，而那道关键帧只在梅花的版式里，
 * 别的页面若真用了 .alert，得的是一个没影的动画。今已各归各家。
 */

*, *::before, *::after{ box-sizing: border-box; }

/* hidden 属性须压得住自家的 display —— 浏览器默认表里的 [hidden]{display:none}
   与作者表同特异度，作者表后写便赢，凡设了 display 的元素挂 hidden 都藏不住。
   （.pin__bar 就这么漏过：设了 display:flex，尽释之后「已钉」条仍杵在原地。） */
[hidden]{ display: none !important; }

html{ -webkit-text-size-adjust: 100%; }

body{
  margin: 0;
  min-height: 100dvh;
  font-family: var(--kai);
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;   /* 楷体字号既已抬起，削瘦一档正得清秀 */
  letter-spacing: var(--ls-text);
  color: var(--ink);
  background: var(--paper);
}

/* 纸纹：固定层，永不随滚动重绘 */
.grain{
  position: fixed; inset: 0; z-index: 40;
  pointer-events: none;
  opacity: .5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
}

/* 八卦暗纹 */
.ring{
  position: fixed;
  right: -7vw; top: 46%;
  width: min(58vh, 40vw); height: min(58vh, 40vw);
  transform: translateY(-50%);
  pointer-events: none;
  opacity: .05;
  color: var(--ink);
}
.ring svg{ width: 100%; height: 100%; animation: turn 240s linear infinite; }
@keyframes turn{ to{ transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce){
  .ring svg{ animation: none; }
  *{ animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

.shell{
  position: relative; z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 3rem 1.5rem;
  min-height: 100dvh;
  display: flex; flex-direction: column;
}

/* ---------- 工具页页头 ---------- */

/* 七站只提供内容；外侧留白、右侧插槽与窄屏换行只由这里决定。 */
.shell--tool{ padding: 2.5rem 3rem 1.5rem; }

.crown{
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--hair);
  box-shadow: 0 3px 0 -2px var(--hair-2);
}
/* 页头下紧接一排页签者，页签自带底线；页头再划一道便成上下两线夹着页签 */
.shell--tabbed .crown{ border-bottom: 0; box-shadow: none; padding-bottom: .3rem; }
.crown__id{ display: flex; align-items: center; gap: 1.25rem; min-width: 0; }
.crown__words{ min-width: 0; }
.crown__extra{ min-width: 0; max-width: 100%; margin-left: auto; }
.crown__hint{ font-size: var(--t-label); color: var(--ink-3); letter-spacing: var(--ls-note); }
.crown__words h1{
  margin: 0;
  font-size: clamp(1.75rem, 1.2rem + 1.5vw, 2.3rem);
  font-weight: 700;
  letter-spacing: var(--ls-seal);
  text-indent: .3em;
  line-height: 1.2;
}
.crown__words p{
  margin: .4rem 0 0;
  line-height: 1.4;
  font-size: var(--t-label); font-weight: 400;
  letter-spacing: var(--ls-label);
  color: var(--ink-3);
}

/* 朱印 */
.seal{
  display: grid; grid-template-columns: 1fr 1fr;
  width: 62px; height: 62px; flex: none;
  background: var(--zhu);
  color: #FDF7E4;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(253, 247, 228, .34);
  animation: seal-breathe 7s var(--ease) infinite;
}
.seal i{
  display: grid; place-items: center;
  font-style: normal; font-weight: 700; font-size: var(--t-lead);
  letter-spacing: 0;
}
/* 择术之印：董其昌墨迹「擇術」字模（shared/icon/README.md）作遮罩，字恒为宣纸色，印底仍随主题强调色 */
.seal--zeshu{ grid-template-columns: 1fr; place-items: center; }
.seal--zeshu::after{
  content: ""; width: 100%; height: 74.7%;  /* 两字各占的大小同先前六成八那版；中间隔擇字高的两成，整块便占印高 74.7% */
  background: currentColor;
  -webkit-mask: url(icon/seal-glyph.png) center / contain no-repeat;
          mask: url(icon/seal-glyph.png) center / contain no-repeat;
}
@keyframes seal-breathe{
  0%,100%{ transform: translateY(0); }
  50%    { transform: translateY(-2px); }
}

.crown__now{
  display: flex; flex-wrap: wrap; gap: 1rem 2.25rem; margin: 0;
  font-size: var(--t-label);
}
.crown__now dt{
  color: var(--ink-3); font-weight: 400;
  letter-spacing: var(--ls-label); font-size: var(--t-micro);
  margin-bottom: .4rem;
}
.crown__now dd{
  margin: 0; letter-spacing: var(--ls-note);
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 768px){
  .shell--tool{ padding: 1.5rem 1.25rem 1.5rem; }
  .crown{ align-items: flex-start; gap: 1.25rem; }
  .crown__extra{ width: 100%; margin-left: 0; }
  .crown__now{ gap: .75rem 1.4rem; }
}

/* ---------- 横规 ---------- */

.rule{ display: flex; align-items: baseline; gap: .9rem; border-bottom: 1px solid var(--hair-2); padding-bottom: .55rem; }
/* flex:none 少不得 —— 一行两件，副题一长便把两字标题挤成一字一行，
   320px 下「生辰」「定字」都竖着摞了起来 */
.rule h2{
  flex: none;
  margin: 0; font-size: var(--t-title); font-weight: 400;
  letter-spacing: var(--ls-title); text-indent: .34em;
}
.rule span{ font-size: var(--t-micro); font-weight: 400; letter-spacing: var(--ls-note); color: var(--ink-3); }

/* ---------- 藏红线标签页 ----------
   一道细墨底线横贯，选中之签的朱线压在底线上、恰好盖住那一截 —— 朱线「藏」进墨线里，
   不另起一道。签下若与底线隔着空，便成上朱下墨两道线，看着是两样东西。
   用法：容器挂 .tabline，签为 [role=tab]（可直接是子，也可再裹一层 [role=tablist]）；
   右侧另有按钮等件，给它 margin-left:auto 即可。下一级的签挂 .tabline--sub，字距收一档。 */

.tabline{
  display: flex; align-items: flex-end; gap: 2.2rem;
  border-bottom: 1px solid var(--hair);
}
.tabline [role="tablist"]{ display: flex; align-items: flex-end; gap: inherit; }
.tabline [role="tab"]{
  position: relative;
  margin-bottom: -1px;            /* 朱线下沉一像素，正落在底线上 */
  padding: .3rem 0 calc(.55rem + 2px);
  font: inherit; font-size: var(--t-title); letter-spacing: var(--ls-title);
  color: var(--ink-3); background: none; cursor: pointer;
  border: 0;
  transition: color .35s var(--ease);
}
/* 朱线自左向右展开，与玄空盘式页签同一手法 —— 用 border 只能整条闪现 */
.tabline [role="tab"]::after{
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--zhu);
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
.tabline [role="tab"]:hover{ color: var(--zhu); }
.tabline [role="tab"][aria-selected="true"]{ color: var(--zhu); }
.tabline [role="tab"][aria-selected="true"]::after{ transform: scaleX(1); }
.tabline [role="tab"]:focus-visible{ outline: 2px solid var(--zhu); outline-offset: 4px; }
.tabline--sub{ gap: 1.6rem; }
.tabline--sub [role="tab"]{ letter-spacing: var(--ls-label); }
@media (max-width: 600px){
  .tabline{ gap: 1.4rem; }
  .tabline [role="tab"]{ font-size: var(--t-body); letter-spacing: var(--ls-label); }
}

/* ---------- 素钮 ----------
   八字「回到此刻」「尽释」、干支历法「回到今日」—— 两站都用，故在此。 */

.ghost{
  padding: .55rem 1rem;
  font-family: inherit; font-size: var(--t-label); letter-spacing: var(--ls-note);
  color: var(--ink-2); background: var(--paper);
  border: 1px solid var(--hair); border-radius: 2px; cursor: pointer;
  transition: color .35s var(--ease), border-color .35s var(--ease);
}
.ghost:hover{ color: var(--zhu); border-color: var(--zhu-edge); }
.ghost:focus-visible{ outline: 2px solid var(--zhu); outline-offset: 2px; border-color: transparent; transition-duration: 0s; }

/* 朱印兼作回到门厅的入口，整页跳转保持各站隔离。 */
.seal--home{ text-decoration: none; animation: none; }
/* 长按选色：iPhone 长按链接默认弹预览、选中文字，压掉才轮得到 theme.js 的长按 */
.seal{ -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.seal--home:hover{ box-shadow: inset 0 0 0 1px rgba(253,247,228,.6); }
.seal--home:focus-visible{ outline: 2px solid var(--zhu); outline-offset: 4px; }
.seal--home{ transition: transform .15s var(--ease), filter .15s; }
.seal--home:active{ transform: translateY(1px) scale(.97); filter: brightness(.92); }
/* 印左一道返回箭头：印能点却看不出能点，长辈尤其猜不到；单占一行又挤首屏（八字盘曾因此收紧），
   故横在印旁、不加行高。与印同去门厅，读屏与 Tab 键只认印那一处，箭头不重复报。 */
.crown__back{
  display: grid; place-items: center; align-self: stretch; flex: none;
  margin: 0 -.2rem 0 -.6rem; padding: 0 1rem 0 .6rem;
  color: var(--ink-3); border-right: 1px solid var(--hair);
  -webkit-tap-highlight-color: transparent;
  transition: color .15s, transform .15s var(--ease);
}
.crown__back svg{ width: 14px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.crown__back:hover{ color: var(--zhu); }
.crown__back:active{ transform: translateX(-2px); color: var(--zhu); }
/* 账号上选了「只点印」（早先的样子）：theme.js 在页头就挂上 data-back，箭头不出 */
:root[data-back="seal"] .crown__back{ display: none; }
/* 窄了的电脑窗口：副题只余十几像素，箭头多伸进左侧留白，不把「定字寻时」挤成两行。
   须写在上面诸条之后：同特异度，写在前头的窄屏规则会被基础样式盖掉 */
@media (max-width: 768px) and (pointer: fine){
  :root:not([data-back="seal"]) .crown__id{ gap: .7rem; }
  .crown__back{ margin-left: -.8rem; padding: 0 .35rem 0 .5rem; }
  .crown__back svg{ width: 11px; height: 20px; }
}
/* 手机一律只点印，同改版前：页头本就窄，拇指点印也够得着；箭头只给电脑网页与桌面端。
   媒体条件与 back-style.js 的 PHONE_MEDIA 同一串，bin/test 查 */
@media (max-width: 768px) and (pointer: coarse){
  .crown__back{ display: none; }
}

/* 选色菜单沿用纸墨，只有色样与当前标记承载强调色。 */
button.seal{ padding: 0; border: 0; font-family: inherit; cursor: pointer; }
button.seal:focus-visible{ outline: 2px solid var(--zhu); outline-offset: 4px; }
.theme-menu{
  position: fixed; z-index: 1000; width: 12rem; max-width: calc(100vw - 16px);
  padding: .4rem; background: var(--paper); border-radius: 4px;
  box-shadow: 0 8px 28px rgba(38,32,25,.24);
}
.theme-menu__item{
  display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 2.6rem;
  padding: .5rem .65rem; border: 0; border-radius: 2px;
  font: inherit; font-size: var(--t-body); text-align: left;
  color: var(--ink); background: transparent; cursor: pointer;
}
.theme-menu__item:hover, .theme-menu__item:focus-visible{ background: var(--zhu-wash); }
.theme-menu__item:focus-visible{ outline: 1px solid var(--zhu); outline-offset: -1px; }
.theme-menu__swatch{ width: .85rem; height: .85rem; border-radius: 2px; flex: none; }
.theme-menu__mark{ margin-left: auto; font-size: var(--t-micro); color: var(--zhu); visibility: hidden; }
.theme-menu__item[aria-checked="true"] .theme-menu__mark{ visibility: visible; }

/* 独立的右上角偏好入口，仅显示当前语言。 */
.language-picker{
  position: fixed; top: max(.25rem, env(safe-area-inset-top));
  /* 压在纸纹 .grain（z 40、multiply 混合）之下：叠在混合层之上，浏览器每帧滚动都得把整屏重新混合一遍，
     Firefox 里门厅横滑便卡；纸纹不接指针，按钮照点得到，还一样沾纸纹 */
  right: max(1.25rem, env(safe-area-inset-right)); z-index: 39;
  min-width: 44px; min-height: 44px; padding: .25rem .35rem;
  font: inherit; font-size: var(--t-micro); letter-spacing: var(--ls-note);
  color: var(--ink-2); background: var(--paper); border: 0; cursor: pointer;
}
.language-picker:hover{ color: var(--zhu); }
.language-picker:focus-visible{ outline: 2px solid var(--zhu); outline-offset: 2px; }
/* 对话框骨架：账号、会员说明同用，见 account-ui.js */
.sheet{
  width: min(26rem, calc(100% - 2rem)); max-width: none; max-height: calc(100dvh - 2rem);
  margin: auto; padding: 1.5rem 1.6rem 1.1rem; box-sizing: border-box;
  border: 1px solid var(--hair); border-radius: 4px;
  background: var(--paper); color: var(--ink);
  /* 宣纸卡浮在遮罩上，只靠一道暖色投影托起，不另设白面 */
  box-shadow: 0 18px 48px -12px rgba(38, 32, 25, .38), 0 2px 6px rgba(38, 32, 25, .08);
  font: inherit; font-size: var(--t-body); letter-spacing: var(--ls-text); line-height: 1.7;
  overflow: auto; overscroll-behavior: contain;
}
.sheet[open]{ animation: sheet-in .32s var(--ease); }
.sheet[open]::backdrop{ animation: sheet-fade .32s ease-out; }
@keyframes sheet-in{ from{ opacity: 0; transform: translateY(10px) scale(.985); } }
@keyframes sheet-fade{ from{ opacity: 0; } }
.sheet::backdrop{ background: rgba(38, 32, 25, .42); }
.sheet__head{ display: flex; align-items: center; gap: .85rem; margin: 0 2.2rem 1.1rem 0; }
.sheet__seal{ width: 40px; height: 40px; border-radius: 2px; animation: none; }
.sheet__seal i{ font-size: var(--t-label); }
.sheet h2{ margin: 0; font-size: var(--t-name); font-weight: 400; letter-spacing: var(--ls-title); line-height: 1.3; }
.sheet p{ margin: 0 0 .8rem; }
.sheet__lead{ color: var(--ink-2); font-size: var(--t-label); line-height: 1.75; }
/* 体验用完时只列「为什么选择我们」的标题，细说在页尾链接里 */
.sheet__why{ margin: 0 0 .8rem; padding: 0; list-style: none; color: var(--ink-2); font-size: var(--t-label); line-height: 2; letter-spacing: var(--ls-label); }
.sheet__why li::before{ content: ''; display: inline-block; width: 5px; height: 5px; margin: 0 .7em .2em 0; background: var(--zhu); transform: rotate(45deg); }
.sheet__more{ margin: 1rem 0 0 !important; padding-top: .8rem; border-top: 1px solid var(--hair-2); font-size: var(--t-micro); text-align: center; }
.sheet__more a{ color: var(--ink-3); text-decoration: none; }
.sheet__more a:hover{ color: var(--zhu); text-decoration: underline; }
.sheet__actions{ display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 .8rem; }
.sheet__btn{
  min-height: 44px; padding: .4rem 1.1rem;
  font: inherit; font-size: var(--t-body); letter-spacing: var(--ls-label);
  color: var(--ink); background: transparent; border: 1px solid var(--hair); border-radius: 3px; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.sheet__btn:hover{ background: var(--zhu-wash); border-color: var(--zhu-edge); color: var(--zhu); }
/* 主按钮朱底实填：一张卡上只该有一处叫人去点 */
.sheet__btn--main{ color: #FDF7E4; background: var(--zhu); border-color: var(--zhu); box-shadow: inset 0 -2px 0 rgba(var(--accent-shadow-rgb), .35); }
.sheet__btn--main:hover{ color: #FDF7E4; background: var(--zhu-lo); border-color: var(--zhu-lo); }
.sheet__btn--wide{ display: block; width: 100%; }
.sheet__btn:disabled{ opacity: .55; cursor: progress; }
.sheet__btn:focus-visible, .sheet__close:focus-visible{ outline: 2px solid var(--zhu); outline-offset: 2px; }
.sheet__message{ margin: .9rem 0 0 !important; padding: .55rem .8rem; font-size: var(--t-label); color: var(--ink-2); background: var(--hair-2); border-radius: 3px; }
.sheet__message.is-bad{ color: var(--zhu); background: var(--zhu-wash); }
.sheet__message a{ color: inherit; }
.sheet__close{
  position: absolute; top: .9rem; right: .9rem;
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  color: var(--ink-3); background: transparent; border: 0; border-radius: 50%; cursor: pointer;
}
.sheet__close:hover{ color: var(--zhu); background: var(--zhu-wash); }
.sheet__close svg{ width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
/* 窄屏改作底部抽屉：拇指够得着，键盘弹起也不把卡顶出屏外 */
@media (max-width: 560px){
  .sheet{
    width: 100%; max-height: calc(100dvh - 1.5rem); margin: auto 0 0;
    padding: 1.3rem 1.25rem max(1rem, env(safe-area-inset-bottom));
    border-width: 1px 0 0; border-radius: 12px 12px 0 0;
  }
  .sheet[open]{ animation-name: sheet-up; }
  @keyframes sheet-up{ from{ transform: translateY(40%); opacity: .4; } }
}
@media (prefers-reduced-motion: reduce){ .sheet[open], .sheet[open]::backdrop{ animation: none; } }

/* 目录紧挨语言按钮之左，账号再左，三者同形同层，见 guide-ui.js、account-ui.js */
.guide-entry{
  position: fixed; top: max(.25rem, env(safe-area-inset-top));
  right: calc(max(1.25rem, env(safe-area-inset-right)) + 44px); z-index: 39;
  min-width: 44px; min-height: 44px; padding: .25rem .35rem;
  font: inherit; font-size: var(--t-micro); letter-spacing: var(--ls-note);
  color: var(--ink-2); background: var(--paper); border: 0; cursor: pointer;
}
.guide-entry:hover, .guide-entry[aria-expanded="true"]{ color: var(--zhu); }
.guide-entry:focus-visible{ outline: 2px solid var(--zhu); outline-offset: 2px; }
.guide-menu{
  position: fixed; z-index: 1000; min-width: 11rem; max-width: calc(100vw - 16px);
  padding: .4rem; background: var(--paper); border-radius: 4px;
  box-shadow: 0 8px 28px rgba(38,32,25,.24);
}
.guide-menu__item{
  display: flex; align-items: center; width: 100%; min-height: 2.6rem; box-sizing: border-box;
  padding: .5rem .75rem; border: 0; border-radius: 2px;
  font: inherit; font-size: var(--t-body); letter-spacing: var(--ls-note); text-align: left; text-decoration: none;
  color: var(--ink); background: transparent; cursor: pointer;
}
.guide-menu__item:hover, .guide-menu__item:focus-visible{ background: var(--zhu-wash); color: var(--zhu); }
.guide-menu__item:focus-visible{ outline: 1px solid var(--zhu); outline-offset: -1px; }
.guide__list{ margin: 0; display: grid; gap: .9rem; }
.guide__row dt{ display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .2rem; font-size: var(--t-lead); letter-spacing: var(--ls-label); color: var(--ink); }
.guide__row dd{ margin: 0; font-size: var(--t-label); line-height: 1.8; color: var(--ink-2); }
/* 条下的附注小一号、左一道细朱线，与正文分出主次；警示符随强调色标出：丢了恢复码存档就回不来，不能淹在正文里。
   不用斜体：中文没有真斜体，浏览器只会把楷字硬拉歪 */
.guide__note{ display: block; margin-top: .55rem; padding-left: .75rem; border-left: 2px solid var(--zhu-edge); font-size: var(--t-micro); line-height: 1.75; color: var(--ink-3); }
.guide__warn{ color: var(--zhu); font-variant-emoji: text; }
.guide kbd{
  display: inline-block; min-width: 1.6em; padding: .05rem .45rem; box-sizing: border-box; text-align: center;
  font: inherit; font-size: var(--t-micro); letter-spacing: var(--ls-text); color: var(--zhu);
  border: 1px solid var(--zhu-edge); border-bottom-width: 2px; border-radius: 3px;
}
/* 账号入口在目录之左 */
.account-entry{
  position: fixed; top: max(.25rem, env(safe-area-inset-top));
  right: calc(max(1.25rem, env(safe-area-inset-right)) + 88px); z-index: 39;
  min-width: 44px; min-height: 44px; padding: .25rem .35rem;
  font: inherit; font-size: var(--t-micro); letter-spacing: var(--ls-note); font-variant-numeric: tabular-nums;
  color: var(--ink-2); background: var(--paper); border: 0; cursor: pointer;
}
.account-entry:hover, .account-entry.is-out{ color: var(--zhu); }
.account-entry:focus-visible{ outline: 2px solid var(--zhu); outline-offset: 2px; }
/* 非会员处存档区换成这一行，见 members-note.js */
.members-note{ color: var(--ink-3); font-size: var(--t-label); letter-spacing: var(--ls-note); }
.members-note__go{
  margin-left: .3em; padding: 0; font: inherit; color: var(--zhu); background: none; border: 0;
  border-bottom: 1px solid var(--zhu-edge); cursor: pointer;
}
.members-note__go:focus-visible{ outline: 2px solid var(--zhu); outline-offset: 2px; }
.acct__tabs{ display: flex; gap: 1.6rem; margin: 0 0 1rem; border-bottom: 1px solid var(--hair); }
.acct__tabs a{
  position: relative; padding: .35rem 0 .55rem; color: var(--ink-3); text-decoration: none;
  font-size: var(--t-lead); letter-spacing: var(--ls-label);
}
.acct__tabs a:hover{ color: var(--ink); }
.acct__tabs a[aria-current]{ color: var(--zhu); }
.acct__tabs a[aria-current]::after{ content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--zhu); }
.acct__tabs a:focus-visible{ outline: 2px solid var(--zhu); outline-offset: 2px; }
.acct__field{ display: grid; gap: .3rem; margin: 0 0 1rem; }
.acct__label{ display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: var(--t-label); color: var(--ink-2); letter-spacing: var(--ls-note); }
.acct__hint{ font-size: var(--t-micro); color: var(--ink-3); }
.acct__forgot{ font-size: var(--t-micro); color: var(--ink-3); text-decoration: none; }
.acct__forgot:hover{ color: var(--zhu); text-decoration: underline; }
.acct__field input{
  width: 100%; box-sizing: border-box; min-height: 46px;
  font: inherit; font-size: max(16px, var(--t-body)); color: var(--ink); letter-spacing: normal;
  padding: .5rem .75rem; border: 1px solid var(--hair); border-radius: 3px;
  background: var(--paper);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.acct__field textarea{
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 8rem;
  font: inherit; font-size: max(16px, var(--t-body)); color: var(--ink); line-height: 1.7;
  padding: .55rem .75rem; border: 1px solid var(--hair); border-radius: 3px; background: var(--paper);
}
.acct__field textarea:focus{ outline: none; border-color: var(--zhu-edge); box-shadow: 0 0 0 3px var(--zhu-wash); }
/* 意见反馈的署名：三样单选，自填那格选中才出 */
.fb__sign{ margin: 0 0 1rem; padding: 0; border: 0; display: grid; gap: .45rem; }
.fb__sign legend{ padding: 0; margin-bottom: .4rem; }
.fb__opt{ display: flex; align-items: baseline; gap: .55rem; cursor: pointer; font-size: var(--t-label); color: var(--ink); }
.fb__opt input{ accent-color: var(--zhu); margin: 0; }
.fb__opt small{ color: var(--ink-3); word-break: break-all; }
.fb__name{ margin: 0 0 .2rem 1.6rem; }
.acct__field input:hover{ border-color: rgba(38, 32, 25, .3); }
.acct__field input:focus{ outline: none; border-color: var(--zhu-edge); background: var(--paper); box-shadow: 0 0 0 3px var(--zhu-wash); }
.acct__pass{ position: relative; display: block; }
.acct__pass input{ padding-right: 3rem; }
.acct__peek{
  position: absolute; top: 50%; right: .3rem; transform: translateY(-50%);
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  color: var(--ink-3); background: transparent; border: 0; border-radius: 50%; cursor: pointer;
}
.acct__peek:hover{ color: var(--zhu); }
.acct__peek:focus-visible{ outline: 2px solid var(--zhu); outline-offset: -2px; }
.acct__peek svg{ width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.acct__peek[aria-pressed="true"] .acct__peek-slash{ display: none; }
/* 「或」一道细线隔开邮箱与 Google：邮箱是主路（大陆打不开 Google），Google 素底，不与登录的朱底争 */
.acct__or{ display: flex; align-items: center; gap: .8rem; margin: 1.1rem 0 .9rem !important; color: var(--ink-3); font-size: var(--t-micro); }
.acct__or::before, .acct__or::after{ content: ""; flex: 1; border-top: 1px solid var(--hair); }
.acct__google{ display: flex; align-items: center; justify-content: center; gap: .6rem; text-decoration: none; box-sizing: border-box; }
.acct__g{ width: 18px; height: 18px; flex: none; }
.acct__ways h3{ margin: 0 0 .4rem; font-size: var(--t-label); color: var(--ink-2); font-weight: normal; }
.acct__ways p{ display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 1.2rem !important; font-size: var(--t-label); }
.acct__ways a{ display: inline-flex; align-items: center; gap: .5rem; color: var(--ink-2); }
.acct__ways a:hover, .acct__ways button:hover{ color: var(--zhu); }
.acct__ways button{ font: inherit; color: var(--ink-3); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.acct__alt{ display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; font-size: var(--t-label); }
.acct__alt a{ color: var(--ink-2); }
.acct__alt a:hover{ color: var(--zhu); }
/* 账号卡：邮箱缩在题下，与「账号」二字左齐（印宽 40px 加间距 .85rem） */
.acct__who{ margin: -.75rem 0 1.2rem calc(40px + .85rem) !important; font-size: var(--t-label); color: var(--ink-3); word-break: break-all; }
/* 朱笺：上下各一道文武线（外粗内细），照古籍版框把这一块框成一页，到期日居中放大 —— 人开这张卡多半只为看这一眼。
   原先衬一层朱晕，宣纸上泛出一块粉红，像警示而不像笺，故撤去底色、改以线框。
   双线用内阴影画：border 的 double 两线等粗，分不出文武；中缝取宣纸色，与卡面同 */
.acct__slip{
  margin: 0 0 1rem; padding: 1.2rem 1rem 1.1rem; text-align: center;
  box-shadow: inset 0 2.5px 0 var(--zhu), inset 0 5px 0 var(--paper), inset 0 6px 0 var(--zhu),
              inset 0 -2.5px 0 var(--zhu), inset 0 -5px 0 var(--paper), inset 0 -6px 0 var(--zhu);
}
.acct__slip p{ margin: 0; }
.acct__kind{ font-size: var(--t-micro); color: var(--zhu); letter-spacing: var(--ls-seal); text-indent: var(--ls-seal); }
.acct__big{ margin: .2rem 0 0 !important; font-size: var(--t-name); letter-spacing: var(--ls-label); line-height: 1.3; font-variant-numeric: tabular-nums; }
.acct__terms{ margin: .35rem 0 0 !important; font-size: var(--t-label); color: var(--ink-2); line-height: 1.65; }
.acct__slip.is-bad .acct__big{ color: var(--zhu); }
.acct__sync{ text-align: center; font-size: var(--t-label); color: var(--ink-3); }
.acct__sync.is-ok::before{
  content: ""; display: inline-block; width: .55em; height: .3em; margin: 0 .55em .25em 0;
  border: solid currentColor; border-width: 0 0 1.6px 1.6px; transform: rotate(-45deg);
}
/* 存档怎么加密的一行；没解锁时要人动手，压朱色 */
.acct__e2e{ text-align: center; font-size: var(--t-micro); color: var(--ink-3); margin-top: -.4rem !important; }
.acct__e2e a{ color: var(--ink-2); }
.acct__e2e a:hover, .acct__e2e.is-bad, .acct__e2e.is-bad a{ color: var(--zhu); }
/* 账号设置的「存档加密」：两张可点的笺，选中那张压朱边；点没选中的去切换 */
.acct__cipher{ margin: 0 0 1.2rem; }
.acct__cipher h3{ margin: 0 0 .6rem; font-size: var(--t-label); font-weight: normal; color: var(--ink-2); letter-spacing: var(--ls-label); }
.acct__cipher [role="radiogroup"]{ display: grid; gap: .5rem; }
.acct__choice{
  display: grid; gap: .2rem; width: 100%; padding: .7rem .9rem .75rem 2.3rem; position: relative; text-align: left;
  font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--hair); border-radius: 3px; cursor: pointer;
}
.acct__choice::before{
  content: ""; position: absolute; left: .85rem; top: 1.05rem; width: .8rem; height: .8rem;
  border: 1.5px solid var(--ink-3); border-radius: 50%; box-sizing: border-box;
}
.acct__choice b{ font-weight: normal; font-size: var(--t-body); }
.acct__choice span{ font-size: var(--t-micro); color: var(--ink-3); line-height: 1.6; }
.acct__choice:hover{ border-color: var(--zhu-edge); }
.acct__choice:focus-visible{ outline: 2px solid var(--zhu); outline-offset: 2px; }
.acct__choice[aria-checked="true"]{ border-color: var(--zhu); background: var(--zhu-wash); cursor: default; }
.acct__choice[aria-checked="true"]::before{ border-color: var(--zhu); background: var(--zhu); box-shadow: inset 0 0 0 2px var(--paper); }
.acct__cipher .acct__e2e{ margin: .5rem 0 0 !important; }
/* 回门厅两式的小样：箭头隔细线、一方小印，与页头同形，一眼看出差在哪 */
.acct__choice--back{ padding-right: 4.4rem; }
.acct__backpic{ position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: .4rem; }
.acct__backpic svg{ width: 8px; height: 14px; padding-right: .4rem; border-right: 1px solid var(--hair); box-sizing: content-box; fill: none; stroke: var(--ink-3); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.acct__backpic i{ width: 1.5rem; height: 1.5rem; background: var(--zhu); border-radius: 2px; }
.acct__points{ margin: 0 0 1.1rem; padding-left: 1.2em; font-size: var(--t-label); line-height: 1.75; color: var(--ink-2); }
.acct__points li + li{ margin-top: .3rem; }
/* 恢复码：分组、字距放开、可整串选中，抄起来不串行。字体照全站一个变量，不另立等宽 */
.acct__code{
  margin: 0 0 .6rem !important; padding: .9rem .5rem; text-align: center;
  font-size: 1.15rem; letter-spacing: .12em; font-variant-numeric: tabular-nums;
  color: var(--ink); background: var(--zhu-wash); border-top: 2px solid var(--zhu);
  user-select: all;
}
.acct__code span{ white-space: nowrap; }   /* 只在组间折行，免得一组断成两截抄错 */
.acct__quiet{ display: flex; justify-content: space-between; align-items: center; margin: .5rem 0 0 !important; }
.acct__quiet button, .acct__quiet a{
  min-height: 44px; padding: 0 .2rem; display: inline-flex; align-items: center;
  font: inherit; font-size: var(--t-label); color: var(--ink-2); background: none; border: 0; cursor: pointer; text-decoration: none;
}
.acct__quiet a{ font-size: var(--t-micro); color: var(--ink-3); }
.acct__quiet button:hover, .acct__quiet a:hover{ color: var(--zhu); }
.acct__quiet button:disabled{ opacity: .55; cursor: progress; }
.acct__quiet :focus-visible{ outline: 2px solid var(--zhu); outline-offset: 2px; }
/* 注销：账号设置页最底下，与「返回」隔开一大段，免得点返回时手滑 */
.acct__danger{ margin: 2.4rem 0 0 !important; text-align: center; font-size: var(--t-micro); }
.acct__danger a{ display: inline-flex; align-items: center; min-height: 44px; padding: 0 .4rem; color: var(--ink-3); text-decoration: none; }
.acct__danger a:hover{ color: var(--zhu); text-decoration: underline; }
.acct__danger a:focus-visible{ outline: 2px solid var(--zhu); outline-offset: 2px; }
.acct__perks{ list-style: none; margin: 0 0 1.1rem; padding: 0; font-size: var(--t-label); color: var(--ink-2); line-height: 1.6; }
.acct__perks li{ position: relative; display: grid; grid-template-columns: auto 1fr; margin: .3rem 0; padding-left: 1.2rem; }
.acct__perks b{ font-weight: 400; color: var(--ink); margin-right: .55rem; }
.acct__perks li::before{ content: ""; position: absolute; left: .12rem; top: .62em; width: .42rem; height: .42rem; background: var(--zhu); border-radius: 1px; transform: rotate(45deg); }
/* 两档上下排作单选，选定了再点底下那颗朱钮去付：原先点卡即跳付款，卡又不像按钮，人不敢点 */
.acct__plans{ display: grid; gap: .5rem; margin: 0 0 .8rem; }
.acct__plan{
  display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: .8rem; align-items: center;
  padding: .7rem .9rem; cursor: pointer; text-align: left;
  font: inherit; color: var(--ink); background: transparent; border: 1px solid var(--hair); border-radius: 3px;
  transition: background-color .15s, border-color .15s;
}
.acct__plan::before{ content: ""; grid-row: 1 / 3; width: 16px; height: 16px; box-sizing: border-box; border: 1.5px solid var(--ink-3); border-radius: 50%; }
.acct__plan[aria-checked="true"]{ border-color: var(--zhu); background: var(--zhu-wash); box-shadow: inset 0 0 0 1px var(--zhu); }
.acct__plan[aria-checked="true"]::before{ border-color: var(--zhu); background: var(--zhu); box-shadow: inset 0 0 0 3px var(--paper); }
.acct__plan:hover{ border-color: var(--zhu-edge); }
.acct__plan-name{ display: flex; align-items: baseline; gap: .5rem; }
.acct__plan-name em{ font-style: normal; font-size: var(--t-micro); color: var(--zhu); border: 1px solid var(--zhu-edge); padding: 0 .35rem; border-radius: 2px; letter-spacing: .05em; }
.acct__plan small{ grid-column: 2; font-size: var(--t-micro); color: var(--ink-3); }
.acct__plan b{ grid-column: 3; grid-row: 1 / 3; font-weight: 400; font-size: var(--t-title); font-variant-numeric: tabular-nums; }
.acct__plan[aria-checked="true"] b{ color: var(--zhu); }
.acct__renew{ display: flex; align-items: center; gap: .5rem; margin: 0 0 .9rem; font-size: var(--t-label); color: var(--ink-2); cursor: pointer; }
.acct__renew input{ width: 16px; height: 16px; margin: 0; accent-color: var(--zhu); }
.acct__renew:has(input:disabled){ color: var(--ink-3); cursor: default; }
.acct__renew span{ font-size: var(--t-micro); }
.acct__plan:focus-visible, .acct__cur button:focus-visible{ outline: 2px solid var(--zhu); outline-offset: 2px; }
.acct__note{ margin: .7rem 0 0 !important; font-size: var(--t-micro); color: var(--ink-3); line-height: 1.6; text-align: center; }
/* 币种退作一行小字：IP 定了的事，只留「没有当地卡」那条退路；管理员才见四种并排 */
.acct__cur{ margin: .2rem 0 0 !important; font-size: var(--t-micro); color: var(--ink-3); text-align: center; }
.acct__cur a{ color: var(--ink-2); }
.acct__cur button{ font: inherit; margin-left: .3rem; padding: 0 .4rem; cursor: pointer; color: var(--ink-3); background: none; border: 1px solid var(--hair); border-radius: 2px; }
.acct__cur button[aria-pressed="true"]{ color: var(--zhu); border-color: var(--zhu-edge); }
/* 深色插件提示，见 dark-notice.js。与语言按钮同压在纸纹之下，缘由同上 */
.dark-notice{
  position: fixed; z-index: 39;
  left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 2rem); box-sizing: border-box;
  display: flex; align-items: center; gap: .5rem;
  padding: .4rem .4rem .4rem .9rem;
  font-size: var(--t-micro); letter-spacing: var(--ls-note); line-height: 1.5;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--zhu); border-left-width: 3px;
}
.dark-notice__close{
  flex: none; min-width: 44px; min-height: 44px;
  font: inherit; font-size: var(--t-body); color: var(--ink-2);
  background: none; border: 0; cursor: pointer;
}
.dark-notice__close:hover{ color: var(--zhu); }
.dark-notice__close:focus-visible{ outline: 2px solid var(--zhu); outline-offset: -2px; }
/* 镜像横幅（mirror-notice.js）：只在陌生域名上出现。压在一切之上、不可关，正版链接要一眼看得见 */
.mirror-notice{
  position: sticky; top: 0; z-index: 60;
  padding: .55rem 1rem;
  font-size: var(--t-label); line-height: 1.6; text-align: center;
  color: var(--paper); background: var(--zhu);
}
.mirror-notice a{ color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
/* 页头从工具入口下方开始，窄屏长标题也不会撞上语言按钮。 */
.shell--tool{ padding-top: 3.5rem; }

/* ---------- 页底说明 ----------
   盘面全由脚本画出，爬虫与初来的人只看得到空格子；这段把本页能做什么写成字。
   默认折叠成一行小字，不扰用人 —— 只能折、不能藏：用户看不到而爬虫看得到，搜索引擎按作弊论处。
   margin-top:auto 让盘短时它也沉在底下。 */
.about{
  margin-top: auto; padding-top: 2.5rem;
  max-width: 46rem;
  font-size: var(--t-label); line-height: 1.85; color: var(--ink-2);
}
.about summary{ display: flex; align-items: baseline; gap: .5rem; width: fit-content; list-style: none; cursor: pointer; color: var(--ink-3); }
.about summary::-webkit-details-marker{ display: none; }
.about summary::before{ content: '▸'; font-size: var(--t-micro); transition: transform .2s var(--ease); }
.about[open] summary::before{ transform: rotate(90deg); }
.about summary:hover, .about summary:focus-visible{ color: var(--zhu); }
.about summary:focus-visible{ outline: 2px solid var(--zhu); outline-offset: 3px; }
.about h2{ margin: 0; font-size: var(--t-micro); font-weight: 400; letter-spacing: var(--ls-note); color: inherit; }
.about[open] summary{ margin-bottom: .6rem; }
.about h3{ margin: 1.1rem 0 .3rem; font-size: var(--t-label); font-weight: 400; color: var(--ink); }
.about p{ margin: 0 0 .6rem; }
.about b{ font-weight: 400; color: var(--ink); }
.about dl{ margin: 0; }
.about dt{ color: var(--ink); }
.about dd{ margin: 0 0 .5rem; }
/* 说明末尾的专题目录（bin/seo.mjs 生成）：紫微、八字、干支历法同式 */
.about__list{ display: grid; grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr)); gap: .1rem 1rem; margin: 0; padding: 0; list-style: none; }
.about__list--wide{ grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); }
.about__list a{ color: var(--ink-2); text-decoration: none; }
.about__list a:hover{ color: var(--zhu); }

/* Apple 品牌按钮保留黑白对比，触摸区域至少 44 点；只在 iOS 原生桥就绪时出现。 */
.acct__apple{background:#000;color:#fff;border-color:#000;min-height:44px}
.acct__apple:hover,.acct__apple:focus-visible{background:#222;color:#fff;border-color:#222}
.acct__apple span{font-size:1.3em;margin-right:.5em}
