/* The XVH world: island map, story theatre, field trip dock, collector's album, Hummi's nest, Maker Studio,
   the daily chest, the class boss and won cards. */

/* ---- Island map ---- */
.world-map { position: relative; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); background: linear-gradient(180deg, #7FD6F5, #2BA8D8); aspect-ratio: 3 / 2; }
.world-map > img:first-child { width: 100%; height: 100%; object-fit: cover; display: block; }
.wm-island { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 2px; text-decoration: none; color: var(--ink); z-index: 2; }
.wm-label { background: #fff; border: 3px solid var(--c); border-radius: 999px; padding: 4px 12px; font: 800 15px var(--font-head); white-space: nowrap; box-shadow: 0 3px 0 rgba(12, 33, 82, .18); transition: transform .15s; }
.wm-progress { background: rgba(255, 255, 255, .88); border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 800; }
.wm-island:hover .wm-label, .wm-island:focus-visible .wm-label { transform: scale(1.08); }
.wm-hummi { position: absolute; width: 56px; height: 56px; transform: translate(-50%, -50%); transition: left .7s cubic-bezier(.4, 0, .2, 1), top .7s cubic-bezier(.4, 0, .2, 1); z-index: 3; pointer-events: none; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .25)); animation: wm-bob 1.6s ease-in-out infinite; }
.wm-hummi.flip { scale: -1 1; }
@keyframes wm-bob { 50% { margin-top: -6px; } }
.world-map.is-low .wm-label { font-size: 13px; }
/* On phones the map keeps its shape and scrolls sideways, so the labels stay on their islands. */
.world-scroll { border-radius: 22px; }
.world-swipe { display: none; }
@media (max-width: 640px) {
  .world-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .world-map { width: 720px; }
  .world-swipe { display: block; margin-top: 4px; }
  .wm-label { font-size: 13px; padding: 3px 9px; }
  .wm-hummi { width: 44px; height: 44px; }
}
.island-panel { display: none; margin-top: 16px; border-top: 6px solid var(--c); }
.island-panel.is-open, .island-panel:target { display: block; animation: w-fade .3s ease-out; }
@keyframes w-fade { from { opacity: 0; transform: translateY(8px); } }
.ip-places { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 8px 0 12px; }
.ip-place { display: grid; gap: 2px; padding: 12px; border-radius: 14px; background: #F4F8FC; border: 2px solid var(--line); text-decoration: none; color: var(--ink); }
.ip-place:hover { border-color: var(--c); }
.ip-place.is-locked { opacity: .65; background: #F1F3F6; }
.ip-emoji { font-size: 28px; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.hub-card { position: relative; display: grid; gap: 2px; padding: 16px; border-radius: 18px; background: #fff; border: 3px solid var(--c); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s; }
.hub-card:hover { transform: translateY(-3px); }
.hub-emoji { font-size: 34px; }
.hub-badge { position: absolute; top: -10px; right: 10px; background: #FF5A5F; color: #fff; font-size: 12px; font-weight: 800; border-radius: 999px; padding: 2px 10px; animation: story-wiggle 1s ease-in-out infinite; }

/* ---- Home page: world banner, chest, story, boss ---- */
.world-hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 16px 0; padding: 22px; min-height: 130px; border-radius: 22px; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, #0E9F9A, #1E88E5) center / cover; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.world-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 40, 80, .78), rgba(8, 40, 80, .15)); }
.world-hero > * { position: relative; }
.wh-text { display: grid; gap: 4px; max-width: 520px; }
.wh-text b { font: 800 26px var(--font-head); }
.home-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .home-pair { grid-template-columns: 1fr; } }
.chest-card { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 18px; background: linear-gradient(135deg, #FFF6D6, #FFE6A3); border: 3px solid #E8B923; }
.chest-card.is-big { background: linear-gradient(135deg, #E8F6FF, #CDE3FF); border-color: #5A8DEE; }
.chest-card.is-open { background: #F4F8FC; border-color: var(--line); }
.chest-card .grow { display: grid; gap: 4px; }
.chest-emoji { font-size: 44px; }
.chest-card.is-shaking .chest-emoji { animation: chest-shake .15s linear infinite; }
@keyframes chest-shake { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
.chest-days { display: flex; gap: 4px; }
.chest-days span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .8); font-size: 11px; font-weight: 800; border: 2px solid #E8D59A; }
.chest-days span.on { background: #FFB800; border-color: #E0A800; color: #fff; }
.chest-days span.big { width: 28px; height: 28px; font-size: 14px; }
.story-card { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 18px; background: #fff; border: 3px solid #8E44AD; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.sc-pic { flex: none; width: 140px; aspect-ratio: 3 / 2; border-radius: 12px; overflow: hidden; background: #F3E9FA; display: grid; place-items: center; font-size: 34px; }
.sc-pic img { width: 100%; height: 100%; object-fit: cover; }
.sc-body { display: grid; gap: 2px; }
.boss-emoji { font-size: 44px; animation: wm-bob 1.4s ease-in-out infinite; }
.boss-emoji.is-beaten { animation: none; }
.boss-bar { height: 14px; border-radius: 999px; background: #E9EEF5; overflow: hidden; margin: 6px 0 4px; border: 2px solid #D5DEEA; }
.boss-bar span { display: block; height: 100%; background: linear-gradient(90deg, #FF5A5F, #FF9A3D); transition: width .6s; }

/* ---- Story theatre ---- */
.story-hero { display: flex; gap: 16px; align-items: flex-start; border-top: 6px solid #8E44AD; }
.sh-icon { font-size: 54px; }
.chapter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 16px; }
.chapter-card { display: grid; border-radius: 18px; overflow: hidden; background: #fff; border: 3px solid #D9C4EA; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.chapter-card.is-seen { border-color: #3DBE6B; }
.chapter-card.is-locked { opacity: .7; box-shadow: none; }
.cc-pic { aspect-ratio: 3 / 2; display: grid; place-items: center; background: linear-gradient(135deg, #F3E9FA, #E3F2FD); font-size: 44px; overflow: hidden; }
.cc-pic img { width: 100%; height: 100%; object-fit: cover; }
.cc-body { display: grid; gap: 2px; padding: 10px 12px; }
.chapter { max-width: 820px; margin: 0 auto; }
.ch-pic { border-radius: 16px; overflow: hidden; margin: 10px 0; background: linear-gradient(135deg, #F3E9FA, #E3F2FD); }
.ch-pic img { width: 100%; height: auto; display: block; }
.ch-scene { display: grid; place-items: center; aspect-ratio: 3 / 2; font-size: 80px; letter-spacing: 12px; }
.ch-panel { display: none; font-size: 20px; line-height: 1.55; margin: 10px 0; }
.ch-panel.is-on { display: block; animation: w-fade .3s ease-out; }
.ch-question { border-top: 2px dashed var(--line); margin-top: 16px; padding-top: 8px; }

/* ---- Field trip dock ---- */
.trip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 12px; }
.trip-card { display: grid; border-radius: 18px; overflow: hidden; background: #fff; border: 3px solid #BFE0F2; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s; }
.trip-card:hover { transform: translateY(-3px); }
.tc-pic { aspect-ratio: 3 / 2; display: grid; place-items: center; font-size: 54px; background: #E3F4FC; overflow: hidden; }
.tc-pic img { width: 100%; height: 100%; object-fit: cover; }
.tc-body { display: grid; gap: 3px; padding: 10px 14px 14px; }

/* ---- Collector's album ---- */
.album-count { background: #FFF6D6; border: 2px solid #E8B923; border-radius: 999px; padding: 4px 14px; }
.album-set { margin-top: 18px; }
.album-set h2 { border-left: 6px solid var(--c); padding-left: 10px; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.xcard { position: relative; aspect-ratio: 4 / 5; border: 0; padding: 0; background: none; cursor: pointer; perspective: 600px; font: inherit; color: var(--ink); }
.xc-front, .xc-back { position: absolute; inset: 0; border-radius: 14px; display: grid; align-content: center; justify-items: center; gap: 6px; padding: 10px; text-align: center; backface-visibility: hidden; transition: transform .45s; border: 4px solid var(--c); background: #fff; box-shadow: 0 4px 0 rgba(12, 33, 82, .12); }
.xc-back { transform: rotateY(180deg); font-size: 13px; line-height: 1.35; background: #FFFDF5; }
.xcard.is-flipped .xc-front { transform: rotateY(180deg); }
.xcard.is-flipped .xc-back { transform: rotateY(360deg); }
.xc-emoji { font-size: 46px; }
.xc-copies { position: absolute; top: 6px; right: 8px; font-size: 12px; font-weight: 800; background: var(--c); color: #fff; border-radius: 999px; padding: 0 7px; }
.xc-rare { font-size: 11px; font-weight: 800; color: #B8860B; }
.xcard.is-rare .xc-front { background: linear-gradient(135deg, #FFFBEA, #FFF1B8); }
.xcard.is-empty { cursor: default; }
.xcard.is-empty .xc-front { border-style: dashed; border-color: #C9D4E3; background: #F4F7FB; color: #9AA8BC; box-shadow: none; }

/* ---- A card won in the reward box ---- */
.won-card { display: grid; justify-items: center; gap: 6px; margin: 10px auto; text-decoration: none; color: var(--ink); }
.wc-flip { position: relative; width: 120px; aspect-ratio: 3 / 4; perspective: 600px; }
.wc-front, .wc-back { position: absolute; inset: 0; border-radius: 12px; border: 4px solid #E8B923; background: #fff; display: grid; align-content: center; justify-items: center; padding: 8px; text-align: center; backface-visibility: hidden; }
.wc-front { animation: wc-flip-in .8s ease-out; }
.wc-back { transform: rotateY(180deg); font-size: 12px; line-height: 1.3; }
.won-card:hover .wc-front { transform: rotateY(180deg); transition: transform .45s; }
.won-card:hover .wc-back { transform: rotateY(360deg); transition: transform .45s; }
.wc-emoji { font-size: 44px; }
.won-card.is-rare .wc-front { background: linear-gradient(135deg, #FFFBEA, #FFE58A); box-shadow: 0 0 18px rgba(255, 196, 0, .7); }
.wc-label { font-weight: 800; font-size: 14px; }
.wc-set { font-weight: 800; color: #2E7D46; }
@keyframes wc-flip-in { 0% { transform: rotateY(180deg) scale(.6); opacity: 0; } 60% { transform: rotateY(-10deg) scale(1.05); opacity: 1; } 100% { transform: none; } }

/* ---- Hummi's nest ---- */
.nest-room { position: relative; border-radius: 22px; overflow: hidden; height: 360px; box-shadow: var(--shadow); margin: 12px 0 8px; }
.nest-room::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 38%; background: repeating-linear-gradient(90deg, #C98F55 0 60px, #BE8248 60px 120px); border-top: 6px solid #A86E3A; }
.nest-wall { position: absolute; top: 24px; left: 6%; right: 6%; display: flex; justify-content: space-around; z-index: 1; }
.nest-floor { position: absolute; bottom: 18px; left: 4%; right: 4%; display: flex; justify-content: space-around; align-items: flex-end; z-index: 2; }
.nest-spot { font-size: 56px; min-width: 64px; min-height: 64px; display: grid; place-items: center; line-height: 1; filter: drop-shadow(0 4px 3px rgba(0, 0, 0, .2)); }
.nest-spot.is-empty { border: 2px dashed rgba(255, 255, 255, .7); border-radius: 12px; filter: none; }
.nest-bird { position: absolute; left: 50%; bottom: 32%; transform: translateX(-50%); width: 96px; height: 96px; z-index: 3; animation: wm-bob 1.6s ease-in-out infinite; }
@media (max-width: 560px) { .nest-room { height: 280px; } .nest-spot { font-size: 34px; min-width: 40px; min-height: 40px; } .nest-bird { width: 70px; height: 70px; } }
.nest-shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.nest-item { display: grid; justify-items: center; gap: 4px; padding: 12px; background: #fff; border: 2px solid var(--line); border-radius: 14px; text-align: center; }
.nest-item.is-placed { border-color: #3DBE6B; background: #F2FBF4; }
.ni-emoji { font-size: 36px; }

/* ---- Maker Studio and comics ---- */
.made-list { display: grid; gap: 8px; }
.made-item { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; background: #fff; border: 2px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); }
.make-q, .make-panel { border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; margin: 0 0 10px; }
.make-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 6px; margin-top: 6px; }
.make-opts .is-right { border-color: #3DBE6B; }
.make-comic { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.emoji-select { font-size: 22px; }
.comic { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 720px; }
@media (max-width: 560px) { .comic { grid-template-columns: 1fr; } }
.comic-panel { position: relative; aspect-ratio: 4 / 3; border: 4px solid #1E2430; border-radius: 10px; overflow: hidden; }
.cp-n { position: absolute; top: 6px; left: 8px; background: #1E2430; color: #fff; font-weight: 800; font-size: 12px; border-radius: 999px; padding: 0 8px; }
.cp-deco { position: absolute; top: 8px; right: 10px; font-size: 22px; opacity: .85; }
.cp-bubble { position: absolute; top: 30px; left: 10px; right: 10px; background: #fff; border: 3px solid #1E2430; border-radius: 16px; padding: 6px 10px; font-weight: 700; font-size: 15px; line-height: 1.3; }
.cp-chars { position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; font-size: 54px; line-height: 1; letter-spacing: 10px; }
.creation-review.is-pending { border-left: 6px solid #FFB800; }
.made-quiz .mq { margin-bottom: 14px; }

.emo-flag { width: 1.2em; height: auto; vertical-align: middle; border-radius: 2px; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.ch-pic video { width: 100%; height: auto; display: block; }

/* ---- Prize Shop ---- */
.prize-banner { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; text-decoration: none; color: var(--ink); background: linear-gradient(135deg, #FFE3EE, #FFF4D6); border: 3px solid #D6336C; box-shadow: var(--shadow); }
.prize-banner > span:first-child { font-size: 40px; }
.prize-banner > span:nth-child(2) { display: grid; flex: 1; }
.prize-hero { display: flex; gap: 16px; align-items: center; padding: 20px; border-radius: 22px; background: linear-gradient(135deg, #FFE3EE, #FFF4D6); border: 3px solid #D6336C; }
.ph-icon { font-size: 64px; }
.prize-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.prize-card { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 16px; background: #fff; border: 3px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.prize-card.is-ready { border-color: #3DBE6B; }
.pc-emoji { font-size: 52px; }
.pc-price { font: 800 20px var(--font-head); color: #B8860B; }
.pc-bar { width: 100%; height: 10px; border-radius: 999px; background: #EEF2F7; overflow: hidden; }
.pc-bar span { display: block; height: 100%; background: linear-gradient(90deg, #FFB800, #3DBE6B); }
.prize-order.is-pending { border-left: 6px solid #FFB800; }
@media print { .site-header, .tabs, .page-head p, #items, #items ~ *, .packing form, .packing button, footer { display: none !important; } .packing { break-inside: avoid; box-shadow: none; border: 1px solid #999; } }

/* Prize orders on the parent's child page */
.prize-list { list-style: none; margin: 0; padding: 0; }
.prize-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line, #E3EAF5); }
.prize-list li:first-child { border-top: 0; }
