:root {
  --paper: #f4f2ef;
  --ink: #2a2826;
  --muted: #6f6a63;
  --line: rgba(42, 40, 38, 0.12);
  --card: #fffcf8;
  --sand: #efeae3;
  --clay: #b4694b;
  --h1: 48px;
  --h2: 34px;
  --h3: 18px;
  --body: 16px;
  --s1: 8px;
  --s2: 12px;
  --s3: 24px;
  --s4: 48px;
  --radius-control: 999px;
  --radius-card: 12px;
  --wrap: 1280px;
  --header-h: 72px;
  --font-heading: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 88px; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--body);
  font-weight: 400;
  line-height: 1.7;
}
main { flex: 1 0 auto; }
img { max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { appearance: none; -webkit-appearance: none; border: 0; background: transparent; }
a { color: inherit; }
p { margin: 0; font-size: var(--body); font-weight: 400; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 500; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: var(--h1); line-height: 1.2; }
h2 { font-size: var(--h2); line-height: 1.25; }
h3 { font-size: var(--h3); line-height: 1.4; font-weight: 600; }
[hidden] { display: none !important; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -120px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
  border-radius: var(--radius-control);
  z-index: 80;
}
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--s1);
  padding: 0 var(--s3);
  background: #fbfaf8;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  text-decoration: none;
  font-weight: 600;
  margin-right: var(--s2);
}
.brand img { width: 28px; height: 28px; }
.brand-name { font-weight: 600; color: inherit; letter-spacing: 0; }
.site-nav { display: flex; align-items: center; gap: var(--s1); }
.site-nav a {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  padding: 6px 8px;
}
.site-nav a[aria-current="page"] { background: var(--sand); border-radius: 8px; box-shadow: none; }
.head-actions { margin-left: auto; display: flex; align-items: center; gap: var(--s1); }
.login-link, .head-create, .lang-menu summary {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.head-create, .login-link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
}
.head-create { background: var(--ink); color: var(--paper); border: 0; cursor: pointer; }
.lang-menu { position: relative; }
[data-lang-trigger] { position: relative; padding-right: 18px; }
[data-lang-trigger]::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 7px;
  height: 7px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
}
.lang-menu summary {
  list-style: none;
  cursor: pointer;
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-68%) rotate(45deg);
}
.lang-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  padding: var(--s1);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  z-index: 30;
}
.lang-pop a {
  text-decoration: none;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: var(--radius-card);
}
.lang-pop a[aria-current="page"] { background: var(--sand); }
.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  margin: 5px 0;
}

.wrap { width: min(var(--wrap), calc(100% - 48px)); margin: 0 auto; }
.hero { padding: var(--s4) 0 var(--s3); text-align: center; }
.switcher { display: flex; justify-content: center; gap: var(--s1); flex-wrap: wrap; }
.switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  height: 36px;
  padding: 0 18px;
  border-radius: var(--radius-control);
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: none;
}
.switch.is-on { background: var(--ink); color: var(--paper); }
.hero h1 { margin-top: var(--s3); font-size: var(--h1); line-height: 1.2; font-weight: 500; }
.hero-note { max-width: 38em; margin: var(--s2) auto 0; color: var(--muted); }

.stage { position: relative; margin-top: 20px; text-align: left; }
.window {
  position: relative;
  margin: 0;
  background: var(--card);
  border: 0;
  border-radius: 18px;
  padding: 22px 24px 8px 36px;
  overflow: hidden;
  box-shadow: none;
}
.window::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 14px;
  background: radial-gradient(circle at 0 7px, var(--paper) 4.5px, transparent 5px) 0 0 / 14px 16px repeat-y;
}
#inbox { scroll-margin-top: 88px; }
#inbox.is-pulse .window { outline: 2px solid var(--ink); }

.addr-row { display: flex; align-items: center; gap: var(--s2); }
.addr {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.copy-btn, .quiet {
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: none;
  white-space: nowrap;
}
.quiet {
  height: 36px;
  min-height: 36px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}
.tool-meta {
  display: flex;
  align-items: center;
  gap: var(--s1);
  margin-top: var(--s2);
  flex-wrap: wrap;
}
.clock {
  font-family: var(--mono);
  font-size: 14px;
  min-width: 7ch;
}
.count { font-size: 14px; color: var(--muted); }

.inbox-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.4fr);
  min-height: 640px;
  margin-top: var(--s2);
  border-top: 1px solid var(--line);
}
.list { overflow: auto; min-width: 0; border-right: 1px solid var(--line); }
.reader { min-width: 0; overflow: auto; display: flex; flex-direction: column; }
.mail-row {
  display: flex;
  align-items: center;
  gap: var(--s2);
  width: 100%;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.mail-row.is-on { background: #f6f1ea; box-shadow: inset 3px 0 0 var(--ink); }
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--clay);
  flex: none;
}
.mail-copy { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 2px; }
.who { font-size: 15px; font-weight: 600; }
.subj { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.when { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 13px; color: var(--muted); white-space: nowrap; flex: none; }
.sample {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: var(--radius-control);
  background: var(--sand);
  font-size: 13px;
  font-weight: 500;
}
.row-del {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px;
}
.reader { background: var(--sand); padding: 16px; }
.letter-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 2px 12px;
  margin: 0;
  padding: 20px 22px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}
