/* One inset parchment panel; download values come from the native updater. */
#app #update-root{box-sizing:border-box;align-items:center;justify-content:center;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:#182d25b8;backdrop-filter:blur(4px)}
#app #update-root .update-card{width:min(430px,100%);max-width:100%;max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));margin:0;box-sizing:border-box;padding:18px!important;gap:14px;border:1px solid #c5ad77!important;border-radius:22px!important;background:linear-gradient(155deg,#fffaf0ed,#fbf0d8ed),url('art/book/parchment-v01722.webp') center/cover!important;position:relative;box-shadow:inset 0 0 0 4px #fffaf0,inset 0 0 0 5px #dcc79680,0 20px 70px #081b2550;text-align:left;scrollbar-width:none;overscroll-behavior:contain}
#app #update-root .update-card::-webkit-scrollbar{display:none}
.update-heading{display:grid;justify-items:center;gap:10px;min-width:0;text-align:center;flex:none}
.update-heading-copy{min-width:0;width:100%}
#app #update-root .update-heading .eyebrow{display:block;margin-bottom:5px;font:700 10px/1.4 Interface,sans-serif;letter-spacing:.12em;color:#947540}
#app #update-root .update-card h2{margin:0;font:700 22px/1.22 Interface,sans-serif;color:#2f5b4b;text-wrap:balance}
#app #update-root .update-version{display:block;margin-top:6px;color:#86744f;font:12px/1.4 Interface,sans-serif;font-variant-numeric:tabular-nums}
.update-emblem{position:relative;display:grid;place-items:center;flex:none;width:82px;height:82px;border:1px solid #bba46b;border-radius:50%;background:radial-gradient(circle,#fffdf4,#efe1bc);box-shadow:inset 0 0 0 4px #fff8e7,0 0 0 4px #c0a76818,0 5px 13px #80623222}
#app #update-root .update-emblem>img{display:block;width:78px;height:78px;max-width:none;max-height:none;margin:0;object-fit:contain}
#app #update-root .update-card p{margin:0;font:13px/1.55 Interface,sans-serif;color:#6d674f}
.update-notes{flex:1 1 auto;min-height:40px;max-height:180px;overflow:auto;scrollbar-width:none;padding:12px;border:1px solid #d4bf8c;border-radius:14px;background:linear-gradient(120deg,#fffdf4b0,#f4e7c97a);box-shadow:inset 0 0 0 2px #fff9ed66}
.update-notes h3{margin:0 0 9px;padding-bottom:7px;border-bottom:1px solid #c5ad7266;color:#42644f;font:700 13px/1.35 Interface,sans-serif}
#app #update-root .update-notes ul{padding:0;margin:0;list-style:none;color:#5f614d}
#app #update-root .update-notes li{padding:0 0 0 13px;margin:7px 0 0;border:0;font:12px/1.5 Interface,sans-serif}
#app #update-root .update-notes li:first-child{margin-top:0}
#app #update-root .update-notes li:before{content:'';width:5px;height:5px;border-radius:50%;left:0;top:.55em;background:#b39a5f}
.update-download{flex:none;padding:12px;border:1px solid #b7be96;border-radius:14px;background:linear-gradient(120deg,#f1f3e7,#e5ead5);box-shadow:inset 0 0 0 2px #fffdf044}
.update-download-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;color:#42684e;font:700 14px/1.4 Interface,sans-serif}
.update-download-heading b{flex:none;font-size:16px;font-variant-numeric:tabular-nums}
.update-progress{position:relative;overflow:hidden;height:9px;margin:10px 0;border:1px solid #acb49470;border-radius:6px;background:#d8dfc8}
.update-progress>i{display:block;width:100%;height:100%;border-radius:5px;background:linear-gradient(90deg,#496e52,#94aa72);transform:scaleX(var(--p,0));transform-origin:left;transition:none}
.update-progress.is-indeterminate>i{opacity:0}
.update-progress.is-indeterminate:after{content:"";position:absolute;inset:0 auto 0 0;width:30%;border-radius:5px;background:#789467;animation:update-download-wait 1.7s ease-in-out infinite alternate}
.update-download-meta{display:block;min-height:16px;color:#758161;font:11px/1.4 Interface,sans-serif;font-variant-numeric:tabular-nums}
.update-download-steps{display:flex;justify-content:space-between;gap:5px;margin:9px 0 0;padding:0;list-style:none;color:#879079;font:10px/1.4 Interface,sans-serif}
#app #update-root .update-download-steps li{padding:0;margin:0;border:0;font:inherit;color:inherit}
#app #update-root .update-download-steps li:before{display:none}
.update-download-steps li.is-active{color:#42684e!important;font-weight:700!important}
#app #update-root .update-card .update-actions{display:grid;gap:8px;flex:none}
#app #update-root .update-actions button{width:100%;margin:0;min-height:45px;border-radius:11px;font:700 14px/1.4 Interface,sans-serif}
#app #update-root .update-actions .secondary{min-height:44px;font-size:12px;background:linear-gradient(#fffaf0,#f0e2bc);color:#786337;border:1px solid #c5ac6d;box-shadow:inset 0 1px #ffffffc0,0 2px 4px #86682c15}
#app #update-root .update-card #update-status{min-height:0;margin:0;font:11px/1.5 Interface,sans-serif;color:#7d785e;text-align:center}
#app #update-root[data-download-phase=error] #update-status{color:#9a5942}
#app #update-root[data-download-phase=error] .update-download{border-color:#d4a98b;background:#faede1}
#app #update-root .update-contacts{display:flex;justify-content:center;gap:14px;flex-wrap:wrap}
#app #update-root .update-community{margin:0;color:#52725e;font:11px/1.4 Interface,sans-serif;text-underline-offset:3px}
#app #release-badge{display:flex;align-items:center;gap:5px;min-height:26px;padding:3px 8px;border:1px solid #bca56c;border-radius:0 0 10px 10px;background:linear-gradient(#fbf0d1,#ead8ad);color:#5c603e;font:700 10px/1.4 Interface,sans-serif;box-shadow:0 2px 6px #725b2826}
#app #release-badge[hidden]{display:none}
#app #release-badge img{width:17px;height:17px;object-fit:contain}
#app #maintenance-banner{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:8px;height:28px;padding:4px 10px;border-bottom:1px solid #b99f67;background:linear-gradient(100deg,#f6e6c0,#e9d5a5);color:#6c613e;font:600 10px/1.3 Interface,sans-serif}
#app #maintenance-banner[hidden]{display:none}
.update-maintenance-clock{font-variant-numeric:tabular-nums;flex:none;color:#315c49}
.update-maintenance-copy{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@keyframes update-download-wait{from{translate:0}to{translate:230%}}
@media(max-height:640px){#app #update-root .update-card{padding:14px!important;gap:10px}#app #update-root .update-emblem{width:55px;height:55px}#app #update-root .update-emblem>img{width:54px;height:54px}#app #update-root .update-heading{gap:7px}#app #update-root .update-card h2{font-size:19px}#app #update-root .update-notes{padding:10px}#app #update-root .update-notes li{font-size:11px;margin-top:5px}}
@media(prefers-reduced-motion:reduce){.update-progress>i{transition:none}.update-progress.is-indeterminate:after{animation:none;width:100%;opacity:.45}}
#app.reduced-motion .update-progress>i{transition:none;animation:none}
#app.reduced-motion .update-progress.is-indeterminate:after{animation:none;width:100%;opacity:.45}
#app #update-root .update-card:focus{outline:0}
#app #update-root .update-actions .primary{background:linear-gradient(#487a62,#315c49);border:1px solid #426b50;box-shadow:inset 0 1px #ffffff35,0 3px 6px #30543b26;text-shadow:0 1px #1c402d44}
#app #update-root .update-card:before,#app #update-root .update-card:after{content:'';position:absolute;width:5px;height:5px;background:#c7ad71;transform:rotate(45deg);pointer-events:none}
#app #update-root .update-card:before{top:9px;left:12px}
#app #update-root .update-card:after{bottom:9px;right:12px}

/* Compact panel, with fixed controls and an independently scrolling changelog. */
#app #update-root .update-card{display:flex;flex-direction:column;height:auto!important;min-height:0;max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));width:min(420px,100%);padding:22px 18px 17px!important;gap:13px;overflow:hidden;border:1px solid #bea36a!important;border-image:none!important;border-radius:21px!important;background:linear-gradient(145deg,#fffaf0f5,#f9f2e3f5),url('art/book/parchment-v01722.webp') center/cover!important;box-shadow:inset 0 0 0 4px #fffaf0,inset 0 0 0 5px #e1d2aa,0 18px 58px #071d1866;animation:update-panel-arrive .28s cubic-bezier(.2,.8,.2,1)}
#app #update-root .update-card:before{content:'';position:absolute;inset:8px;width:auto;height:auto;border:1px solid #d9c79c66;border-radius:14px;background:none;transform:none;pointer-events:none}
#app #update-root .update-card:after{display:none}
#app #update-root .update-card h2{font:700 calc(23px)/1.25 Interface,sans-serif;color:#2e5d4e}
#app #update-root .update-heading .eyebrow{font:700 calc(9px)/1.35 Interface,sans-serif;letter-spacing:1.3px;color:#9a8050}
#app #update-root .update-version{font:calc(11px)/1.4 Interface,sans-serif;color:#a08d67}
#app #update-root .update-card>p{flex:none;font:calc(12px)/1.5 Interface,sans-serif;color:#8b826a;text-align:center}
#app #update-root .update-emblem{width:88px;height:88px;overflow:hidden;border-color:#ccb574;background:radial-gradient(circle at 40% 30%,#fffbed,#f1e1b9);box-shadow:inset 0 0 0 4px #fffaeb,0 0 0 5px #c9ae6c12,0 5px 18px #88703c20}
#app #update-root .update-emblem>img{width:84px;height:84px}
#app #update-root .update-close{display:grid!important;place-items:center!important;position:absolute;right:14px;top:13px;z-index:3;width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;padding:0!important;margin:0!important;border:1px solid #d6c69e!important;border-radius:10px!important;background:#fffaef!important;color:#8f8669!important;font:400 calc(23px)/1 Interface,sans-serif!important;box-shadow:inset 0 1px #fff}
#app #update-root .update-notes{display:flex;flex-direction:column;flex:1 1 auto;min-height:66px;max-height:215px;padding:12px 12px 10px;overflow:hidden;border:1px solid #ded0ad;border-radius:12px;background:#fffcf2;box-shadow:inset 0 1px #fff}
#app #update-root .update-notes h3{flex:none;margin:0 0 9px;padding:0 0 8px;border-bottom:1px solid #e8ddc2;font:700 calc(12px)/1.35 Interface,sans-serif;color:#4d6b52}
#app #update-root .update-notes ul{flex:1;min-height:0;margin:0;padding:0 7px 0 0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin!important;scrollbar-color:#baa473 #f1ead9!important}
#app #update-root .update-notes ul::-webkit-scrollbar{display:block!important;width:4px!important}
#app #update-root .update-notes ul::-webkit-scrollbar-track{background:#f1ead9;border-radius:5px}
#app #update-root .update-notes ul::-webkit-scrollbar-thumb{background:#baa473;border-radius:5px}
#app #update-root .update-notes li{position:relative;margin:0 0 9px;padding:0 0 0 12px;font:calc(12px)/1.5 Interface,sans-serif;color:#6b705b;overflow-wrap:anywhere}
#app #update-root .update-notes li:last-child{margin-bottom:0}
#app #update-root .update-notes li:before{left:0;top:6px;width:4px;height:4px;border-radius:1px;background:#bea66e;transform:rotate(45deg)}
#app #update-root .update-download{padding:12px;border:1px solid #c2caa8;border-radius:12px;background:linear-gradient(120deg,#f3f4e8,#e9eddb);box-shadow:inset 0 1px #fffef5}
.update-download-heading{font:600 calc(12px)/1.35 Interface,sans-serif;color:#4c6d51}
.update-download-heading b{font:700 calc(18px)/1 Interface,sans-serif;color:#3c664a}
#app #update-root .update-progress{height:12px;margin:11px 0 9px;border:1px solid #b5bf9e;border-radius:9px;background:#dce3cc;box-shadow:inset 0 1px 3px #687a4e1c}
.update-progress>i{position:relative;border-radius:8px;background:linear-gradient(180deg,#93ae79,#63895c);box-shadow:inset 0 1px #cbdcb5}
#update-root[data-download-phase=downloading] .update-progress:not(.is-indeterminate)>i:after{content:'';position:absolute;inset:0;width:35%;background:linear-gradient(90deg,transparent,#e9f1d844,transparent);animation:update-progress-shine 2.2s ease-in-out infinite}
.update-download-meta{min-height:14px;font:calc(10px)/1.4 Interface,sans-serif;color:#8a9376}
.update-download-steps{margin-top:10px;gap:6px;font:calc(9px)/1.3 Interface,sans-serif;color:#9a9f8a}
#app #update-root .update-download-steps li{display:flex;align-items:center;gap:4px}
#app #update-root .update-download-steps li:before{display:block;content:'';position:static;flex:none;width:4px;height:4px;border:0;border-radius:50%;background:#bcc4a8;transform:none}
#app #update-root .update-download-steps li.is-active:before{background:#88a36c;box-shadow:0 0 0 2px #8da77322}
#app #update-root .update-actions button{min-height:46px;padding:9px 12px;font:700 calc(13px)/1.35 Interface,sans-serif}
#app #update-root .update-actions .primary{border:1px solid #355e4b;background:linear-gradient(#4d7d65,#355f4d);box-shadow:inset 0 1px #a2b99c66,0 3px 6px #304c3622;color:#fffbed}
#app #update-root .update-actions .secondary{min-height:41px;border-color:#d2bc84;background:linear-gradient(#fff9e9,#f3e8cc);font-size:calc(11px);color:#8d7951}
#app #update-root .update-card #update-status{font:calc(10px)/1.4 Interface,sans-serif;color:#a0967e}
@keyframes update-panel-arrive{from{opacity:0;transform:translateY(12px) scale(.985)}to{opacity:1;transform:none}}
@keyframes update-download-wait{from{left:-5%}to{left:75%}}
@keyframes update-progress-shine{from{transform:translateX(-120%)}to{transform:translateX(380%)}}
@media(max-height:680px){#app #update-root .update-card{padding:15px!important;gap:9px}#app #update-root .update-emblem{width:58px;height:58px}#app #update-root .update-emblem>img{width:54px;height:54px}.update-heading{gap:7px}#app #update-root .update-card h2{font-size:calc(20px)}#app #update-root .update-version{display:none}#app #update-root .update-heading .eyebrow{font-size:calc(8px);margin-bottom:3px}#app #update-root .update-card>p{font-size:calc(11px)}#app #update-root .update-notes{padding:10px;min-height:52px;max-height:115px}#app #update-root .update-notes li{font-size:calc(11px);margin-bottom:6px}#app #update-root .update-notes h3{margin-bottom:7px;padding-bottom:6px}#app #update-root .update-download{padding:10px}.update-download-steps{margin-top:7px}#app #update-root .update-actions button{min-height:40px;padding:7px}#app #update-root .update-actions .secondary{min-height:37px}#app #update-root .update-card #update-status{font-size:calc(9px)}}
@media(prefers-reduced-motion:reduce){#app #update-root *,#app #update-root :before,#app #update-root :after{animation:none!important;transition:none!important}}
#app #update-root[data-presentation=winter] .update-card{border-color:#9db9b5!important;background:linear-gradient(145deg,#fffdf1f7,#edf6f5f7),url('art/book/parchment-v01722.webp') center/cover!important;box-shadow:inset 0 0 0 4px #fcfff8,inset 0 0 0 5px #c9d7cd,0 18px 58px #071d1866}
#app #update-root[data-presentation=winter] .update-card:before{border-color:#b5ccbd80}
#app #update-root .update-season-decor{position:absolute;inset:0;pointer-events:none;overflow:hidden;border-radius:inherit;z-index:0}
#app #update-root .update-card>*:not(.update-season-decor){position:relative}
#app #update-root .update-season-decor img{position:absolute;object-fit:contain}
#app #update-root .update-winter-snow{top:0;left:0;width:100%;height:18px;object-fit:cover!important;object-position:top}
#app #update-root .update-winter-sprig{top:12px;left:9px;width:77px;height:73px;opacity:.88}
#app #update-root .update-winter-bells{right:7px;bottom:6px;width:66px;height:72px;opacity:.32}
#app #update-root[data-presentation=winter] .update-heading{padding-top:4px}
#app #update-root[data-presentation=winter] .update-emblem{border-color:#a7bda9;background:radial-gradient(circle at 38% 25%,#fffff6,#dcebe2);box-shadow:inset 0 0 0 4px #f8fff8,0 0 0 5px #bbd4c324,0 5px 18px #46776518}
#app #update-root[data-presentation=winter] .update-notes{border-color:#c6d7cd;background:#fcfff7}
#app #update-root[data-presentation=winter] .update-notes h3{border-color:#d6e4d9}
#app #update-root[data-presentation=winter] .update-download{border-color:#b4c9c0;background:linear-gradient(120deg,#eef5ee,#e3eee8)}
