/* ============================================================================
 * ww-skin.css — Sakurairo-style theme switcher (LOCAL; inline-SVG icons). v3.
 * Trigger = a round color-PALETTE button stuck to the bottom-right corner (replaces
 * the old text gear; flips gently, no clockwise spin). The drawer slides out to its
 * LEFT (compact, 2 rows). Skin choice = {day(default)=no bg, night, music, sakura,
 * dots, pastoral}; Font A/B separate. Background = fixed full-viewport layer with the
 * page wrappers going transparent so it truly fills the screen.
 * ========================================================================== */

/* ---------- trigger: round palette button, bottom-right corner ---------- */
.changeSkin-gear {
    position: fixed !important; right: 18px !important; bottom: 18px !important;
    left: auto !important; top: auto !important;
    width: 46px !important; height: 46px !important; padding: 0 !important; margin: 0 !important;
    display: flex !important; align-items: center; justify-content: center;
    border-radius: 50% !important; white-space: nowrap; cursor: pointer; z-index: 99;
    background: rgba(255,255,255,.92) !important;
    box-shadow: 0 4px 16px -4px rgba(0,0,0,.28), 0 0 0 1px rgba(0,0,0,.04) !important;
    -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
    color: #6b6470; perspective: 260px; transition: transform .2s ease, box-shadow .2s ease;
}
.changeSkin-gear:hover { box-shadow: 0 6px 22px -4px rgba(0,0,0,.34), 0 0 0 1px rgba(0,0,0,.05) !important; }
.changeSkin-gear .keys, .changeSkin-gear #open-skinMenu, .changeSkin-gear span:not(.ww-skin-palette) { display: none !important; } /* drop the old text */
.changeSkin-gear .ww-skin-palette { display: inline-flex; transform-style: preserve-3d; animation: ww-skin-flip 3.6s ease-in-out infinite; }
.changeSkin-gear .ww-skin-palette svg { width: 25px; height: 25px; display: block; }
@keyframes ww-skin-flip { 0%, 58% { transform: rotateY(0deg); } 100% { transform: rotateY(360deg); } }
@media (prefers-reduced-motion: reduce) { .changeSkin-gear .ww-skin-palette { animation: none; } }

/* ---------- the drawer: slides LEFT out of the palette button, bottoms aligned ---------- */
.skin-menu.ww-skin-menu {
    position: fixed; right: 74px; bottom: 18px; left: auto; top: auto;
    width: auto; height: auto; padding: 0;
    display: flex; flex-direction: row; align-items: flex-end; gap: 8px;
    background: transparent; box-shadow: none; border: 0; z-index: 98;
    transform: translateX(24px) scale(.96); transform-origin: right bottom;
    opacity: 0; pointer-events: none;
    transition: transform .32s cubic-bezier(.22,.84,.46,1.04), opacity .26s ease;
    white-space: nowrap;
}
.skin-menu.ww-skin-menu.show { transform: translateX(0) scale(1); opacity: 1; pointer-events: auto; }

.ww-skin-menu .ww-skin-group {
    display: flex; gap: 5px; padding: 6px; border-radius: 14px;
    background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.9);
    box-shadow: 0 4px 22px -6px rgba(0,0,0,.22);
    -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
}
.ww-skin-menu .ww-skin-bg-group { display: grid; grid-template-columns: repeat(2,1fr); grid-auto-rows: 40px; }
.ww-skin-menu .ww-skin-col { flex-direction: column; }

