/* Original Heistle notices: dark steel and lit edges, with one short entrance and no extra flourish. */
#toast{position:fixed;top:max(16px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:120;width:min(404px,calc(100% - 24px));pointer-events:none}
#toast:empty{display:none}
.toast-card{--notice-accent:var(--amber2);--notice-rgb:255,217,133;position:relative;isolation:isolate;overflow:hidden;display:flex;align-items:center;gap:14px;padding:16px 46px 18px 16px;border:1px solid #6b6242;border-radius:15px;background:radial-gradient(ellipse at 0 0,rgba(var(--notice-rgb),.09),transparent 70%),linear-gradient(120deg,#1c281e,#101911 85%);box-shadow:0 14px 36px #0008,0 2px 5px #0006,inset 0 1px 0 #f3e5b712,inset 0 -1px 0 #0006;pointer-events:auto;animation:notice-in .32s cubic-bezier(.2,.8,.3,1) both}
.toast-card::before{content:'';position:absolute;inset:5px;border:1px solid rgba(var(--notice-rgb),.07);border-radius:10px;pointer-events:none}
.toast-card[data-tone="success"]{--notice-accent:#7befb6;--notice-rgb:75,225,157;border-color:#3d7356}
.toast-card[data-tone="warning"]{--notice-accent:#ffcf75;--notice-rgb:255,196,90;border-color:#8a6b34}
.toast-card[data-tone="error"]{--notice-accent:#ffac9a;--notice-rgb:242,132,108;border-color:#855049}
.toast-card[data-tone="achievement"]{--notice-accent:#ffe096;--notice-rgb:255,215,119;border-color:#a88a48;background:radial-gradient(ellipse at 0 0,#94703430,transparent 75%),linear-gradient(120deg,#252b1a,#161d12 85%)}
.toast-emblem{position:relative;z-index:1;flex:none;display:grid;place-items:center;width:46px;height:48px;color:var(--notice-accent);animation:notice-mark .3s ease-out .06s both}
.toast-emblem img{display:block;width:38px;height:38px;object-fit:contain;filter:drop-shadow(0 3px 3px #0007)}
.toast-emblem .notice-glyph{display:block;width:46px;height:46px;overflow:visible}
.toast-emblem .notice-check{stroke-dasharray:1;stroke-dashoffset:0;animation:notice-check .4s cubic-bezier(.4,0,.2,1) .22s both}
.toast-emblem .notice-mark{transform-origin:24px 24px;animation:notice-mark .45s ease-out .2s both}
.toast-copy{position:relative;z-index:1;min-width:0;flex:1;text-align:left}
.toast-title{margin-bottom:5px;font:700 9px/1.4 var(--mono);letter-spacing:1.7px;text-transform:uppercase;color:var(--notice-accent);overflow-wrap:anywhere}
.toast-message{font:500 13px/1.5 var(--body);color:var(--ink);overflow-wrap:anywhere}
.toast-value{display:block;margin:0 0 3px;font:700 23px/1.3 var(--mono);letter-spacing:-.7px;color:var(--notice-accent);overflow-wrap:anywhere;font-variant-numeric:tabular-nums;animation:notice-value .42s ease-out .12s both}
.toast-has-value .toast-message{font-size:11px;font-weight:400;color:#aab9a5}
.toast-card[data-tone="achievement"] .toast-value{font:700 24px/1.1 var(--disp);letter-spacing:.3px;margin-bottom:5px}
.toast-close{position:absolute;z-index:3;top:3px;right:3px;width:40px;height:40px;display:grid;place-items:center;border:0;border-radius:10px;color:#9caa96;background:transparent;cursor:pointer;transition:color .18s ease,background .18s ease,transform .18s ease}
.toast-close svg{width:25px;height:25px}
.toast-close:active{transform:scale(.9)}
.toast-close:focus-visible{outline:2px solid var(--notice-accent);outline-offset:-5px}
.toast-progress{position:absolute;bottom:0;left:14px;right:14px;height:2px;border-radius:2px;background:var(--notice-accent);opacity:.55;transform-origin:left;animation:notice-timer var(--notice-duration) linear forwards}
.toast-sparks{position:absolute;z-index:2;top:50%;left:39px;pointer-events:none;color:var(--notice-accent)}
.toast-sparks i{position:absolute;top:0;left:0;width:5px;height:5px;background:currentColor;clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%);opacity:0;animation:notice-spark .85s ease-out var(--spark-delay) both}
.toast-card.is-leaving{animation:notice-out .18s ease-in both;pointer-events:none}
@media(hover:hover) and (pointer:fine){.toast-close:hover{background:#ffffff09;color:var(--ink)}}
@keyframes notice-in{from{opacity:0;transform:translateY(-12px)}to{opacity:1;transform:none}}
@keyframes notice-out{to{opacity:0;transform:translateY(-10px) scale(.98)}}
@keyframes notice-check{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
@keyframes notice-mark{from{opacity:0;transform:scale(.8)}to{opacity:1;transform:none}}
@keyframes notice-value{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
@keyframes notice-spark{0%{opacity:0;transform:translate(0,0) scale(.5)}22%{opacity:.8}100%{opacity:0;transform:translate(var(--spark-x),var(--spark-y)) scale(.25)}}
@keyframes notice-timer{from{transform:scaleX(1)}to{transform:scaleX(0)}}

.ach-new{--reward-delay:0ms;position:relative;isolation:isolate;overflow:hidden;display:flex;align-items:center;gap:14px;padding:17px 16px;margin:0 0 12px;border:1px solid #8d7135;border-left:3px solid #dbad4d;border-radius:15px;background:radial-gradient(ellipse at 0 50%,#cca7411b,transparent 66%),linear-gradient(115deg,#2a3020,#172016 68%,#141c13);box-shadow:inset 0 1px 0 #ffe6a01a,0 7px 18px #0004;animation:reward-arrive .42s cubic-bezier(.2,.8,.2,1) var(--reward-delay) both}
.reward-emblem{position:relative;flex:none;width:56px;height:56px;display:grid;place-items:center;border:1px solid #a487435c;border-radius:50%;background:radial-gradient(circle at 45% 30%,#69542645,#0e160d 72%);box-shadow:inset 0 1px 0 #ffe5a02b,0 3px 8px #0005}
.ach-new .achievement-icon,.reward-emblem .tool-icon{width:38px;height:38px;object-fit:contain;filter:drop-shadow(0 2px 3px #0006);animation:reward-stamp .56s cubic-bezier(.2,.75,.2,1) calc(var(--reward-delay) + .04s) both}
.ach-new .ant{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0;flex:1}
.ach-new .ank{font:700 8.5px/1.4 var(--mono);letter-spacing:1.5px;color:#c9ab67;text-transform:uppercase}
.ach-new .ann{font:700 24px/1.08 var(--disp);letter-spacing:.4px;color:var(--amber2);overflow-wrap:anywhere}
.reward-description{font:400 11.5px/1.5 var(--body);color:var(--dim)}
.reward-seal{flex:none;display:grid;place-items:center;width:28px;height:28px;color:var(--amber2);animation:reward-stamp .4s ease-out calc(var(--reward-delay) + .2s) both}
.reward-seal svg{width:28px;height:28px;overflow:visible}
.reward-level-badge{display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--amber2);animation:reward-stamp .56s ease-out calc(var(--reward-delay) + .04s) both}
.reward-level-badge small{font:700 8px/1 var(--mono);letter-spacing:1px}
.reward-level-badge b{font:700 30px/1.1 var(--disp)}
.reward-saved{border-color:#587557;border-left-color:var(--good);background:linear-gradient(115deg,#263526,#151f16 72%)}
.reward-saved .ank,.reward-saved .reward-seal{color:var(--good2)}
@keyframes reward-arrive{from{opacity:0;transform:translateY(12px) scale(.985)}to{opacity:1;transform:none}}
@keyframes reward-stamp{from{opacity:0;transform:scale(.9)}to{opacity:1;transform:none}}
@media(max-width:480px){#toast{top:max(10px,env(safe-area-inset-top));width:calc(100% - 20px)}.toast-card{gap:11px;padding:14px 44px 16px 12px}.toast-emblem{width:40px;height:43px}.toast-emblem .notice-glyph{width:40px;height:40px}.toast-emblem img{width:34px;height:34px}.toast-value{font-size:21px}.toast-title{font-size:8.5px;letter-spacing:1.3px}.toast-close{width:42px;height:42px}.toast-sparks{left:32px}.ach-new{gap:11px;padding:14px 12px}.reward-emblem{width:48px;height:48px}.ach-new .achievement-icon,.reward-emblem .tool-icon{width:34px;height:34px}.ach-new .ann{font-size:22px}.reward-seal,.reward-seal svg{width:24px;height:24px}.reward-description{font-size:11px}}
@media(prefers-reduced-motion:reduce){.toast-card,.toast-card *,.ach-new,.reward-summary,.reward-summary *,.ach-new .achievement-icon,.reward-emblem .tool-icon,.reward-level-badge,.reward-seal{animation:none!important;transition:none!important}.toast-progress,.toast-sparks{display:none}.toast-emblem .notice-check{stroke-dashoffset:0}}


.reward-level .reward-description{color:var(--good);font:700 13px/1.5 var(--mono)}

/* Plain notices (no title): one compact line next to a smaller emblem. */
.toast-plain{gap:12px;padding:12px 44px 13px 13px}
.toast-plain .toast-emblem{width:34px;height:36px}
.toast-plain .toast-emblem .notice-glyph{width:34px;height:34px}
.toast-plain .toast-message{font-size:14px}

/* Result rewards: level and medals in one quiet block. */
.reward-summary{display:grid;gap:12px;margin:0 0 16px;padding:14px 16px;border:1px solid #6b6242;border-radius:14px;background:linear-gradient(115deg,#252c1c,#161e14 70%);box-shadow:inset 0 1px 0 #ffe6a012;animation:reward-arrive .32s ease-out both}
.reward-row{display:flex;align-items:center;gap:12px;min-width:0}
.reward-row+.reward-row{padding-top:12px;border-top:1px solid #ffffff0d}
.reward-summary .reward-level-badge{flex:none;display:flex;width:42px;height:42px;border:1px solid #a487435c;border-radius:50%;background:radial-gradient(circle at 45% 30%,#69542645,#0e160d 72%);animation:none}
.reward-summary .reward-level-badge b{font-size:21px;line-height:1}
.reward-summary .reward-level-badge small{font-size:7px}
.reward-copy{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.reward-label{font:700 8.5px/1.4 var(--mono);letter-spacing:1.5px;color:#c9ab67;text-transform:uppercase}
.reward-title{font:700 20px/1.1 var(--disp);letter-spacing:.4px;color:var(--amber2)}
.reward-bonus{flex:none;font:700 14px/1 var(--mono);color:var(--good)}
.reward-medals{flex-direction:column;align-items:stretch;gap:8px}
.reward-medal-list{list-style:none;display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0}
.reward-medal{display:inline-flex;align-items:center;gap:7px;min-width:0;padding:4px 10px 4px 5px;border:1px solid #6b624266;border-radius:999px;background:#0e160d99;font:600 13px/1.3 var(--body);color:var(--ink)}
.reward-medal .reward-medal-icon{flex:none;width:24px;height:24px;object-fit:contain}
.reward-medals .reward-medal:only-child{flex-wrap:wrap;border-radius:12px;padding:6px 12px 6px 6px}
.reward-medals .reward-medal:only-child .reward-description{flex-basis:100%;padding-left:31px;font-size:11.5px}

/* Medal explanation: hover on desktop, focus for keyboards, a tap on touch screens. */
.reward-medals .reward-medal-list .reward-medal{position:relative;cursor:help;transition:border-color .15s,background .15s}
.reward-medal[tabindex]:hover,.reward-medal[tabindex]:focus{z-index:3;border-color:#a88a48;background:#1d2616;outline:none}
.reward-medal[tabindex]:focus-visible{outline:2px solid var(--amber2);outline-offset:2px}
.reward-tip{position:absolute;z-index:4;bottom:calc(100% + 9px);left:50%;translate:-50% 0;width:max-content;max-width:min(240px,72vw);padding:8px 11px;border:1px solid #6b6242;border-radius:9px;background:#0d140c;box-shadow:0 8px 20px #000a;font:400 12px/1.45 var(--body);color:var(--ink);text-align:left;white-space:normal;pointer-events:none;opacity:0;visibility:hidden;transform:translateY(3px);transition:opacity .14s ease,transform .14s ease,visibility 0s linear .14s}
.reward-tip.placed{left:var(--tip-left);translate:none}
.reward-tip::after{content:'';position:absolute;top:100%;left:var(--tip-arrow,50%);width:9px;height:9px;margin:-5px 0 0 -5px;border:solid #6b6242;border-width:0 1px 1px 0;background:#0d140c;transform:rotate(45deg)}
.reward-medal:hover .reward-tip,.reward-medal:focus .reward-tip{opacity:1;visibility:visible;transform:none;transition-delay:0s}
.reward-hint{display:none;font:400 11.5px/1.4 var(--body);color:var(--faint)}
@media(hover:none){.reward-hint{display:block}}
@media(prefers-reduced-motion:reduce){.reward-tip{transition:none}}
