.pet-shop { width:min(640px,calc(100% - 24px)); max-height:calc(100vh - 32px); max-height:calc(100dvh - 32px); box-sizing:border-box; margin:auto; padding:20px; border:0; border-radius:16px; background:rgba(255,250,255,.58); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); color:#211446; box-shadow:0 18px 50px rgba(33,20,70,.22); overflow:auto; font:inherit; }
.pet-shop::backdrop { background:rgba(33,20,70,.28); }
.pet-shop header { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.pet-shop h2 { margin:0; font-size:24px; }
.pet-shop button { min-height:44px; padding:8px 14px; border:1px solid #d8cceb; border-radius:10px; font:inherit; font-weight:600; background:#f3edff; color:#5932ab; cursor:pointer; }
.pet-shop button:hover:not(:disabled) { background:#e9ddff; }
.pet-shop button:focus-visible { outline:3px solid #6840d8; outline-offset:3px; }
.pet-shop button:disabled { background:#f0edf4; color:#655d71; cursor:not-allowed; }
.pet-shop-wallet { margin:12px 0 16px; font-variant-numeric:tabular-nums; color:#554569; }
.pet-shop nav { display:flex; flex-wrap:wrap; gap:6px; }
.pet-shop nav button { flex:1; white-space:nowrap; }
.pet-shop nav button[aria-pressed="true"] { background:#6840d8; border-color:#6840d8; color:#fff; }
.pet-shop-status { color:#554569; font-size:13px; line-height:1.7; padding-bottom:12px; border-bottom:1px solid #e8e0f1; }
.pet-shop-product { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:18px 0; border-bottom:1px solid #e8e0f1; }
.pet-shop-product > div { min-width:0; }
.pet-shop-product > button { flex-shrink:0; }
.pet-shop-product h3 { margin:0 0 8px; font-size:17px; line-height:1.5; }
.pet-shop-product h3 small { color:#655278; font-size:12px; font-weight:500; white-space:nowrap; }
.pet-shop-product p { margin:0 0 10px; color:#554569; font-size:14px; line-height:1.65; }
.pet-shop-product span { color:#5932ab; font-size:14px; font-weight:600; }
.pet-shop-empty { padding:30px 0; color:#554569; line-height:1.8; }
.pet-shop-feedback { position:sticky; bottom:-20px; margin:0; padding:14px 0; background:rgba(255,250,255,.68); color:#5932ab; font-size:14px; line-height:1.6; }
.pet-shop-feedback:empty { padding:0; }
.pet-shop-game { display:flex; gap:6px; margin-top:10px; }
.pet-shop-game button { flex:1; padding:8px; }
.pet-shop-effect { display:inline-block; margin-left:16px; color:#6840d8; animation:pet-shop-bounce .6s ease-in-out 3 alternate; }
.pet-shop-effect-rest { animation:pet-shop-rest 1.2s ease-out 2; }
.pet-shop ::selection { color:#fff; background:#6840d8; }
@keyframes pet-shop-bounce { from { transform:translateY(0); } to { transform:translateY(-12px); } }
@keyframes pet-shop-rest { from { opacity:1; } to { opacity:.3; transform:translateY(-8px); } }
@media (max-width:390px) { .pet-shop { padding:16px; } .pet-shop nav button { padding:8px; font-size:14px; } .pet-shop-product { gap:8px; } .pet-shop-product > button { padding:8px; } .pet-shop-feedback { bottom:-16px; } }
@media (prefers-reduced-motion:reduce) { .pet-shop-effect { animation:none; } }

.pet-shop-products { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:20px 0; }
.pet-shop .pet-shop-image { display:grid; place-items:center; padding:8px; aspect-ratio:1; border:0; background:rgba(255,255,255,.46); border-radius:16px; }
.pet-shop .pet-shop-image:hover { background:rgba(238,225,255,.85); }
.pet-shop-image img { display:block; width:100%; max-width:132px; height:auto; }
.pet-shop-status { display:flex; flex-wrap:wrap; justify-content:space-between; gap:5px 10px; }
.pet-shop-status progress { width:100%; height:8px; border:0; border-radius:8px; overflow:hidden; accent-color:#6840d8; background:#e6dced; }
.pet-shop-status progress::-webkit-progress-bar { background:#e6dced; }
.pet-shop-status progress::-webkit-progress-value { background:#6840d8; border-radius:8px; }
.pet-shop-status progress::-moz-progress-bar { background:#6840d8; }
.pet-shop-detail { position:relative; background:rgba(255,255,255,.7); border-radius:16px; padding:18px; margin:16px 0; text-align:center; }
.pet-shop-detail[hidden] { display:none; }
.pet-shop-detail > img { display:block; width:100px; height:100px; margin:0 auto 10px; }
.pet-shop-detail h3 { font-size:18px; margin:8px 0; }
.pet-shop-detail h3 small { font-size:12px; font-weight:500; color:#554569; }
.pet-shop-detail p { font-size:14px; line-height:1.7; margin:10px 0; }
.pet-shop .pet-shop-detail-close { position:absolute; top:10px; right:10px; font-size:13px; padding:6px 10px; }
.pet-shop-empty { grid-column:1/-1; }
.pet-shop { scrollbar-color:#b39ad3 transparent; }
@media(max-width:390px) { .pet-shop-products { gap:8px; } .pet-shop h2 {font-size:22px;} }

.pet-shop .pet-shop-detail { position:fixed; inset:0; box-sizing:border-box; width:min(340px,calc(100% - 48px)); max-height:calc(100dvh - 64px); overflow:auto; margin:auto; border:0; background:rgba(255,250,255,.68); color:#211446; backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); box-shadow:0 18px 50px rgba(33,20,70,.22); font:inherit; }
.pet-shop-detail::backdrop { background:rgba(33,20,70,.2); }
.pet-shop-detail .pet-shop-feedback {position:static; background:transparent; margin-top:12px; padding:0; }
.pet-local-level { display:inline-flex; }

.pet-home-intimacy .pet-intimacy-progress, .pet-shop-status .pet-intimacy-progress { appearance:none; -webkit-appearance:none; display:block; width:100%; height:10px; border:0; border-radius:8px; overflow:hidden; background:#e6dced; }
.pet-intimacy-progress::-webkit-progress-bar { background:#e6dced; border-radius:8px; }
.pet-home-intimacy .pet-intimacy-progress::-webkit-progress-value, .pet-shop-status .pet-intimacy-progress::-webkit-progress-value { background:linear-gradient(90deg,#ed6073,#f7aa52,#edcf50,#73bd81,#60b4d5,#8181d4,#b779cb); border-radius:8px; }
.pet-home-intimacy .pet-intimacy-progress::-moz-progress-bar, .pet-shop-status .pet-intimacy-progress::-moz-progress-bar { background:linear-gradient(90deg,#ed6073,#f7aa52,#edcf50,#73bd81,#60b4d5,#8181d4,#b779cb); border-radius:8px; }

.pet-board-v5 .student-board-head { position:relative; }
.pet-board-v5 .student-board-head > div:first-child { width:100%; min-width:0; }
.pet-board-v5 .pet-local-header-right { position:absolute; top:0; right:0; }
.pet-local-name-row { margin-top:0; flex-wrap:nowrap; min-height:38px; padding-right:110px; }
.pet-local-name-row h2 { max-width:100%; overflow-wrap:anywhere; }
.pet-home-intimacy { display:flex; align-items:center; width:100%; min-width:0; gap:8px; margin:8px 0 0; padding:0; background:none; border:0; border-radius:0; box-shadow:none; color:#554569; }
.pet-intimacy-label { flex-shrink:0; font-size:18px; font-weight:800; line-height:1.2; color:#b7791f; }
.pet-home-intimacy-track { flex:1; min-width:0; position:relative; isolation:isolate; height:18px; width:100%; overflow:hidden; border-radius:9px; background:#e6dced; font-variant-numeric:tabular-nums; }
.pet-home-intimacy-fill { position:absolute; inset:0 auto 0 0; width:var(--intimacy-fill); border-radius:9px; background:linear-gradient(90deg,#ed6073,#f7aa52,#edcf50,#73bd81,#60b4d5,#8181d4,#b779cb); }
.pet-intimacy-number { position:absolute; inset:0; display:grid; place-items:center; font-size:11px; font-weight:800; line-height:18px; color:#000; }
.pet-intimacy-number-filled { clip-path:inset(0 calc(100% - var(--intimacy-fill)) 0 0); color:#fff; }

.pet-intimacy-number:not(.pet-intimacy-number-filled) { clip-path:inset(0 0 0 var(--intimacy-fill)); }

.pet-local-title-row { display:flex; align-items:center; gap:8px; padding-right:90px; min-height:27px; }
.pet-board-v5 .student-board-head .pet-local-title-row p { margin:0; }
.pet-local-name-row h2 { min-width:0; flex-shrink:1; }
.pet-local-name-row .pet-local-level { flex-shrink:0; }

.pet-shop-detail [data-buy] { display:inline-flex; justify-content:center; align-items:center; gap:7px; min-width:104px; }
.pet-shop-detail [data-buy] .galaxy-coin { width:24px; height:24px; flex-shrink:0; font-size:15px; }
.pet-shop-detail .pet-shop-owned { margin:12px 0 0; color:#554569; font-variant-numeric:tabular-nums; }