.ww-skin-menu .ww-skin-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; box-sizing: border-box;
    border-radius: 11px; border: 1px solid rgba(0,0,0,.06); background: #fbfbfc;
    color: #5a5560; cursor: pointer; transition: all .16s ease;
    -webkit-user-select: none; user-select: none;
}
.ww-skin-menu .ww-skin-btn:hover { background: #eef0f3; color: #2f3540; }
.ww-skin-menu .ww-skin-btn:focus-visible { outline: 2px solid #9a8fa6; outline-offset: 2px; }
.ww-skin-menu .ww-skin-btn.active { border: 2px solid #8d8194; color: #5f5468; background: #fff; box-shadow: 0 0 0 3px rgba(141,129,148,.14); }
.ww-skin-menu .ww-skin-btn svg { width: 20px; height: 20px; display: block; }
.ww-skin-menu .ww-skin-btn.ww-skin-font { font-size: 19px; font-weight: 600; line-height: 1; }
.ww-skin-menu .ww-skin-btn[data-font="sans"]  { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
.ww-skin-menu .ww-skin-btn[data-font="serif"] { font-family: Georgia, "Songti SC", "STSong", "SimSun", serif; }

/* ---------- background: fixed full-viewport layer ---------- */
.ww-skin-bg-layer { position: fixed; inset: 0; z-index: -1; pointer-events: none; background-repeat: repeat; background-position: top left; background-size: auto; }
body.ww-bg-music    .ww-skin-bg-layer { background-image: url("../skin-bg/music.png"); }
body.ww-bg-sakura   .ww-skin-bg-layer { background-image: url("../skin-bg/sakura.png"); }
body.ww-bg-dots     .ww-skin-bg-layer { background-image: url("../skin-bg/dots.png"); }
body.ww-bg-pastoral .ww-skin-bg-layer { background-image: url("../skin-bg/pastoral.png"); }
body[class*="ww-bg-"],
body[class*="ww-bg-"] #main-container,
body[class*="ww-bg-"] #page,
body[class*="ww-bg-"] #page.site,
body[class*="ww-bg-"] #primary,
body[class*="ww-bg-"] .site-main { background-color: transparent !important; background-image: none !important; }
body[class*="ww-bg-"] #content.site-content,
body[class*="ww-bg-"] #primary.content-area { background-color: transparent !important; background-image: none !important; }
/* readable cards: any article entry / content block on a pattern gets a near-solid surface so text
   stays legible (biography's <article class="page"> included, plus list/article entries on any page). */
body[class*="ww-bg-"] article,
body[class*="ww-bg-"] .post-item,
body[class*="ww-bg-"] .ww-fl,
body[class*="ww-bg-"] #comments,
body[class*="ww-bg-"] .links,
body[class*="ww-bg-"] .page-header,
body[class*="ww-bg-"] .pagination {
    background-color: rgba(255,255,255,.62) !important;
    -webkit-backdrop-filter: blur(11px) saturate(1.15); backdrop-filter: blur(11px) saturate(1.15);
    border-radius: 14px;
}
/* @supports fallback: if the browser can't do backdrop-filter, use a more opaque card so text stays readable */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    body[class*="ww-bg-"] article,
    body[class*="ww-bg-"] .post-item,
    body[class*="ww-bg-"] .ww-fl,
    body[class*="ww-bg-"] #comments,
    body[class*="ww-bg-"] .links { background-color: rgba(255,255,255,.92) !important; }
}

/* ---------- fonts ---------- */
body.ww-font-serif { font-family: Georgia, "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", serif; }
body.ww-font-serif code, body.ww-font-serif pre, body.ww-font-serif kbd,
body.ww-font-serif samp, body.ww-font-serif tt { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; }

/* ---------- night ---------- */
body.dark .changeSkin-gear { background: rgba(46,50,56,.92) !important; color: #d6d2da !important; box-shadow: 0 4px 16px -4px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.06) !important; }
body.dark .ww-skin-menu .ww-skin-group { background: rgba(40,44,50,.94); border-color: rgba(255,255,255,.08); }
body.dark .ww-skin-menu .ww-skin-btn { background: rgba(60,64,72,.92); color: #d6d6dd; border-color: rgba(255,255,255,.08); }
body.dark .ww-skin-menu .ww-skin-btn:hover { background: rgba(90,95,104,.95); color: #fff; }
body.dark .ww-skin-menu .ww-skin-btn.active { border-color: #b3a8bd; color: #cdbfd6; background: rgba(80,84,92,.95); box-shadow: 0 0 0 3px rgba(179,168,189,.16); }

/* ---------- /test exam page: hide the switcher entirely ---------- */
body.page-template-page-test-php .changeSkin-gear,
body.page-template-page-test-php .skin-menu.ww-skin-menu { display: none !important; }
body.home .changeSkin-gear,
body.home .skin-menu.ww-skin-menu { display: none !important; }

/* 2G-06B: nudge the back-to-top cat a little toward the right edge (paired with the JS up-raise)
   so it never collides with the corner palette button or the drawer. */
.cd-top { right: 12px !important; }

/* 旧版透明导航时代给 .site-header 糊的满宽白磨砂条(!important)已删除:
   新的浮层导航直接坐在"当前页主图"上,封面本就到顶,不需要这条白带。
   (壁纸不会从导航透出,因为封面 .pattern-center 满宽盖住顶部;无封面页由菜单承托保证可读。) */

/* ww cursors — the parent Sakura cursor rules (body/a/p/.ins-section/disabled) are now LOCAL, edited at
 * the SOURCE in the parent style.css, so NO remote jsdelivr .cur is fetched anywhere. Here we only ADD two
 * cases the parent theme never styled: a text caret over form inputs, and a disabled cursor over disabled
 * controls. No !important, no duplicate overrides. */
input:not([type="button"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]), textarea, [contenteditable="true"] { cursor: url(/wp-content/themes/Fioritura/assets/cursor/text.cur), text; }
button:disabled, input:disabled, [disabled], [aria-disabled="true"] { cursor: url(/wp-content/themes/Fioritura/assets/cursor/disabled.cur), not-allowed; }
/* (loading/busy cursor removed per user — browsers cannot repaint the cursor during a
   stationary-click navigation, so it stays the system default. The bouncing music-notes overlay is
   the loading indicator.) */

/* (removed over-aggressive transparency that affected the 念两句诗/content area) */

/* ---------- cover seam fix (user's own diagnosis): the temple cover FLOATS on the wallpaper with a
 * gentle bottom arc that reaches BOTH feet, no white band. ROOT CAUSE = parent .pattern-center::after
 * is a 150%-wide OPAQUE #fff ellipse (overshoots the sides = straight gaps, and always paints white).
 * Fix — ONLY when a wallpaper skin is active (white skin keeps the theme default):
 *   1) kill the white ellipse (::after display:none);
 *   2) make the cover's white backdrop transparent so the wallpaper shows through;
 *   3) MASK the cover's bottom with a full-width ellipse: horizontal radius 50% -> the ellipse passes
 *      exactly through both bottom corners (reaches the feet, no side gap); vertical radius 34px -> a
 *      little arc. The masked-out arc reveals the wallpaper behind, so the image looks like it floats.
 * NO !important: these child selectors are more specific than the parent's AND load later, so they win
 * by the natural cascade (not selector-strength hacks). */
body[class*="ww-bg-"] .pattern-center-blank { background: transparent; }  /* 让壁纸从弧形切口透上来;阴影按用户要求移除 */
body[class*="ww-bg-"] .pattern-center::after { display: none; }
body[class*="ww-bg-"] .pattern-center {
    /* ARC via clip-path, NOT mask. WebKit rasterises a masked element to an offscreen layer and
       FREEZES the SVG-background animation inside it (that killed the cover loader). clip-path is a
       geometric clip (no offscreen raster) so the loader keeps animating; the arc looks identical.
       #ww-cover-arc is a hidden inline <clipPath clipPathUnits="objectBoundingBox"> printed in wp_footer. */
    -webkit-clip-path: url("#ww-cover-arc");
            clip-path: url("#ww-cover-arc");
}

/* ww(single census clear of arc): on single posts the title+author census sits at the cover bottom
   (.single-header bottom:20px); the floating-arc mask (~32px deep at centre) was slicing the author
   avatar/name row. Only when a wallpaper skin is active, lift the single-post header above the arc so
   nothing is cut. Archive/category covers use .pattern-header (centre) and are unaffected. */
body[class*="ww-bg-"] .pattern-center header.single-header { bottom: 46px; }
@media (max-width: 860px) { body[class*="ww-bg-"] .pattern-center header.single-header { bottom: 36px; } }

/* ww(cover 填满 + 居中裁 + 绝不漏缝):封面必须永远填满整个框,不留空条。
   background-size:cover = 缩放到刚好盖住整框、裁掉溢出、居中:
     - 普通/横图 -> 铺满宽度,上下均等裁;
     - 超宽图(或窄屏手机把框变高) -> 铺满高度,左右均等裁,绝不漏缝。 */
body[class*="ww-bg-"] .pattern-attachment-img {
    background-size: cover;
    background-position: center center;   /* 居中裁切:太宽的图左右均等裁 */
}


