/* 浮墨邮局 · 票样配色修正
   在 stamp-design.css、fusion-layout.css 之后加载。
   只改颜色、底纹、描边与阴影；细线用 inset box-shadow，不占布局尺寸。
   变量限定在票样与邮封内，不写 :root，不影响首屏。
   --post-orange 沿用原值：仅“最新”与主操作。 */

.philatelic, .postal-dialog {
  --post-ink: #19172a;
  --post-ink-soft: #57515f;   /* 票纸上约 7.3:1 */
  --post-paper: #fffaf0;
  --post-sheet: #fffaf0;
  --post-line: #d3c5aa;       /* 装饰分隔线 */
  --post-mount-paper: #bfb29c;/* 暖灰纸套；与票纸约 2:1，齿孔靠它显形 */
  --post-tint: #f1dfbf;       /* 重置票图纸面；深墨数字约 13.6:1 */
  --post-rule: #625850;       /* 票框、票图线；票纸上约 6.6:1 */
  --post-brick: #9c3218;      /* 链接、原帖核验戳、邮封条纹；约 7:1 */
  --post-blue: var(--post-rule); /* 原帽蓝变量改为墨褐，接住其余引用 */
}

/* ---------- 纸套：暖灰纸 + 细墨线 ---------- */
.philatelic .post-card {
  background: var(--post-mount-paper);
  box-shadow: inset 0 0 0 1px var(--post-ink);
}
.philatelic .post-card:focus-visible { outline-color: var(--post-ink); }

/* ---------- 票框：线型仍由 data-type 决定 ---------- */
:is(.philatelic, .postal-dialog) .post-frame { border-color: var(--post-rule); }

/* ---------- 票图：暖浅纸面、深墨数字 ----------
   重置=满版暖纸横刻线加细框，预告=空白加上下线，未说明=斜纹 */
:is(.philatelic, .postal-dialog) .post-day {
  background: repeating-linear-gradient(135deg, rgb(98 88 80 / .3) 0 1px, #0000 1px 7px);
  color: var(--post-ink);
}
:is(.philatelic, .postal-dialog) .post-paper[data-type="reset"] .post-day {
  background: repeating-linear-gradient(0deg, rgb(98 88 80 / .2) 0 1px, #0000 1px 5px), var(--post-tint);
  box-shadow: inset 0 0 0 1px var(--post-rule);
  color: var(--post-ink);
}
:is(.philatelic, .postal-dialog) .post-paper[data-type="scheduled"] .post-day {
  background: none;
  border-block-color: var(--post-rule);
}

/* ---------- 对象框与核验戳 ---------- */
:is(.philatelic, .postal-dialog) .post-scope { border-color: var(--post-rule); }
/* 赤褐只加在双环带勾上，呼应首屏的红勾；戳形与文字仍各自表意 */
:is(.philatelic, .postal-dialog) .post-proof[data-proof="x"] .post-mark { color: var(--post-brick); }

/* ---------- 邮封 ---------- */
.postal-dialog .postal-stamp {
  background: var(--post-mount-paper);
  box-shadow: inset -1px 0 0 var(--post-ink);
}
.postal-dialog .postal-bar {
  border-image: repeating-linear-gradient(115deg, var(--post-brick) 0 16px, var(--post-sheet) 16px 24px, var(--post-ink) 24px 40px, var(--post-sheet) 40px 48px) 6;
}
/* 主操作保持橙底墨字，不吃链接色 */
.postal-dialog a:not(.postal-action) { color: var(--post-brick); }
.postal-dialog :is(a, button):focus-visible { outline-color: var(--post-ink); }

/* 单列邮封：分界线改到下沿 */
@container postal (max-width: 39rem) {
  .postal-dialog .postal-stamp { box-shadow: inset 0 -1px 0 var(--post-ink); }
}

/* 放在最后：焦点色与描边交还系统 */
@media (forced-colors: active) {
  .philatelic .post-card:focus-visible,
  .postal-dialog :is(a, button):focus-visible { outline-color: Highlight; }
}

/* Calendar adapter uses the same paper palette; selected dates remain distinct. */
.philatelic #calendar button{background:var(--post-tint);color:var(--post-ink);box-shadow:inset 0 0 0 1px var(--post-line)}
.philatelic #calendar button[aria-pressed="true"]{background:var(--post-ink);color:var(--post-sheet)}
.philatelic #calendar button:focus-visible,.philatelic select:focus-visible{outline-color:var(--post-ink)}
.philatelic select:hover{background:#efe2c9}
