@import url('chinese-type.css?v=perf1');
/* Shared handmade stationery for all daily wishes and the final postcard. */
.craft-card{
 --craft-ink:#465441;--craft-trim:#798568;--craft-paper:#fffaf0;
 box-sizing:border-box;position:relative;isolation:isolate;
 width:min(100%,370px);min-height:0;padding:29px 28px 27px;
 border:7px solid #bda079;border-radius:2px;outline:1px solid #796342;outline-offset:-7px;
 background:var(--craft-paper);color:var(--craft-ink);
 box-shadow:1px 3px 0 #9e815b,3px 6px 0 #d7bd93,0 16px 36px #30271c33;
 text-align:center;flex-shrink:0;
}
.craft-card[data-craft="button"]{--craft-ink:#5d5145;--craft-trim:#b18d80}
.craft-card[data-craft="paper"]{--craft-ink:#435442;--craft-trim:#6e8065;--craft-paper:#fbf5e8}
.craft-card:before{content:'';position:absolute;inset:9px;border:1px dashed var(--craft-trim);border-radius:1px;opacity:.65;pointer-events:none;z-index:-1}
.craft-card:after{content:'';position:absolute;inset:0;z-index:-2;pointer-events:none;opacity:.55;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23998768' filter='url(%23n)' opacity='.25' d='M0 0h160v160H0z'/%3E%3C/svg%3E")}
.craft-card .corner,.craft-card .star,.craft-card .wish-star{display:none}
.craft-card .craft-art{display:block;width:144px;height:120px;margin:3px auto 10px;background:url('assets/craft-linen-tree.svg') center/contain no-repeat}
.craft-card[data-craft="button"] .craft-art{background-image:url('assets/craft-button-tree.svg')}
.craft-card[data-craft="paper"] .craft-art{background-image:url('assets/craft-paper-trees.svg')}
.craft-card .eyebrow,.craft-card .kicker{font:9px/1.5 'Christmas Iansui',system-ui;letter-spacing:.16em;margin:0 0 8px;color:var(--craft-ink)}
.craft-card h2{font:italic 27px/1.3 'Christmas Iansui',Georgia,'Songti TC',serif;letter-spacing:0;text-wrap:balance;color:var(--craft-ink);margin:0 auto 12px}
.craft-card p{font-size:13px;line-height:1.65}
.craft-card .translation{font:italic 13px/1.6 'Christmas Iansui',Georgia,serif;opacity:.82;margin:12px 0}
.craft-card .mission{margin:17px 0 0;padding:15px 0 0;border-top:1px dashed #b6a386}
.craft-card .mission-label{font:9px/1.4 'Christmas Iansui',system-ui;letter-spacing:.13em;color:#81664a;margin:0 0 7px}
.craft-card #missionText{font:13px/1.65 'Christmas Iansui',system-ui;color:var(--craft-ink)}
.craft-card .mission-note{font:10px/1.5 'Christmas Iansui',system-ui;color:#756b5c;margin:8px 0 0}
.craft-card .rule{width:27px;height:1px;background:#b99d73;margin:16px auto 10px}
.craft-card .signoff,.craft-card .signature{font:italic 13px/1.5 'Christmas Iansui',Georgia,serif;margin:0;color:var(--craft-ink)}
.craft-card:focus-visible{outline:2px solid var(--craft-trim);outline-offset:4px}
.reader{justify-content:flex-start;padding:76px 24px 28px;scroll-padding-block:24px}
.reader .wish-card{margin-block:auto 0}
.reader .replay{flex-shrink:0;margin:20px auto auto}
dialog.craft-card{max-width:calc(100vw - 42px);max-height:calc(100svh - 48px);overflow:auto;margin:auto}
dialog.craft-card::backdrop{background:#17251f70;backdrop-filter:blur(5px)}
.craft-card button,.craft-card a{min-height:44px;border:1px solid #b59d77;background:#f6edda;color:var(--craft-ink);font:13px/1.4 'Christmas Iansui',system-ui;border-radius:4px;padding:11px 16px;transition:background .18s,box-shadow .18s}
.craft-card button:hover,.craft-card a:hover{background:#eee0c4;box-shadow:0 2px 0 #b59d77}
.craft-card button:active,.craft-card a:active{box-shadow:inset 0 2px 3px #705d3c25}
.back.craft-card{width:auto;padding:24px 22px;display:flex;justify-content:center;align-items:center}
.back.craft-card .craft-art{width:126px;height:105px;flex-shrink:0;margin:10px auto}
.back.craft-card .stamp{display:none}
.back.craft-card h2{font-size:25px}.back.craft-card p{margin:8px 0;font-size:12px}
@media(max-width:360px){.craft-card{padding:25px 22px}.craft-card h2{font-size:24px}.reader{padding-inline:18px}}
@media(max-height:700px){.craft-card .craft-art{width:114px;height:95px}.reader{padding-top:68px}.craft-card{padding-block:24px}}

/* Fine warm paper fibres, kept beneath the ink and stitching. */
.craft-card{background-image:repeating-linear-gradient(9deg,#99774908 0 .5px,transparent .5px 4px),repeating-linear-gradient(97deg,#b8a48506 0 .7px,transparent .7px 7px),radial-gradient(ellipse at 15% 8%,#ffffff90,transparent 65%);background-color:var(--craft-paper)}
.reader:not([hidden]){background:#eee9deab;backdrop-filter:blur(5px)}
.back.craft-card{position:absolute;inset:0}
@media(max-width:420px){
 .back.craft-card{padding:16px 14px}
 .back.craft-card .craft-art{width:94px;height:78px;margin:4px auto}
 .back.craft-card h2{font-size:23px;margin-bottom:7px}
 .back.craft-card p{font-size:11px;line-height:1.45;margin:6px 0}
 .back.craft-card .signature{font-size:11px}
}
/* The handwritten reverse needs more height than the picture at narrow widths. */
#postcard.flipped:has(.craft-card){min-height:420px}
body:has(#postcard.flipped) main{height:auto;min-height:100svh;overflow:visible}

/* Let the handmade illustration lead, with a quiet watercolor paper wash. */
.craft-card{background-image:radial-gradient(ellipse at 9% 24%,#b6c5a92b,transparent 43%),radial-gradient(ellipse at 94% 70%,#d8b4a329,transparent 42%),repeating-linear-gradient(9deg,#9977490b 0 .6px,transparent .6px 4px),repeating-linear-gradient(97deg,#b8a48509 0 .7px,transparent .7px 7px),radial-gradient(ellipse at 15% 8%,#ffffff80,transparent 65%)}
.craft-card:after{opacity:.72}
.craft-card .craft-art{width:210px;height:175px;max-width:100%;margin:5px auto 15px;filter:drop-shadow(0 3px 4px #a58d6714)}
.craft-card h2{font-size:22px;line-height:1.35;font-weight:400}
.craft-card .translation{font-size:12px}
.craft-card #missionText,.craft-card .mission>p:not(.mission-label):not(.mission-note){font-size:12px;line-height:1.65}
.craft-card .signoff,.craft-card .signature{font-size:12px}
.back.craft-card .craft-art{width:170px;height:142px;margin:5px auto 12px}
.back.craft-card h2{font-size:22px}
#postcard.flipped:has(.craft-card){min-height:460px}
@media(max-width:360px){.craft-card h2{font-size:21px}.craft-card .craft-art{width:190px;height:158px}}
@media(max-width:420px){.back.craft-card .craft-art{width:146px;height:122px}.back.craft-card h2{font-size:21px}}
@media(max-height:700px){.craft-card .craft-art{width:180px;height:150px}}

/* More prominent, richer handmade artwork against the quiet paper. */
.craft-card .craft-art{width:260px;height:217px;filter:saturate(1.65) contrast(1.04) drop-shadow(0 3px 4px #a58d671c)}
.back.craft-card .craft-art{width:195px;height:163px}
#postcard.flipped:has(.craft-card){min-height:490px}
@media(max-width:360px){.craft-card .craft-art{width:232px;height:193px}}
@media(max-width:420px){.back.craft-card .craft-art{width:170px;height:142px}}
@media(max-height:700px){.craft-card .craft-art{width:224px;height:187px}}

/* Antique ivory and gilt detailing echo the watercolor castle. */
.craft-card{
 --craft-paper:#fbf5e7;--craft-ink:#4c5544;--craft-trim:#ad9568;
 border-color:#c5ad80;outline-color:#a78d5c;
 background-image:linear-gradient(90deg,#ad89521a,transparent 7%,transparent 93%,#ad89521a),linear-gradient(#b5976320,transparent 8%,transparent 92%,#b597631a),radial-gradient(ellipse at 9% 24%,#b6c5a92b,transparent 43%),radial-gradient(ellipse at 94% 70%,#d8b4a324,transparent 42%),repeating-linear-gradient(9deg,#9977490b 0 .6px,transparent .6px 4px),repeating-linear-gradient(97deg,#b8a48509 0 .7px,transparent .7px 7px);
 box-shadow:inset 0 0 16px #b69b6920,1px 3px 0 #a58a59,3px 6px 0 #ddcba6,0 16px 36px #30271c2b;
}
.craft-card[data-craft="button"]{--craft-ink:#5d5145;--craft-trim:#b49a77}
.craft-card[data-craft="paper"]{--craft-paper:#faf3e4;--craft-ink:#4b5947;--craft-trim:#9b9b77}
.craft-card:before{border-color:var(--craft-trim);box-shadow:0 0 0 3px #d2bd901c;opacity:.75}
.craft-card .craft-art{filter:saturate(1.4) sepia(.12) contrast(.98) drop-shadow(0 3px 3px #856c4926)}
.craft-card .rule{width:47px;height:10px;background:linear-gradient(#b99d73,#b99d73) left center/16px 1px no-repeat,linear-gradient(#b99d73,#b99d73) right center/16px 1px no-repeat;position:relative}
.craft-card .rule:after{content:'✧';position:absolute;inset:-4px 0 0;font:16px 'Christmas Iansui',Georgia;color:#aa8750}
.craft-card .signoff,.craft-card .signature{color:#7c6746}

/* Foil catches a narrow highlight; the paper beneath stays matte. */
.craft-card{
 --foil:linear-gradient(128deg,#89652f 0%,#c5a457 18%,#fae7ad 31%,#fff3c7 34%,#ad8339 39%,#d9ba70 59%,#fff0b9 70%,#b48c43 75%,#8f6b33 100%);
 border-image:var(--foil) 1;
 outline-color:#ae8a4e;
 box-shadow:inset 0 0 16px #b69b691c,inset 0 0 0 1px #fff5d6,1px 2px 0 #88662f,2px 4px 0 #d7bd82,0 16px 36px #30271c2b;
}
.craft-card:before{border-color:#b49659;box-shadow:0 0 0 2px #f5e5b54d,inset 0 1px 0 #fffaf0;opacity:.85}
.craft-card .rule{background:linear-gradient(90deg,#987039,#f4dfa0,#ae843c) left center/16px 1px no-repeat,linear-gradient(90deg,#ae843c,#f4dfa0,#987039) right center/16px 1px no-repeat;filter:drop-shadow(0 1px 0 #fff9df)}
.craft-card .rule:after{background:var(--foil);background-clip:text;-webkit-background-clip:text;color:transparent;filter:drop-shadow(0 .5px 0 #886b38)}
.craft-card .eyebrow,.craft-card .kicker{color:#8c6b36;text-shadow:0 1px 0 #fff8df}
