:root {
  color-scheme: light;
  --table: #f5f4f0;
  --ink: #312e29;
  --muted: #777269;
  --receipt-font: clamp(13px, 3.45vw, 17px);
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  color: var(--ink);
  background: var(--table);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100svh; display: flex; flex-direction: column; background: radial-gradient(ellipse at 50% 40%, #fff8, transparent 70%); }
button, textarea { font: inherit; }
a { color: inherit; text-underline-offset: 4px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
.navigation { display: flex; align-items: center; justify-content: space-between; padding: 24px clamp(16px, 5vw, 64px); gap: 16px; font-size: 12px; }
.wordmark { letter-spacing: .09em; text-decoration: none; }
.navigation nav { display: flex; align-items: center; gap: 20px; }
.navigation nav a { color: var(--muted); text-decoration: none; padding: 8px 0; }
.navigation nav a[aria-current] { color: var(--ink); border-bottom: 1px solid; }
#help { background: none; border: 1px solid #312e2933; border-radius: 50%; width: 28px; height: 28px; color: var(--ink); }
main { flex: 1; width: 100%; }
#write-view { padding: clamp(20px, 5vh, 56px) 16px 24px; }
.intro { display: flex; justify-content: center; align-items: center; gap: 8px; margin-bottom: 28px; color: var(--muted); font-size: 11px; }
.connection-dot { width: 6px; height: 6px; background: #aaa59a; border-radius: 50%; flex-shrink: 0; }
.connection-dot.online { background: #657c59; }
.editor { display: flex; flex-direction: column; align-items: center; }
.receipt-shadow { filter: drop-shadow(0 3px 4px #312e290a) drop-shadow(0 12px 28px #312e291a); }
.paper { font-size: var(--receipt-font); background: #fff; width: 36ch; padding: 28px 2ch 30px; line-height: 1.5; mask: linear-gradient(#000 0 0) 0 5px / 100% calc(100% - 10px) no-repeat, conic-gradient(from 135deg at 50% 0, #000 90deg, transparent 0) 0 0 / 10px 5px repeat-x, conic-gradient(from -45deg at 50% 100%, #000 90deg, transparent 0) 0 100% / 10px 5px repeat-x; }
.receipt-heading, .receipt-footer { text-align: center; }
.receipt-heading h1 { font-size: 1.35em; letter-spacing: .045em; margin: 0 0 4px; line-height: 1.5; }
.paper p { margin: 0; font-size: .8em; }
.receipt-footer { color: var(--muted); }
.rule { color: #c7c2b9; overflow: hidden; white-space: pre; margin: 14px 0; }
#message { display: block; width: 32ch; height: 13.5em; padding: 0; border: 0; margin: 0; resize: none; outline: none; background: transparent; color: var(--ink); line-height: 1.5; font-variant-ligatures: none; white-space: break-spaces; overflow-wrap: anywhere; word-break: break-all; tab-size: 4; overflow: auto; border-radius: 0; }
#message:focus-visible { box-shadow: -3px 0 0 #312e2926; }
#message::placeholder { color: #a7a096; opacity: 1; }
.editor-meta { width: calc(36 * .6 * var(--receipt-font)); display: flex; justify-content: space-between; gap: 12px; margin: 18px 0 0; color: var(--muted); font-size: 10px; }
.hint { color: var(--muted); font-size: 11px; line-height: 1.7; text-align: center; }
.print-button { margin-top: 12px; padding: 15px 24px; border: 1px solid var(--ink); border-radius: 3px; background: var(--ink); color: #fff; font-size: 13px; display: flex; gap: 28px; align-items: center; transition: transform .15s, background .15s; }
.print-button:not(:disabled):hover { background: #49453d; transform: translateY(-2px); }
.shortcut { font-size: 10px; }
.status { text-align: center; font-size: 12px; line-height: 1.7; max-width: 440px; margin: 18px auto 0; min-height: 2em; }
.status.error, .invalid { color: #a03b2c; }
.site-footer { text-align: center; color: var(--muted); font-size: 10px; padding: 24px 16px; }
.history { max-width: 650px; margin: 40px auto; padding: 0 24px; }
.history-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.eyebrow { font-size: 10px; letter-spacing: .12em; color: var(--muted); }
.history h1 { font-size: 26px; font-weight: normal; margin: 8px 0 18px; }
.history-description { font-size: 12px; line-height: 1.8; color: var(--muted); }
.text-button { border: 0; border-bottom: 1px solid #312e2933; color: var(--ink); background: transparent; padding: 8px 0; font-size: 12px; }
.messages { list-style: none; padding: 0; margin: 20px 0; }
.messages li { border-bottom: 1px solid #312e291a; }
.messages summary { padding: 20px 0; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 9px 16px; }
.message-title { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-date, .message-state { color: var(--muted); font-size: 10px; }
.message-date { grid-column: 1; }
.message-state { grid-column: 2; grid-row: 1 / 3; align-self: center; }
.messages details[open] summary .message-title { white-space: normal; }
.messages pre { margin: 0 0 20px; padding: 20px; background: #fff; font: inherit; font-size: clamp(11px, 3vw, 14px); line-height: 1.6; white-space: pre; overflow-x: auto; }
#load-more { display: block; margin: 24px auto; }
dialog { width: min(440px, calc(100% - 32px)); padding: 28px; border: 0; background: #fff; box-shadow: 0 12px 60px #312e2926; color: var(--ink); }
dialog::backdrop { background: #312e2966; backdrop-filter: blur(3px); }
dialog h2 { font-size: 20px; font-weight: normal; margin-top: 32px; }
dialog p { font-size: 12px; line-height: 1.9; }
.close { float: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 450px) { .navigation { font-size: 10px; } .navigation nav { gap: 12px; } .wordmark { letter-spacing: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