.letter-who { margin: 0; font-size: 18px; font-weight: 600; }
.letter-addr { margin: 0; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.letter-subj { grid-column: 1 / -1; margin: 10px 0 0; font-size: 22px; line-height: 1.35; color: var(--ink); font-weight: 600; }
.letter-head .sample { grid-column: 2; grid-row: 1; }
.letter-frame {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.letter-frame iframe, .letter-text {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0 0 12px 12px;
  flex: 1 1 auto;
  min-height: 280px;
  height: 100%;
  background: var(--card);
}
.letter-text { margin: 0; padding: 18px 24px; white-space: pre-wrap; font-family: var(--font-body); overflow-wrap: anywhere; }
.demo-letter {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  padding: 6px 22px 26px;
}
.demo-letter-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.demo-letter p { margin: 0 0 14px; }
.demo-letter > p:last-child {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.demo-letter p.code-plate {
  margin: 18px 0 20px;
  padding: 18px 16px;
  border-radius: 10px;
  background: #1b2838;
  color: #fff;
  font-family: var(--mono);
  font-size: 26px;
  letter-spacing: 0.16em;
  text-align: center;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.demo-meta-rows {
  margin: 4px 0 18px;
  padding: 16px 18px;
  border-radius: 10px;
  background: #fff6f1;
  border: 1px solid rgba(180, 105, 75, 0.28);
}
.demo-meta-rows p { margin: 0 0 10px; }
.demo-meta-rows p:last-child { margin-bottom: 0; }
.demo-letter-head.is-stay + .demo-meta-rows .code-plate {
  margin: 12px 0;
  background: #fff;
  color: #8a3f28;
  border: 1px solid rgba(180, 105, 75, 0.45);
  font-size: 20px;
  letter-spacing: 0.08em;
}
.attach-note {
  margin: var(--s2) 8px var(--s1);
  padding: 12px 14px;
  border-left: 3px solid var(--clay);
  background: var(--sand);
  font-size: 14px;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--card);
  display: flex;
  flex-direction: column;
  border-radius: 0;
  height: 100dvh;
}
.sheet-bar { display: flex; justify-content: flex-end; padding: 12px; }
.sheet .reader {
  display: flex;
  flex-direction: column;
  overflow: auto;
  flex: 1;
  min-height: 0;
}
.sheet .demo-letter { flex: 0 1 auto; }

main { counter-reset: bandno; }
.band {
  --hole: var(--paper);
  padding: 72px 0;
  counter-increment: bandno;
}
.band:nth-child(even) { --hole: var(--sand); background: var(--sand); }
main > .band:last-child { background: transparent; --hole: var(--paper); padding-bottom: 96px; }
.band .wrap {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  column-gap: 28px;
  row-gap: 16px;
  align-items: start;
}
.band .wrap > * { grid-column: 2; min-width: 0; }
.band .wrap::before {
  content: counter(bandno, decimal-leading-zero);
  grid-column: 1;
  grid-row: 1;
  padding-top: 10px;
  color: var(--clay);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
}
.band .wrap::after {
  content: "";
  grid-column: 1;
  grid-row: 2;
  width: 36px;
  height: 44px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 44'%3E%3Crect x='1.5' y='1.5' width='33' height='41' rx='3' fill='none' stroke='%23b4694b'/%3E%3Cpath d='M11 16h14M11 22h14M11 28h8' fill='none' stroke='%23b4694b' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.band h2 { margin: 0; max-width: 16em; }
.band h2 + p, .band .lede-block { margin: 0; max-width: 40em; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 8px; }
.card, .scene {
  position: relative;
  background: var(--card);
  border: 0;
  border-radius: 16px;
  padding: 24px 24px 24px 32px;
  box-shadow: none;
}
.card::before, .scene::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 14px;
  background: radial-gradient(circle at 0 7px, var(--hole) 4.5px, transparent 5px) 0 0 / 14px 16px repeat-y;
}
.card h3, .scene h3 { margin: 0 0 12px; }
.card h3::before, .scene h3::before {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  margin-bottom: 12px;
  background:
    linear-gradient(var(--clay), var(--clay)) 0 0 / 12px 1.5px no-repeat,
    linear-gradient(var(--clay), var(--clay)) 0 0 / 1.5px 12px no-repeat;
}
.card p + p, .scene p + p { margin-top: 12px; }
.steps { margin: 8px 0 0; padding: 0; list-style: none; display: grid; }
.steps li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.num {
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  color: var(--clay);
  display: block;
  padding-top: 2px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.scene-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.life-table { width: 100%; border-collapse: collapse; margin-top: 8px; background: transparent; border: 0; }
main > .wrap { padding-top: 8px; padding-bottom: 96px; }
.life-table th, .life-table td { text-align: left; padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 400; vertical-align: top; }
.life-table th { background: transparent; font-weight: 600; font-size: 13px; letter-spacing: 0.08em; color: var(--muted); border-bottom-color: var(--ink); }
.life-table td:first-child { color: var(--clay); font-weight: 600; }
.checks { margin: 8px 0 0; padding: 0; list-style: none; display: grid; counter-reset: check; }
.checks li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 18px 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}
.checks li::before {
  counter-increment: check;
  content: counter(check, decimal-leading-zero);
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  color: var(--clay);
  display: block;
  padding-top: 2px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
}
.faq { display: grid; margin-top: 8px; }
.faq-item {
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 18px 0;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s2);
  font-size: 18px;
  font-weight: 500;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  flex: none;
}
.faq-item[open] summary::after { transform: rotate(225deg); }
.faq-item p { margin-top: var(--s2); max-width: 40em; }

.site-foot { margin-top: auto; background: var(--sand); padding: var(--s4) 0 var(--s3); }
.foot-brand { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s1); max-width: 28em; }
.foot-brand img { width: 32px; height: 32px; }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); margin-top: var(--s3); }
.foot-cols div { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s1); }
.foot-cols a { text-decoration: none; font-size: 14px; }
.foot-tail { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); font-size: 14px; color: var(--muted); }
.foot-tail a { color: var(--muted); }
.site-foot :last-child { margin-bottom: 0; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(430px, calc(100% - 32px));
  background: var(--ink);
  color: var(--paper);
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 14px;
  text-align: center;
  z-index: 60;
}
.ask {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(42, 40, 38, 0.35);
  display: grid;
  place-items: center;
  padding: var(--s3);
}
.ask-card {
  width: min(420px, 100%);
  background: var(--card);
  border-radius: var(--radius-card);
  padding: var(--s3);
  border: 1px solid var(--line);
}
.ask-actions { display: flex; justify-content: flex-end; gap: var(--s1); margin-top: var(--s3); }
.ask-actions button {
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-control);
  border: 1px solid #cfc8bf;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  box-shadow: none;
}
.ask-actions .ask-yes { background: var(--ink); color: var(--paper); border-color: var(--ink); }

input:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.nav-drawer {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-width: 100%;
  background: #fbfaf8;
  border-bottom: 1px solid var(--line);
  padding: var(--s2) var(--s3) var(--s3);
  flex-direction: column;
  z-index: 19;
}
.nav-drawer a {
  text-decoration: none;
  padding: 10px 0;
  white-space: normal;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; flex: none; }
  .site-nav { display: none; }
  .nav-drawer.is-open { display: flex; position: absolute; left: 0; right: auto; width: min(280px, calc(100% - 24px)); text-align: left; }
  .site-header { gap: 6px; padding: 0 12px; flex-wrap: nowrap; }
  .brand { margin-right: 0; gap: 6px; flex: none; min-width: 0; }
  .head-actions { gap: 4px; flex: none; min-width: 0; }
  .lang-menu summary, .login-link, .head-create { white-space: nowrap; }
  .login-link, .head-create { padding: 0 10px; }
  .switcher { flex-wrap: nowrap; }
  .switch { min-width: 0; flex: 1 1 0; white-space: nowrap; padding: 0 12px; }
  .hero h1 { font-size: 36px; }
  .split, .scene-grid, .foot-cols { grid-template-columns: minmax(0, 1fr); }
  .window { padding-left: 28px; }
  .addr { font-size: 18px; }
  .addr-row { flex-wrap: wrap; }
  .copy-btn { width: 100%; justify-content: center; }
}

@media (max-width: 420px) {
  :lang(en) .brand-name,
  :lang(fr) .brand-name,
  :lang(ja) .brand-name,
  :lang(pt) .brand-name { display: none; }
}

