@font-face { font-family: "Inter Tight"; src: url("/fonts/inter-tight.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("/fonts/dm-mono.woff2") format("woff2"); font-weight: 400; font-display: swap; }
:root {
  color-scheme: dark;
  --bg: #151719; --rail: #111315; --panel: #191b1e; --subtle: #1d2023; --line: #323538; --text: #f4f3ef;
  --muted: #b2b2af; --faint: #979a99; --accent: #f97316; --selected: #35251c; --green: #83bda0;
  --paper: #f2eadc; --ink: #26241f; --paper-muted: #625a4c; --mono: "DM Mono", Consolas, monospace;
}
[data-theme="light"] { color-scheme: light; --bg: #faf9f7; --rail: #f1f0ec; --panel: #fff; --subtle: #f4f4f1; --line: #d9d8d2; --text: #222522; --muted: #535850; --faint: #666a62; --selected: #fae4d3; --green: #417b55; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.5 "Inter Tight", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
h1,h2,h3,p { margin: 0; }
button,input,select { font: inherit; color: inherit; }
button,a,select { -webkit-tap-highlight-color: transparent; }
button { background: none; border: 0; color: inherit; cursor: pointer; padding: 0; min-height: 42px; }
button:disabled { cursor: wait; opacity: .55; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible { outline: 2px solid #f97316; outline-offset: 3px; }
a { color: inherit; }
i[data-i],.tm-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
i[data-i] { width: 19px; height: 19px; }
i svg { width: 100%; height: 100%; display: block; }
.tm-icon { width: 42px; min-height: 42px; border-radius: 7px; color: var(--muted); }
.tm-icon:hover,.tm-rail-foot a:hover,.tm-rail-foot button:hover { background: var(--subtle); color: var(--text); }
.tm-skip { position: fixed; top: 8px; left: 8px; z-index: 9; padding: 9px; background: var(--accent); color: #1d1711; transform: translateY(-160%); }
.tm-skip:focus { transform: none; }
.tm-shell { display: grid; grid-template-columns: 226px minmax(0,1fr); min-height: 100dvh; }
.tm-rail { height: 100dvh; position: sticky; top: 0; display: flex; flex-direction: column; overflow-y: auto; background: var(--rail); border-right: 1px solid var(--line); padding: 0 16px; }
.tm-brand { min-height: 74px; display: flex; align-items: center; gap: 10px; font-size: 1.43rem; font-weight: 720; letter-spacing: -.055em; padding: 0 10px; }
.tm-label,.tm-card-label,.tm-columns,.tm-stamp-type { font: .76rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.tm-label { color: var(--faint); }
.tm-rail nav { margin: 35px 0 18px; }
.tm-rail nav .tm-label { padding: 0 12px 10px; }
.tm-rail nav button,.tm-rail-foot a,.tm-rail-foot button,.tm-address-choice { display: flex; align-items: center; width: 100%; gap: 12px; text-align: left; padding: 0 12px; font-size: .925rem; border-radius: 6px; color: var(--muted); }
.tm-rail nav button { margin-bottom: 3px; }
.tm-rail nav button:hover,.tm-address-choice:hover { background: var(--subtle); }
.tm-rail nav button[aria-current="page"] { color: #ffa561; background: var(--selected); }
[data-theme="light"] .tm-rail nav button[aria-current="page"] { color: #99400a; }
.tm-rail b,.tm-pill { margin-left: auto; font: .77rem/1.5 var(--mono); }
.tm-rail nav b { padding: 1px 7px; background: #f9731621; border-radius: 4px; }
.tm-addresses { border-top: 1px solid var(--line); padding-top: 14px; }
.tm-rail-heading { display: flex; align-items: center; justify-content: space-between; padding-left: 12px; }
.tm-rail-heading .tm-icon i { width: 15px; }
.tm-address-row { display: flex; align-items: center; }
.tm-address-choice { gap: 9px; flex: 1; min-width: 0; font-family: var(--mono); font-size: .8rem; }
.tm-address-choice span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-address-row .tm-icon { opacity: 0; }
.tm-address-row:hover .tm-icon,.tm-address-row:focus-within .tm-icon { opacity: 1; }
.tm-address-row .tm-icon i { width: 15px; }
.tm-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
.tm-address-choice[aria-current="true"] .tm-dot,.tm-auto[aria-pressed="true"] .tm-dot { background: var(--green); }
.tm-rail-foot { border-top: 1px solid var(--line); padding: 12px 0 17px; margin-top: auto; }
.tm-rail-foot a { min-height: 42px; text-decoration: none; }
.tm-work { min-width: 0; }
.tm-top { display: flex; align-items: center; gap: 10px; height: 65px; padding: 0 clamp(22px,3.7vw,66px); border-bottom: 1px solid var(--line); }
.tm-breadcrumb,.tm-top-right { display: flex; align-items: center; gap: 13px; font-size: .9rem; }
.tm-breadcrumb { color: var(--muted); }
.tm-breadcrumb i { width: 16px; }
.tm-breadcrumb em { font-style: normal; color: var(--faint); }
.tm-breadcrumb strong { font-weight: 530; color: var(--text); }
.tm-top-right { margin-left: auto; }
.tm-top-right time { font: .8rem var(--mono); color: var(--faint); }
.tm-top-right .tm-icon { border-left: 1px solid var(--line); border-radius: 0; width: 46px; margin-left: 2px; }
.tm-menu { display: none; }
main { max-width: 1350px; margin: 0 auto; padding: clamp(28px,3.4vw,54px) clamp(22px,3.7vw,66px) 45px; }
h1 { font-size: clamp(2.4rem,3.3vw,3.6rem); line-height: 1.04; letter-spacing: -.052em; font-weight: 610; }
.tm-intro { color: var(--muted); margin: 8px 0 26px; }
.tm-postcard { color-scheme: light; background: var(--paper); color: var(--ink); border-radius: 11px; overflow: hidden; position: relative; border: 1px solid #cfc3b0; }
.tm-postcard::before { content: ""; display: block; height: 5px; background: repeating-linear-gradient(130deg, #c36648 0 14px, #eee5d5 14px 28px, #53636f 28px 42px, #eee5d5 42px 56px); }
.tm-card-face { display: flex; align-items: center; gap: 22px; padding: 25px 29px 21px; min-height: 145px; background-image: repeating-linear-gradient(0deg,transparent 0 3px,#71604005 3px 4px); }
.tm-address-info { flex: 1; min-width: 0; }
.tm-card-label { color: var(--paper-muted); display: flex; align-items: center; gap: 9px; font-weight: 400; }
.tm-card-label i { width: 15px; height: 15px; }
.tm-current { font: 400 clamp(1.3rem,2.25vw,2.65rem)/1.28 var(--mono); letter-spacing: -.065em; overflow-wrap: anywhere; margin: 12px 0 8px; }
.tm-current span { color: #665f53; }
.tm-expiry { display: flex; align-items: center; gap: 7px; min-height: 20px; color: var(--paper-muted); font-size: .875rem; }
.tm-expiry i { width: 15px; height: 15px; }
.tm-postage { position: relative; width: 122px; height: 98px; flex: none; color: #8c5539; user-select: none; }
.tm-stamp { position: absolute; right: 1px; top: 2px; height: 85px; width: 74px; padding: 7px; transform: rotate(8deg); background: #dc9568; mask: linear-gradient(#000 0 0) center/calc(100% - 7px) calc(100% - 7px) no-repeat, radial-gradient(circle at 4px 4px, transparent 2.2px,#000 2.8px) -4px -4px/8px 8px; }
.tm-stamp-inner { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 1px solid #905638; background: repeating-linear-gradient(145deg,transparent 0 3px,#a359373a 3px 4px); }
.tm-stamp-type { font-size: .57rem; color: #613822; letter-spacing: .13em; background: #d9956a; }
.tm-stamp-inner i { width: 40px; height: 36px; color: #784028; }
.tm-stamp-lines { border-block: 1px solid currentColor; width: 65%; height: 4px; }
.tm-postage .tm-cancel-mark { position: absolute; left: 0; bottom: 4px; width: 84px; height: 41px; transform: rotate(-11deg); color: #766951; opacity: .72; }
.tm-card-actions,.tm-dialog-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.tm-card-actions { padding: 13px 29px; border-top: 1px dashed #bfb3a1; background: #eadfcf8c; }
.tm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 6px; border: 1px solid var(--line); padding: 0 15px; font-size: .92rem; font-weight: 570; }
.tm-btn i { width: 16px; height: 16px; }
.tm-btn:hover { background: var(--subtle); }
.tm-paper-btn { border-color: #bcaf9c; color: #3e392f; background: #f7f0e4; }
.tm-paper-btn:hover { background: #fff8eb; }
.tm-copy,.tm-primary { color: #241a10; background: var(--accent); border-color: #d7600a; }
.tm-copy:hover,.tm-primary:hover { background: #ff8c38; }
.tm-inbox { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 25px; background: var(--panel); }
.tm-inbox-head,.tm-folder-title,.tm-inbox-actions,.tm-auto { display: flex; align-items: center; }
.tm-inbox-head { min-height: 68px; justify-content: space-between; padding: 0 20px; gap: 12px; }
.tm-folder-title { gap: 9px; }
.tm-folder-title i { color: var(--muted); }
.tm-folder-title h2,.tm-dialog-head h2 { font-size: 1.25rem; font-weight: 600; letter-spacing: -.025em; }
.tm-pill { border: 1px solid var(--line); padding: 0 7px; border-radius: 5px; color: var(--muted); }
.tm-inbox-actions { gap: 8px; }
.tm-auto { gap: 8px; padding: 0 8px; font-size: .83rem; color: var(--muted); }
.tm-inbox-actions .tm-icon { width: 42px; }
.tm-columns,.tm-message { display: grid; grid-template-columns: minmax(110px,1fr) minmax(100px,1.8fr) minmax(65px,.55fr); column-gap: 14px; align-items: center; }
.tm-columns { color: var(--faint); padding: 9px 22px; border-block: 1px solid var(--line); background: var(--subtle); font-size: .73rem; }
.tm-columns span:last-child,.tm-message time { text-align: right; }
.tm-empty { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; min-height: clamp(225px,30vh,340px); padding: 27px 16px 32px; }
.tm-empty h3 { margin: 14px 0 5px; font-size: 1.24rem; letter-spacing: -.028em; font-weight: 560; }
.tm-empty p { color: var(--muted); max-width: 38ch; font-size: .94rem; }
.tm-empty-art { width: 86px; height: 69px; position: relative; color: #858c8c; background: radial-gradient(#92979855 1px, transparent 1px) center/6px 6px; }
.tm-empty-art::before { content: ""; position: absolute; inset: 35% 13% 16%; border-radius: 5px; border: 1px solid currentColor; background: var(--subtle); transform: rotate(9deg); }
.tm-empty-art::after { content: ""; position: absolute; inset: 43% 14% 7%; border-radius: 5px; border: 1.5px solid currentColor; transform: rotate(-7deg); background: linear-gradient(32deg,transparent 48%,#8d9393 50%,transparent 52%) left top / 51% 65% no-repeat,linear-gradient(-32deg,transparent 48%,#8d9393 50%,transparent 52%) right top / 51% 65% no-repeat,var(--subtle); }
.tm-empty-art i { position: absolute; width: 20px; height: 12px; top: 15%; right: 13%; border-top: 2px solid #c7834d; transform: rotate(-41deg); }
.tm-empty-art i::before,.tm-empty-art i::after { content: ""; position: absolute; height: 2px; width: 8px; background: #c7834d; }
.tm-empty-art i::before { left: 0; top: -9px; transform: rotate(-32deg); }
.tm-empty-art i::after { right: 1px; bottom: 0; transform: rotate(33deg); }
.tm-message { position: relative; padding: 6px 22px; min-height: 63px; border-bottom: 1px solid var(--line); }
.tm-message:last-child { border-bottom: 0; }
.tm-message:hover { background: var(--subtle); }
.tm-message button.tm-open { position: absolute; inset: 0; width: 100%; }
.tm-sender { display: flex; align-items: center; gap: 7px; min-width: 0; }
.tm-sender span,.tm-subject { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .93rem; }
.tm-sender button { z-index: 1; }
.tm-sender .tm-icon { margin-left: -11px; }
.tm-icon[aria-pressed="true"] { color: var(--accent); }
.tm-message time,.tm-detail-meta { font-size: .8rem; color: var(--faint); }
.tm-reader { padding: 20px; overflow-wrap: anywhere; }
.tm-reader h3 { font-weight: 600; font-size: 1.5rem; margin: 16px 0 6px; }
.tm-reader pre { white-space: pre-wrap; font: inherit; }
.tm-body { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.tm-reader iframe { width: 100%; min-height: 340px; background: white; border: 0; }
.tm-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tm-tags span { border: 1px solid var(--line); padding: 2px 7px; font: .75rem var(--mono); border-radius: 4px; }
.tm-reader .tm-btn,.tm-att { margin: 3px; }
.tm-att { display: inline-flex; }
.tm-attachment-meta { display: inline-flex; align-items: center; gap: 7px; margin: 10px 12px 0 0; color: var(--muted); }
#warning { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--selected); border: 1px solid var(--line); border-radius: 7px; margin-top: 16px; padding: 8px 14px; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 17px; border-radius: 6px; box-shadow: 0 6px 25px #0004; z-index: 8; }
#toast:empty { display: none; }
dialog { padding: 24px; width: min(410px, calc(100vw - 32px)); background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 80px #0006; }
dialog::backdrop { background: #080909ad; }
.tm-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
dialog label { display: block; font-weight: 550; font-size: .91rem; margin: 13px 0 6px; }
dialog input, dialog select { width: 100%; min-height: 44px; padding: 8px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
dialog select { appearance: none; background: linear-gradient(45deg,transparent 50%,var(--muted) 50%) calc(100% - 16px) 50%/5px 5px no-repeat,linear-gradient(135deg,var(--muted) 50%,transparent 50%) calc(100% - 11px) 50%/5px 5px no-repeat,var(--bg); }
.tm-input-group { display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
.tm-input-group span { color: var(--muted); font: .88rem var(--mono); padding-left: 12px; }
.tm-input-group span:empty { display: none; }
.tm-input-group input { border: 0; }
.tm-form-error { color: #e78b62; margin: 12px 0; font-size: .92rem; }
.tm-dialog-actions { margin-top: 18px; justify-content: flex-end; }
#remove-text { overflow-wrap: anywhere; }
@media (min-width: 901px) and (max-width: 1140px) { .tm-shell { grid-template-columns: 200px minmax(0,1fr); } .tm-postage { width: 88px; } main { padding-inline: 26px; } }
@media (max-width: 900px) {
  .tm-shell { display: block; }
  .tm-rail { position: fixed; left: 0; top: 0; width: 240px; z-index: 6; transform: translateX(-100%); visibility: hidden; }
  body.tm-menu-open .tm-rail { transform: none; visibility: visible; }
  .tm-scrim { position: fixed; inset: 0; background: #08090999; z-index: 5; width: 100%; height: 100%; }
  .tm-menu { display: inline-flex; }
  .tm-address-row .tm-icon { opacity: 1; }
}
@media (max-width: 680px) {
  .tm-top { height: 56px; padding: 0 10px; gap: 4px; }
  .tm-top-right time { display: none; }
  .tm-top-right .tm-icon { border: 0; }
  main { padding: 27px 16px; }
  h1 { font-size: 2.45rem; }
  .tm-intro { margin-bottom: 20px; }
  .tm-card-face { padding: 19px 17px; gap: 5px; min-height: 130px; }
  .tm-postage { position: absolute; top: 13px; right: 14px; transform: scale(.48); transform-origin: top right; }
  .tm-card-label { padding-right: 42px; }
  .tm-current { font-size: clamp(1.2rem,4.2vw,1.7rem); margin-top: 17px; }
  .tm-card-actions { padding: 10px 12px; gap: 6px; }
  .tm-card-actions .tm-btn { padding: 0 9px; gap: 5px; font-size: .8rem; flex-grow: 1; }
  .tm-card-actions .tm-btn i { width: 14px; }
  .tm-inbox { margin-top: 18px; }
  .tm-inbox-head { padding: 0 13px; min-height: 59px; }
  .tm-inbox-actions { gap: 0; }
  .tm-auto { font-size: .78rem; gap: 5px; padding: 0 4px; }
  .tm-columns { padding-inline: 13px; grid-template-columns: 1fr 1fr auto; }
  .tm-message { grid-template-columns: minmax(0,1fr) auto; gap: 0 8px; padding: 8px 13px; }
  .tm-message time { grid-row: 1; grid-column: 2; }
  .tm-subject { grid-column: span 2; padding-left: 39px; }
  .tm-empty { min-height: 220px; }
}
@media (prefers-reduced-motion: no-preference) { button,a { transition: background-color .13s ease, color .13s ease; } .tm-rail { transition: transform .15s ease; } }

