/* Hallmark · v2.0.0 · shape: app screen · scope: app · theme: custom · genre: workbench · nav: address list · surface: paper · motion: state */
/* Hallmark · pre-emit critique: P5 H4 E4 S4 R4 V4 · weakest: scanning long addresses; username, address suffix and letter metadata have distinct positions. */
:root {
  --paper: #fbfaf7;
  --clean: #fffefc;
  --side: #f2f1ec;
  --ink: #202623;
  --deep: #263b33;
  --mast-line: #557164;
  --mast-text: #f4f2df;
  --mast-sub: #c7d3c3;
  --muted: #58655e;
  --line: #d8d9d0;
  --input-line: #838e83;
  --soft-line: #e8e8e0;
  --quiet-hover: #e9eae2;
  --accent: #9b382c;
  --accent-hover: #81291f;
  --accent-soft: #f8e8df;
  --on-accent: #fff8f1;
  --focus: #23634c;
  --error: #993a2a;
  --dim: #33433d77;
  --face: "Inter","Segoe UI","PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  --print: "Georgia","Songti SC","Noto Serif CJK SC","STSong","SimSun",serif;
  --radius: 6px;
  --page-max: 106rem;
}
* { box-sizing: border-box; }
html,body { margin: 0; min-height: 100%; overflow-x: clip; }
body { background: var(--paper); color: var(--ink); font: 1rem/1.5 var(--face); -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
h1,h2,h3,p,dl,dd { margin: 0; }
h1,h2,h3 { min-width: 0; overflow-wrap: break-word; line-height: 1.3; }
h1,h2 { text-wrap: balance; }
button,input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { background: var(--side); color: var(--muted); cursor: not-allowed; }
button:focus-visible,a:focus-visible,input:focus-visible,dialog:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
button:active:not(:disabled) { transform: translateY(1px); }
a { color: var(--accent); text-underline-offset: .18em; overflow-wrap: anywhere; }
a:hover { color: var(--accent-hover); }
button { white-space: nowrap; }
.symbol-store { position: absolute; width: 0; height: 0; overflow: clip; pointer-events: none; }
.icon { display: inline-block; flex: none; width: 1.16rem; height: 1.16rem; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.primary,.secondary,.text-button,.icon-button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border-radius: var(--radius); }
.primary,.secondary { border: 1px solid transparent; min-height: 2.5rem; padding: .46rem 1.05rem; font-size: .94rem; font-weight: 650; }
.primary { background: var(--accent); color: var(--on-accent); }
.primary:hover:not(:disabled) { background: var(--accent-hover); }
.secondary { background: var(--clean); border-color: var(--line); }
.secondary:hover,.icon-button:hover:not(:disabled),.text-button:hover:not(:disabled) { background: var(--quiet-hover); }
.icon-button,.text-button { border: 0; background: transparent; color: var(--muted); }
.icon-button { flex: none; width: 2.5rem; height: 2.5rem; padding: 0; }
.icon-button.small { width: 2.1rem; height: 2.1rem; }
.icon-button.small .icon { width: 1rem; height: 1rem; }
.text-button { min-height: 2.5rem; padding: .35rem .6rem; font-size: .92rem; }
.muted,.region-state { color: var(--muted); }
.startup,.no-script { padding: 2rem; }
.gate { min-height: 100vh; min-height: 100svh; display: grid; align-items: center; padding: 2rem; }
.gate-layout { display: grid; grid-template-columns: minmax(0, .98fr) minmax(0, 1fr); width: min(100%, 59rem); margin-inline: auto; border: 1px solid var(--line); border-radius: .75rem; overflow: clip; background: var(--clean); }
.mast { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 32rem; padding: 2.25rem; background: var(--deep); color: var(--mast-text); }
.mast::before { content: ""; position: absolute; inset: .7rem; border: 1px solid var(--mast-line); border-radius: .18rem; pointer-events: none; }
.mast-top,.brand,.account,.head-top,.side-head,.dialog-head,.selected-line,.pagination,.pagination>div { display: flex; align-items: center; }
.mast-top { gap: .7rem; }
.mast-top b { font-size: 1.05rem; font-weight: 600; }
.brand-symbol { position: relative; display: inline-grid; flex: none; place-items: center; width: 2.05rem; height: 2.05rem; background: var(--deep); color: var(--mast-text); border-radius: .35rem; }
.brand-symbol::after { content: ""; position: absolute; inset: .2rem; border: 1px dotted currentColor; opacity: .55; border-radius: .16rem; }
.brand-symbol .icon { width: 1.25rem; height: 1.25rem; }
.brand-symbol.light { background: var(--mast-text); color: var(--deep); }
.mast-title { padding-block: 2.5rem .35rem; }
.mast-title h1 { font-family: var(--print); font-weight: 650; font-size: 5.6rem; line-height: 1.1; }
.brand-period { font-size: .9em; }
.mast-domain { margin-top: 1.2rem; padding-top: .9rem; max-width: 17rem; border-top: 1px solid var(--mast-line); color: var(--mast-sub); font-size: 1.12rem; }
.login { display: flex; flex-direction: column; justify-content: center; padding: 3.5rem 3rem; }
.login h2 { font-size: 1.85rem; font-weight: 700; }
.login>p { margin-top: .5rem; font-size: .96rem; }
.login form { margin-top: 2rem; }
form label { display: block; color: var(--ink); font-size: .92rem; font-weight: 600; margin-bottom: .45rem; }
.login label:not(:first-child) { margin-top: 1.05rem; }
input { width: 100%; min-width: 0; height: 2.8rem; padding: .55rem .75rem; border: 1px solid var(--input-line); border-radius: var(--radius); background: var(--clean); }
.password-wrap,.address-input { position: relative; }
.password-wrap input { padding-right: 2.8rem; }
.password-wrap button { position: absolute; top: .15rem; right: .18rem; }
.login-submit { width: 100%; margin-top: 1.5rem; min-height: 2.75rem; }
.form-error { color: var(--error); font-size: .92rem; margin-top: .7rem; overflow-wrap: anywhere; }
.workspace { min-height: 100vh; background: var(--clean); }
.topbar { background: var(--clean); border-bottom: 1px solid var(--line); }
.bar-inner { max-width: var(--page-max); padding: 0 1.5rem; min-height: 3.9rem; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { min-width: 0; gap: .62rem; }
.brand strong { font-family: var(--print); font-size: 1.34rem; font-weight: 700; white-space: nowrap; }
.domain { border-left: 1px solid var(--line); color: var(--muted); margin-left: .2rem; padding-left: .75rem; font-size: .86rem; }
.account { min-width: 0; gap: .35rem; color: var(--muted); font-size: .88rem; }
.account>span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account>.icon { width: 1rem; height: 1rem; }
.mail-grid { width: min(100%, var(--page-max)); height: calc(100vh - 3.96rem); height: calc(100dvh - 3.96rem); min-height: 24rem; margin-inline: auto; display: grid; grid-template-columns: minmax(13.5rem, .72fr) minmax(17.5rem, 1fr) minmax(0, 1.95fr); }
.addresses-pane,.list-pane,.reader-pane { min-height: 0; min-width: 0; }
.addresses-pane { display: flex; flex-direction: column; overflow-y: auto; background: var(--side); border-right: 1px solid var(--line); padding: 1.65rem 1.03rem; }
.side-head { justify-content: space-between; padding: 0 .36rem; }
.side-head h2 { font-size: 1rem; }
.add-button { margin: 1.05rem .2rem 1rem; }
.address-list { display: grid; gap: .18rem; }
.address-row,.message-row { width: 100%; appearance: none; text-align: left; border: 0; }
.address-row { display: flex; gap: .58rem; align-items: center; justify-content: flex-start; min-height: 2.55rem; border-radius: var(--radius); padding: .44rem .52rem; color: var(--ink); background: transparent; }
.address-row>.icon { color: var(--muted); width: 1.07rem; }
.address-row span:first-of-type { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.address-row .count { margin-left: auto; flex: none; color: var(--muted); font-size: .84rem; font-variant-numeric: tabular-nums; }
.address-row:hover,.message-row:hover { background: var(--quiet-hover); }
.address-row[aria-current=true],.message-row[aria-current=true] { background: var(--accent-soft); }
.address-row[aria-current=true],.address-row[aria-current=true]>.icon,.address-row[aria-current=true]>.count { color: var(--accent-hover); }
.list-pane { display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--paper); }
.pane-head { padding: 1.25rem 1.15rem .85rem; border-bottom: 1px solid var(--line); }
.head-top { gap: .38rem; }
.head-top h2 { font-size: 1.41rem; }
.head-top .trailing { margin-left: auto; }
.selected-line { min-width: 0; color: var(--muted); gap: .13rem; font-size: .9rem; }
#current-address { min-width: 0; overflow-wrap: anywhere; }
.message-scroll { overflow-y: auto; overscroll-behavior-y: contain; flex: 1; }
.message-row { display: grid; justify-items: stretch; gap: .36rem; padding: 1.02rem 1.25rem; background: transparent; border-bottom: 1px solid var(--soft-line); border-left: 3px solid transparent; }
.message-row[aria-current=true] { border-left-color: var(--accent); }
.message-row:focus-visible,.address-row:focus-visible { outline-offset: -3px; }
.message-byline,.message-summary { display: flex; min-width: 0; align-items: center; gap: .45rem; }
.message-byline>span,.message-summary>span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-byline { font-size: .84rem; color: var(--muted); }
.message-byline time { flex: none; margin-left: auto; font-variant-numeric: tabular-nums; }
.message-summary { font-size: 1rem; color: var(--ink); font-weight: 620; }
.message-summary .icon { color: var(--muted); width: .92rem; height: .92rem; }
.region-state { padding: 1.45rem 1.2rem; font-size: .93rem; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.addresses-pane .region-state { padding: .4rem; }
.region-state:empty,.reader-state:empty { display: none; }
.region-state strong,.reader-state strong { display: block; color: var(--ink); font-size: 1rem; margin-bottom: .35rem; }
.region-state button,.reader-state button { display: block; margin-top: .75rem; }
.pagination { justify-content: space-between; border-top: 1px solid var(--line); padding: .35rem .8rem; font-size: .84rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.reader-pane { background: var(--clean); overflow-y: auto; overscroll-behavior-y: contain; }
.reader-state { height: 100%; min-height: 12rem; display: grid; align-content: center; justify-items: center; padding: 1.6rem; color: var(--muted); text-align: center; font-size: .93rem; font-variant-numeric: tabular-nums; }
.reader-state>.icon { width: 2.6rem; height: 2.6rem; margin-bottom: 1rem; color: var(--muted); stroke-width: 1.2; }
.letter { width: min(100%, 55rem); padding: 2.3rem 2.65rem 5rem; margin-inline: auto; }
.letter h2 { font-size: 1.83rem; font-weight: 680; overflow-wrap: anywhere; line-height: 1.48; }
.letter-meta { margin-top: 1.25rem; padding-bottom: 1.65rem; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 3.2rem minmax(0,1fr); gap: .35rem .6rem; font-size: .9rem; }
.letter-meta dt { color: var(--muted); }
.letter-meta dd { overflow-wrap: anywhere; }
.letter-body { padding-top: 1.7rem; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
.files { margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.files h3 { font-size: 1rem; margin-bottom: .5rem; }
.file { display: flex; align-items: center; gap: .55rem; padding: .65rem 0; color: var(--ink); text-decoration: none; }
.file>span { overflow-wrap: anywhere; min-width: 0; }
.file small { color: var(--muted); flex: none; margin-left: auto; font-size: .82rem; }
.file:hover span { text-decoration: underline; }
.mobile-side,.mobile-read { display: none; }
dialog { background: var(--clean); color: var(--ink); border: 1px solid var(--line); border-radius: .7rem; padding: 1.55rem; width: min(27rem, calc(100% - 2rem)); }
dialog::backdrop { background: var(--dim); }
.dialog-head { justify-content: space-between; margin-bottom: 1.3rem; }
.dialog-head h2 { font-size: 1.34rem; }
.dialog-actions { margin-top: 1.55rem; display: flex; justify-content: flex-end; gap: .55rem; }
.address-input { display: flex; align-items: stretch; min-width: 0; border: 1px solid var(--input-line); border-radius: var(--radius); }
.address-input input { border: 0; flex: 1; }
.address-input>span { display: flex; align-items: center; padding: .3rem .55rem; color: var(--muted); white-space: nowrap; font-size: .87rem; }
.toast { position: fixed; bottom: 1.1rem; left: 50%; transform: translateX(-50%); max-width: calc(100% - 2rem); border-radius: var(--radius); padding: .65rem .9rem; background: var(--deep); color: var(--mast-text); font-size: .92rem; z-index: 3; overflow-wrap: anywhere; }
@media(min-width: 107rem) { .mail-grid { border: 1px solid var(--line); border-block: 0; } }
@media(max-width: 67rem) {
  .mail-grid { grid-template-columns: minmax(12rem,.7fr) minmax(14rem,1fr) minmax(0,1.55fr); }
  .addresses-pane { padding-inline: .65rem; }
  .letter { padding-inline: 1.45rem; }
}
@media(max-width: 58rem) {
  .mail-grid { grid-template-columns: minmax(15rem, .85fr) minmax(0,1.25fr); }
  .addresses-pane { display: none; }
  .mobile-side { display: inline-flex; }
  .workspace[data-view=addresses] .addresses-pane { display: flex; }
  .workspace[data-view=addresses] .list-pane { display: none; }
}
@media(max-width: 43rem) {
  .bar-inner { min-height: 3.5rem; padding-inline: .9rem; }
  .brand { gap: .42rem; }
  .brand-symbol { width: 1.85rem; height: 1.85rem; }
  .domain { display: none; }
  .mail-grid { display: block; height: calc(100vh - 3.55rem); height: calc(100dvh - 3.55rem); min-height: 18rem; }
  .addresses-pane,.list-pane,.reader-pane { height: 100%; border-right: 0; }
  .pane-head { padding: .75rem .95rem .65rem; }
  .addresses-pane,.reader-pane { display: none; }
  .workspace[data-view=read] .list-pane { display: none; }
  .workspace[data-view=read] .reader-pane { display: block; }
  .mobile-read { display: inline-flex; margin: .6rem .7rem .1rem; }
  .letter { padding: 1rem 1.25rem 3rem; }
  .letter h2 { font-size: 1.5rem; }
  .addresses-pane { padding: 1rem; }
  .reader-state { height: auto; min-height: 12rem; }
  .gate { padding: 1rem; }
  .gate-layout { display: block; max-width: 27rem; }
  .mast { padding: 1.45rem 1.65rem; min-height: 0; }
  .mast-top .brand-symbol { width: 1.5rem; height: 1.5rem; }
  .mast-title { padding: 1rem 0 .15rem; }
  .mast-title h1 { font-size: 2.9rem; }
  .mast-domain { margin-top: .5rem; padding-top: 0; border: 0; font-size: .94rem; }
  .login { padding: 1.5rem 1.4rem 1.85rem; }
  .login h2 { font-size: 1.5rem; }
  .login form { margin-top: 1.35rem; }
}
@media(prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation: none !important; }
  button:active:not(:disabled) { transform: none; }
}