@media (max-width: 800px) {
  .inbox-grid { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .inbox-grid > .reader { display: none; }
  .letter-head, .demo-letter { padding-left: 16px; padding-right: 16px; }
  .letter-subj { font-size: 18px; }
  .demo-letter p.code-plate { font-size: 22px; letter-spacing: 0.1em; }
  .list { border-right: 0; }
  .sheet, .window, .stage { transform: none; animation: none; }
}

.kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-width: 0;
  max-width: min(100%, calc(100vw - 48px));
  overflow-wrap: anywhere;
  padding: 4px 10px;
  border-radius: var(--radius-control);
  background: var(--sand);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  margin: 0 0 18px;
}
.page-lead { max-width: 40em; color: var(--muted); margin-top: var(--s2); }
.folio { padding: 88px 0 24px; }
.folio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.72fr);
  gap: 48px;
  align-items: end;
}
.folio-copy h1 { font-size: var(--h1); line-height: 1.15; max-width: 12em; }
.folio-copy h1::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin-bottom: 18px;
  background:
    linear-gradient(var(--clay), var(--clay)) 0 0 / 14px 1.5px no-repeat,
    linear-gradient(var(--clay), var(--clay)) 0 0 / 1.5px 14px no-repeat;
}
.folio-deck { margin-top: 16px; max-width: 36em; color: var(--muted); font-size: 18px; line-height: 1.6; }
.ticket {
  --hole: var(--paper);
  position: relative;
  background: var(--card);
  border-radius: 16px;
  padding: 28px 24px 22px 32px;
}
.ticket::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 14px;
  background: radial-gradient(circle at 0 7px, var(--hole) 4.5px, transparent 5px) 0 0 / 14px 16px repeat-y;
}
.ticket-k { margin: 0; color: var(--clay); font-size: 13px; font-weight: 600; letter-spacing: 0.14em; }
.ticket-fig {
  margin: 12px 0 0;
  font-size: 56px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ticket-fig span { color: var(--clay); }
.ticket-meta { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 0; }
.ticket-meta li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.ticket-meta b { font-weight: 600; }
.spread { padding: 56px 0; }
.spread.is-sand { background: var(--sand); }
.spread.is-sand .ticket { --hole: var(--sand); }
.spread-grid {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  column-gap: 28px;
  row-gap: 20px;
  align-items: start;
}
.rail { display: grid; justify-items: start; gap: 14px; }
.rail-no { color: var(--clay); font-size: 13px; font-weight: 600; letter-spacing: 0.16em; }
.stamp { width: 36px; height: 44px; display: block; }
.spread-body { min-width: 0; }
.spread-body h2 { margin: 0; max-width: 16em; font-size: 34px; line-height: 1.2; }
.spread-body > p { margin: 14px 0 0; max-width: 40em; }
.pair, .time-row, .beats { display: grid; gap: 16px; margin-top: 28px; }
.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.time-row, .beats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plate {
  background: var(--card);
  border-radius: 16px;
  padding: 24px;
  min-width: 0;
}
.plate.is-ink { background: var(--ink); color: var(--paper); }
.plate-k { margin: 0 0 10px; color: var(--clay); font-size: 13px; font-weight: 600; letter-spacing: 0.12em; }
.plate.is-ink .plate-k { color: #e4b5a1; }
.plate h3 { margin: 0 0 10px; font-size: 22px; }
.plate p { margin: 0; }
.time-cell, .beat {
  background: var(--card);
  border-radius: 16px;
  padding: 22px 20px;
  min-width: 0;
}
.time-cell strong, .beat strong {
  display: block;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.time-cell p, .beat p { margin: 10px 0 0; color: var(--muted); }
.specimen { display: grid; margin-top: 28px; }
.specimen-head, .specimen-row {
  display: grid;
  grid-template-columns: 0.7fr 1fr 1.15fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.specimen-head { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; border-bottom-color: var(--ink); }
.specimen-row span:first-child { color: var(--clay); font-weight: 600; }
.lexicon { display: grid; }
.lexicon > div {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.lexicon dt { margin: 0; font-size: 20px; font-weight: 600; }
.lexicon dd { margin: 0; }
.exits { margin: 8px 0 0; padding: 0; list-style: none; display: grid; }
.exits li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.exits li > span { color: var(--clay); font-size: 13px; font-weight: 600; letter-spacing: 0.14em; padding-top: 4px; }
.exits h3 { margin: 0 0 6px; font-size: 18px; }
.exits p { margin: 0; }
.folio-close { padding: 12px 0 96px; }
.folio-close-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  position: relative;
  background: var(--sand);
  border-radius: 16px;
  padding: 28px 28px 28px 40px;
}
.folio-close-grid::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 14px;
  background: radial-gradient(circle at 0 7px, var(--paper) 4.5px, transparent 5px) 0 0 / 14px 16px repeat-y;
}
.folio-close p { margin: 0; max-width: 28em; }
.folio-close .section-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.retain {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 8px;
}
.retain article {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
}
.retain strong {
  display: block;
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}
.retain p { margin: 8px 0 0; color: var(--muted); }
.prose { max-width: none; padding-bottom: 48px; counter-reset: clause; }
.prose > h1 { font-size: var(--h1); line-height: 1.15; max-width: 16em; margin: 0 0 8px; }
.prose > h1::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin-bottom: 18px;
  background:
    linear-gradient(var(--clay), var(--clay)) 0 0 / 14px 1.5px no-repeat,
    linear-gradient(var(--clay), var(--clay)) 0 0 / 1.5px 14px no-repeat;
}
.prose h2 { font-size: 28px; line-height: 1.25; margin: 0; }
.prose > h2 {
  counter-increment: clause;
  position: relative;
  margin: 48px 0 8px;
  padding: 4px 0 0 72px;
  background: none;
  border: 0;
}
.prose > h2::before {
  content: counter(clause, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 10px;
  width: auto;
  height: auto;
  margin: 0;
  border-radius: 0;
  background: none;
  color: var(--clay);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
}
.prose h3 { font-size: 18px; line-height: 1.4; margin: 0 0 8px; }
.prose > :first-child:not(h1) { margin-top: 0; }
.prose p { margin: 0 0 12px; }
.prose > h2 + p { margin: 0 0 0 72px; max-width: 40em; padding: 0; background: none; border: 0; }
.prose li { margin: 0 0 8px; line-height: 1.7; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 1.2em; }
.prose table, .life-table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; background: transparent; }
.prose th, .prose td, .life-table th, .life-table td { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; background: transparent; }
.prose th, .life-table th { font-weight: 600; font-size: 13px; letter-spacing: 0.08em; color: var(--muted); border-bottom-color: var(--ink); }
/* Opened note: one perforated sheet, not a sidebar blog. */
.article-layout {
  --sheet-x: 44px;
  --sheet-l: 148px;
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 36px var(--sheet-x) 0 var(--sheet-l);
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
}
.article-layout::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 16px;
  background: radial-gradient(circle at 0 8px, var(--paper) 5px, transparent 5.5px) 0 0 / 16px 20px repeat-y;
  pointer-events: none;
}
.article-mast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 24px;
  align-items: start;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--ink);
}
.article-mast .kicker { grid-column: 1; margin: 0; }
.article-mast .meta-row {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  margin: 0;
}
.article-mast .meta-row span {
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.article-mast .meta-row span::before { display: none; }
.article-mast .meta-row span:last-child {
  color: var(--clay);
  font-weight: 600;
  letter-spacing: 0.12em;
}
.article-mast h1 {
  grid-column: 1 / -1;
  margin: 18px 0 0;
  max-width: 16em;
  font-size: 44px;
  line-height: 1.12;
  letter-spacing: -0.03em;
}
.article-mast h1::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin-bottom: 14px;
  background:
    linear-gradient(var(--clay), var(--clay)) 0 0 / 14px 1.5px no-repeat,
    linear-gradient(var(--clay), var(--clay)) 0 0 / 1.5px 14px no-repeat;
}
.article-layout .toc {
  position: static;
  z-index: auto;
  margin: 0;
  padding: 6px 0 2px;
  background: none;
  border-radius: 0;
}
.article-layout .toc::before { display: none; }
.article-layout .toc ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}
.article-layout .toc li { counter-increment: toc; min-width: 0; }
.article-layout .toc a {
  display: grid;
  grid-template-columns: 2.4em minmax(0, 1fr);
  column-gap: 8px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-size: 15px;
  line-height: 1.4;
}
.article-layout .toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--clay);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
}
.article-body { counter-reset: clause; padding-top: 8px; }
.article-layout .chapter {
  counter-increment: clause;
  position: relative;
  display: block;
  margin: 0;
  padding: 28px 0 8px;
  background: none;
}
.article-layout .chapter + .chapter { border-top: 1px solid var(--line); }
.article-layout .chapter::before {
  content: counter(clause, decimal-leading-zero);
  position: absolute;
  left: -76px;
  top: 32px;
  color: var(--clay);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.article-layout .chapter h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.25;
}
.article-body { min-width: 0; }
.article-layout .chapter p {
  margin: 12px 0 0;
  max-width: 38em;
}
.article-layout .chapter > p:last-child:not(:first-of-type) {
  margin-top: 2px;
  padding-left: 14px;
  border-left: 2px solid var(--clay);
  max-width: 32em;
  font-size: 17px;
  line-height: 1.55;
}
.article-layout .chapter h3 {
  margin: 22px 0 0;
  font-size: 18px;
  line-height: 1.4;
}
.article-body a {
  color: var(--clay);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-body ul,
.article-body ol {
  margin: 14px 0 0;
  padding-left: 1.25em;
  max-width: 40em;
}
.article-body li { margin: 0 0 8px; line-height: 1.7; }
.article-body .call-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 16px 0 0;
  padding: 14px 16px;
  max-width: 40em;
  background: var(--sand);
  border-radius: 12px;
}
.article-body .call-box svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  margin-top: 3px;
  color: var(--clay);
}
.article-body svg { width: 22px; height: 22px; }
.article-body .sheet-scroll {
  overflow-x: auto;
  max-width: 100%;
  margin: 16px 0 4px;
}
.article-body table,
.article-body .sheet-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  margin: 0;
}
.article-body th,
.article-body td {
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
}
.article-body th {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom-color: var(--ink);
}
.article-layout .article-cta {
  position: relative;
  margin: 32px calc(var(--sheet-x) * -1) 0 calc(var(--sheet-l) * -1);
  padding: 28px var(--sheet-x) 32px calc(var(--sheet-l) + 4px);
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
}
.article-layout .article-cta::before { display: none; }
.article-layout .article-cta p { margin: 0; max-width: 28em; color: var(--paper); }
.article-layout .article-cta .section-cta { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 18px; }
.article-layout .article-cta .head-create { background: var(--paper); color: var(--ink); }
.article-layout .article-cta .switch { border-color: rgba(244, 242, 239, 0.55); color: var(--paper); background: transparent; }
main > .wrap:has(.article-layout) .recommend-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 12;
  width: min(280px, calc(100% - 48px));
  margin: 0;
  padding: 22px 40px 20px 28px;
  display: grid;
  gap: 8px;
  background: var(--card);
  border: 0;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(42, 40, 38, 0.12);
}
main > .wrap:has(.article-layout) .recommend-float::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 14px;
  background: radial-gradient(circle at 0 7px, var(--paper) 4.5px, transparent 5px) 0 0 / 14px 16px repeat-y;
}
main > .wrap:has(.article-layout) .recommend-float p { margin: 0; }
main > .wrap:has(.article-layout) .recommend-float p:first-of-type { color: var(--muted); }
main > .wrap:has(.article-layout) .recommend-float a { text-underline-offset: 3px; }
.glance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 28px 0; }
.glance-card {
  position: relative;
  background: var(--card);
  border: 0;
  border-radius: 16px;
  padding: 22px 22px 22px 32px;
}
.glance-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 14px;
  background: radial-gradient(circle at 0 7px, var(--paper) 4.5px, transparent 5px) 0 0 / 14px 16px repeat-y;
}
.glance-card h3::before {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  margin-bottom: 10px;
  background:
    linear-gradient(var(--clay), var(--clay)) 0 0 / 12px 1.5px no-repeat,
    linear-gradient(var(--clay), var(--clay)) 0 0 / 1.5px 12px no-repeat;
}
.choice, .term, .audit-row, .plan-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--s3);
}
.choice-grid, .term-list, .plan-grid { display: grid; gap: var(--s2); margin-top: var(--s3); }
.choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.plan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.audit-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--s2); align-items: start; margin-top: var(--s2); }
.crumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; margin: 32px 0 var(--s2); }
.crumb a { text-decoration: none; }
.meta-row { display: flex; flex-wrap: wrap; gap: var(--s1); margin: var(--s2) 0 var(--s3); }
.meta-row span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-control); background: var(--sand); font-size: 13px; }
.meta-row span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--clay); }
main > .wrap:has(.article-layout) {
  width: min(860px, calc(100% - 48px));
  padding-top: 28px;
  padding-bottom: 72px;
}
@media (min-width: 901px) and (max-width: 1560px) {
  main > .wrap:has(.article-layout) {
    width: min(860px, calc(100% - 336px));
    margin-left: max(24px, calc((100% - 1164px) / 2));
    margin-right: auto;
  }
}
.wrap:has(.article-layout) > .crumb { margin: 0 0 18px; }
.float-x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: var(--sand);
  color: var(--ink);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.notes-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "kicker" "title" "lead" "count";
  align-items: start;
  row-gap: 12px;
  padding: 72px 0 28px;
  max-width: 40em;
}
.notes-hero .kicker { grid-area: kicker; margin: 0; }
.notes-hero h1 { grid-area: title; font-size: var(--h1); margin: 0; }
.notes-lead { grid-area: lead; margin: 0; color: var(--muted); max-width: 36em; }
.notes-hero h1::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin-bottom: 16px;
  background:
    linear-gradient(var(--clay), var(--clay)) 0 0 / 14px 1.5px no-repeat,
    linear-gradient(var(--clay), var(--clay)) 0 0 / 1.5px 14px no-repeat;
}
.note-count {
  grid-area: count;
  margin: 4px 0 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.note-count [data-note-count] {
  color: var(--clay);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}
.note-grid { display: grid; gap: 16px; padding-bottom: 96px; }
.note-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  grid-template-areas: "meta go" "title go" "summary go";
  column-gap: 16px;
  row-gap: 8px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 0;
  border-radius: 16px;
  padding: 22px 22px 22px 36px;
  position: relative;
}
.note-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 14px;
  background: radial-gradient(circle at 0 7px, var(--paper) 4.5px, transparent 5px) 0 0 / 14px 16px repeat-y;
}
.note-meta { grid-area: meta; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 0; }
.note-card .kicker { margin: 0; }
.note-card h2 { grid-area: title; font-size: 26px; line-height: 1.25; margin: 0; }
.note-card .note-summary { grid-area: summary; margin: 0; color: var(--muted); max-width: 46em; }
.note-date { margin: 0; color: var(--clay); font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; letter-spacing: 0.04em; }
.note-go {
  grid-area: go;
  justify-self: end;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: rotate(-45deg);
}
.note-card.is-latest h2 { font-size: 32px; }
.auth-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr); gap: var(--s4); padding: 72px 0 var(--s4); align-items: start; }
main > .wrap.auth-split { padding-top: 72px; }
main > .wrap.desk-frame {
  width: min(960px, calc(100% - 48px));
  margin-top: 72px;
  margin-bottom: 72px;
  padding-top: 0;
  padding-bottom: 0;
  display: block;
  position: relative;
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
}
main > .wrap.desk-frame::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 16px;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(circle at 0 8px, var(--paper) 5px, transparent 5.5px) 0 0 / 16px 18px repeat-y;
}
.auth-story h1 { font-size: 40px; line-height: 1.15; }
.auth-story h1::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin-bottom: 16px;
  background:
    linear-gradient(var(--clay), var(--clay)) 0 0 / 14px 1.5px no-repeat,
    linear-gradient(var(--clay), var(--clay)) 0 0 / 1.5px 14px no-repeat;
}
.auth-points { margin: 28px 0 0; padding: 0; list-style: none; display: grid; counter-reset: authstep; }
.auth-points li {
  counter-increment: authstep;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-left: 0;
}
.auth-points li::before {
  content: counter(authstep, decimal-leading-zero);
  color: var(--clay);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
}
.pass-sheet {
  position: relative;
  background: var(--card);
  border: 0;
  border-radius: 16px;
  padding: 28px 24px 24px 36px;
}
.pass-sheet::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 14px;
  background: radial-gradient(circle at 0 7px, var(--paper) 4.5px, transparent 5px) 0 0 / 14px 16px repeat-y;
}
.pass-sheet h2 { font-size: 22px; line-height: 1.3; margin: 0 0 12px; }
.field { display: grid; gap: var(--s1); margin-top: var(--s2); }
.field input {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--paper);
  padding: 0 12px;
  text-align: left;
  letter-spacing: 0.02em;
}
.field input:focus { border-color: var(--ink); outline: none; }
.auth-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.desk-frame { display: block; padding: 0; }
.lane { margin: 0; }
.prefix-row { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--paper); min-height: 44px; }
.prefix-row:focus-within { border-color: var(--ink); }
.prefix-row input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 16px; outline: none; }
[data-alias-prefix] { padding-left: 16px; }
.prefix-row input:focus { outline: none; border: 0; }
.suffix { display: flex; align-items: center; padding: 0 12px; color: var(--muted); white-space: nowrap; }
.alias-row, .archive-row { display: flex; align-items: center; gap: var(--s2); padding: 12px 0; border-bottom: 1px solid var(--line); }
.alias-row .addr, .archive-row p { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pill { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: var(--radius-control); background: var(--sand); font-size: 13px; }
.filter-trigger, .chev { display: inline-flex; align-items: center; }
.chev { width: 7px; height: 7px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); margin-left: 8px; }
.filter-menu { display: grid; gap: 4px; margin-top: var(--s1); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); padding: var(--s1); width: max-content; }
.twofa-howto { display: grid; gap: 8px; margin: 0 0 16px; padding-left: 1.2em; }
.twofa-qr-plate { margin: 0; background: var(--paper); padding: 8px; }
.twofa-bench { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: var(--s3); align-items: start; margin-top: var(--s2); }
.twofa-bench img { width: 160px; height: 160px; background: var(--paper); }
.omit-note { margin-top: 14px; padding: 12px 14px; border-left: 3px solid var(--clay); background: var(--card); }
.empty-state { padding: var(--s3); border: 1px dashed var(--line); border-radius: var(--radius-card); color: var(--muted); }
.console-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--paper); border-radius: var(--radius-control); padding: 10px 16px; z-index: 60; max-width: min(420px, calc(100% - 32px)); }

