/* Original dragon-tower card frame. Artwork remains the existing live 3D booth. */
body{background:radial-gradient(ellipse at top,#30383b,#0a1016 75%);color:#eee8d8}
.app{max-width:480px;margin:18px auto;padding:12px;border:2px solid #857957;border-radius:23px;background:linear-gradient(#15252444,#10202266),url('assets/dragon-scales.svg');box-shadow:0 0 0 5px #0b1318,0 24px 80px #0009;overflow:hidden}
header{height:52px;min-height:52px;padding:0 12px;margin:0 0 8px;border:1px solid #b8aa78;border-radius:13px 13px 5px 5px;background:linear-gradient(110deg,#d7caa5,#b9b28d 55%,#ddd0ac);box-shadow:inset 0 0 0 3px #453e2940,0 3px 5px #0008}
header .brand{font:bold 23px/1 Georgia,serif;letter-spacing:1px;color:#252e2b;text-shadow:0 1px #fff7}header .beta{color:#414c43;font:9px/1.2 sans-serif;letter-spacing:1px}
#customise{width:38px;min-width:44px;height:44px;border-radius:50%;background:#273b38;color:#eadbb3;border:2px solid #8c8059;box-shadow:inset 0 0 0 2px #111d21}
.table-layout{display:block}.wizard-panel{position:relative;top:auto;padding:0 5px}.workspace{padding:0;border:0;border-radius:0;background:none}
.booth-stage{width:100%;max-width:none;border:2px solid #9e8c59;border-radius:100px 100px 5px 5px;box-shadow:0 0 0 4px #111c20,0 5px 10px #0008}
.booth-stage .portrait{height:auto!important;aspect-ratio:9/10;max-height:none}
.tower-type{position:relative;margin:9px 0 0;padding:10px 12px;color:#ede2c6;background:linear-gradient(90deg,#283e3c,#3d5046,#263938);border:1px solid #af9c68;box-shadow:inset 0 0 0 3px #101d254d;font:600 14px/1.2 Georgia,serif;letter-spacing:.3px;display:flex;justify-content:space-between;align-items:center}
.tower-type span{color:#d5bb79;font-size:18px}
#welcome{background:linear-gradient(110deg,#e6ddc2,#d2c8aa);color:#2b302a;margin:7px 0 0;border:1px solid #9e9168;border-bottom:0;border-radius:5px 5px 0 0;padding:13px 14px 4px;box-shadow:inset 3px 0 #fff2,inset -3px 0 #574d2820}
#welcome::before,#welcome::after{display:none}
.app{min-height:0}
#welcome h1{font:italic 19px/1.3 Georgia,serif;color:#30382f;margin:0 0 6px;letter-spacing:0;text-align:left}
.mtg-invitation{font:14px/1.45 Georgia,serif;color:#414538;text-align:left;margin:0 0 8px}
.composer-wrap{position:relative;left:auto;right:auto;bottom:auto;max-height:none;overflow:visible;margin:0;padding:12px;background:linear-gradient(110deg,#e6ddc2,#d2c8aa);border:1px solid #9e9168;border-top:0;border-radius:0 0 10px 10px;backdrop-filter:none;gap:8px}
.ask-dock{max-width:none}.ask-dock #primary-action{min-height:54px;border:1px solid #8d7747;border-radius:8px;background:linear-gradient(#405c50,#263f38);color:#fff0c9;box-shadow:inset 0 0 0 2px #a89b5b55,0 3px 4px #382d2925;font:600 18px Georgia,serif}
#primary-action[data-action=finish]{background:#6a4824;color:#fff3d2}#primary-action:disabled{opacity:.75}
.secondary-actions{gap:8px}.secondary-actions button,.secondary-actions button:last-child{font:14px Georgia,serif;color:#303d34;background:#faf0d240;border:1px solid #746f515f;border-radius:6px;padding:8px;min-height:44px}
#voice-state,.voice-privacy,.follow-hint{color:#4e5144}.voice-privacy{font-size:11px;line-height:1.4}.follow-hint{font-family:Georgia,serif}.connection{color:#343d32}
.composer,#question{background:#f5edd7;color:#29342d;border-color:#857c58;border-radius:6px}#question::placeholder{color:#626557}
.answer{background:linear-gradient(110deg,#e6ddc2,#d6ccaf);color:#2a332d;border:2px solid #98875c;border-radius:8px;box-shadow:inset 0 0 0 3px #fff2;margin:10px 0;padding:16px}
.answer .short-answer{font:17px/1.65 Georgia,serif}.answer a{color:#355849}.answer .muted,.answer summary,.answer-wizard{color:#53533e}.question-bubble{border:1px solid #a3915a;background:#263e38;border-radius:8px;color:#f0e5cc}
.answer details{border-color:#8b80514d}.answer-feedback button,.clarify-choices button{background:#2e463d;color:#f5e7c7;border-color:#a28c55;border-radius:6px}
.has-conversation .composer-wrap,.is-composing .composer-wrap{position:sticky;bottom:var(--keyboard-inset,0px);z-index:10;border-top:1px solid #9e9168}
.has-conversation .booth-stage,.is-composing .booth-stage{width:153px;border-radius:65px 65px 5px 5px}.has-conversation .tower-type,.is-composing .tower-type{font-size:12px;padding:7px 10px}
dialog{border:3px double #a89765;border-radius:14px;background:linear-gradient(140deg,#273d37,#15272b);box-shadow:0 0 0 5px #0c171c,0 20px 90px #000a}
dialog h2{font:24px Georgia,serif;color:#e8d7ad}#app-menu>button,#attachments>button{border-radius:6px;border-color:#9d8b5b;background:#ded3b4;color:#29382f;font:16px Georgia,serif}
:focus-visible{outline:3px solid #9b6924;outline-offset:3px}
/* Ash-grey masonry/scales, living vines and a single sculpted wing. */
.app{position:relative;isolation:isolate;border-color:#888a87;background:linear-gradient(#797d8120,#22293030),url('assets/ash-scales.svg');box-shadow:0 0 0 5px #171c21,0 24px 80px #0009}
.app::before,.app::after{content:'';position:absolute;pointer-events:none;z-index:4;top:75px;bottom:12px;width:27px;background:url('assets/tower-vines.svg') left bottom / 27px 420px repeat-y}
.app::before{left:-7px}.app::after{right:-7px;transform:scaleX(-1);opacity:.8}
.wizard-panel::after{content:'';position:absolute;z-index:5;pointer-events:none;right:-10px;top:-13px;width:126px;height:210px;background:url('assets/dragon-wing.svg?v=3') center / contain no-repeat;filter:drop-shadow(-3px 4px 3px #0009)}
.booth-stage{border-color:#98998b}.tower-type{background:linear-gradient(90deg,#3b4247,#555b5c,#343d43);border-color:#9b9c8b}
#primary-action[data-action=talk]::before{content:'';width:25px;height:25px;display:inline-block;vertical-align:middle;margin-right:10px;border:0;padding:0;border-radius:0;background:url('assets/mtg-tap.svg') center / contain no-repeat}
.has-conversation .wizard-panel::after,.is-composing .wizard-panel::after{width:66px;height:110px;right:calc(50% - 88px);top:-6px}
@media(max-width:799px){.app{max-width:460px;width:calc(100% - 16px);padding:9px;margin:8px auto;box-sizing:border-box}.wizard-panel{padding:0 3px}.booth-stage{width:100%}.booth-stage .portrait{max-height:43dvh}.booth-stage #avatar{width:min(100%,calc(43dvh * .9));margin:auto}.workspace{padding:0}.has-conversation .booth-stage #avatar,.is-composing .booth-stage #avatar{width:100%}dialog{border-radius:16px 16px 0 0}}
@media(max-height:700px) and (max-width:799px){.booth-stage .portrait{max-height:37dvh}.booth-stage #avatar{width:min(100%,calc(37dvh * .9))}#welcome{padding-top:9px}#welcome h1{font-size:17px}.composer-wrap{padding:9px}}

/* Five small pendants hang down the lower left frame beneath the vines. */
.wizard-panel::before{content:'';position:absolute;pointer-events:none;z-index:4;left:-12px;top:58%;width:40px;height:41%;background:url('assets/phyrexian-chain.svg?v=4') left top / contain no-repeat;filter:drop-shadow(1px 2px 1px #000b)}
.has-conversation .wizard-panel::before,.is-composing .wizard-panel::before{left:calc(50% - 88px);width:28px;background-size:contain}

/* Four dragon wings clasp the artwork frame; chains join the side edges. */
.app::before,.app::after,.wizard-panel::before,.wizard-panel::after{display:none}
.dragon-frame{position:absolute;inset:0;z-index:5;pointer-events:none}
.corner-wing{position:absolute;width:102px;height:170px;background:url('assets/dragon-wing.svg?v=3') center / contain no-repeat;filter:drop-shadow(0 3px 2px #0009)}
.wing-crimson{right:-10px;top:-10px}
.wing-blue{left:-10px;top:-10px;transform:scaleX(-1);filter:hue-rotate(185deg) saturate(.8) drop-shadow(0 3px 2px #0009)}
.wing-moss{left:-10px;bottom:-5px;transform:scale(-1);width:78px;height:130px;filter:hue-rotate(85deg) saturate(.65) drop-shadow(0 -3px 2px #0009)}
.wing-violet{right:-10px;bottom:-5px;transform:scaleY(-1);width:78px;height:130px;filter:hue-rotate(285deg) saturate(.65) drop-shadow(0 -3px 2px #0009)}
.frame-chain{position:absolute;top:29%;bottom:22%;width:24px;background:url('assets/phyrexian-single-chain.svg') center / 24px 160px repeat-y;filter:drop-shadow(1px 2px 1px #000a)}
.frame-chain-left{left:-8px}.frame-chain-right{right:-8px}
.has-conversation .dragon-frame,.is-composing .dragon-frame{width:153px;left:50%;right:auto;transform:translateX(-50%)}
.has-conversation .corner-wing,.is-composing .corner-wing{width:48px;height:80px}
.has-conversation .frame-chain,.is-composing .frame-chain{width:18px;background-size:18px 120px}
/* Obsidian wings: retain relief highlights without coloured membranes. */
.corner-wing.wing-crimson,.corner-wing.wing-blue,.corner-wing.wing-moss,.corner-wing.wing-violet{filter:grayscale(1) brightness(.48) contrast(1.2) drop-shadow(0 3px 2px #000b)}
/* Lower vines end at the artwork window, following the controls' height. */
.workspace{position:relative}
.workspace::before,.workspace::after{content:'';position:absolute;top:0;bottom:0;width:25px;z-index:11;pointer-events:none;background:url('assets/tower-vines.svg') left bottom / 25px 360px repeat-y;filter:drop-shadow(1px 1px 1px #0008)}
.workspace::before{left:-12px}
.workspace::after{right:-12px;transform:scaleX(-1)}

/* The study layers and fixed-aspect camera must fill the artwork window together. */
.booth-stage{box-sizing:border-box;margin:0 auto}
.booth-stage .portrait{height:auto!important;max-height:none!important;aspect-ratio:9/10}
.booth-stage #avatar{inset:0;width:100%;height:100%;max-width:none!important;max-height:none;margin:0;aspect-ratio:9/10}
.has-conversation .booth-stage,.is-composing .booth-stage{margin:0 auto}
