/* Lacak Surat · Terlambat Satu Menit
   Halaman lacak kiriman tanpa gambar. Tema mengikuti situs (data-theme), lalu perangkat. */
:root {
  --ui: var(--qm-ui); --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace; --serif: var(--qm-read); --size: 19px;
  --bg: #f4f3ef; --card: #ffffff; --ink: #19191b; --muted: #6e6d72; --faint: #a3a2a6; --line: #e3e1db; --soft: #efede7;
  --pending: #6e6d72; --pending-bg: #ecebe6; --held: #a1650f; --held-bg: #fbf0dc; --transit: #2559c7; --transit-bg: #e5edfd;
  --done: #1f7a4b; --done-bg: #e0f3e8; --lost: #b8371f; --lost-bg: #fbe5df; --accent: #19191b; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px -16px rgba(0,0,0,.18);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #111112; --card: #19191b; --ink: #f1f0ec; --muted: #9b9aa0; --faint: #5f5e64; --line: #2a2a2d; --soft: #202023;
  --pending: #a5a4aa; --pending-bg: #26262a; --held: #f0b45c; --held-bg: #33280f; --transit: #8bb0ff; --transit-bg: #172440;
  --done: #6fd39c; --done-bg: #112b1e; --lost: #ff8a70; --lost-bg: #38170f; --accent: #f1f0ec; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -18px rgba(0,0,0,.8);
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #111112; --card: #19191b; --ink: #f1f0ec; --muted: #9b9aa0; --faint: #5f5e64; --line: #2a2a2d; --soft: #202023;
  --pending: #a5a4aa; --pending-bg: #26262a; --held: #f0b45c; --held-bg: #33280f; --transit: #8bb0ff; --transit-bg: #172440;
  --done: #6fd39c; --done-bg: #112b1e; --lost: #ff8a70; --lost-bg: #38170f; --accent: #f1f0ec; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -18px rgba(0,0,0,.8);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; color: var(--ink); background: var(--bg); font: 14px/1.5 var(--ui); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { opacity: .4; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--transit); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.eyebrow { margin: 0; font: 500 11px var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* Bilah atas */
.topbar { position: sticky; top: 0; z-index: 20; height: 60px; display: flex; align-items: center; gap: 8px; padding: 0 max(12px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left)); background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.icon { width: 40px; height: 40px; flex: none; border: 0; display: inline-grid; place-items: center; background: transparent; border-radius: 10px; text-decoration: none; color: var(--ink); font: 300 26px var(--ui); }
.icon:hover { background: var(--soft); }
.brand { display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 4px 8px; border: 0; background: none; font: 600 14px var(--ui); letter-spacing: -.01em; }
.brand-mark { width: 18px; height: 13px; border: 1.6px solid currentColor; border-radius: 2px; background: linear-gradient(to bottom right, transparent 47%, currentColor 48% 52%, transparent 53%) top / 100% 70% no-repeat, linear-gradient(to bottom left, transparent 47%, currentColor 48% 52%, transparent 53%) top / 100% 70% no-repeat; }
.top-resi { flex: 1; text-align: right; padding-right: 6px; color: var(--muted); font: 500 12px var(--mono); letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reading-line { position: absolute; left: 0; bottom: -1px; height: 2px; width: calc(var(--progress, 0) * 100%); background: var(--transit); }
html:not([data-view="detail"]) .reading-line { display: none; }

/* Halaman lacak */
.home, .detail, .summary { width: min(760px, 100%); margin: 0 auto; padding: 0 20px 120px; }
.detail { padding-bottom: 55vh; }
.search { padding: 12vh 0 32px; }
.search h1 { margin: 10px 0 10px; font: 600 clamp(36px, 6vw, 56px)/1.02 var(--ui); letter-spacing: -.035em; }
.search-note { margin: 0 0 28px; color: var(--muted); font-size: 15px; }
.search-form { display: flex; gap: 8px; padding: 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
#resi { flex: 1; min-width: 0; height: 56px; padding: 0 14px; border: 0; background: none; color: var(--ink); font: 500 clamp(18px, 4.6vw, 24px) var(--mono); letter-spacing: .08em; outline: none; caret-color: var(--transit); }
#trackButton { flex: none; height: 56px; padding: 0 26px; border: 0; border-radius: 12px; background: var(--accent); color: var(--bg); font: 600 15px var(--ui); }
html[data-ready="track"] #trackButton { animation: ready 1.6s ease-in-out infinite; }
@keyframes ready { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--transit) 25%, transparent); } }
.results { padding-top: 8px; }
.results-head { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.shipments { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.skeleton { height: 128px; border-radius: 16px; background: linear-gradient(90deg, var(--soft), var(--card), var(--soft)); background-size: 200% 100%; animation: shimmer 1.1s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.ship-card { position: relative; width: 100%; display: grid; gap: 12px; padding: 18px 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); text-align: left; overflow: hidden; transition: transform .2s ease, border-color .2s; animation: cardIn .45s ease both; }
.shipments li:nth-child(2) .ship-card { animation-delay: .08s; }
.shipments li:nth-child(3) .ship-card { animation-delay: .16s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } }
.ship-card:hover { border-color: var(--faint); transform: translateY(-1px); }
.ship-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.resi { font: 500 13px var(--mono); letter-spacing: .06em; color: var(--muted); }
.ship-route { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 20px; letter-spacing: -.02em; }
.ship-route b { font-weight: 600; }
.ship-route span { color: var(--faint); }
.ship-route small { flex-basis: 100%; color: var(--muted); font-size: 13px; letter-spacing: 0; }
.ship-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.ship-progress { position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--p) * 100%); background: var(--transit); }
.summary-card { width: 100%; margin-top: 10px; display: grid; gap: 4px; padding: 18px; border: 1px dashed var(--ink); border-radius: 16px; background: none; text-align: left; font: 600 17px var(--ui); }
.summary-card small { font: 400 12px var(--ui); color: var(--muted); }

