@charset "UTF-8";
:root{--paper:#f6eedf;--ink:#30263a;--muted:#786a74;--line:#d4c4ad;--pink:#b53666;--indigo:#514694;--teal:#247c72;--ochre:#aa6a19;--sA:var(--pink);--sB:var(--indigo);--sC:var(--teal);--sD:var(--ochre)}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:"PingFang SC","Microsoft YaHei",sans-serif}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer}button:disabled{cursor:default;opacity:.4}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid var(--indigo);outline-offset:4px}button{touch-action:manipulation}a{color:inherit}.page{max-width:1440px;margin:auto;padding:0 40px}.topline{display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid var(--ink);min-height:88px}.back{font-size:16px;font-weight:600;text-decoration:none;line-height:1.5}.text-button{border:0;background:none;min-height:44px;padding:8px 0;white-space:nowrap;font-size:15px}.masthead{display:flex;align-items:center;justify-content:space-between;padding:39px 0 32px}.eyebrow{font-size:15px;letter-spacing:.16em;margin:0 0 13px;color:var(--pink)}h1{font-size:clamp(32px,4.4vw,64px);margin:0;line-height:1.18;letter-spacing:-.04em}h1 span{color:var(--pink)}.paper-mark{display:flex;align-items:center;position:relative;gap:8px;margin-right:20px;transform:rotate(-9deg)}.paper-mark i{font:48px Georgia,serif;display:grid;place-items:center;border:1px solid var(--ink);width:52px;height:70px;background:#fffaf0;box-shadow:3px 3px 0 #ddcdb9}.paper-mark i:nth-child(2){transform:rotate(12deg)}.paper-mark b{font-size:35px;margin-left:8px;color:var(--pink)}.workbench{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.06fr);gap:42px;align-items:start}.maker,.packing{min-width:0}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 15px}h2{font-size:18px;margin:0}h3{font-size:15px;margin:0}.section-heading>span{font-size:12px;color:var(--muted)}.ink-note{font-weight:700;color:var(--pink)!important}.stamps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 18px}.stamp{position:relative;border:1px solid #dac6b0;border-bottom:5px solid #c6b49c;background:#fffbf2;border-radius:16px 16px 9px 9px;min-height:116px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;transition:transform .14s,box-shadow .14s}.stamp .shape{width:44px;height:44px}.stamp span{font-size:13px;font-weight:700;color:var(--muted)}.stamp::after{content:'＋';position:absolute;right:8px;top:5px;color:var(--muted);font-size:18px}.stamp:hover{box-shadow:0 5px 0 #d7c6b7;transform:translateY(-3px)}.stamp:active{transform:translateY(3px);box-shadow:none}.stamp.selected{border-color:var(--symbol-color);border-bottom-color:var(--symbol-color)}.shape{display:inline-block;flex:none;width:25px;height:25px;vertical-align:middle;color:var(--symbol-color)}[data-symbol="A"]{--symbol-color:var(--sA)}[data-symbol="B"]{--symbol-color:var(--sB)}[data-symbol="C"]{--symbol-color:var(--sC)}[data-symbol="D"]{--symbol-color:var(--sD)}.totals{background:var(--ink);color:#fff8ed;display:grid;grid-template-columns:1fr 30px 1.7fr;align-items:center;padding:16px 20px 13px;gap:0 10px;margin-bottom:22px;border-radius:3px}.totals>div{display:flex;align-items:baseline;gap:7px;flex-wrap:wrap}.totals>div>span{font-size:12px;width:100%;color:#d4c5ca}.totals strong{font:38px/1.1 Georgia,serif}.totals small{font-size:12px}.total-arrow{color:#dac1ce;font-size:23px}.totals p{grid-column:1/-1;margin:9px 0 0;border-top:1px solid #665365;padding-top:9px;color:#f2bdcd;font-size:13px}.totals p.saved{color:#bae5c8}.message-paper{background:#fffaf0;border:1px solid var(--line);position:relative;box-shadow:3px 4px 0 #e4d7c5;padding:15px 14px 9px}.message-paper::before{content:'';position:absolute;top:0;left:0;height:100%;width:4px;background:repeating-linear-gradient(to bottom,#d9c3a6 0 4px,transparent 4px 10px)}.paper-heading{display:flex;justify-content:space-between;align-items:center;margin:0 0 10px}.paper-heading>span{font-size:12px;color:var(--muted)}.message-strip{display:flex;flex-wrap:wrap;gap:2px;min-height:48px;max-height:142px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#d0bba4 transparent}.message-symbol{background:none;border:1px solid transparent;width:44px;height:44px;padding:8px;flex:none;border-radius:3px;position:relative}.message-symbol .shape{width:26px;height:26px}.message-symbol.selected{border-color:var(--symbol-color);background:color-mix(in srgb,var(--symbol-color) 9%,transparent)}.empty-note{font-size:13px;color:var(--muted);margin:auto 3px;line-height:1.7}.paper-actions{display:flex;justify-content:space-between;border-top:1px dashed var(--line);margin-top:8px}.small-button{border:0;background:none;font-size:12px;padding:10px 9px;min-height:44px;border-radius:4px}.small-button:hover{background:#e9ddce}.presets{display:flex;flex-wrap:wrap;gap:0 3px;align-items:center;margin-top:10px}.presets>span{font-size:12px;color:var(--muted);margin-right:3px}.presets .small-button{padding:9px 8px;color:var(--indigo);text-decoration:underline;text-underline-offset:4px}.feedback{font-size:13px;color:var(--muted);min-height:38px;margin:2px 0 15px;line-height:1.6}.code-heading{border-top:1px solid var(--line);padding-top:18px;margin-bottom:9px}.code-heading>span{font-size:11px}.codebook{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.code-card{background:#ede2d2;border:1px solid transparent;padding:10px 6px;min-width:0;border-radius:3px;display:flex;flex-direction:column;align-items:center;gap:7px}.code-card.selected{border-color:var(--symbol-color);background:#fffaf0}.code-card>span{font-size:11px;color:var(--muted)}.frequency-track{height:5px;background:#d8c8b7;width:100%;margin:2px 0}.frequency-track i{display:block;height:100%;background:var(--symbol-color)}.code-card code{font:700 19px/1.1 "Courier New",monospace;letter-spacing:.1em;color:var(--symbol-color);min-height:21px}.code-card small{font-size:10px;color:var(--muted)}.scale-key{display:flex;align-items:center;gap:5px;white-space:nowrap}.scale-key i{display:block;width:13px;height:20px;border:1px solid var(--muted)}.bit-sheet{padding:17px 18px;background:#fffbf3;border:1px solid var(--line);margin-bottom:15px;box-shadow:3px 4px 0 #e4d7c5}.band-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:13px}.band-heading>span{font-size:11px;color:var(--muted);text-align:right}.band-heading b{display:inline-block;font-size:14px;color:var(--ink);margin-left:8px}.bit-band{display:grid;grid-template-columns:repeat(auto-fill,16px);gap:3px;align-content:start;min-height:23px}.bit{display:grid;place-items:center;width:16px;height:23px;background:#f0e8dc;border:1px solid #d6c7b9;font:12px/1 "Courier New",monospace;color:var(--muted);position:relative}.bit[data-symbol]{background:color-mix(in srgb,var(--symbol-color) 8%,#fffaf0);border-color:color-mix(in srgb,var(--symbol-color) 45%,#fffaf0);color:var(--symbol-color)}.bit.selected{background:var(--symbol-color);border-color:var(--symbol-color);color:#fff}.bit.start::before{content:'';position:absolute;left:-2px;top:0;bottom:0;border-left:1px solid var(--ink);opacity:.7}.bit.read{opacity:.34}.bit.reading{outline:2px solid var(--ink);outline-offset:1px;transform:translateY(-2px);opacity:1}.huffman-sheet{border-top:4px solid var(--pink);padding-top:14px}.table-card{border-top:1px dashed #cbb9a6;margin-top:16px;padding-top:12px}.table-card>div:first-child{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;gap:10px}.table-card strong{font-size:12px;font-weight:600}.table-card>div>span{font-size:13px;color:var(--muted)}.table-bits .bit{background:#ece0ce;border:1px dashed #bba68d;color:#7a6451}.table-card small{font-size:11px;display:block;margin-top:9px;color:var(--muted);line-height:1.5}.pack-action{display:flex;align-items:center;gap:16px;margin:21px 0 18px}.primary-button{border:0;border-bottom:4px solid #782345;background:var(--pink);color:white;border-radius:5px;min-height:54px;padding:13px 21px;font-size:16px;font-weight:700;box-shadow:0 3px 0 #e3d3c2;display:flex;gap:30px;align-items:center;justify-content:space-between}.primary-button:hover{background:#a32f5a}.primary-button:active{transform:translateY(2px)}.primary-button span{font-size:21px}.pack-action>span{font-size:13px;font-family:"Courier New",monospace;color:var(--muted)}.decoder{border:1px solid #bcb0b8;border-radius:3px;background:#eae1e5;padding:15px 18px 12px;box-shadow:inset 0 4px 0 #d1c3cd}.decoder-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.decoder-heading h2{font-size:17px}.play-controls{display:flex;gap:3px}.reader{display:grid;grid-template-columns:50px 65px minmax(0,1fr);gap:8px;align-items:center;background:#fffaf3;padding:10px 12px;border:1px solid #cabbc3;min-height:74px}.reader-label{font-size:12px;color:var(--muted)}.reader strong{font:700 24px "Courier New",monospace;color:var(--pink);letter-spacing:.03em}.reader #readResult{font-size:13px;text-align:right}.reader #readProgress{grid-column:1/-1;font:11px "Courier New",monospace;color:var(--muted)}.progress-track{height:4px;background:#d3c2cc;margin-top:5px}.progress-track i{display:block;height:100%;background:var(--pink);width:0;transition:width .15s}.restored-strip{display:flex;flex-wrap:wrap;gap:3px;min-height:49px;max-height:132px;overflow-y:auto;padding-top:12px}.restored-symbol{width:26px;height:28px;display:grid;place-items:center}.restored-symbol .shape{width:23px;height:23px}.restore-status{font-size:12px;color:var(--muted);line-height:1.6;margin:8px 0 0;min-height:20px}.restore-status.success{color:#226c58;font-weight:700}.tree-details{margin:20px 0 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:4px 0}.tree-details summary{cursor:pointer;min-height:48px;padding:14px 2px;font-size:13px;font-weight:600;list-style-position:inside}.tree-details summary span{font-size:11px;color:var(--muted);font-weight:400;margin-left:14px;white-space:nowrap}.tree-wrap{width:100%;min-height:90px;background:#fff8ed;border:1px solid var(--line)}.tree-wrap svg{width:100%;height:auto;display:block}.tree-details p{font-size:12px;line-height:1.7;color:var(--muted)}.format-note{display:grid;gap:8px;font-size:12px;line-height:1.6;padding:10px 0 15px}.format-note code{overflow-wrap:anywhere;letter-spacing:3px;background:#e9ddcc;padding:8px;font-size:13px}.bottom-note{margin:35px 0 28px;border-top:1px solid var(--ink);padding-top:17px;display:flex;justify-content:space-between;gap:20px;font-size:13px;line-height:1.7}.bottom-note span{font-size:11px;color:var(--muted)}dialog{color:var(--ink);border:1px solid var(--ink);max-width:650px;width:calc(100% - 32px);max-height:85vh;padding:35px;background:#fffaf0;line-height:1.8}dialog::backdrop{background:#211728aa}dialog h2{font-size:25px;margin-bottom:20px}dialog h3{font-size:17px;margin-top:25px}dialog p{font-size:14px}dialog a{display:block;color:var(--indigo);font-size:13px;margin:8px 0}.close-dialog{position:absolute;right:10px;top:10px;border:0;background:none;width:44px;height:44px;font-size:28px}.source-note{border-top:1px solid var(--line);margin-top:25px}.footnote{font-size:12px!important;color:var(--muted)}
@media(min-width:1500px){.page{padding:0 50px}.workbench{gap:55px}}
@media(max-width:950px){.page{padding:0 26px}.workbench{gap:25px}.stamp{min-height:105px}.stamps{gap:8px}.stamp .shape{width:38px;height:38px}.band-heading{align-items:flex-start}.band-heading>span{max-width:130px}.band-heading b{display:block;margin:4px 0 0}.pack-action{gap:10px}.primary-button{padding:12px 15px;gap:20px}.pack-action>span{font-size:11px}.totals{padding:15px}.totals strong{font-size:34px}.code-heading{align-items:flex-start}.code-heading>span{max-width:100px;text-align:right}}
@media(max-width:720px){.page{padding:0 19px}.topline{min-height:75px;gap:8px;flex-wrap:wrap;padding:12px 0}.back{font-size:12px;flex:1;min-width:170px}.text-button{font-size:12px;min-height:44px}.masthead{padding:28px 0 23px}.eyebrow{font-size:12px;letter-spacing:.12em;margin-bottom:11px}h1{font-size:35px}.paper-mark{display:none}.workbench{grid-template-columns:minmax(0,1fr);gap:28px}.section-heading{margin-bottom:12px}h2{font-size:16px}.stamps{gap:9px;margin-bottom:14px}.stamp{min-height:90px;border-bottom-width:4px;border-radius:13px 13px 6px 6px;gap:6px}.stamp .shape{width:34px;height:34px}.stamp span{font-size:11px}.stamp::after{font-size:14px;right:6px;top:4px}.totals{padding:12px 15px 11px;grid-template-columns:1fr 25px 1.7fr;margin-bottom:18px}.totals strong{font-size:32px}.totals>div>span{font-size:11px}.totals p{font-size:12px;margin-top:7px;padding-top:7px}.message-paper{padding:13px 10px 5px}.message-symbol{width:44px;height:44px}.message-strip{gap:0;max-height:132px}.paper-heading h3{font-size:14px}.paper-heading>span{font-size:11px}.presets{gap:0}.presets>span{font-size:11px}.presets .small-button{font-size:11px;padding:9px 6px}.feedback{font-size:12px;margin-bottom:11px;min-height:20px}.code-heading{padding-top:15px}.code-heading>span{max-width:none;font-size:10px}.codebook{gap:7px}.code-card{padding:10px 5px}.code-card .shape{width:23px;height:23px}.code-card code{font-size:17px}.bit-sheet{padding:14px 12px;margin-bottom:14px}.band-heading{align-items:center}.band-heading>span{max-width:none}.band-heading b{display:inline-block;margin:0 0 0 6px}.band-heading h3{font-size:14px}.band-heading>span{font-size:10px}.band-heading b{font-size:12px}.bit-band{grid-template-columns:repeat(auto-fill,16px);gap:3px}.pack-action{margin:18px 0 16px}.primary-button{font-size:15px;flex:1;min-height:54px}.pack-action>span{font-size:12px;max-width:112px;line-height:1.6}.decoder{padding:12px}.reader{grid-template-columns:44px 55px minmax(0,1fr);padding:10px;gap:6px}.reader strong{font-size:22px}.reader #readResult{font-size:12px}.tree-details summary{font-size:12px}.tree-details summary span{font-size:10px;margin-left:8px}.bottom-note{display:block;margin:27px 0 24px;padding-top:13px;font-size:12px}.bottom-note span{display:block;font-size:10px;margin-top:6px}.scale-key{font-size:10px!important}dialog{padding:29px 22px}dialog h2{font-size:21px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;scroll-behavior:auto!important;animation:none!important}}
