/* 《翻轉》互动页共享层：新导航、角色光标、标题插图、陪练小角色、点击翻字。
   所有类名以 fz- 开头，不影响各练习页原有样式。 */

.fz-header, .fz-header * { box-sizing: border-box; }
.fz-header {
  position: relative; z-index: 40;
  background: #F5F0E4; border-bottom: 1px solid #D8CFBC;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #2B2F3A; line-height: 1.4; text-align: left;
}
.fz-header .fz-in { max-width: 1200px; margin: 0 auto; padding: 12px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.fz-header a { color: #2B2F3A; text-decoration: none; border: 0; background: none; }
.fz-header a:hover { color: #C8321A; }
.fz-brand { display: flex; align-items: center; gap: 10px; }
.fz-seal { width: 34px; height: 34px; border-radius: 7px; background: #C8321A; display: flex; align-items: center; justify-content: center; flex: none; }
.fz-seal span { font-family: "Noto Serif SC", "Songti SC", "STSong", serif; font-weight: 900; font-size: 22px; line-height: 1; color: #FFFBF0; transform: rotate(180deg); display: block; }
.fz-brand-name { font-family: "Noto Serif SC", "Songti SC", "STSong", serif; font-weight: 900; font-size: 21px; letter-spacing: .15em; }
.fz-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; font-size: 14px; font-weight: 500; }
.fz-links a[aria-current="page"] { color: #C8321A; box-shadow: inset 0 -2px 0 #C8321A; }
.fz-links .fz-sub { padding: 6px 18px; border-radius: 999px; background: #2B2F3A; color: #F5F0E4 !important; }
.fz-crumb { background: #EFE8D8; border-bottom: 1px solid #D8CFBC; font-size: 13px; }
.fz-crumb .fz-in { padding-top: 6px; padding-bottom: 6px; gap: 8px; justify-content: flex-start; }
.fz-crumb a { color: #5A5F66; }
.fz-crumb b { color: #2B2F3A; font-weight: 700; }

/* ---------- 角色光标（只在有鼠标的设备上） ---------- */
@media (pointer: fine) {
  html.fz-think, html.fz-think body, html.fz-think *:not(input):not(textarea):not(select):not([contenteditable="true"]) {
    cursor: url(/assets/cursors/think.png) 1 1, auto !important;
    cursor: -webkit-image-set(url(/assets/cursors/think.png) 1x, url(/assets/cursors/think@2x.png) 2x) 1 1, auto !important;
  }
  html.fz-think :is(a, button, summary, label, [role="button"], [onclick], .fz-buddy):hover,
  html.fz-think :is(a, button, summary, label, [role="button"], [onclick], .fz-buddy):hover * {
    cursor: url(/assets/cursors/think-hover.png) 1 1, pointer !important;
    cursor: -webkit-image-set(url(/assets/cursors/think-hover.png) 1x, url(/assets/cursors/think-hover@2x.png) 2x) 1 1, pointer !important;
  }
  html.fz-words, html.fz-words body, html.fz-words *:not(input):not(textarea):not(select):not([contenteditable="true"]) {
    cursor: url(/assets/cursors/words.png) 1 1, auto !important;
    cursor: -webkit-image-set(url(/assets/cursors/words.png) 1x, url(/assets/cursors/words@2x.png) 2x) 1 1, auto !important;
  }
  html.fz-words :is(a, button, summary, label, [role="button"], [onclick], .fz-buddy):hover,
  html.fz-words :is(a, button, summary, label, [role="button"], [onclick], .fz-buddy):hover * {
    cursor: url(/assets/cursors/words-hover.png) 1 1, pointer !important;
    cursor: -webkit-image-set(url(/assets/cursors/words-hover.png) 1x, url(/assets/cursors/words-hover@2x.png) 2x) 1 1, pointer !important;
  }
  html.fz-write, html.fz-write body, html.fz-write *:not(input):not(textarea):not(select):not([contenteditable="true"]) {
    cursor: url(/assets/cursors/write.png) 1 1, auto !important;
    cursor: -webkit-image-set(url(/assets/cursors/write.png) 1x, url(/assets/cursors/write@2x.png) 2x) 1 1, auto !important;
  }
  html.fz-write :is(a, button, summary, label, [role="button"], [onclick], .fz-buddy):hover,
  html.fz-write :is(a, button, summary, label, [role="button"], [onclick], .fz-buddy):hover * {
    cursor: url(/assets/cursors/write-hover.png) 1 1, pointer !important;
    cursor: -webkit-image-set(url(/assets/cursors/write-hover.png) 1x, url(/assets/cursors/write-hover@2x.png) 2x) 1 1, pointer !important;
  }
}

/* ---------- 标题区插图 ---------- */
.fz-hero-host { position: relative; }
.fz-hero-art { display: none; }
@media (min-width: 1100px) {
  .fz-hero-art {
    display: block; position: absolute; top: 16px; right: max(24px, calc((100% - 1180px) / 2));
    width: auto; pointer-events: none; z-index: 2;
    filter: drop-shadow(0 8px 16px rgba(20, 24, 40, .18));
    animation: fz-float 6s ease-in-out infinite;
  }
}
@media (min-width: 1100px) { .fz-hero-art.fz-out { right: auto; } }
@keyframes fz-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- 陪练小角色 ---------- */
.fz-buddy-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; align-items: flex-end; gap: 10px; flex-direction: row-reverse; pointer-events: none; font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
.fz-buddy { pointer-events: auto; width: 74px; height: 74px; border-radius: 50%; padding: 0; border: 3px solid #2B2F3A; overflow: hidden; position: relative; box-shadow: 0 8px 20px rgba(20, 24, 40, .25); transition: transform .2s ease; }
.fz-buddy:hover { transform: translateY(-3px) rotate(-4deg); }
.fz-buddy:focus-visible { outline: 3px solid #1F6F8B; outline-offset: 3px; }
.fz-buddy img { position: absolute; left: -50%; top: -6%; width: 200%; height: auto; max-width: none; }
.fz-bubble { pointer-events: auto; position: relative; max-width: 250px; background: #FFFBF0; color: #2B2F3A; border: 2px solid #2B2F3A; border-radius: 16px 16px 4px 16px; padding: 10px 30px 10px 14px; font-size: 14px; line-height: 1.6; box-shadow: 0 8px 20px rgba(20, 24, 40, .18); margin-bottom: 30px; opacity: 0; transform: translateY(6px) scale(.96); transform-origin: bottom right; transition: opacity .2s ease, transform .2s ease; visibility: hidden; }
.fz-bubble.fz-show { opacity: 1; transform: none; visibility: visible; }
.fz-bubble b { display: block; font-size: 12px; letter-spacing: .1em; color: #C8321A; margin-bottom: 2px; }
.fz-close { position: absolute; top: 4px; right: 6px; width: 22px; height: 22px; border: 0; background: none; color: #5A5F66; font-size: 16px; line-height: 1; padding: 0; }
.fz-close:hover { color: #C8321A; }
@media (max-width: 640px) {
  .fz-buddy { width: 56px; height: 56px; }
  .fz-buddy-wrap { right: 12px; bottom: 12px; }
  .fz-bubble { max-width: 200px; font-size: 13px; margin-bottom: 22px; }
}
@media print { .fz-buddy-wrap, .fz-hero-art { display: none !important; } }

/* ---------- 点击时翻出的小印章 ---------- */
.fz-pop { position: fixed; z-index: 70; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 6px; background: #C8321A; color: #FFFBF0; display: flex; align-items: center; justify-content: center; font-family: "Noto Serif SC", "Songti SC", serif; font-weight: 900; font-size: 16px; pointer-events: none; animation: fz-pop .7s ease-out forwards; }
@keyframes fz-pop {
  0% { transform: scale(.3) rotate(0deg); opacity: 0; }
  30% { transform: scale(1.1) rotate(180deg); opacity: 1; }
  100% { transform: translateY(-26px) scale(.8) rotate(180deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .fz-hero-art { animation: none; }
  .fz-pop { display: none; }
  .fz-bubble, .fz-buddy { transition: none; }
}

/* 防止各练习页自己的 button / img 样式把小角色撑大 */
.fz-buddy-wrap .fz-buddy { width: 74px !important; height: 74px !important; min-width: 0 !important; min-height: 0 !important; max-width: none !important; padding: 0 !important; margin: 0 !important; flex: none !important; font-size: 0 !important; line-height: 0 !important; display: block !important; background-clip: padding-box; }
.fz-buddy-wrap .fz-buddy img { position: absolute !important; left: -50% !important; top: -6% !important; width: 200% !important; height: auto !important; max-width: none !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; }
.fz-buddy-wrap .fz-close { width: 22px !important; height: 22px !important; min-width: 0 !important; padding: 0 !important; margin: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; color: #5A5F66 !important; font-size: 16px !important; }
.fz-buddy-wrap .fz-bubble { flex: none; width: max-content; }
@media (max-width: 640px) { .fz-buddy-wrap .fz-buddy { width: 56px !important; height: 56px !important; } }
.fz-header .fz-in, .fz-crumb .fz-in { width: auto !important; }
.fz-header .fz-in, .fz-crumb .fz-in { max-width: 1200px !important; margin: 0 auto !important; padding-left: 24px !important; padding-right: 24px !important; display: flex !important; }
.fz-crumb .fz-in { padding-top: 6px !important; padding-bottom: 6px !important; }
.fz-crumb, .fz-crumb a, .fz-crumb b, .fz-crumb span { font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif !important; font-size: 13px !important; line-height: 1.5 !important; text-decoration: none !important; }