.foot-cols h2 { font-size: 14px; line-height: 1.4; margin: 0 0 8px; font-weight: 600; }
[data-code-pane] { display: grid; gap: 16px; }
[data-code-pane] h2 { font-size: 22px; line-height: 1.3; margin: 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.filter-trigger {
  display: inline-flex;
  align-items: center;
  position: relative;
  min-height: 40px;
  height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  background: var(--sand);
  border-radius: var(--radius-control);
  gap: 8px;
}
.filter-trigger::after { content: none; }
.filter-menu [role="option"] {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 12px;
  width: 100%;
  text-align: left;
}
.archive-detail { min-width: 0; max-width: 100%; }
.archive-detail iframe { min-width: 0; max-width: 100%; }
[data-2fa-badge] { margin-bottom: 20px; display: block; }
[data-2fa-disable] { margin-top: 24px; }
[data-twofa-setup] { margin-top: 24px; }
.lane-guard:has([data-twofa-setup]:not([hidden])) [data-twofa-start] { display: none; }
.guard-steps, .twofa-howto {
  margin: 16px 0 20px;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.guard-steps li, .twofa-howto li {
  margin: 0;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

/* Alias desk is one perforated sheet. Later rules beat the lane cards above. */
.desk-mast {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  padding: 36px 40px 28px 52px;
  border-bottom: 1px solid var(--line);
}
.desk-mast h1 {
  margin: 10px 0 6px;
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.desk-mail {
  margin: 0;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.desk-meter {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 112px;
}
.desk-cap {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.desk-meter [data-quota] {
  margin: 0;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 600;
  color: var(--clay);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.desk-meter .quiet { margin-top: 6px; }
.desk-body .lane {
  padding: 32px 40px 36px 52px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.desk-body .lane:last-child { border-bottom: 0; }
.desk-body .lane h2 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.25;
}
.desk-body .lane h2::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin-bottom: 10px;
  background:
    linear-gradient(var(--clay), var(--clay)) 0 0 / 14px 1.5px no-repeat,
    linear-gradient(var(--clay), var(--clay)) 0 0 / 1.5px 14px no-repeat;
}
.desk-body .lane > p:not([data-2fa-badge]) {
  margin: 0 0 18px;
  max-width: 62em;
  color: var(--muted);
}
.desk-body .lane > p[data-2fa-badge] {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  margin: 0 0 14px;
  padding: 4px 10px;
  border-radius: var(--radius-control);
  background: var(--sand);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.desk-body .empty-state {
  margin: 0;
  padding: 4px 0 0;
  border: 0;
  color: var(--muted);
}
.lane-alias form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.lane-alias .prefix-row {
  flex: 1 1 280px;
  min-width: min(100%, 240px);
  height: 48px;
  min-height: 48px;
}
.lane-alias .prefix-row input { font-size: 16px; }
.lane-alias .prefix-row input:focus,
.lane-alias .prefix-row:focus-within { outline: none; }
.lane-alias .auth-actions { margin: 0; flex-wrap: nowrap; }
.lane-alias .auth-actions .quiet,
.lane-alias .auth-actions .head-create,
.lane-guard .head-create,
.lane-guard .auth-actions .head-create,
.lane-guard .auth-actions .quiet {
  height: 48px;
  min-height: 48px;
  padding: 0 18px;
  font-size: 16px;
}
.alias-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
  align-items: center;
  padding: 16px 0;
}
.alias-row .addr { margin: 0; font-family: var(--mono); font-size: 15px; }
.alias-acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.archive-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "subject when" "meta when";
  gap: 2px 16px;
  width: 100%;
  margin: 0;
  padding: 14px 0;
  text-align: left;
  cursor: pointer;
  border-radius: 0;
}
.archive-row .arc-subject {
  grid-area: subject;
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.archive-row .arc-meta {
  grid-area: meta;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.archive-row .arc-when {
  grid-area: when;
  margin: 0;
  align-self: center;
  color: var(--clay);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.archive-row:hover .arc-subject { color: var(--clay); }
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}
.filter-slot { position: relative; }
.filter-bar .filter-trigger {
  height: 40px;
  min-height: 40px;
  padding: 0 16px;
  font-size: 16px;
  white-space: nowrap;
  max-width: 100%;
}
.filter-bar .chev {
  margin-left: 10px;
  transform: translateY(-2px) rotate(45deg);
}
.filter-bar .filter-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 8;
  margin: 0;
  min-width: 180px;
  width: max-content;
  max-width: min(320px, calc(100vw - 64px));
  box-shadow: 0 10px 30px rgba(42, 40, 38, 0.12);
}
.filter-bar .filter-menu button,
.filter-bar .filter-menu [role="option"] {
  display: flex;
  width: 100%;
  min-height: 40px;
  border-radius: 8px;
  background: transparent;
  font-size: 15px;
}
.filter-bar .filter-menu button:hover { background: var(--sand); }
.filter-bar .auth-actions { margin: 0 0 0 auto; }
.filter-bar > .auth-actions .quiet {
  height: 40px;
  min-height: 40px;
  padding: 0 16px;
  font-size: 16px;
}
.twofa-bench form { max-width: 240px; }
.twofa-bench .field { margin-top: 12px; }
.twofa-bench .field input { letter-spacing: 0.16em; }
.twofa-howto { display: none; }
.desk-body .guard-steps li {
  background: var(--sand);
  border: 0;
}
.desk-body .field input { height: 48px; font-size: 16px; }
.lane-guard label.field:has([data-2fa-off-code]) { display: none; }
.lane-guard:has([data-2fa-disable]:not([hidden])) label.field:has([data-2fa-off-code]) {
  display: grid;
  max-width: 240px;
  margin-top: 8px;
}
.twofa-bench p { margin: 0 0 12px; overflow-wrap: anywhere; font-family: var(--mono); font-size: 14px; }
.archive-detail .letter-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  margin: 16px 0 0;
  padding: 0 0 12px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.archive-detail .letter-head p { margin: 0; overflow-wrap: anywhere; }
.archive-detail .letter-head p:first-child { font-weight: 600; font-size: 18px; }
.archive-detail .letter-head p:last-child { color: var(--clay); font-size: 13px; font-weight: 600; }
.archive-detail .letter-frame { margin-top: 14px; }
.archive-detail .letter-frame iframe,
.archive-detail .letter-frame pre {
  width: 100%;
  min-height: 180px;
  max-height: 420px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}
.archive-detail .letter-frame pre {
  margin: 0;
  padding: 16px 18px;
  white-space: pre-wrap;
  font-family: var(--font-body);
  overflow-wrap: anywhere;
}
.archive-detail > a {
  display: inline-flex;
  align-items: center;
  margin: 12px 8px 0 0;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--sand);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
}
@media (max-width: 900px) {
  .folio-copy h1, .prose > h1, .notes-hero h1, .spread-body h2 { font-size: 36px; }
  .ticket-fig { font-size: 40px; }
  .guard-steps, .twofa-howto { grid-template-columns: minmax(0, 1fr); }
  .glance-grid, .choice-grid, .plan-grid, .auth-split, .desk-frame, .twofa-bench, .audit-row, .folio-grid, .pair, .time-row, .beats, .retain, .folio-close-grid { grid-template-columns: minmax(0, 1fr); }
  .band .wrap, .spread-grid { grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; }
  .prose > h2 { padding-left: 48px; }
  .prose > h2 + p { margin-left: 48px; }
  .lexicon > div { grid-template-columns: minmax(0, 1fr); }
  .article-layout { --sheet-x: 20px; --sheet-l: 80px; padding-top: 28px; }
  .article-mast h1 { font-size: 32px; }
  .article-mast .meta-row span:last-child { letter-spacing: 0.06em; }
  .article-layout .toc ol { grid-template-columns: minmax(0, 1fr); }
  .article-layout .chapter::before { left: -46px; top: 30px; font-size: 18px; }
  main > .wrap:has(.article-layout) .recommend-float { right: 12px; bottom: 12px; width: min(240px, calc(100% - 24px)); }
  .article-layout .article-cta .head-create,
  .article-layout .article-cta .switch { min-width: 0; }
  .notes-hero { padding-top: 48px; }
  .note-card, .note-card.is-latest { padding: 20px 16px 20px 28px; }
  .note-card h2, .note-card.is-latest h2 { font-size: 22px; }
  .specimen-head, .specimen-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  main > .wrap.desk-frame { width: min(960px, calc(100% - 32px)); margin-top: 28px; margin-bottom: 48px; }
  .desk-mast { flex-direction: column; align-items: flex-start; gap: 16px; padding: 28px 20px 22px 36px; }
  .desk-mast h1 { font-size: 32px; }
  .desk-meter { justify-items: start; }
  .desk-body .lane { padding: 24px 20px 28px 36px; }
  .lane-alias form { flex-direction: column; align-items: stretch; }
  .lane-alias .prefix-row { flex: 1 1 auto; width: 100%; max-width: 100%; min-width: 0; }
  .lane-alias .auth-actions { width: 100%; }
  .lane-alias .auth-actions .quiet,
  .lane-alias .auth-actions .head-create { flex: 1 1 auto; justify-content: center; }
  .alias-row { grid-template-columns: minmax(0, 1fr); }
  .alias-acts { justify-content: flex-start; }
  .archive-row { grid-template-columns: minmax(0, 1fr); grid-template-areas: "subject" "meta" "when"; }
  .archive-row .arc-when { white-space: normal; }
  .filter-bar .auth-actions { margin-left: 0; }
  .filter-bar .filter-trigger { white-space: normal; }
}
