.pet-world-page {
    --world-ink: #233b33;
    --world-muted: #536e64;
    --world-green: #276b54;
    --world-line: #d9e5dc;
    --world-paper: #fff;
    color: var(--world-ink);
    background: #f2f7f3;
}

.pet-world-page [hidden] { display: none !important; }
.pet-world-page .world-main { width: 100%; min-width: 0; max-width: 1420px; margin: 0 auto; padding: 28px clamp(16px, 3vw, 44px); }
.pet-world-page .world-main h1, .pet-world-page .world-main h2, .pet-world-page .world-main h3, .pet-world-page .world-main h4, .pet-world-page .world-main p { margin: 0; }
.pet-world-page .world-main button { font: inherit; cursor: pointer; }
.pet-world-page .world-main button:disabled { cursor: default; opacity: .55; }
.pet-world-page .world-main :focus-visible { outline: 3px solid #38836d; outline-offset: 2px; }
.world-header, .world-wallet, .world-home-heading, .world-camera-bar, .world-pet-identity, .world-section-heading, .world-footer, .world-dialog-heading { display: flex; align-items: center; justify-content: space-between; }
.world-header h1 { font-size: clamp(26px, 4vw, 38px); letter-spacing: -.035em; }
.world-wallet { border: 1px solid #e4ddbd; border-radius: 12px; padding: 5px 7px 5px 12px; background: #fff9e7; color: #644d23; font-size: 13px; }
.world-wallet strong { font-size: 20px; padding: 0 5px; font-variant-numeric: tabular-nums; }
.world-wallet button { border: 0; background: #f7edcd; color: inherit; border-radius: 7px; margin-left: 9px; padding: 7px 9px; }
.world-tabs { width: fit-content; max-width: 100%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 22px 0 20px; padding: 4px; border: 1px solid var(--world-line); border-radius: 12px; background: #e7f0e9; }
.world-tabs button { min-height: 41px; padding: 0 clamp(12px, 2.5vw, 28px); border: 0; border-radius: 8px; color: var(--world-ink); background: transparent; white-space: nowrap; }
.world-tabs button[aria-selected=true] { background: var(--world-green); color: white; font-weight: 700; }
.world-panel { min-width: 0; }
.world-home-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(216px, 264px); gap: 18px; align-items: start; }
.world-home-card, .world-goal-card, .world-encounter-card, .world-habitat-card, .world-buddy-card, .world-shop-card { border: 1px solid var(--world-line); border-radius: 16px; background: var(--world-paper); }
.world-home-card { overflow: hidden; }
.world-home-heading, .world-pet-identity { padding: 13px 17px; }
.world-home-heading h2 { font-size: 20px; }
.world-home-heading p, .world-pet-identity span { display: inline-block; margin-top: 4px; font-size: 13px; color: var(--world-muted); }
.world-scene { position: relative; height: 490px; overflow: hidden; isolation: isolate; background: #dbece2; background: radial-gradient(ellipse at 52% 43%, #f0f7de, var(--scene-sky, #c9e7de)); }
.world-courtyard { display: block; width: 100%; height: 100%; visibility: hidden; touch-action: none; cursor: grab; }
.world-scene[data-render=ready] .world-courtyard { visibility: visible; }
.world-courtyard:active { cursor: grabbing; }
.world-courtyard:focus-visible { outline-offset: -4px !important; }
.pet-world-page .world-main .world-scene-status { position: absolute; left: 50%; top: 50%; width: 85%; text-align: center; transform: translate(-50%, -50%); color: #2a4d40; font-size: 15px; pointer-events: none; }
.world-camera-bar { min-height: 47px; padding: 5px 16px; background: #edf5ef; color: #466358; font-size: 12px; }
.world-camera-bar span { padding-right: 10px; }
.world-camera-bar button { flex-shrink: 0; }
.world-pet-identity h3 { font-size: 19px; }
.pet-world-page .world-main .world-pet-message { min-height: 22px; margin: 0 17px 12px; font-size: 13px; color: var(--world-muted); }
.world-pet-message:empty { display: none; }
.world-care-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 16px 16px; }
.world-care-actions button { border: 1px solid #c9ded2; border-radius: 9px; background: #f2f8f3; color: #214a3b; padding: 8px 4px; }
.world-care-actions strong, .world-care-actions small { display: block; }
.world-care-actions small { margin-top: 3px; color: var(--world-muted); font-size: 11px; }
.world-goals { display: grid; gap: 12px; }
.world-goal-card, .world-encounter-card { padding: 16px; }
.world-goals h2, .world-goals h3 { margin: 5px 0 !important; font-size: 18px; }
.world-goals p { color: var(--world-muted); font-size: 13px; line-height: 1.55; }
.world-goals button { margin-top: 10px; }
.world-section-kicker { font-size: 12px; font-weight: 700; }
.world-dual-progress { display: grid; gap: 8px; margin-top: 13px; }
.world-dual-progress label { display: grid; grid-template-columns: 1fr auto; gap: 5px; font-size: 12px; }
.world-dual-progress label span { color: var(--world-muted); }
.world-dual-progress progress { grid-column: 1 / -1; display: block; width: 100%; height: 8px; border: 0; border-radius: 9px; overflow: hidden; background: #e3eee5; }
.world-dual-progress progress::-webkit-progress-bar { background: #e3eee5; }
.world-dual-progress progress::-webkit-progress-value { background: #4b9276; }
.world-quiet-button, .world-primary-button, .world-shop-card button, .world-habitat-body button, .world-buddy-card button { border: 1px solid #bfd7ca; border-radius: 8px; padding: 7px 10px; background: white; color: #20533f; min-height: 34px; }
.world-primary-button, .world-shop-card button:not(:disabled) { border-color: var(--world-green); background: var(--world-green); color: #fff; }
.world-text-link, .world-footer a { color: #245d49; font-size: 13px; }
.world-section-heading { align-items: start; margin: 4px 0 15px; }
.world-section-heading h2 { font-size: 24px; }
.world-section-heading p { margin-top: 5px !important; color: var(--world-muted); font-size: 14px; line-height: 1.6; }
.world-count-pill { display: inline-block; flex-shrink: 0; margin: 4px 0 0 8px; border-radius: 7px; background: #e2efe6; color: #285241; padding: 5px 9px; font-size: 12px; white-space: nowrap; }
.world-equipped { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)) auto; align-items: center; gap: 9px; padding: 12px 14px; margin: 0 0 13px; border: 1px solid #c9ddcf; border-radius: 12px; background: #e9f4ec; }
.world-equipped small, .world-equipped strong { display: block; }
.world-equipped small { color: var(--world-muted); }
.world-equipped strong { margin-top: 4px; font-size: 14px; }
.world-equipped button { white-space: nowrap; }
.world-shop-filters { display: flex; flex-wrap: wrap; margin-bottom: 11px; }
.world-shop-filters button { margin: 0 6px 4px 0; border: 1px solid #c9dcd0; border-radius: 8px; padding: 6px 11px; background: white; color: #285344; font-size: 13px; }
.world-shop-filters button[aria-pressed=true] { background: #dceee2; border-color: #90bca8; font-weight: 700; }
.world-habitat-grid, .world-buddy-grid, .world-shop-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.world-shop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.world-shop-card, .world-habitat-card, .world-buddy-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.world-shop-card.is-equipped, .world-habitat-card.is-equipped, .world-buddy-card.is-equipped { border-color: #71a58d; }
.world-item-art { position: relative; height: 126px; overflow: hidden; background: #edf4ee; }
.world-item-art img { position: absolute; left: 50%; top: -6%; transform: translateX(-50%); width: auto; height: 126%; mix-blend-mode: multiply; }
.world-item-art span { position: absolute; right: 7px; top: 7px; border-radius: 6px; padding: 3px 5px; background: #fff; color: #315746; font-size: 10px; }
.world-card-body, .world-habitat-body { display: flex; flex-direction: column; flex: 1; padding: 11px; }
.world-card-body h3, .world-habitat-body h3 { font-size: 15px; }
.world-card-body p, .world-habitat-body p { color: var(--world-muted); font-size: 12px; line-height: 1.45; padding: 5px 0 8px; }
.world-card-body small { font-size: 11px; color: #4e685c; margin: auto 0 7px; }
.world-habitat-body button, .world-buddy-card button { margin-top: auto; }
.world-card-body button, .world-habitat-body button { font-size: 12px !important; }
.world-habitat-art { height: 74px; display: grid; place-items: end start; background: linear-gradient(164deg, var(--map-sky) 55%, var(--map-land) 56%); padding: 9px; }
.world-habitat-art span { background: #fff; padding: 3px 6px; border-radius: 5px; color: #365547; font-size: 11px; }
.world-buddy-art { height: 73px; display: grid; place-items: center; background: var(--buddy-card-color); color: #263d36; }
.world-buddy-art span { padding: 6px 10px; border-radius: 7px; background: #fff; font-size: 13px; }
.world-empty-state { grid-column: 1/-1; padding: 22px; border: 1px dashed #a8c4b2; border-radius: 12px; color: var(--world-muted); }
.world-journal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(205px, 24%);
    gap: 16px;
    align-items: start;
}
#world-badges, #world-journey { scroll-margin-top: 82px; }
.world-badges {
    padding: clamp(13px, 2vw, 24px);
    border: 1px solid #e5d6b5;
    border-radius: 18px;
    background: #fffcf3;
}
.world-badge-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding-bottom: 13px;
    border-bottom: 1px solid #e9ddc2;
}
.world-badge-heading h2 { font-size: clamp(22px, 2.5vw, 30px); }
.world-badge-count {
    margin-left: 10px;
    padding: 4px 8px;
    border-radius: 12px;
    background: #f3e8ca;
    color: #644d24;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.world-journey-link { display: none; margin-left: auto; padding: 9px 0 9px 8px; color: #315b45; font-size: 12px; }
.world-badge-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 13px; }
.world-badge-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 5px 10px;
    border: 1px solid transparent;
    border-bottom-color: #e9ddc2;
    border-radius: 8px;
    text-align: center;
}
.world-badge-card.is-earned { border-color: #e4c887; background: #fff3d5; }
.world-badge-medallion { position: relative; width: 100%; max-width: 112px; margin-bottom: 7px; }
.world-badge-medallion::before { display: block; padding-top: 100%; content: ""; }
.world-badge-medallion > .pet-badge-lock, .world-badge-medallion > .pet-badge-image { position: absolute; top: 0; left: 0; }
.world-badge-medallion .pet-badge-lock { background: #eeeee4; color: #59695d; }
.world-badge-card h3 { font-size: 15px; line-height: 1.4; }
.world-badge-card p { padding: 4px 0 7px; color: #55645c; font-size: 12px; line-height: 1.4; }
.world-badge-card small { margin-top: auto; color: #55645c; font-size: 12px; font-variant-numeric: tabular-nums; }
.world-badge-card.is-earned small { color: #72521c; font-weight: 700; }
.world-journey {
    padding: 16px 13px;
    border: 1px solid var(--world-line);
    border-radius: 14px;
    background: #f5f8f3;
}
.world-journey-heading { padding: 0 5px 12px; }
.world-journey-heading h2 { font-size: 18px; }
.world-journey-heading p { padding-top: 5px; color: var(--world-muted); font-size: 13px; }
.world-journey ol { margin: 0; padding: 0; list-style: none; }
.world-journey li {
    position: relative;
    display: grid;
    grid-template-columns: 23px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 7px 5px;
    color: var(--world-muted);
    font-size: 13px;
}
.world-journey li:not(:last-child)::before {
    position: absolute;
    top: 20px;
    bottom: -10px;
    left: 16px;
    width: 1px;
    background: #c7d8ca;
    content: "";
}
.world-journey-marker {
    position: relative;
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    border: 1px solid #bacbbf;
    border-radius: 50%;
    background: #f5f8f3;
    color: #506357;
    font-size: 11px;
}
.world-journey .is-reached .world-journey-marker { border-color: #80a88d; background: #e0eee3; color: #285441; }
.world-journey li.is-current { border-radius: 8px; background: #e0eee3; color: #194d36; }
.world-journey .is-current .world-journey-marker { border-color: #276b54; background: #276b54; color: #fff; }
.world-journey-current { margin-left: 5px; font-size: 11px; font-weight: 700; }
.world-journey li p { padding-top: 3px; font-size: 11px; }
.world-journey-note { padding: 11px 5px 0; border-top: 1px solid var(--world-line); color: var(--world-muted); font-size: 12px; line-height: 1.45; }
.world-footer { justify-content: flex-end; margin-top: 18px; }
.world-footer a { margin-left: 12px; }
.pet-world-page .world-main .world-notice { position: fixed; right: 16px; bottom: 16px; z-index: 30; max-width: calc(100vw - 32px); border-radius: 9px; padding: 10px 13px; background: #205b47; color: #fff; box-shadow: 0 5px 20px #163b2925; }
.world-notice.is-error { background: #8c4130 !important; }
.world-notice:empty { display: none; }
.world-dialog { width: min(400px, calc(100vw - 30px)); max-height: 85vh; padding: 19px; border: 1px solid #c5dbcc; border-radius: 14px; color: var(--world-ink); background: white; }
.world-dialog::backdrop { background: #102b2380; }
.world-dialog p, .world-dialog input { margin: 10px 0 !important; }
.world-dialog input { display: block; width: 100%; padding: 8px; border: 1px solid #aacaba; border-radius: 6px; }
.world-dialog .dialog-actions { margin-top: 13px; text-align: right; }
.world-dialog .dialog-actions button { margin-left: 6px; }
.world-ledger-dialog li { display: flex; justify-content: space-between; margin: 8px 0; }
.world-ledger-dialog time { display: block; color: var(--world-muted); font-size: 11px; }

@media (min-width: 1200px) {
    .world-badge-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1050px) {
    .world-home-layout { grid-template-columns: minmax(0, 1fr); }
    .world-goals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .world-scene { height: 430px; }
    .world-shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .world-journal-layout { grid-template-columns: minmax(0, 1fr); }
    .world-journey-link { display: inline-block; }
}
@media (max-width: 640px) {
    .pet-world-page .world-main { padding: 14px 13px 22px; }
    .world-tabs { width: 100%; margin: 14px 0 14px; }
    .world-tabs button { padding: 0 4px; font-size: 14px; }
    .world-scene { height: 350px; }
    .world-section-heading p { font-size: 12px; }
    .world-habitat-grid, .world-buddy-grid, .world-shop-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
    .world-goals { grid-template-columns: minmax(0,1fr); }
    .world-badge-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .world-badge-medallion { max-width: 92px; }
    .world-item-art { height: 107px; }
    .world-equipped { padding: 8px; font-size: 12px; }
    .world-equipped button { padding: 6px; }
}