.status-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 3px 10px; border-radius: 999px; font: 600 12px/1.2 var(--ui); color: var(--pending); background: var(--pending-bg); white-space: normal; }
.status-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.status-chip[data-tone="held"] { color: var(--held); background: var(--held-bg); }
.status-chip[data-tone="transit"] { color: var(--transit); background: var(--transit-bg); }
.status-chip[data-tone="done"] { color: var(--done); background: var(--done-bg); }
.status-chip[data-tone="lost"] { color: var(--lost); background: var(--lost-bg); }
.status-chip.updated { animation: pop .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { 30% { transform: scale(1.08); } }

/* Riwayat */
.ship-head { padding: 34px 0 26px; }
.resi-big { margin: 8px 0 22px; font: 500 clamp(28px, 6vw, 42px) var(--mono); letter-spacing: .06em; }
.route { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0 0 22px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--line); }
.route div { padding: 12px 14px; background: var(--card); }
.route dt { color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.route dd { margin: 4px 0 0; }
.route b { display: block; font-weight: 600; font-size: 15px; }
.route small { display: block; color: var(--muted); font-size: 12px; line-height: 1.4; margin-top: 2px; }
.side-line { margin: 0 0 18px; color: var(--muted); font: italic 400 17px var(--serif); }
.side-line #sideTitle { color: var(--ink); font-style: normal; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.begin { min-height: 46px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--accent); color: var(--bg); font-weight: 600; }
.resume { min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--transit); text-decoration: underline; text-underline-offset: 4px; font-size: 13px; }
.status-bar { position: sticky; top: 56px; z-index: 10; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px 16px; margin: 0 -20px; padding: 12px 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
.status-bar .status-chip { min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; line-height: 20px; }
.status-bar .status-chip::before { display: inline-block; margin-right: 6px; vertical-align: 1px; }
.stages { display: flex; margin: 0; padding: 0; list-style: none; gap: 4px; min-width: 0; }
.stages li { flex: 1; min-width: 0; padding-top: 8px; position: relative; color: var(--faint); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stages li::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; border-radius: 2px; background: var(--line); }
.stages li[data-done] { color: var(--muted); }
.stages li[data-done]::before { background: var(--ink); }
.stages li[data-current] { color: var(--ink); font-weight: 600; }
.last-scan { color: var(--muted); font: 12px var(--mono); white-space: nowrap; }

.timeline { position: relative; margin: 24px 0 0; padding: 0; list-style: none; }
.timeline::before { content: ''; position: absolute; left: 77px; top: 8px; bottom: 0; width: 1px; background: var(--line); }
.loading { padding: 20vh 0; color: var(--muted); }
.entry { display: grid; grid-template-columns: 64px 26px minmax(0, 1fr); align-items: start; padding: 10px 0 22px; }
.when { padding-top: 7px; text-align: right; line-height: 1.2; }
.when time { display: block; font-size: 13px; color: var(--ink); }
.when time.pending { color: var(--faint); }
.when small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.dot { position: relative; z-index: 1; justify-self: center; margin-top: 10px; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--faint); background: var(--bg); transition: background .3s, border-color .3s; }
.entry[data-scanned] .dot { background: var(--ink); border-color: var(--ink); }
.entry.beat .dot { width: 13px; height: 13px; margin-top: 8px; }
.entry.beat[data-scanned] .dot { background: var(--transit); border-color: var(--transit); box-shadow: 0 0 0 4px var(--transit-bg); }
.entry.just .dot { animation: ping 1s ease-out; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 var(--transit); } 100% { box-shadow: 0 0 0 14px transparent; } }
.entry[data-fog] .when time { filter: blur(1.6px); color: var(--muted); }
.entry[data-fog] .when small { font-style: italic; }
.entry[data-frozen] .when time { color: var(--lost); }
.what { min-width: 0; padding-left: 4px; }
.entry-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 2px 0 10px; }
.loc { color: var(--muted); font-size: 12px; }
.loc::before { content: '⌖ '; color: var(--faint); }
.passage { margin: 0; font: 400 var(--size)/1.75 var(--serif); overflow-wrap: anywhere; text-wrap: pretty; }
.passage:focus { outline: none; }
.gap { height: 54px; display: grid; grid-template-columns: 64px 26px 1fr; }
.gap span { grid-column: 2; justify-self: center; width: 13px; height: 1px; background: var(--faint); margin-top: 27px; }

