/*
Theme Name: new_v2
Description: Centered pastel redesign of the Mitsukemashita Music song site. Keeps the original data model (posts, jrock_download, shuffle, sticky player).
Version: 2.0.0
Text Domain: new_v2
*/

:root {
    --paper: #fff8fb; --card: #ffffff; --ink: #2a1b3d; --soft: #6e5d82; --line: #f0dce8;
    --pink: #ff5fa2; --cyan: #2cc7d4; --lav: #c9b6f2; --gold: #f0a23a;
    --sky: linear-gradient(170deg, #ffc9de 0%, #e3d2fb 48%, #bdeef0 100%);
    --sky-h: linear-gradient(90deg, #ffd0e3 0%, #e6d8fb 50%, #c3eff1 100%);
    --cover-ratio: 16 / 9; --card-max: 300px; --dl-max: 260px;
    --font-display: 'Dela Gothic One', sans-serif;
    --font-body: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', sans-serif;
}
@media (prefers-color-scheme: dark) {
    :root { color-scheme: dark; --paper: #1a1230; --card: #251a40; --ink: #fff0f7; --soft: #bba9d3; --line: #3a2b5c;
            --sky: linear-gradient(170deg, #4a2160 0%, #2f2467 50%, #1d5a73 100%);
            --sky-h: linear-gradient(90deg, #4a2160 0%, #2f2467 50%, #1d5a73 100%); }
}
body.cover-1-1 { --cover-ratio: 1 / 1; --card-max: 240px; --dl-max: 230px; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 12px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.7 var(--font-body); text-align: center; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 22px; }
.screen-reader-text { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 99999; }

/* Header: pastel band so the white logo stands out; large centered logo */
/* .top-sky = header + hero as one continuous pastel field (full width, content stays centered) */
.top-sky { background: var(--sky); border-radius: 0 0 56px 56px; position: relative; overflow: hidden; margin-bottom: 28px; }
.top-sky::after { content: ""; position: absolute; left: 50%; top: 20px; width: 520px; height: 320px; margin-left: -260px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 70%); pointer-events: none; }
#site-header { position: relative; z-index: 1; padding: 28px 0 14px; }
.header-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.logo-area img { display: block; height: 130px; width: auto; max-width: 100%; object-fit: contain; margin: 0 auto; filter: drop-shadow(0 4px 16px rgba(255,95,162,.35)); }
.site-title-text { font: 400 34px/1 var(--font-display); }
.main-nav ul { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; list-style: none; margin: 0; padding: 0; }
.main-nav a { display: block; padding: 8px 20px; border-radius: 99px; font-weight: 700; font-size: 15px; background: rgba(255,255,255,.6); }
.main-nav a:hover, .main-nav a:focus-visible, .main-nav .current-menu-item > a { background: var(--card); outline: none; }
@media (prefers-color-scheme: dark) { .main-nav a { background: rgba(255,255,255,.12); } }
@media (max-width: 600px) { #site-header { padding: 26px 0 16px; } .top-sky { border-radius: 0 0 34px 34px; } .logo-area img { height: 100px; } }

/* Hero */
/* Hero: intro text and latest card side by side (stacked on small screens) */
.hero { max-width: 1100px; margin: 0 auto; padding: 8px 22px 44px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 48px; align-items: center; justify-items: center; position: relative; z-index: 1; }
@media (max-width: 819px) { .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.hero > * { position: relative; z-index: 1; }
.hero-sub { margin: 0 auto 10px; font: 700 clamp(24px, 3vw, 34px)/1.3 var(--font-body); max-width: 18ch; }
.hero-note { margin: 0 auto 24px; font-size: 18px; max-width: 34ch; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: 99px; font: 700 17px/1.3 var(--font-body); border: 2px solid var(--ink); background: var(--card); color: var(--ink); cursor: pointer; transition: transform .2s; }
.btn:hover { transform: translateY(-2px); }
.btn.main { background: var(--ink); color: var(--paper); }
.btn:focus-visible, .chip:focus-visible, .pl:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

/* Latest slider (3 newest posts, stacked in one grid cell) */
.latest-slider { display: grid; width: min(400px, 100%); }
.latest-slide { grid-area: 1 / 1; background: var(--card); border-radius: 26px; padding: 16px; display: grid; gap: 10px; justify-items: center; box-shadow: 0 14px 34px rgba(106,59,138,.15); opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility .8s; }
.latest-slide.active { opacity: 1; visibility: visible; }
.latest-slide .cover { width: 100%; }
.latest-slide h2 { margin: 0; font-size: 20px; line-height: 1.35; }

/* Covers (image or gradient placeholder) */
.cover { display: block; position: relative; width: 100%; aspect-ratio: var(--cover-ratio); border-radius: 18px; overflow: hidden; background: linear-gradient(135deg, var(--a, #ff8fbd), var(--b, #8fe3ea)); color: #fff; font: 400 40px/1 var(--font-display); text-shadow: 0 2px 12px rgba(0,0,0,.3); display: grid; place-items: center; }
.cover .ph { position: relative; z-index: 0; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
a.cover:hover img { transform: scale(1.05); }
.tag { position: absolute; left: 10px; top: 10px; z-index: 2; background: rgba(255,255,255,.88); color: #2a1b3d; font: 700 13px/1 var(--font-body); padding: 6px 10px; border-radius: 99px; text-shadow: none; }
.play-dot { position: absolute; right: 10px; bottom: 10px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; background: var(--pink); color: #fff; display: grid; place-items: center; font-size: 15px; text-shadow: none; box-shadow: 0 4px 12px rgba(0,0,0,.25); }

/* Sections */
.section { padding: 68px 0 0; }
.section h2 { font: 400 clamp(28px, 4.5vw, 40px)/1.2 var(--font-display); margin: 0 0 6px; }
.lead { color: var(--soft); margin: 0 auto 24px; max-width: 46ch; }
.meta { margin: 0; color: var(--soft); font-size: 14px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 26px; }
.chip { border: 2px solid var(--line); background: var(--card); color: var(--ink); padding: 7px 18px; border-radius: 99px; font: 700 15px/1.4 var(--font-body); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--pink); border-color: var(--pink); color: #fff; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; max-width: calc(4 * var(--card-max) + 72px); margin: 0 auto; transition: opacity .4s ease; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.song { display: grid; gap: 8px; justify-items: center; align-content: start; }
.song h3 { margin: 4px 0 0; font-size: 17px; line-height: 1.4; }
.links { display: flex; gap: 16px; justify-content: center; font-size: 14px; font-weight: 700; }
.links a { border-bottom: 2px solid var(--cyan); }
.links a:hover { border-color: var(--pink); }
.dl-grid { gap: 18px; }
.dl-card { display: grid; gap: 10px; justify-items: center; background: var(--card); border: 2px solid var(--line); border-radius: 22px; padding: 14px; }
.dl-card h3 { margin: 0; font-size: 17px; line-height: 1.35; }
.progress { width: 0; height: 3px; border-radius: 3px; background: var(--cyan); margin: 22px auto 0; max-width: 100%; }
.progress.dl { background: var(--gold); }
.empty { color: var(--soft); grid-column: 1 / -1; }

/* Social widget (keeps the old .social-btn classes working) */
.social-grid, .connect .widget { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.social-btn { display: inline-flex; justify-content: center; min-width: 150px; padding: 12px 22px; border-radius: 99px; font-weight: 700; color: #fff !important; }
.social-yt { background: #ff0000; } .social-x { background: #000; } .social-spotify { background: #1db954; } .social-insta { background: #e1306c; }

.about-box { background: var(--card); border: 2px solid var(--line); border-radius: 30px; padding: 36px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.about-box p { max-width: 52ch; margin: 0; }

/* Single + archive */
body.cover-1-1 .entry .cover { max-width: 360px; }
.entry { padding: 20px 0 0; max-width: 780px; margin: 0 auto; }
.entry h1 { font: 400 clamp(28px, 5vw, 42px)/1.25 var(--font-display); margin: 0 0 22px; }
.entry .cover { max-width: 560px; margin: 0 auto 22px; }
.entry-content { background: var(--card); border: 2px solid var(--line); border-radius: 26px; padding: 32px 26px; margin-top: 26px; line-height: 1.8; }
.pagination { margin-top: 36px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 16px; border-radius: 99px; background: var(--card); border: 2px solid var(--line); font-weight: 700; }
.pagination .current { background: var(--pink); border-color: var(--pink); color: #fff; }

footer.site-footer { padding: 64px 0 56px; color: var(--soft); font-size: 14px; }

body.has-player footer.site-footer { padding-bottom: 130px; }
.nw { white-space: nowrap; }

/* Sticky shuffle player */
.sticky-player { position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; width: min(560px, calc(100% - 28px)); background: var(--ink); color: var(--paper); border-radius: 99px; padding: 8px 10px 8px 22px; display: flex; align-items: center; gap: 14px; box-shadow: 0 12px 34px rgba(42,27,61,.35); z-index: 9999; text-align: left; }
.sticky-player.playing { box-shadow: 0 0 0 3px var(--cyan), 0 12px 34px rgba(42,27,61,.35); }
.player-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
#player-artist { font-size: 11px; color: var(--pink); }
#player-title { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--pink); color: #fff; font-size: 16px; cursor: pointer; }
.pl.alt { background: rgba(255,255,255,.18); width: 38px; height: 38px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .latest-slide, .grid, .cover img { transition: none; } }
