.packet-welcome{border:0;padding:0;width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;border-radius:28px;background:#fff7ed;color:#571b16;box-shadow:0 30px 100px #30070855;overscroll-behavior:contain}
.packet-welcome::backdrop{background:#08162fb8;backdrop-filter:blur(6px)}
.packet-welcome-card{position:relative;padding:24px 26px 20px;text-align:center;background:radial-gradient(ellipse at 50% 26%,#fff1c7 0,transparent 55%),linear-gradient(155deg,#fff9f0,#fff0df);overflow:hidden}
.packet-welcome-close{position:absolute;right:14px;top:14px;width:32px;height:32px;display:grid;place-items:center;border:1px solid #ddc0a2;background:#ffffff9e;border-radius:50%;color:#784333;font-size:23px;padding:0;z-index:1}
.packet-welcome-brand{display:flex;align-items:center;gap:7px;padding-right:34px;text-align:left;color:#0b2548;font-size:15px}
.packet-welcome-brand img{width:24px;height:24px}.packet-welcome-brand span{border-radius:20px;background:#fff5de;border:1px solid #f1dab3;font-size:11px;color:#7c5333;padding:3px 8px;margin-left:4px}
.packet-welcome-art{position:relative;margin:4px auto -2px;width:min(248px,68vw);height:min(248px,68vw)}
.packet-welcome-art img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 14px 13px #ba2d1720)}
.packet-welcome[open] .packet-welcome-card{animation:packet-welcome-in .24s ease-out}.packet-welcome[open] .packet-welcome-art{animation:packet-welcome-art-in .45s ease-out}
.packet-welcome h2{font-size:26px;line-height:1.3;margin:0;color:#6d1c18;font-weight:800;letter-spacing:-.5px}
.packet-welcome #packet-welcome-subtitle{margin:8px 0 17px;color:#95604c;font-size:14px}
.packet-welcome-summary{display:grid;gap:5px;border:1px solid #f1ddbc;background:#fffcf6c9;border-radius:17px;padding:13px 12px}
.packet-welcome-summary small{font-size:12px;color:#95604c}.packet-welcome-summary b{font-size:25px;color:#a12e20;line-height:1.3;overflow-wrap:anywhere}.packet-welcome-summary span{font-size:12px;color:#94634d}.packet-welcome-summary code{font-size:10px;color:#9c7e62;overflow-wrap:anywhere}
.packet-welcome-action{margin-top:16px;width:100%;min-height:51px;padding:12px 14px;border-radius:16px;border:1px solid #bd772d;background:linear-gradient(180deg,#ffecc0,#f3c575);box-shadow:0 5px 0 #dbb074,0 10px 17px #ba6b2120;color:#692c09;font-size:17px;font-weight:800;line-height:1.3;white-space:normal}
.packet-welcome-action:disabled{opacity:.65;box-shadow:none;cursor:default}.packet-welcome-action:not(:disabled):active{transform:translateY(2px);box-shadow:0 3px 0 #dbb074}
.packet-welcome #packet-welcome-note{font-size:11px;line-height:1.5;margin:15px 0 10px;color:#966b52}
.packet-welcome-links{display:flex;justify-content:center;align-items:center;gap:18px}.packet-welcome-links button{font-size:12px;border:0;background:transparent;padding:6px;color:#895639;box-shadow:none}.packet-welcome-links button:disabled{opacity:.5}
.packet-welcome button:focus-visible{outline:3px solid #1973e8;outline-offset:3px}
@keyframes packet-welcome-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@keyframes packet-welcome-art-in{from{opacity:.6;transform:scale(.94)}to{opacity:1;transform:scale(1)}}
@media(max-height:700px){.packet-welcome-card{padding-top:18px;padding-bottom:14px}.packet-welcome-art{width:180px;height:180px}.packet-welcome h2{font-size:23px}.packet-welcome #packet-welcome-subtitle{margin-bottom:12px}.packet-welcome-summary{padding:10px}.packet-welcome-action{margin-top:12px}}
@media(prefers-reduced-motion:reduce){.packet-welcome[open] .packet-welcome-card,.packet-welcome[open] .packet-welcome-art{animation:none}.packet-welcome-action:not(:disabled):active{transform:none}}

/* Exhausted packet presentation only. Claim eligibility remains in the existing controller. */
.packet-welcome-full-art{display:none}
.packet-welcome[data-state="full"]{background:#b71d2d;color:#fff0cb}
.packet-welcome[data-state="full"] .packet-welcome-card{background:radial-gradient(ellipse at 50% 30%,#ef655c66,transparent 65%),linear-gradient(150deg,#da3444,#b2182b 75%)}
.packet-welcome[data-state="full"] .packet-welcome-brand{color:#fff4dc}
.packet-welcome[data-state="full"] .packet-welcome-brand span{color:#ffedc5;border-color:#ffd88e55;background:#ffffff12}
.packet-welcome[data-state="full"] .packet-welcome-close{color:#ffedcd;border-color:#ffedcd66;background:#ffffff12}
.packet-welcome[data-state="full"] .packet-welcome-art{display:none}
.packet-welcome[data-state="full"] .packet-welcome-full-art{display:grid;justify-items:center;margin:34px auto 24px;position:relative;width:220px}
.packet-welcome-empty-envelope{position:relative;width:158px;height:182px;border:1px solid #ffb19a66;border-radius:14px 14px 24px 24px;background:linear-gradient(145deg,#f75551,#c41c2e);box-shadow:0 18px 35px #680e234d;transform:rotate(-5deg);overflow:hidden}
.packet-welcome-empty-envelope::before{content:"";position:absolute;left:-1px;right:-1px;top:-45px;height:135px;border-bottom:1px solid #ffb98a80;border-radius:0 0 50% 50%;background:linear-gradient(150deg,#ff7863,#e33242);box-shadow:0 6px 12px #780b2226}
.packet-welcome-seal{position:absolute;display:grid;place-items:center;left:43px;top:65px;width:70px;height:70px;border:4px solid #ffdf9c;border-radius:50%;background:linear-gradient(145deg,#fff4cf,#edbc6c);box-shadow:0 5px 18px #770e224d;transform:rotate(5deg)}
.packet-welcome-seal img{width:44px;height:44px;object-fit:contain}
#packet-welcome-full-stamp{margin-top:-22px;z-index:1;position:relative;padding:8px 22px;background:#fff0c8;border:1px solid #e9bd76;border-radius:30px;color:#7b2a1b;font-size:15px;font-weight:800;letter-spacing:2px;box-shadow:0 6px 15px #69082130}
.packet-welcome[data-state="full"] h2{color:#ffedc5;font-size:25px;line-height:1.4;text-wrap:balance}
.packet-welcome[data-state="full"] #packet-welcome-subtitle{color:#ffdcc1;line-height:1.6;margin:10px 0 24px}
.packet-welcome[data-state="full"] .packet-welcome-summary{background:#7e0e232b;border-color:#ffd69933;gap:8px;padding:14px}
.packet-welcome[data-state="full"] .packet-welcome-summary small,.packet-welcome[data-state="full"] .packet-welcome-summary b{display:none}
.packet-welcome[data-state="full"] .packet-welcome-summary span{color:#fff0ce;font-size:14px}
.packet-welcome[data-state="full"] .packet-welcome-summary code{color:#ffd5b5}
.packet-welcome[data-state="full"] .packet-welcome-action,.packet-welcome[data-state="full"] #packet-welcome-note{display:none}
.packet-welcome[data-state="full"] .packet-welcome-links{gap:12px;margin-top:18px}
.packet-welcome[data-state="full"] .packet-welcome-links button{color:#fff0ce;border:1px solid #ffd69955;border-radius:12px;padding:10px 16px;background:#ffffff09;font-size:13px}
.packet-welcome[data-state="full"] button:focus-visible{outline-color:#ffedbc}
@media(max-height:700px){.packet-welcome[data-state="full"] .packet-welcome-full-art{margin-top:24px;margin-bottom:18px}.packet-welcome-empty-envelope{height:152px}.packet-welcome-seal{top:55px}.packet-welcome[data-state="full"] #packet-welcome-subtitle{margin-bottom:16px}}

/* Read-only query failure display. A retry delegates to the original query button. */
.packet-welcome:is([data-state="notfound"],[data-state="query-error"]) .packet-welcome-art{display:none}
.packet-welcome:is([data-state="notfound"],[data-state="query-error"]) .packet-welcome-full-art{display:grid;justify-items:center;margin:30px auto 24px;width:220px}
.packet-welcome:is([data-state="notfound"],[data-state="query-error"]) .packet-welcome-empty-envelope{background:linear-gradient(145deg,#f55555,#bf2535);box-shadow:0 16px 35px #aa33252b}
.packet-welcome:is([data-state="notfound"],[data-state="query-error"]) h2{font-size:25px;text-wrap:balance}
.packet-welcome:is([data-state="notfound"],[data-state="query-error"]) #packet-welcome-subtitle{line-height:1.7;margin:12px 0 20px;text-wrap:balance}
.packet-welcome:is([data-state="notfound"],[data-state="query-error"]) .packet-welcome-summary,.packet-welcome:is([data-state="notfound"],[data-state="query-error"]) #packet-welcome-note,.packet-welcome:is([data-state="notfound"],[data-state="query-error"]) #packet-welcome-retry{display:none}
.packet-welcome:is([data-state="notfound"],[data-state="query-error"]) .packet-welcome-links{margin-top:14px}
@media(max-height:700px){.packet-welcome:is([data-state="notfound"],[data-state="query-error"]) .packet-welcome-full-art{margin-top:18px;margin-bottom:18px}}