.manifest { margin: 14px 0 0; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.manifest summary { min-height: 46px; display: flex; align-items: center; padding: 0 14px; cursor: pointer; color: var(--held); font-weight: 600; font-size: 13px; }
.manifest ol { margin: 0; padding: 0 14px 10px; list-style: none; max-height: 340px; overflow: auto; }
.manifest li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font: 12px var(--mono); color: var(--muted); }
.forwarded { margin: 0 0 12px; padding: 0; list-style: none; }
.forwarded li { padding: 4px 0; font: 12px var(--mono); color: var(--muted); opacity: calc(.25 + var(--n) * .08); text-decoration: line-through; text-decoration-color: var(--faint); }
.forwarded li::before { content: '↪ '; }

.proof { margin: 20px 0 6px; padding: 20px 20px 18px; border: 1.5px dashed var(--ink); border-radius: 14px; background: var(--card); }
.proof.arrive { animation: arrive .9s cubic-bezier(.2,1.2,.4,1) both; }
@keyframes arrive { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.proof-title { margin: 0 0 14px; font: 600 12px var(--ui); letter-spacing: .12em; text-transform: uppercase; }
.proof dl { margin: 0; display: grid; gap: 0; }
.proof dl div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--line); }
.proof dt { color: var(--muted); font-size: 12px; }
.proof dd { margin: 0; font-size: 15px; font-weight: 500; }
.proof .received dd { font: 600 30px var(--ui); letter-spacing: -.02em; color: var(--lost); }
.proof .signature { height: 36px; border-bottom: 1px dashed var(--faint); }
.proof .late dd { font: 600 20px var(--ui); color: var(--lost); }
.revisits { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.revisits li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 12px; }
.revisits li small { color: var(--muted); }
.revisits .estimate { border-style: dashed; background: none; }
.part-end { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 70px; padding-top: 30px; border-top: 1px solid var(--line); }
.next-side { min-height: 52px; padding: 0 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-weight: 600; text-align: left; }
.summary-link { border: 1.5px dashed var(--ink); }
.text-button { min-height: 40px; border: 0; background: none; color: var(--muted); font-size: 13px; }

