/* Account entry and compact, readable mobile game panels. */
.account-locked>.screen,.account-locked>.bottom-nav,.account-locked>#battle-root,.account-locked>#level-root,.account-locked>#modal-root{visibility:hidden}
#auth-root{position:absolute;inset:0;z-index:80;background:#f4f2e7}
.account-screen{position:absolute;inset:0;overflow:auto;overscroll-behavior:contain;padding:24px 20px 18px;display:flex;flex-direction:column;align-items:center;gap:24px;background:linear-gradient(180deg,#edf0e4b0,#f8f6ee 72%),url('art/coast.jpg') center top/cover}
.auth-brand{display:flex;align-items:center;gap:10px;flex-shrink:0;margin:3px 0 4px}
.auth-brand img{width:54px;height:58px;object-fit:contain}
.auth-brand strong{font-size:19px;letter-spacing:2px;display:block}.auth-brand small{font-size:8px;letter-spacing:2.2px;display:block;color:#6c8173;margin-top:6px}
.account-card{width:100%;max-width:420px;flex-shrink:0;padding:24px 22px;background:#fffdf7f5;border:1px solid #dbe2d0;border-radius:24px;box-shadow:0 12px 40px #204e3620}
.account-card h1{font-family:Interface,sans-serif;font-size:30px;font-weight:700;color:#245e59;line-height:1.2;letter-spacing:-.7px;margin:10px 0}
.account-card .eyebrow{font-size:8px;letter-spacing:1.5px;line-height:1.7;color:#809080}
.auth-copy{font-size:13px;color:#718278;line-height:1.65;margin-bottom:18px}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:5px;background:#f0f2e8;border-radius:12px;padding:4px;margin-bottom:24px}
.auth-tabs button{border-radius:9px;min-height:40px;font-size:13px;color:#788777}.auth-tabs button.active{background:#fffdf8;color:#266561;box-shadow:0 2px 6px #26483012;font-weight:700}
#shore-auth label{font-size:12px;display:block;color:#49645a;margin:14px 0 7px;font-weight:700}
#shore-auth input{width:100%;min-height:47px;background:#fafbf4;border:1px solid #d5dfce;border-radius:11px;padding:12px;font-size:14px;color:#214742;outline-offset:2px}
.password-field{position:relative}.password-field input{padding-right:76px!important}.password-field button{position:absolute;right:5px;top:0;bottom:0;font-size:10px;min-width:64px;color:#64867b}
.account-card .primary{width:100%;min-height:48px;margin-top:22px;font-size:14px}
.account-error{background:#f9ebe3;border:1px solid #e8c3ad;border-radius:10px;color:#985538;font-size:12px;line-height:1.6;padding:10px;margin-top:14px}
.auth-footnote{font-size:10px;line-height:1.65;text-align:center;color:#8b967f;margin:16px 0 0}.account-version{font-size:8px;letter-spacing:1.8px;color:#8e9b84;margin-top:auto;flex-shrink:0}
.auth-wait{text-align:center;padding:18px 0}.auth-wait h1{font-size:25px}.auth-wait p{font-size:13px;line-height:1.65;color:#72847a}.auth-wait .secondary{width:100%;margin-top:10px;min-height:44px}
.account-spinner{display:inline-block;width:32px;height:32px;border:3px solid #e0e9d8;border-top-color:#44897c;border-radius:50%;animation:account-spin .8s linear infinite;margin-bottom:14px}
.role-choice{position:relative;text-align:left;width:100%;display:block;overflow:hidden;border-radius:18px;border:1.5px solid #b7cdb6;background:linear-gradient(145deg,#eef3e4,#fffdf7);margin-top:16px;padding:12px 16px 18px}
.role-choice[aria-checked=true]{border-color:#478b79;box-shadow:0 0 0 3px #4e967517}
.role-art{height:175px;display:flex;justify-content:center;contain:layout paint}.role-art>div{width:180px;height:180px;background:url('art/motion/combat-clean.png') 0 0/600% 100%;filter:drop-shadow(0 5px 3px #254e3920)}
.role-copy{display:block}.role-copy small{font-size:9px;color:#79906e}.role-copy strong{display:block;font-family:Interface,sans-serif;font-size:27px;color:#235c54;margin:5px 0}.role-copy>span{font-size:12px;line-height:1.65;display:block;color:#6b8272}.role-copy em{display:block;font-size:9px;font-style:normal;color:#8f926b;margin-top:11px}
.role-check{position:absolute;right:13px;top:13px;border:1px solid #aac3a5;border-radius:50%;width:25px;height:25px;display:grid;place-items:center;color:#447c69;background:#fffdf7}
.role-skills{display:flex;justify-content:space-between;gap:8px;margin:16px 0 0}.role-skills>span{flex:1;min-width:0;text-align:center;font-size:8px;line-height:1.5;color:#657f6b}.role-skills img{width:32px;height:32px;object-fit:contain;display:block;margin:0 auto 5px}.auth-link{width:100%;font-size:11px;margin-top:12px;min-height:36px}
@keyframes account-spin{to{transform:rotate(360deg)}}

/* Reward rows never inherit the aspect ratio of inventory cards. */
.modal.victory-modal{display:flex;flex-direction:column;overflow:hidden;padding:18px;max-height:100%;border-radius:22px}
.victory-heading{flex-shrink:0;padding:0 0 13px;text-align:left;border-bottom:1px solid #e4e6d4}
.victory-mark{display:flex;align-items:center;gap:9px}.victory-mark img{width:40px;height:42px;object-fit:contain}.victory-mark>span{font-size:8px;letter-spacing:1.1px;color:#998252;display:flex;align-items:center;gap:5px}.victory-mark .icon{font-size:13px}
.victory-heading h2{font-family:Interface,sans-serif;font-size:34px;margin:8px 0 2px;line-height:1.1}.victory-heading p{font-size:12px;margin-top:7px;line-height:1.4;color:#778976}
.victory-scroll{min-height:0;overflow:auto;overscroll-behavior:contain;flex:1;padding:14px 0 0}
.victory-rewards{gap:9px;margin:0 0 15px}.victory-rewards>span{padding:12px 8px;font-size:22px;line-height:1.2;min-height:71px}.victory-rewards small{font-size:10px}
.victory-section{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.victory-section h3{font-size:13px}.victory-section>span{font-size:10px;color:#859381}
.victory-loot{display:flex;flex-direction:column;gap:9px}.victory-loot>div{width:100%}
.reward-row{display:flex;align-items:center;gap:10px;padding:11px 10px;border:1px solid var(--rarity,#d7dfcf);border-radius:14px;background:#fffdf8;text-align:left;width:100%;min-width:0;position:relative}
.reward-item-art{width:62px;height:70px;flex:0 0 62px;display:grid;place-items:center;background:radial-gradient(ellipse,var(--rarity-bg,#eef2e5),transparent 70%);overflow:hidden;contain:layout paint}
.reward-item-art img{display:block;width:100%;height:100%;object-fit:contain;max-height:70px}
.reward-item-copy{min-width:0;flex:1}.reward-item-copy h3{font-size:12px;line-height:1.5;overflow-wrap:anywhere;margin:4px 0 7px}.reward-item-rarity{font-size:8px;color:#799481}.reward-quantity{font-size:10px;color:#55786d;border-radius:7px;border:1px solid #dce4d4;padding:4px;align-self:flex-start;flex-shrink:0;margin-left:-4px}
.benefit-tags{display:flex;flex-wrap:wrap;gap:5px}.benefit-tags>span{font-size:9px;line-height:1.4;color:#426e61;background:#f0f5e9;padding:4px 5px;border-radius:6px;display:inline-flex;align-items:center;gap:3px}.benefit-tags .icon{font-size:12px}.reward-condition{display:block;font-size:8px;color:#8c9a82;margin-top:6px}
.victory-saved{display:flex;align-items:center;justify-content:center;gap:5px;font-size:9px;line-height:1.5;color:#83947b;text-align:center;margin:14px 0}.victory-saved .icon{font-size:13px}
.victory-level{display:flex;flex-wrap:wrap;align-items:center;gap:7px;background:#f5efdc;border:1px solid #e5d8af;color:#947c45;font-size:11px;padding:10px;border-radius:11px;margin-bottom:14px}.victory-level .icon{font-size:16px}.victory-level>span{width:100%;font-size:9px;padding-left:23px}
.victory-footer{flex-shrink:0;border-top:1px solid #e8e8dc;padding-top:11px;background:#fffdf5}.victory-footer .primary{width:100%;margin:0;min-height:47px;font-size:14px}.victory-footer .secondary{width:100%;margin-top:8px;min-height:40px;font-size:11px}

/* Isolate the natural-size artwork from the text below it. */
.monster-detail .modal-header h2{font-size:13px;letter-spacing:0;line-height:1.4;color:#657b71}
.monster-detail-art{position:relative;width:100%;height:clamp(120px,24vh,188px);min-height:0;overflow:hidden;contain:layout paint;border-radius:16px;background:radial-gradient(ellipse at center,#e4ecd5 0%,#f5f7eb 55%,transparent 78%)}
.monster-detail-art>img{position:absolute;inset:7px;width:calc(100% - 14px);height:calc(100% - 14px);max-width:calc(100% - 14px);max-height:calc(100% - 14px);display:block;object-fit:contain}
.monster-detail-name{font-size:24px!important;margin:14px 0 6px!important;line-height:1.2;overflow-wrap:anywhere}.monster-detail>.eyebrow{display:block;font-size:9px;color:#7b8c7b;letter-spacing:1px;margin-bottom:16px}.monster-detail .property-grid{margin-top:12px}.monster-detail .property-tile{min-height:60px}.monster-detail .property-tile small{font-size:10px}.monster-detail .property-tile strong{font-size:18px}.monster-detail .modal-copy{font-size:12px;line-height:1.75}.monster-detail .behavior p{font-size:11px}.monster-detail .loot-line>div{min-width:0}.monster-detail .loot-line strong{font-size:11px;overflow-wrap:anywhere}
.item-card{height:auto;aspect-ratio:auto;min-height:265px;overflow:visible}.item-card .item-art{flex:0 0 auto;height:122px;min-height:0}.item-card .item-art img{height:100%;max-height:122px}.item-card h3{line-height:1.5;font-size:12px!important;min-height:0!important;margin-bottom:7px}.item-card-stat{font-size:10px;line-height:1.5;flex-wrap:wrap}.item-type{margin-top:auto;gap:6px;padding-top:9px;line-height:1.5}.item-card .mini-durability{margin-top:10px}.item-card-stat .stat-tag{font-size:9px}

/* Shop, recipes and repairs share a clear product presentation. */
.modal.workshop-modal{display:flex;flex-direction:column;overflow:hidden;padding:17px;max-height:100%}.workshop-modal>.modal-header{flex-shrink:0;margin-bottom:12px}.workshop-modal>.modal-header h2{font-size:19px}
.store-keeper{display:flex;align-items:center;gap:10px;flex-shrink:0;background:#f0f4e7;border:1px solid #dde5d0;padding:9px;border-radius:13px;margin-bottom:13px}.store-keeper>img{width:42px;height:48px;object-fit:cover;border-radius:9px}.store-keeper>div{flex:1;min-width:0}.store-keeper strong{font-size:13px;display:block}.store-keeper small{font-size:9px;color:#779076;display:block;line-height:1.5;margin-top:4px}.store-keeper .coins{font-size:13px;gap:4px;padding:6px}.store-keeper .coins .icon{font-size:17px}
.store-tabs{flex-shrink:0;display:grid;grid-template-columns:1.15fr 1fr .8fr;gap:4px;border-bottom:1px solid #e0e6d5;padding:0 0 11px;margin:0 0 12px}.store-tabs button{font-size:10px;min-height:39px;border-radius:10px;color:#7e8b79;background:#f1f3e8}.store-tabs button.active{background:#e2eedf;color:#347865;font-weight:700;border:1px solid #b9d0b3}
.store-list{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:12px;padding-bottom:3px}
.store-card{flex-shrink:0;border:1px solid var(--rarity,#d5dfcb);border-radius:16px;padding:12px;background:#fffdf8}.store-item-head{display:flex;align-items:center;gap:11px}.store-item-head>div:last-child{flex:1;min-width:0}.store-art{width:65px;height:83px;flex-shrink:0;contain:layout paint;background:radial-gradient(ellipse,var(--rarity-bg,#edf2e4),transparent 70%)}.store-art>img{display:block;width:100%;height:100%;object-fit:contain}.store-item-head h3{font-size:14px;line-height:1.45;margin:6px 0 7px;overflow-wrap:anywhere}.store-item-head .eyebrow{font-size:7px;letter-spacing:.3px;line-height:1.6}
.recipe-material{display:flex;align-items:center;gap:7px;background:#f5f3e8;border:1px solid #e6e1ca;border-radius:9px;padding:6px 9px;margin-top:11px;font-size:9px;color:#918267}.recipe-material img{width:26px;height:27px;object-fit:contain}.recipe-material>span{flex:1;min-width:0;line-height:1.5}.recipe-material strong{font-size:11px;flex-shrink:0}.recipe-material.enough{background:#eff5e8;border-color:#d5e1c8;color:#729463}
.store-action{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:13px;padding-top:11px;border-top:1px solid #e7e9dc}.store-price{display:flex;align-items:center;flex-wrap:wrap;gap:5px;font-size:18px;font-weight:700;color:#52786a}.store-price>.icon{font-size:20px;color:#b39755}.store-price small{font-size:9px;font-weight:400;color:#909978}.store-action .primary{margin:0;padding:9px 12px;min-height:40px;width:auto;font-size:11px;flex-shrink:0;max-width:67%}.store-description{font-size:11px;color:#7c8e7b;line-height:1.65;margin-top:10px}.repair-state{font-size:11px;color:#749276;line-height:1.6}.repair-progress{margin-top:11px;height:5px}
.store-empty{text-align:center;padding:38px 18px}.store-empty>.icon{font-size:40px;color:#90b083}.store-empty h3{font-size:16px;margin:14px 0 8px}.store-empty p{font-size:12px;line-height:1.7;color:#7b8f77}
.work-modal{text-align:center}.work-animation{height:205px;position:relative;contain:layout paint;margin:4px 0 20px}.work-aura{position:absolute;inset:10% 15%;background:radial-gradient(ellipse,#e0eaca,transparent 70%);border-radius:50%;animation:forge-glow 1.1s ease-in-out infinite}
.work-object{position:absolute;left:25%;right:25%;top:15%;height:70%;z-index:2;animation:forge-item 1.1s ease-in-out infinite}.work-object img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 4px 5px #4b5d2720)}
.work-hammer{position:absolute;right:15%;top:19%;transform-origin:top right;animation:forge-hammer .65s ease-in-out infinite;color:#7b9465;z-index:3}.work-hammer .icon{font-size:38px}.work-hammer svg{width:46px;height:65px;filter:drop-shadow(0 3px 2px #36533920)}
.work-animation>i{position:absolute;left:55%;top:53%;width:4px;height:4px;border-radius:50%;background:#d4aa55;--angle:calc(var(--spark)*60deg);animation:forge-spark .65s ease-out infinite;animation-delay:calc(var(--spark)*.06s)}
.work-copy h2{font-size:23px;line-height:1.3;margin:9px 0}.work-copy p{font-size:13px;color:#789176}.work-copy small{font-size:10px;color:#899780}.work-copy .eyebrow{font-size:8px;letter-spacing:1px}.work-progress{height:4px;border-radius:4px;background:#e1e8d5;overflow:hidden;margin:22px 12px 14px}.work-progress>span{display:block;width:35%;height:100%;background:#74a589;border-radius:4px;animation:work-slide 1.2s ease-in-out infinite}
.work-animation.buy .work-hammer{animation:bag-bob 1s ease-in-out infinite}.work-success{padding:12px 0 20px}.work-success>.icon{display:flex;font-size:34px;color:#b49a5a;justify-content:center;margin-bottom:14px}.work-success>.eyebrow{display:block;font-size:8px;color:#809171;letter-spacing:2px}.work-success h2{font-family:Interface,sans-serif;font-size:29px;color:#286a5b;margin:9px 0}.work-success p{font-size:11px;color:#829578;line-height:1.5}.crafted-modal .reward-row{text-align:left;animation:loot-reveal .45s ease both}.crafted-modal>.primary{font-size:13px;min-height:46px}.crafted-modal>.secondary{min-height:41px;font-size:11px}
@keyframes forge-hammer{0%,100%{transform:rotate(-20deg)}55%{transform:rotate(25deg)}}
@keyframes forge-glow{50%{opacity:.55;transform:scale(1.09)}}
@keyframes forge-item{50%{transform:translateY(3px) scale(.98)}}
@keyframes forge-spark{0%{opacity:1;transform:rotate(var(--angle)) translateX(0)}100%{opacity:0;transform:rotate(var(--angle)) translateX(55px)}}
@keyframes work-slide{0%{transform:translateX(-100%)}100%{transform:translateX(380%)}}
@keyframes bag-bob{50%{transform:translateY(-8px) rotate(8deg)}}
.reduced-motion .work-animation *,.reduced-motion .crafted-modal .reward-row,.reduced-motion .victory-loot>div{animation:none}
@media(max-height:670px){.account-screen{padding:14px 16px;gap:16px}.auth-brand img{width:43px;height:45px}.account-card{padding:19px}.auth-tabs{margin-bottom:17px}.role-art{height:126px}.role-art>div{width:136px;height:136px}.victory-heading h2{font-size:28px}.victory-heading{padding-bottom:10px}.victory-mark img{width:32px;height:34px}.victory-rewards>span{min-height:62px;padding:9px}.monster-detail-art{height:127px}.work-animation{height:160px}}
@media(max-width:350px){.account-screen{padding:16px 12px}.account-card{padding:18px}.account-card h1{font-size:27px}.reward-item-art{width:49px;height:58px;flex-basis:49px}.reward-item-copy h3{font-size:11px}.reward-row{gap:8px;padding:10px 8px}.benefit-tags>span{font-size:8px}.modal.victory-modal{padding:15px}.victory-mark>span{font-size:7px}.store-card{padding:10px}.store-art{width:52px;height:72px}.store-item-head h3{font-size:12px}.store-action .primary{font-size:10px}.store-tabs button{font-size:9px}.item-card .item-art{height:108px}.item-card{min-height:255px}}
@media(prefers-reduced-motion:reduce){.work-animation *,.crafted-modal .reward-row,.victory-loot>div{animation:none}}
