:root{--black:#111;--red:#e20a0a;--grey:#313131}*{box-sizing:border-box}body{margin:0;background:#b8b8b8;color:var(--black);font-family:Arial,'Malgun Gothic',sans-serif;font-weight:700}.game-shell{position:relative;width:min(100%,760px);min-height:100vh;margin:auto;padding:14px 30px 32px;background:white;border:3px solid var(--black);box-shadow:0 0 30px #0007}header{display:grid;grid-template-columns:110px 1fr 48px;align-items:start;height:103px;text-align:center}.nav-button{border:0;background:transparent;padding-top:3px;font-size:19px;font-weight:900;text-align:left}.eyebrow{margin:6px 0 -6px;color:#777;font-size:10px;font-weight:400;letter-spacing:1px}h1{margin:0;color:var(--red);font-size:54px;line-height:1;letter-spacing:-5px;text-shadow:0 4px 1px #111,-1px -1px 0 #111,1px -1px 0 #111}.icon-button{justify-self:end;width:47px;height:47px;border:3px solid #111;border-radius:50%;background:#313131;color:#888;font-size:27px;line-height:35px}.wallet{position:absolute;bottom:18px;left:30px;right:30px;display:flex;align-items:end;justify-content:space-between;font-size:18px}.wallet div{display:flex;gap:5px;align-items:baseline}.wallet div:nth-child(2){position:absolute;left:0;bottom:31px}.wallet div:nth-child(3){position:absolute;right:0;bottom:31px}.wallet span{font-size:14px}.wallet strong{font-size:23px}.forge-card{position:relative;text-align:center;min-height:391px;padding-top:30px}.level-badge{display:none}.sword-stage{height:222px;position:relative;display:grid;place-items:center}.sword{--blade:#d4d9dd;--edge:#fff;--handle:#6e4934;position:relative;width:91px;height:207px;transform:rotate(43deg);filter:drop-shadow(4px 5px 0 #111);transition:.35s ease}.blade{position:absolute;left:28px;top:0;width:35px;height:135px;background:linear-gradient(90deg,var(--blade) 0 40%,var(--edge) 41% 61%,var(--blade) 62%);clip-path:polygon(50% 0,100% 100%,55% 95%,0 100%);outline:4px solid #111;outline-offset:-4px}.guard{position:absolute;left:4px;top:126px;width:83px;height:17px;border:4px solid #111;border-radius:4px;background:#ddd}.grip{position:absolute;left:33px;top:139px;width:24px;height:53px;border:4px solid #111;border-radius:3px;background:repeating-linear-gradient(90deg,var(--handle),var(--handle) 5px,#201611 5px,#201611 9px)}.pommel{position:absolute;left:27px;top:187px;width:37px;height:26px;border:4px solid #111;border-radius:50%;background:#aaa}.spark{display:none;position:absolute;width:9px;height:9px;background:#ffe17c;transform:rotate(45deg);box-shadow:0 0 12px 4px #ffd24c}.spark-one{top:30px;left:31%}.spark-two{top:92px;right:28%}.spark-three{bottom:28px;left:25%}.rarity{margin:0 0 1px;font-size:12px;color:#777;text-transform:uppercase}.forge-card h2{margin:0;font-size:47px;letter-spacing:-4px;line-height:1}.sell-value{position:absolute;top:62px;left:3px;margin:0;text-align:left;font-size:18px}.sell-value strong{display:block;font-size:22px}.odds-card{position:absolute;bottom:86px;left:50%;transform:translateX(-50%);width:292px;text-align:center}.section-heading{display:flex;justify-content:center;gap:10px;align-items:center}.section-heading h3{font-size:20px}.section-heading span{font-size:12px;color:#555}.odds-row{display:flex;justify-content:center;gap:10px;margin:5px 0;font-size:12px}.odds-row b{font-size:15px}.odds-bar{display:flex;height:7px;border:2px solid #111}.odds-bar i{height:100%}.odds-bar i:nth-child(1){background:#54a65f}.odds-bar i:nth-child(2){background:#dfbd37}.odds-bar i:nth-child(3){background:#d44242}.actions{position:absolute;right:28px;top:176px;display:grid;gap:16px}.actions button{width:120px;height:120px;border:4px solid #111;border-radius:50%;font-weight:900}.enhance{background:#303030;color:#eee;font-size:16px;box-shadow:inset 0 0 0 13px #303030}.enhance span{display:block;color:#777;font-size:37px;line-height:25px}.enhance small{display:block;font-size:12px;color:#ddd}.sell{background:#c9c9c9;color:#111;font-size:15px}.actions button:active{transform:scale(.95)}.actions button:disabled{opacity:.45;cursor:not-allowed}.items-card{position:absolute;bottom:90px;left:31px;width:164px}.items-card .section-heading{justify-content:flex-start}.items-card .section-heading h3{font-size:14px}.hint{font-size:9px!important}.item{margin-top:5px;width:100%;display:flex;align-items:center;gap:5px;padding:5px;border:2px solid #111;background:#eee;text-align:left;font-size:10px}.item .shield{font-size:19px}.item b,.item small{display:block}.item small{font-size:8px;font-weight:400}.item em{margin-left:auto;font-style:normal}.log-card{margin-top:15px;padding:9px 12px;border:2px solid #111;background:#f6f6f6}.log-card .section-heading{justify-content:space-between}.log-card .section-heading h3{font-size:14px}.text-button{border:0;background:transparent;font-size:11px;font-weight:bold}.log-card ul{list-style:none;margin:6px 0 0;padding:0;max-height:90px;overflow:auto}.log-card li{padding:5px 0;border-top:1px solid #ccc;font-size:11px}.log-card li span{float:right}.good{color:#09851b}.bad{color:#cf0000}.neutral{color:#555}.toast{position:fixed;z-index:5;bottom:25px;left:50%;transform:translate(-50%,20px);opacity:0;padding:10px 17px;border:3px solid #111;background:#fff;color:#111;transition:.2s}.toast.show{opacity:1;transform:translate(-50%,0)}.shake{animation:shake .35s}.flash .spark{display:block;animation:blink .45s 2}.up{animation:up .45s}@keyframes shake{25%{transform:translateX(-7px)}75%{transform:translateX(7px)}}@keyframes blink{50%{opacity:0;transform:rotate(45deg) scale(.1)}}@keyframes up{50%{transform:rotate(43deg) scale(1.16)}}
@media(max-width:600px){.game-shell{padding:9px 15px 29px;border-width:2px}header{grid-template-columns:58px 1fr 40px;height:70px}.nav-button{font-size:13px}.eyebrow{display:none}h1{font-size:35px;letter-spacing:-3px;padding-top:3px}.icon-button{width:37px;height:37px;font-size:20px}.forge-card{min-height:435px;padding-top:22px}.sword-stage{height:211px;transform:scale(.84)}.forge-card h2{font-size:35px;letter-spacing:-3px}.sell-value{top:41px;font-size:13px}.sell-value strong{font-size:17px}.actions{right:13px;top:173px}.actions button{width:84px;height:84px;border-width:3px;font-size:12px}.enhance span{font-size:26px;line-height:17px}.enhance small{font-size:9px}.odds-card{bottom:98px;width:245px}.section-heading h3{font-size:16px}.items-card{left:15px;bottom:100px;width:126px}.wallet{left:15px;right:15px;bottom:16px;font-size:13px}.wallet strong{font-size:18px}.wallet span{font-size:11px}.wallet div:nth-child(2),.wallet div:nth-child(3){bottom:27px}.log-card{margin-top:2px}.rarity{margin-top:-11px}}

/* The lower dashboard intentionally keeps the crisp, boxed Flash-era feel without overlapping controls. */
.wallet{position:static;margin:0 0 8px;min-height:32px;justify-content:space-between}.wallet div,.wallet div:nth-child(2),.wallet div:nth-child(3){position:static}.wallet div:nth-child(2){order:-1}.forge-card{min-height:390px}.odds-card{position:static;transform:none;margin:0 auto 10px;width:min(100%,370px);padding:9px;border:2px solid #111}.items-card{position:static;width:min(100%,370px);margin:0 auto 10px}.log-card{margin-top:0}.items-card .section-heading{justify-content:center}.wallet strong{font-size:20px}
@media(max-width:600px){.wallet{margin:0 0 4px;min-height:30px}.wallet div:nth-child(2){order:0}.wallet div{display:block;text-align:center}.wallet span{display:block}.forge-card{min-height:370px}.odds-card{bottom:auto;width:min(100%,310px);margin-bottom:7px}.items-card{bottom:auto;width:min(100%,310px);margin-bottom:7px}.log-card{margin-top:0}.rarity{margin-top:-11px}}

/* 메론 테마: 기존의 각진 검을 둥근 과일 일러스트로 교체합니다. */
.sword{--melon:#83b735;width:155px;height:155px;transform:none;filter:drop-shadow(5px 6px 0 #111)}.blade{left:7px;top:10px;width:143px;height:137px;clip-path:none;outline:0;border:5px solid #111;border-radius:52% 48% 51% 49%;background:repeating-linear-gradient(105deg,transparent 0 19px,#244f27 20px 25px,transparent 26px 44px),radial-gradient(circle at 36% 31%,#fff9 0 6%,transparent 7%),var(--melon)}.guard,.grip,.pommel{display:none}.sword::before{content:'';position:absolute;top:-19px;left:66px;width:25px;height:36px;border:5px solid #111;border-bottom:0;border-radius:100% 0 0 0;background:#4e942f;transform:rotate(19deg)}.sword::after{content:'';position:absolute;top:-10px;left:89px;width:37px;height:23px;border:4px solid #111;border-radius:100% 0 100% 0;background:#72b23e;transform:rotate(-11deg)}.sword-stage{height:222px}.forge-card h2{letter-spacing:-3px}.enhance span{color:#71b849}.enhance{background:#323232}.item .shield{color:#549739}@media(max-width:600px){.sword{transform:scale(.77)}.sword-stage{transform:none}}

/* 상단 메뉴와 파괴 결과 화면 */
.nav-buttons{display:grid;gap:5px;text-align:left}.nav-buttons .nav-button{padding:0;font-size:16px}.game-shell>header{grid-template-columns:170px 1fr 48px}.failure-screen{position:fixed;z-index:20;inset:0;width:min(100%,950px);min-height:100vh;margin:auto;padding:20px;background:#fff;border:3px solid #111;font-family:Arial,'Malgun Gothic',sans-serif;color:#111}.failure-screen[hidden]{display:none}.failure-screen header{height:125px;grid-template-columns:1fr 1.6fr 1fr}.failure-screen h1{font-size:54px}.failure-help{margin:4px 0 39px;font-size:22px;line-height:1.55}.loot-result{display:flex;align-items:center;gap:9px;font-size:25px}.seed-icon{display:grid;place-items:center;width:47px;height:47px;border:4px solid #111;background:#7eaa3f;clip-path:polygon(50% 0,90% 18%,100% 56%,68% 100%,22% 92%,0 45%,17% 11%)}.loot-result button{border:0;background:transparent;font:inherit;font-weight:900;text-decoration:underline;cursor:pointer}.failure-melon{position:absolute;top:310px;right:9%;width:180px;height:175px;border:6px solid #111;border-radius:52% 48% 51% 49%;background:repeating-linear-gradient(105deg,transparent 0 25px,#244f27 26px 32px,transparent 33px 55px),#87bb45}.failure-melon::before,.failure-melon::after{content:'';position:absolute;background:#111}.failure-melon::before{width:5px;height:160px;left:86px;top:5px;transform:rotate(35deg)}.failure-melon::after{height:5px;width:148px;top:81px;left:11px;transform:rotate(-20deg)}.failure-screen h2{position:absolute;left:20px;bottom:120px;margin:0;font-size:60px;line-height:1.15;letter-spacing:-5px}.failure-bottom{position:absolute;bottom:21px;left:20px;right:35px;display:flex;justify-content:space-between;font-size:24px}.failure-bottom b{font-size:30px}@media(max-width:600px){.game-shell>header{grid-template-columns:110px 1fr 40px}.nav-buttons .nav-button{font-size:11px}.failure-screen{padding:13px;border-width:2px}.failure-screen header{height:76px;grid-template-columns:1fr 2fr 1fr}.failure-screen h1{font-size:35px}.failure-help{font-size:15px;margin:4px 0 28px}.loot-result{font-size:18px}.seed-icon{width:35px;height:35px}.failure-melon{top:245px;right:8%;width:114px;height:110px;border-width:4px}.failure-melon::before{height:100px;left:53px}.failure-melon::after{width:92px;top:51px}.failure-screen h2{left:13px;bottom:100px;font-size:38px;letter-spacing:-3px}.failure-bottom{left:13px;right:15px;bottom:20px;font-size:16px}.failure-bottom b{font-size:20px}}

/* 일반 화면도 파괴 결과와 같은 넓은 플래시 게임 캔버스 비율로 고정합니다. */
.game-shell{width:min(100%,950px);min-height:0;aspect-ratio:4/3;padding:18px 20px;overflow:hidden}.game-shell>header{height:106px}.wallet{margin:0;min-height:32px}.forge-card{height:490px;min-height:0;padding-top:24px}.sword-stage{height:237px}.odds-card{position:absolute;bottom:14px;left:50%;transform:translateX(-50%);width:330px;margin:0}.items-card,.log-card{display:none}.actions{right:30px;top:158px}.sell-value{top:48px}.game-shell .wallet div:nth-child(2){order:0}
@media(max-width:600px){.game-shell{aspect-ratio:auto;min-height:100vh;padding:9px 15px 22px;overflow:visible}.game-shell>header{height:70px}.forge-card{height:410px}.sword-stage{height:218px}.odds-card{width:260px;bottom:10px}.actions{top:150px;right:13px}.sell-value{top:39px}}

.rescue-button{position:absolute;top:315px;right:7%;width:178px;height:178px;border:6px solid #111;border-radius:50%;background:#303030;color:#fff;font-size:25px;font-weight:900}.rescue-button small{display:block;color:#ddd;font-size:14px}.rescue-button:disabled{opacity:.35}.menu-screen{position:fixed;z-index:18;inset:0;width:min(100%,950px);min-height:100vh;margin:auto;padding:20px;background:#fff;border:3px solid #111}.menu-screen[hidden]{display:none}.menu-screen header{height:120px;grid-template-columns:180px 1fr 120px}.menu-screen h1{font-size:50px}.menu-description{margin:0 auto 22px;max-width:650px;text-align:center;font-size:18px}.menu-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-width:760px;margin:auto}.menu-item{min-height:70px;padding:12px;border:3px solid #111;background:#f1f1f1;text-align:left;font:inherit}.menu-item b,.menu-item small{display:block}.menu-item small{margin-top:5px;font-size:12px}.menu-item:disabled{opacity:.35}@media(max-width:600px){.rescue-button{top:245px;right:5%;width:105px;height:105px;border-width:4px;font-size:15px}.rescue-button small{font-size:10px}.menu-screen{padding:13px;border-width:2px}.menu-screen header{height:75px;grid-template-columns:95px 1fr 20px}.menu-screen h1{font-size:32px}.menu-description{font-size:13px;margin-bottom:13px}.menu-list{grid-template-columns:1fr;gap:7px}.menu-item{min-height:55px;padding:8px;font-size:13px}}
.exit-menu{justify-self:end;border:0;background:transparent;font:900 20px Arial,'Malgun Gothic',sans-serif;white-space:nowrap}.exit-menu span{display:inline-grid;place-items:center;width:47px;height:47px;border:3px solid #111;border-radius:50%;background:#303030;color:#777;font-size:18px}.menu-screen header{height:132px;grid-template-columns:170px 1fr 170px}.menu-screen h1{font-size:54px}.menu-description{position:absolute;left:28px;top:145px;max-width:180px;text-align:left;font-size:17px;line-height:1.35}.menu-list{display:grid;grid-template-columns:1fr;gap:0;width:72%;max-width:700px;margin:44px auto 0}.menu-item{display:grid;grid-template-columns:1fr auto;align-items:center;min-height:53px;padding:4px 0;border:0;background:transparent;font-size:20px}.menu-item b{font-size:20px}.menu-item small{margin:0;font-size:17px;font-weight:900}.menu-item:disabled{opacity:.27}.menu-list[data-mode="inventory"]{grid-template-columns:1fr 1fr;column-gap:80px;align-content:start}.menu-list[data-mode="inventory"] .menu-item{min-height:43px;grid-template-columns:auto 1fr;gap:4px;font-size:21px}.menu-list[data-mode="inventory"] .menu-item b{font-size:21px}.menu-list[data-mode="inventory"] .menu-item small{font-size:21px}.menu-list[data-mode="shop"] .menu-item{min-height:76px}.menu-list[data-mode="shop"] .menu-item b{font-size:24px}.menu-list[data-mode="shop"] .menu-item small{font-size:21px}.menu-list[data-mode="forge"] .menu-item{min-height:51px}.menu-list[data-mode="forge"] .menu-item b{font-size:19px}@media(max-width:600px){.exit-menu{font-size:12px}.exit-menu span{width:31px;height:31px;border-width:2px;font-size:12px}.menu-screen header{height:77px;grid-template-columns:50px 1fr 90px}.menu-screen h1{font-size:33px}.menu-description{position:static;margin:0 0 10px;max-width:none;text-align:center;font-size:12px}.menu-list{width:94%;margin:0 auto}.menu-item{min-height:40px;font-size:12px}.menu-item b,.menu-list[data-mode="shop"] .menu-item b,.menu-list[data-mode="forge"] .menu-item b{font-size:12px}.menu-item small,.menu-list[data-mode="shop"] .menu-item small{font-size:11px}.menu-list[data-mode="inventory"]{column-gap:15px}.menu-list[data-mode="inventory"] .menu-item{min-height:32px}.menu-list[data-mode="inventory"] .menu-item b,.menu-list[data-mode="inventory"] .menu-item small{font-size:13px}}
.menu-screen .menu-item:disabled{opacity:1;color:#111}
.menu-list[data-mode="forge"]{margin-top:14px}.menu-list[data-mode="forge"] .menu-item{min-height:39px}
.header-actions{justify-self:end;display:flex;gap:7px;align-items:center}.music-button{width:34px;height:34px;border:2px solid #111;border-radius:50%;background:#fff;color:#111;font-size:18px;font-weight:900}.music-button[aria-pressed="true"]{background:#303030;color:#72c449}.success-only{font-size:25px}.success-only b{font-size:31px}.odds-card{padding:8px}.odds-row,.odds-bar,.odds-card .section-heading{display:none}.sword,.toast{transition:none!important}.shake,.flash .spark,.up{animation:none!important}.toast{display:none!important}.loot-result[hidden]{display:none}@media(max-width:600px){.music-button{width:28px;height:28px;font-size:15px}.success-only{font-size:18px}.success-only b{font-size:22px}}
.odds-card{border:0!important;background:transparent!important;padding:0!important;width:auto!important;white-space:nowrap}
.volume-control{width:72px;accent-color:#4c9a42}.failure-screen .rescue-button{top:auto;bottom:20px;right:7%;width:178px;height:72px;border-radius:8px;font-size:24px}.quick-rescue{position:absolute;top:184px;right:7%;border:0;background:transparent;color:#111;font:900 18px Arial,'Malgun Gothic',sans-serif}.quick-rescue small{font-size:12px}.quick-rescue:disabled{opacity:.3}@media(max-width:600px){.volume-control{width:46px}.failure-screen .rescue-button{bottom:20px;right:5%;width:110px;height:50px;border-radius:5px;font-size:15px}.quick-rescue{top:139px;right:5%;font-size:12px}.quick-rescue small{font-size:9px}}
.failure-screen .rescue-button{top:315px;bottom:auto;right:7%;width:178px;height:178px;border:6px solid #111;border-radius:50%;font-size:25px}.quick-rescue{top:188px;right:7%;display:grid;place-items:center;width:82px;height:82px;border:4px solid #111;border-radius:50%;background:#c8c8c8;color:#111;text-align:center;font-size:15px;line-height:1.05}.quick-rescue small{display:block;font-size:10px}.quick-rescue:disabled{opacity:.35}@media(max-width:600px){.failure-screen .rescue-button{top:245px;bottom:auto;right:5%;width:105px;height:105px;border-width:4px;border-radius:50%;font-size:15px}.quick-rescue{top:132px;right:5%;width:55px;height:55px;border-width:2px;font-size:10px}.quick-rescue small{font-size:7px}}
.failure-screen .failure-melon{display:none}

/* Static melon progression sprites: three enhancement levels share each visual tier. */
.sword{width:180px;height:180px;transform:none!important;filter:drop-shadow(5px 6px 0 #111);background-image:url('assets/melon-sprites.svg');background-repeat:no-repeat;background-size:1000% 100%;background-position:0 center}
.sword>*{display:none!important}
.sword[data-tier="0"]{background-position:0% center}
.sword[data-tier="1"]{background-position:11.111% center}
.sword[data-tier="2"]{background-position:22.222% center}
.sword[data-tier="3"]{background-position:33.333% center}
.sword[data-tier="4"]{background-position:44.444% center}
.sword[data-tier="5"]{background-position:55.555% center}
.sword[data-tier="6"]{background-position:66.666% center}
.sword[data-tier="7"]{background-position:77.777% center}
.sword[data-tier="8"]{background-position:88.888% center}
.sword[data-tier="9"]{background-position:100% center}
@media(max-width:600px){.sword{width:155px;height:155px}}
.sword{background-size:3000% 100%}
.sword[data-tier]{background-position:var(--sprite-pos,0%) center}
.sword[data-level]{background-image:var(--sprite-image)!important;background-size:100% 100%!important;background-position:center!important}
.sword[data-level]{background:none!important;width:180px;height:180px;object-fit:contain;display:block}
.game-shell>header{position:relative}
.game-shell>header>div:nth-child(2){position:absolute;left:50%;top:0;transform:translateX(-50%);width:max-content}
.eyebrow{display:none!important}
@media(max-width:600px){.game-shell>header>div:nth-child(2){top:2px}}
.menu-footnote{position:absolute;left:0;right:0;bottom:24px;margin:0;text-align:center;font-size:16px;font-weight:900;color:#555}
@media(max-width:600px){.menu-footnote{bottom:14px;font-size:11px}}
.menu-list[data-mode="forge"] .menu-item{grid-template-columns:1fr auto auto;gap:16px;align-items:center;cursor:default}
.menu-list[data-mode="forge"] .menu-item small{font-size:17px;min-width:48px;text-align:right}
.exchange-button{border:0;background:transparent;padding:5px 0;color:#111;font:inherit;font-size:17px;font-weight:900;text-decoration:underline;cursor:pointer;white-space:nowrap}
.exchange-button:disabled{opacity:.35;cursor:not-allowed;text-decoration:none}
@media(max-width:600px){.menu-list[data-mode="forge"] .menu-item{grid-template-columns:1fr auto auto;gap:7px}.menu-list[data-mode="forge"] .menu-item small,.exchange-button{font-size:11px}}