/* Ringkasan */
.summary header { padding: 40px 0 24px; }
.summary h1 { margin: 8px 0 0; font: 600 clamp(30px, 5vw, 44px)/1.05 var(--ui); letter-spacing: -.03em; }
.summary-rows { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card); }
.summary-rows li { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center; padding: 16px 18px; border-top: 1px solid var(--line); animation: cardIn .5s ease both; }
.summary-rows li:first-child { border-top: 0; }
.summary-rows li:nth-child(2) { animation-delay: .1s; } .summary-rows li:nth-child(3) { animation-delay: .2s; } .summary-rows li:nth-child(4) { animation-delay: .3s; } .summary-rows li:nth-child(5) { animation-delay: .45s; }
.summary-rows .resi { grid-column: 1 / -1; font-size: 11px; }
.summary-rows b { font-size: 16px; }
.summary-rows .status-chip { grid-column: 1; justify-self: start; }
.summary-rows .mono { grid-column: 2; grid-row: 2 / 4; color: var(--muted); }
.reader-log { margin: 28px 0 0; padding: 18px; border-radius: 16px; background: var(--soft); }
.reader-log p:last-child { margin: 8px 0 0; font-size: 15px; }
.coda { margin: 70px 0 40px; }
.coda .speaker { margin: 26px 0 6px; color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.coda blockquote { margin: 0; font: 400 clamp(24px, 3.4vw, 32px)/1.35 var(--serif); }
.estimate-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 40px; color: var(--muted); }

/* Dialog */
dialog { width: min(440px, calc(100% - 28px)); max-height: 85dvh; overflow: auto; padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: var(--ink); overscroll-behavior: contain; }
dialog::backdrop { background: rgba(0,0,0,.3); backdrop-filter: blur(4px); }
body:has(dialog[open]) { overflow: hidden; }
.dialog-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; background: var(--card); }
.dialog-head h2 { margin: 0; font: 600 20px var(--ui); }
.settings-body { padding: 0 20px 18px; }
.setting-row { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.setting-button { min-width: 44px; min-height: 44px; padding: 8px; border: 0; background: none; color: var(--transit); font-weight: 600; }
.setting-button[aria-pressed="true"] { text-decoration: underline; text-underline-offset: 4px; }
.dialog-note { color: var(--muted); font-size: 12px; margin: 12px 0; }
.volume-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
#volume { width: 100%; height: 40px; accent-color: var(--transit); }

@media (max-width: 640px) {
  .home, .detail, .summary { padding: 0 16px 100px; }
  .detail { padding-bottom: 55vh; }
  .search { padding-top: 8vh; }
  #trackButton { padding: 0 18px; }
  .route { grid-template-columns: 1fr 1fr; }
  .route div:last-child { grid-column: 1 / -1; }
  .status-bar { margin: 0 -16px; padding: 10px 16px; grid-template-columns: 1fr auto; }
  .status-bar .status-chip { justify-self: start; }
  .stages { grid-column: 1 / -1; grid-row: 2; }
  .stages li { font-size: 9px; }
  .timeline::before { left: 61px; }
  .entry, .gap { grid-template-columns: 50px 22px minmax(0, 1fr); }
  .when time { font-size: 11px; }
  .when small { font-size: 9px; }
  .passage { line-height: 1.7; }
  .proof dl div { grid-template-columns: 110px 1fr; }
  .proof .received dd { font-size: 24px; }
}
html[data-calm] *, html[data-calm] *::before, html[data-calm] *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
#summaryTitle:focus { outline: none; }

/* Isi kiriman */
.contents-button { min-height: 46px; padding: 0 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-weight: 600; position: relative; }
.contents-mini { min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font: 600 12px var(--ui); position: relative; }
.contents-button.fresh::after, .contents-mini.fresh::after { content: ''; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--transit); box-shadow: 0 0 0 2px var(--bg); animation: pop .6s cubic-bezier(.3,1.6,.5,1); }
.status-bar { grid-template-columns: auto 1fr auto auto; }
.contents-dialog { width: min(560px, calc(100% - 24px)); background: var(--bg); }
.contents-dialog .dialog-head { background: var(--bg); padding-bottom: 8px; }
.contents-dialog .dialog-head .eyebrow { font: 500 11px var(--mono); letter-spacing: .06em; margin-bottom: 4px; }
.contents-tabs { display: flex; gap: 6px; padding: 0 20px 10px; flex-wrap: wrap; }
.contents-tabs:empty { display: none; }
.contents-tabs button { min-height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: none; font: 600 12px var(--ui); color: var(--muted); }
.contents-tabs button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.contents-body { padding: 4px 20px 24px; }
.contents-label { margin: 0 0 10px; font: 600 15px var(--ui); }
.letter-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); }
.letter-meta div { padding: 9px 12px; background: var(--card); }
.letter-meta dt { color: var(--muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.letter-meta dd { margin: 2px 0 0; font-weight: 600; font-size: 13px; }
.letter { --rule: color-mix(in srgb, var(--transit) 22%, transparent); --ink-letter: color-mix(in srgb, var(--ink) 82%, #1b3a8a 18%); position: relative; padding: 26px 24px 30px 44px; border-radius: 6px; background: repeating-linear-gradient(to bottom, transparent 0 35px, var(--rule) 35px 36px), var(--card); background-position: 0 14px; box-shadow: var(--shadow); color: var(--ink-letter); }
.letter::before { content: ''; position: absolute; left: 30px; top: 0; bottom: 0; width: 1px; background: color-mix(in srgb, var(--lost) 35%, transparent); }
.letter-line { margin: 0 0 36px; font: 400 calc(var(--size) + 1px)/36px var(--serif); animation: write 1.2s ease both; }
.letter-line:last-child { margin-bottom: 0; }
.letter[data-hand="saman"] .letter-line, .letter[data-hand="maryam"] .letter-line { font-style: italic; letter-spacing: .015em; }
.letter[data-hand="saman"] .letter-line { word-spacing: .12em; }
.letter-line.faded { opacity: .55; filter: saturate(.4); }
@keyframes write { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.contents-empty { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.sealed { position: relative; height: 150px; border-radius: 6px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.sealed::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom right, transparent calc(50% - 1px), var(--line) 50%, transparent calc(50% + 1px)) left / 50% 100% no-repeat, linear-gradient(to bottom left, transparent calc(50% - 1px), var(--line) 50%, transparent calc(50% + 1px)) right / 50% 100% no-repeat; }
.sealed span { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px; border-radius: 50%; background: var(--lost); opacity: .7; }
@media (max-width: 640px) {
  .status-bar { grid-template-columns: 1fr auto auto; }
  .letter { padding: 22px 16px 26px 34px; }
  .letter::before { left: 22px; }
  .letter-meta dd { font-size: 12px; }
}

/* Kolom resi, 52 surat, kiriman lain */
#resi:not([readonly]) { cursor: text; }
.ship-card.static { cursor: default; }
.ship-card.static:hover { transform: none; border-color: var(--line); }
.letter.mini { padding: 16px 16px 18px 34px; box-shadow: none; border: 1px solid var(--line); }
.letter.mini::before { left: 22px; }
.letter.mini .letter-line { font-size: 17px; line-height: 30px; margin-bottom: 30px; }
.letter.mini .letter-line:last-child { margin-bottom: 0; }
.letter.mini { background: repeating-linear-gradient(to bottom, transparent 0 29px, var(--rule) 29px 30px), var(--card); background-position: 0 12px; }
.open-side { justify-self: start; color: var(--transit); padding: 0; }
.reset-search { min-height: 40px; margin: 12px 0 0; padding: 0; border: 0; background: none; color: var(--transit); font: 600 13px var(--ui); }
.not-found { padding: 22px 18px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); }
.not-found p { margin: 0; }
.manifest li { padding: 0; }
.manifest li button { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; min-height: 40px; padding: 6px 0; border: 0; background: none; color: var(--muted); font: 12px var(--mono); text-align: left; }
.manifest li button:hover { color: var(--ink); }
.manifest li button span:nth-child(2) { font-family: var(--ui); }

/* Urutan */
.order-toggle { min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: none; font: 600 12px var(--ui); white-space: nowrap; }
.order-toggle[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.status-bar { grid-template-columns: auto 1fr auto auto auto; }

/* Riwayat alamat */
.addresses { margin: -6px 0 22px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.addresses ol { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.addresses li { font-size: 13px; color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.addresses li:not(:last-child)::after { content: '→'; margin-left: 10px; color: var(--faint); display: inline-block; text-decoration: none; }
.addresses li[aria-current] { color: var(--ink); font-weight: 600; text-decoration: none; }
.addresses li[data-back] { color: var(--done); }

/* Catatan yang tidak dapat ditampilkan */
.redacted-status { margin: 0 0 12px; }
.redacted { position: relative; display: grid; gap: 14px; padding: 26px 22px; border-radius: 6px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.redacted span { display: block; width: var(--w); height: 13px; border-radius: 2px; background: var(--ink); opacity: .85; }
.redacted b { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-8deg); padding: 6px 14px; border: 2px solid var(--lost); border-radius: 6px; color: var(--lost); background: color-mix(in srgb, var(--card) 85%, transparent); font: 700 13px var(--ui); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.ship-card .redacted { box-shadow: none; border: 1px solid var(--line); padding: 18px; gap: 10px; }
.ship-card .redacted span { height: 10px; }

/* Bukti penerimaan untuk dicetak */
.print-head { display: none; }
.print-proof { margin-top: 14px; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; background: none; font: 600 13px var(--ui); }
@media print {
  html[data-print="proof"] body { background: #fff; color: #000; }
  html[data-print="proof"] body > *:not(#detail), html[data-print="proof"] #detail > *:not(#story), html[data-print="proof"] #story > li:not(:has(#proof)), html[data-print="proof"] #story .when, html[data-print="proof"] #story .dot, html[data-print="proof"] #story .entry-head, html[data-print="proof"] #story .passage, html[data-print="proof"] .print-proof { display: none !important; }
  html[data-print="proof"] #story, html[data-print="proof"] #story > li { display: block; padding: 0; margin: 0; }
  html[data-print="proof"] .timeline::before { display: none; }
  html[data-print="proof"] .proof { border-color: #000; box-shadow: none; animation: none; }
  html[data-print="proof"] .print-head { display: block; margin: 14px 0 0; font: 12px var(--mono); color: #444; }
}
@media (max-width: 640px) {
  .status-bar { grid-template-columns: 1fr auto auto; }
  .status-bar .last-scan { display: none; }
  .order-toggle { padding: 0 10px; }
}

@media (max-width: 1100px) and (min-width: 641px) { .status-bar .last-scan { display: none; } .status-bar { grid-template-columns: auto 1fr auto auto; } }

/* ---------- bingkai situs ---------- */
.ship-head .jm-step { margin: 0 0 14px; }
.summary-next { margin-top: 26px; }
@media (max-width: 420px) { .topbar .brand { padding: 4px 2px; } .topbar .brand #brandName { display: none; } }
@media (min-width: 900px) {
  .topbar { background-color: var(--bd-b); background-image: var(--qm-sky); background-attachment: fixed; -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom: 0; padding: 0 20px; }
  .home, .detail, .summary { margin: 4px auto 40px; min-height: calc(100vh - 104px); padding: 0 28px 160px; border-radius: 28px; background: var(--bg); box-shadow: var(--qm-shadow); }
  .reading-line { left: calc(50% - 366px); bottom: 0; width: calc(var(--progress, 0) * 732px); border-radius: 2px; }
}
