/* 玩法基础样式：小芽精灵陪伴 + 独立练习田（农场课堂）
   仅作用于 .gp-* 命名空间，不覆盖既有农场/详情页样式。
   精灵逐帧图层由 sprite_player.js 以 128×128 背景定位绘制，
   因此 .gp-sprite / .gp-poster / .gp-breath 必须严格 128×128，
   视觉缩放统一交给外层 .gp-scale 的 transform。 */

/* ============ 通用按钮 ============ */
.gp-button{
  appearance:none;border:1px solid #cddcc4;background:#fff;color:#33512f;
  border-radius:999px;padding:8px 16px;font:600 13px/1.2 inherit;cursor:pointer;
  transition:transform .12s ease,box-shadow .12s ease,background .12s ease;
}
.gp-button:active{transform:translateY(1px)}
.gp-button:disabled{opacity:.5;cursor:not-allowed}
.gp-button.gp-primary{
  border-color:transparent;color:#fff;
  background:linear-gradient(110deg,#5c8a4a,#37603f);
  box-shadow:0 6px 16px rgba(53,95,62,.28);
}

/* ============ 精灵停靠容器 ============ */
.gp-dock-host{display:block;width:100%}
.gp-companion{
  position:relative;width:calc(100% - 28px);max-width:692px;margin:6px auto 10px;padding:0;
  border:0;color:#425b36;background:transparent;box-shadow:none;box-sizing:border-box;
}
.gp-companion[hidden],.gp-companion [hidden]{display:none!important}
.gp-companion>.gp-more-button{
  display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;
  margin:0 0 0 auto;padding:9px 15px;border:1px solid #d4dfc5;border-radius:999px;
  background:rgba(255,253,244,.92);color:#5a7148;font-size:12px;font-weight:600;
  box-shadow:0 2px 5px rgba(69,93,44,.06);
}
.gp-more-button::before{
  content:'';width:6px;height:6px;margin:0 8px 8px 0;border-radius:2px;
  background:#8aab69;box-shadow:8px 0 #8aab69,0 8px #8aab69,8px 8px #8aab69;
}
.gp-more-button:focus-visible{outline:2px solid #799b54;outline-offset:3px}
.gp-play-panel .gp-entrybar{margin-top:18px}
.gp-entrybar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.gp-entrybar .gp-button{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;
  min-width:0;min-height:86px;margin:0;padding:10px 3px 9px;border:1px solid #e3e8d4;border-radius:13px;
  background:rgba(255,255,250,.88);color:#536844;font:500 12px/1.4 -apple-system,'Microsoft YaHei',sans-serif;
  box-shadow:0 2px 0 rgba(198,211,173,.25);transition:transform .15s,background .15s,border-color .15s;
}
.gp-entrybar .gp-button:active{transform:translateY(2px);background:#eff4df;border-color:#bacd9d;box-shadow:none}
.gp-entrybar .gp-button:focus-visible{outline:2px solid #799b54;outline-offset:3px}
.gp-entrybar .gp-button[aria-expanded="true"]{background:#edf4dc;border-color:#adbf8e}
.gp-entry-icon{
  display:flex;align-items:center;justify-content:center;width:42px;height:38px;border-radius:13px;
  background:linear-gradient(145deg,#eff5dd,#e2edcc);box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
  pointer-events:none;
}
.gp-entrybar .gp-button:nth-child(2n) .gp-entry-icon{background:linear-gradient(145deg,#fff5dc,#f7e8c1)}
.gp-entrybar .gp-button:nth-child(3n) .gp-entry-icon{background:linear-gradient(145deg,#eaf4e4,#d7e9d1)}
.gp-entrybar .gp-button:nth-child(6) .gp-entry-icon{background:linear-gradient(145deg,#faeee3,#f2dfd1)}
.gp-entry-icon img{display:block;width:30px;height:30px;object-fit:contain;filter:drop-shadow(0 2px 1px rgba(78,74,37,.12))}
.gp-entry-label{display:block;max-width:100%;white-space:nowrap;pointer-events:none}
@media(hover:hover){.gp-entrybar .gp-button:hover{background:#f4f8e9;border-color:#c3d2aa;transform:translateY(-1px)}}
@media(max-width:360px){
  .gp-companion{width:calc(100% - 20px)}
  .gp-entrybar{gap:7px}
  .gp-entrybar .gp-button{min-height:80px;font-size:11px}
}
@media(prefers-reduced-motion:reduce){.gp-entrybar .gp-button{transition:none}}

.gp-companion-row{
  position:relative;display:flex;align-items:flex-end;justify-content:center;
  min-height:104px;
}
.gp-companion.gp-land{width:100%;margin:4px 0}
.gp-land .gp-companion-row{justify-content:flex-end;gap:12px;min-height:64px}
.gp-land .gp-character{flex:0 0 64px;width:64px;height:64px}
.gp-companion.gp-land .gp-scale{position:absolute;left:0;top:0;transform-origin:0 0;--gp-scale:.5}
.gp-land .gp-shadow{width:34px}
.gp-land .gp-bubble{position:relative;right:auto;bottom:auto;min-width:0;width:auto;flex:1;box-sizing:border-box}

/* ============ 小芽入景 NPC（探索版农场屋门口，2026-09-25 取代页头悬浮）============
   槽位 .iso-npc-slot 的定位/深度由 iso25d.js paintNpcSlot 内联；
   这里只负责槽内角色可点、气泡浮在角色头顶。pointer-events 会继承槽的 none，
   角色与气泡必须显式收回 auto，否则点不到小芽、点不了气泡按钮。 */
.iso-npc-slot .gp-character{
  pointer-events:auto;display:block;
  filter:drop-shadow(0 2px 3px rgba(40,70,30,.28)) saturate(.98);
}
.iso-npc-slot .gp-bubble{
  pointer-events:auto;position:absolute;bottom:calc(100% + 8px);left:50%;right:auto;
  transform:translateX(-50%);width:min(252px,68vw);max-height:52vh;overflow:auto;z-index:40;
}
.iso-npc-slot .gp-bubble::after{
  right:auto;left:50%;bottom:-7px;margin-left:-6px;
  border-top:0;border-right:1px solid #e8dcba;border-bottom:1px solid #e8dcba;
  background:#fdf1d8;
}

/* 角色点击区 */
.gp-character{
  position:relative;appearance:none;border:0;background:transparent;padding:0;
  cursor:pointer;display:block;line-height:0;
}
.gp-character:disabled{cursor:default}

.gp-shadow{
  position:absolute;left:50%;bottom:2px;width:64px;height:14px;
  transform:translateX(-50%);border-radius:50%;
  background:radial-gradient(ellipse at center,rgba(41,70,55,.28),rgba(41,70,55,0) 70%);
  pointer-events:none;
}

/* 缩放层：脚底锚点 (0.5,0.9) */
.gp-scale{
  position:relative;display:block;width:128px;height:128px;
  transform-origin:50% 90%;transform:scale(var(--gp-scale,.74));
}

.gp-breath{position:relative;display:block;width:128px;height:128px;transform-origin:50% 92%}
.gp-pose-stage{position:relative;display:block;width:128px;height:128px;transform-origin:50% 94%}
.gp-poster{position:absolute;left:0;top:0;width:128px;height:128px;object-fit:contain;pointer-events:none}
.gp-pose-outgoing{opacity:0}
.gp-pose-outgoing[hidden]{display:none!important}
.gp-pose-changing{animation:gp-pose-settle var(--gp-pose-duration,1.2s) cubic-bezier(.4,0,.2,1) both}
.gp-pose-changing>.gp-poster:not(.gp-pose-outgoing){animation:gp-pose-in var(--gp-pose-duration,1.2s) linear both}
.gp-pose-changing>.gp-pose-outgoing{animation:gp-pose-out var(--gp-pose-duration,1.2s) linear both}
@keyframes gp-pose-in{0%{opacity:0}100%{opacity:1}}
@keyframes gp-pose-out{0%{opacity:1}100%{opacity:0}}
@keyframes gp-pose-settle{
  0%,100%{transform:translateY(0) scale(1,1) rotate(0)}
  24%{transform:translateY(1px) scale(1.015,.975) rotate(-.6deg)}
  66%{transform:translateY(-1px) scale(.995,1.015) rotate(.3deg)}
}
@media(prefers-reduced-motion:reduce){
  .gp-pose-changing,.gp-pose-changing>.gp-poster,.gp-breath.gp-breathing{animation:none!important}
  .gp-pose-outgoing{display:none!important}
}
.gp-sprite{
  position:absolute;left:0;top:0;width:128px;height:128px;
  background-repeat:no-repeat;background-position:0 0;
}
/* 小芽形象统一为 Q 版立绘：几何帧层已离屏，poster 常显，不再随 gp-playing 隐藏 */
/* 完整动态下的呼吸微动 */
.gp-breath.gp-breathing{animation:gp-breathe 3.4s ease-in-out infinite}
@keyframes gp-breathe{
  0%,100%{transform:scale(1,1) translateY(0)}
  50%{transform:scale(1.015,.985) translateY(-2px)}
}

/* 气泡提示：暖色纸感卡片 + 头像抬头 + 按钮分层（2026-10-04 重做） */
.gp-bubble{
  position:absolute;right:calc(50% + 46px);bottom:16px;z-index:3;
  width:min(238px,60vw);padding:11px 13px 10px;border-radius:16px;
  background:linear-gradient(168deg,#fffdf6 0%,#fff8e6 62%,#fdf1d8 100%);
  border:1px solid #e8dcba;
  box-shadow:0 10px 24px rgba(74,59,28,.20),0 2px 5px rgba(74,59,28,.10),
    inset 0 1px 0 rgba(255,255,255,.9);
}
.gp-bubble[hidden]{display:none}
/* 小尾巴：与气泡底色衔接，带描边 */
.gp-bubble::after{
  content:"";position:absolute;right:-7px;bottom:18px;width:12px;height:12px;
  background:#fdf1d8;border-right:1px solid #e8dcba;border-top:1px solid #e8dcba;
  transform:rotate(45deg);
}

/* 抬头：小芽头像 + 名字 */
.gp-bubble-head{
  display:flex;align-items:center;gap:6px;margin:0 0 6px;
}
.gp-bubble-face{
  width:24px;height:24px;flex:0 0 24px;border-radius:50%;
  background:radial-gradient(circle at 50% 62%,#e9f3d8,#d6e8bd);
  border:1px solid #cfe0b4;object-fit:cover;
}
.gp-bubble-name{
  font-size:11.5px;font-weight:700;color:#7a9a4e;letter-spacing:.4px;
}
/* 头像加载失败时只留名字，仍不塌版 */
.gp-bubble-head-plain .gp-bubble-name::before{content:"🌱 ";font-size:11px}

.gp-hint{
  margin:0 0 9px;font-size:13px;line-height:1.62;color:#4a3f22;
  /* 提示正文与按钮之间的分隔线，替代原先"文字+一排同权重按钮"的杂乱感 */
  padding-bottom:9px;border-bottom:1px dashed #e3d6ae;
  /* flex 子项默认 min-width:auto，长文案会撑破气泡；置0 才能正常换行 */
  min-width:0;overflow-wrap:break-word;
}

/* 按钮区：主行动置首（flex order），关闭降为文字链 */
.gp-bubble-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;min-width:0}
.gp-bubble-actions .gp-bubble-go{order:1}
.gp-bubble-actions .gp-primary{order:0}
.gp-bubble-actions .gp-bubble-close{order:2}
.gp-bubble .gp-button{margin:0;padding:6px 13px;font-size:12px}
.gp-bubble .gp-bubble-close{
  margin-left:auto;padding:5px 2px;border:0;background:transparent;
  color:#a4956f;font-size:11.5px;font-weight:600;
}
.gp-bubble .gp-bubble-close:hover{color:#7d6f4e}
/* 极窄屏：三个按钮必然换行，关闭按钮不再右贴边，避免"贴框"的局促感 */
@media (max-width:340px){
  .gp-bubble-actions .gp-bubble-close{margin-left:0}
}

/* 设置面板里的"重新开启自动提示"（本机关闭过自动气泡时才出现） */
.gp-bubble-restore-wrap{margin:4px 0 2px;padding-top:10px;border-top:1px dashed #e0e6d6}
.gp-bubble-restore{width:100%;border-style:dashed;border-color:#b9cda6;background:#f4f9ee;color:#4a6b34}

.gp-status{margin:6px 0 0;min-height:18px;font-size:12px;color:#6c7a63;text-align:center}
.gp-companion .gp-status:empty{min-height:0;margin:0}
.gp-companion>.gp-button:not(.gp-more-button){display:block;margin:6px auto 0}

/* 设置面板 */
body.gp-settings-open{overflow:hidden}
.mask.gp-settings-mask,.mask.gp-play-mask{
  position:fixed;inset:0;z-index:160;display:flex;align-items:center;justify-content:center;
  padding:20px 14px;background:rgba(34,53,34,.42);overscroll-behavior:contain;
  backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);
}
.gp-settings-mask[hidden],.gp-settings-mask.hidden,.gp-settings-mask [hidden],
.gp-play-mask[hidden],.gp-play-mask.hidden,.gp-play-mask [hidden]{display:none!important}
.gp-settings,.gp-play-panel{
  width:100%;max-width:420px;max-height:calc(100vh - 40px);max-height:calc(100dvh - 40px);
  margin:0;padding:20px;border-radius:24px;background:linear-gradient(145deg,#fffdf4,#f2f6e9);
  border:1px solid #e4ebd5;box-shadow:0 20px 70px rgba(31,53,30,.25),inset 0 1px 0 #fff;
  color:#425b36;overflow-y:auto;overscroll-behavior:contain;box-sizing:border-box;
}
.gp-settings-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}
.gp-settings h3,.gp-play-panel h3{margin:0;font-size:19px;color:#33512f;letter-spacing:1px}
.gp-settings p{margin:8px 0;font-size:12px;color:#6c7a63;line-height:1.6;overflow-wrap:anywhere}
.gp-settings .gp-settings-bond{margin:0 0 18px;color:#83916e}
.gp-settings .gp-field{
  display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;
  margin:0;padding:10px 0;border-top:1px solid #e0e8d3;font-size:13px;color:#3d4a34;
}
.gp-settings .gp-field select{min-width:0;max-width:65%;padding:9px 8px;border:1px solid #cddcc4;border-radius:10px;background:#fff;color:#33512f;font-size:13px}
.gp-settings .gp-field input[type=checkbox]{flex:none;width:22px;height:22px;margin:0;accent-color:#638b49;cursor:pointer}
.gp-settings-actions{display:flex;gap:10px;margin-top:18px}
.gp-settings-actions .gp-button{flex:1;min-height:44px;margin:0;padding:10px 8px;border-radius:13px}
.gp-settings .gp-settings-close,.gp-play-panel .gp-settings-close{min-height:40px;margin:0;padding:8px 12px;border-color:#dce5ce;background:#f1f5e8;font-size:12px}
.gp-settings>.gp-button{display:block;margin:10px auto 0}
.gp-settings>.gp-status:empty{display:none}
.gp-settings .gp-button:focus-visible,.gp-settings input:focus-visible,.gp-settings select:focus-visible,.gp-play-panel .gp-button:focus-visible{outline:2px solid #769957;outline-offset:3px}
@media(max-width:480px){
  .mask.gp-settings-mask,.mask.gp-play-mask{align-items:flex-end;padding:10px 10px max(10px,env(safe-area-inset-bottom))}
  .gp-settings,.gp-play-panel{padding:18px;border-radius:22px;max-height:calc(100vh - 36px);max-height:calc(100dvh - 36px)}
}

/* 弹层遮盖时暂停表现层 */
.gp-companion.gp-suspended .gp-breath{animation:none}

/* ============ 宠物伙伴（自定义外观）单图轻动作 ============
   自定义宠物为单张透明立绘，禁用小芽多帧动作轮播；
   仅保留呼吸（.gp-breath.gp-breathing）、轻摆（gp-pet-sway）与点击跳（gp-pet-hop）。
   轴心沿用 .gp-pose-stage 的 50% 94%（近脚底），摆动/起跳更自然。 */
.gp-pose-stage.gp-pet{animation:gp-pet-sway 4.2s ease-in-out infinite}
.gp-pose-stage.gp-pet.gp-pet-hop{animation:gp-pet-hop .6s cubic-bezier(.28,.84,.42,1) 1}
@keyframes gp-pet-sway{
  0%,100%{transform:rotate(-1.4deg) translateY(0)}
  50%{transform:rotate(1.4deg) translateY(-1px)}
}
@keyframes gp-pet-hop{
  0%{transform:translateY(0) scale(1,1)}
  30%{transform:translateY(-10px) scale(.97,1.05)}
  55%{transform:translateY(0) scale(1.04,.94)}
  100%{transform:translateY(0) scale(1,1)}
}

/* 伙伴设置：当前外观预览 + 更换/恢复操作 */
.gp-appearance{margin:0 0 14px;padding:12px;border-radius:14px;background:#fff;border:1px solid #e4eadd}
.gp-appearance-cap{font-size:12px;color:#6c7a63;margin-bottom:8px;text-align:center}
.gp-appearance-preview{
  display:flex;align-items:center;justify-content:center;width:72px;height:72px;margin:0 auto 10px;
  border-radius:14px;background:linear-gradient(180deg,#eaf4e0,#d6e8c6);overflow:hidden;
}
.gp-appearance-preview img{width:100%;height:100%;object-fit:contain}
.gp-appearance-preview.is-sprout{font-size:34px;line-height:1}
.gp-appearance-ops{display:flex;gap:8px;flex-wrap:wrap}
.gp-appearance-ops .gp-button{flex:1 1 auto;min-width:120px;margin:0;padding:9px 10px;font-size:12.5px}
.gp-appearance-reset{border-color:#f0d0d0;color:#b23b3b}
@media(prefers-reduced-motion:reduce){
  .gp-pose-stage.gp-pet,.gp-pose-stage.gp-pet.gp-pet-hop{animation:none!important}
}

/* ============ 农场课堂（独立练习田） ============ */
.gp-tutorial-page{
  position:relative;z-index:20;width:100%;max-width:720px;min-height:100vh;margin:0 auto;
  padding:0 16px 40px;color:#294637;
  /* 温暖田园底色（与地块详情页同族）：浅绿到米黄的柔和过渡 + 角部光晕 */
  background:radial-gradient(ellipse at 0 18%,#e3eecb,transparent 55%),
    radial-gradient(ellipse at 100% 82%,#f4efcf,transparent 60%),
    linear-gradient(#e9f0d5,#f7f3dd);
}
.gp-tutorial-header{
  position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:12px;
  padding:12px 0;background:linear-gradient(180deg,#e9f0d5 70%,rgba(233,240,213,0));
}
.gp-tutorial-header h1{margin:0;font-size:18px;color:#294637}
.gp-tutorial-header .gp-button{padding:6px 14px;font-size:13px}
.gp-teaching-label{margin:2px 0 14px;font-size:12px;color:#7a8a70}

.gp-tutorial-card{
  padding:16px;border-radius:22px;background:#fffdf6;border:1px solid #edeadb;
  box-shadow:0 14px 34px rgba(73,99,51,.13);
}
.gp-step-count{margin:0 0 6px;font-size:12px;color:#8a977f;letter-spacing:.04em}
.gp-tutorial-card h2{margin:0 0 12px;font-size:17px;color:#294637}

.gp-practice-scene{
  position:relative;width:100%;aspect-ratio:2/1;border-radius:16px;overflow:hidden;
  background:linear-gradient(180deg,#dff0d2,#c6e2b4);margin-bottom:12px;
  box-shadow:inset 0 0 0 1px #ffffff66,0 4px 12px rgba(73,99,51,.12);
}
.gp-practice-soil{position:absolute;left:0;top:0;width:100%;height:100%;object-fit:cover}
.gp-practice-plant{
  position:absolute;left:50%;bottom:16%;transform:translateX(-50%);
  display:flex;align-items:flex-end;gap:3px;
}
.gp-leaf{
  display:block;width:12px;height:26px;border-radius:60% 40% 55% 45%/70% 70% 30% 30%;
  background:linear-gradient(180deg,#6aa84f,#3f7a35);transform-origin:50% 100%;
}
.gp-leaf-0{transform:rotate(-24deg) scaleY(.8)}
.gp-leaf-1{transform:rotate(-10deg) scaleY(.95)}
.gp-leaf-2{height:34px}
.gp-leaf-3{transform:rotate(10deg) scaleY(.95)}
.gp-leaf-4{transform:rotate(24deg) scaleY(.8)}
.gp-case-label,.gp-sample-label{
  position:absolute;top:8px;padding:3px 9px;border-radius:999px;font-size:11px;
  background:rgba(255,255,255,.86);color:#7a5b28;border:1px solid #e7d9b6;
}
.gp-case-label{left:8px}
.gp-sample-label{right:8px;color:#5b6b52;border-color:#d6e2cb}

.gp-teaching-copy{margin:0 0 8px;font-size:14px;line-height:1.65;color:#3d4a34}
.gp-teaching-note{margin:0 0 10px;font-size:12px;line-height:1.5;color:#8a977f}

.gp-step-list{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0 0;padding:10px;border-radius:14px;background:#f4f6e9;border:1px solid #e6e9d2;list-style:none}
.gp-step-list li{
  padding:4px 10px;border-radius:999px;font-size:11px;background:#fff;color:#9aa58a;border:1px solid #e3e8d2;
}
.gp-step-list li.gp-done{background:#e6f1d9;color:#4d7040;border-color:#cfe3c1}
.gp-step-list li.gp-done::before{content:'✓ '}
.gp-step-list li[aria-current=step]{background:linear-gradient(110deg,#5c8a4a,#37603f);color:#fff;border-color:transparent;font-weight:600;box-shadow:0 2px 6px rgba(60,96,45,.35)}

.gp-tutorial-companion{display:flex;justify-content:center;margin:16px 0 4px}
.gp-badge{
  margin:12px 0 0;padding:8px 12px;border-radius:12px;font-size:12px;text-align:center;
  background:#fbf5e3;color:#8a6d24;border:1px solid #ecd9a6;
}

.gp-tutorial-controls{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:18px}
.gp-tutorial-controls .gp-button{min-width:120px}
.gp-tutorial-controls p{width:100%;margin:0;font-size:12px;color:#8a977f;text-align:center}

/* ============ P2 通用页头 / 空态 ============ */
.gp-codex-page,.gp-quest-page,.gp-village-page{
  position:relative;z-index:20;width:100%;max-width:720px;min-height:100vh;margin:0 auto;
  padding:0 16px 40px;background:#f7f8f2;
}
.gp-page-header{
  position:sticky;top:0;z-index:2;display:flex;flex-wrap:wrap;align-items:center;gap:12px;
  padding:12px 0;background:linear-gradient(180deg,#f7f8f2 70%,rgba(247,248,242,0));
}
.gp-page-header h1{margin:0;font-size:18px;color:#294637}
.gp-page-header .gp-button{padding:6px 14px;font-size:13px}
.gp-empty{margin:18px 0;font-size:13px;color:#8a977f;text-align:center}
.gp-muted{margin:2px 0 0;font-size:12px;color:#8a977f}

/* ============ P2 个人图鉴 ============ */
.gp-codex-bar{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 12px}
.gp-codex-bar .gp-button{padding:6px 14px;font-size:12px}
.gp-codex-bar .gp-button.gp-active{border-color:transparent;color:#fff;background:linear-gradient(110deg,#5c8a4a,#37603f)}
.gp-codex-summary{margin:0 0 12px;font-size:12px;color:#6c7a63;text-align:center}
.gp-codex-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.gp-codex-card{
  appearance:none;text-align:left;cursor:pointer;display:flex;gap:10px;
  padding:10px;border-radius:16px;background:#fff;border:1px solid #e4eadd;
  box-shadow:0 6px 18px rgba(41,70,55,.06);font:inherit;color:inherit;
}
.gp-codex-card:active{transform:translateY(1px)}
.gp-codex-art{
  position:relative;flex:0 0 56px;width:56px;height:56px;border-radius:12px;overflow:hidden;
  background:linear-gradient(180deg,#eaf4e0,#d6e8c6);display:flex;align-items:center;justify-content:center;
}
.gp-codex-art img{width:100%;height:100%;object-fit:cover}
.gp-codex-art.gp-locked{filter:grayscale(1) brightness(.86)}
.gp-codex-art.gp-locked::after{content:"?";position:absolute;font:700 26px/1 inherit;color:rgba(255,255,255,.7)}
.gp-codex-body{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:4px}
.gp-codex-body strong{font-size:14px;color:#294637}
.gp-codex-meta{font-size:11px;line-height:1.4;color:#8a977f}
.gp-codex-badges{display:flex;flex-wrap:wrap;gap:4px}
.gp-codex-detail-head{display:flex;align-items:center;gap:12px;margin:6px 0 10px}
.gp-codex-detail-img{width:64px;height:64px;border-radius:14px;object-fit:cover;background:#eaf4e0}
.gp-codex-detail-head h2{margin:0;font-size:18px;color:#294637}
.gp-codex-intro{margin:0 0 12px;font-size:13px;line-height:1.6;color:#3d4a34}
.gp-codex-facts{display:grid;grid-template-columns:auto 1fr;gap:6px 12px;margin:0 0 12px;padding:12px;border-radius:14px;background:#fff;border:1px solid #e4eadd}
.gp-codex-facts dt{font-size:12px;color:#8a977f}
.gp-codex-facts dd{margin:0;font-size:13px;color:#33512f;font-weight:600}
.gp-codex-note{margin:8px 0 12px;font-size:11px;line-height:1.5;color:#8a977f}
.gp-codex-set{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0;padding:10px 12px;border-radius:12px;background:#fbfdf7;border:1px solid #e4eadd}
.gp-codex-set>span{font-size:13px;color:#33512f;font-weight:600}
.gp-codex-content>.gp-button{margin:6px 8px 6px 0}

/* P2 容器内的小徽章：覆盖教程纪念章的块级 .gp-badge 样式 */
.gp-codex-badges .gp-badge,.gp-codex-set .gp-badge,.gp-quest-actions .gp-badge,.gp-quest-card-head .gp-badge{
  display:inline-block;margin:0;padding:2px 8px;border-radius:999px;font:600 11px/1.6 inherit;font-style:normal;text-align:center;
}
.gp-badge-on{background:#e2efd9;color:#4d7040;border:1px solid #cfe3c1}
.gp-badge-off{background:#f0f1ec;color:#a2ac99;border:1px solid #e2e6da}

/* ============ P2 今日委托 ============ */
.gp-quest-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:4px 0 8px}
.gp-quest-day{font-size:12px;color:#6c7a63}
.gp-quest-note{margin:0 0 12px;font-size:12px;line-height:1.5;color:#8a977f}
.gp-quest-card{margin:0 0 12px;padding:14px;border-radius:16px;background:#fff;border:1px solid #e4eadd;box-shadow:0 6px 18px rgba(41,70,55,.06)}
.gp-quest-card-head{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.gp-quest-card-head strong{flex:1 1 auto;font-size:14px;color:#294637}
.gp-quest-type{flex:0 0 auto;padding:2px 8px;border-radius:999px;font:600 11px/1.6 inherit;font-style:normal;background:#eaf4e0;color:#4d7040;border:1px solid #d6e8c6}
.gp-quest-state{flex:0 0 auto;font-size:11px;color:#8a977f}
.gp-quest-q{margin:0 0 8px;font-size:13px;line-height:1.55;color:#3d4a34}
.gp-quest-options{display:flex;flex-direction:column;gap:8px}
.gp-quest-options .gp-button{text-align:left;white-space:normal;border-radius:12px;padding:10px 12px;font-weight:500}
.gp-quest-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:10px}
.gp-quest-content>.gp-primary{display:block;margin:8px auto 0;min-width:160px}

/* ============ P3 我的村落 ============ */
.gp-village-content>.gp-button{margin:6px 8px 6px 0}
.gp-village-note{margin:0 0 12px;font-size:12px;line-height:1.55;color:#8a977f}
.gp-village-sec-h{margin:16px 0 8px;font-size:14px;font-weight:700;color:#294637}
.gp-village-sign{padding:14px 16px;border-radius:16px;background:linear-gradient(135deg,#eaf4e0,#d6e8c6);border:1px solid #cfe3c1}
.gp-village-name{margin:0;font-size:18px;color:#294637}
.gp-village-meta{margin:4px 0 0;font-size:12px;color:#5b6b52;line-height:1.5}
.gp-village-scene{margin:12px 0;padding:14px;border-radius:16px;background:#fff;border:1px solid #e4eadd;text-align:center}
.gp-village-scene-art{display:flex;align-items:center;justify-content:center;height:96px;border-radius:12px;background:linear-gradient(180deg,#dff0d2,#c6e2b4);overflow:hidden}
.gp-village-scene-emoji{font-size:40px;line-height:1;opacity:.35;transition:opacity .2s ease,font-size .2s ease}
.gp-stage-25 .gp-village-scene-emoji{opacity:.5;font-size:46px}
.gp-stage-50 .gp-village-scene-emoji{opacity:.68;font-size:52px}
.gp-stage-75 .gp-village-scene-emoji{opacity:.85;font-size:58px}
.gp-stage-100 .gp-village-scene-emoji{opacity:1;font-size:64px}
.gp-village-scene-dots{display:flex;justify-content:center;gap:6px;margin:10px 0 4px}
.gp-village-dot{padding:2px 8px;border-radius:999px;font:600 11px/1.6 inherit;background:#f0f1ec;color:#a2ac99;border:1px solid #e2e6da}
.gp-village-dot.gp-dot-on{background:#e2efd9;color:#4d7040;border-color:#cfe3c1}
.gp-village-scene-cap{margin:6px 0 0;font-size:12px;color:#8a977f}
.gp-village-project{margin:12px 0;padding:14px;border-radius:16px;background:#fff;border:1px solid #e4eadd}
.gp-village-project-theme{margin:0 0 10px;font-size:13px;color:#3d4a34}
.gp-village-bar{height:12px;border-radius:999px;background:#eef3e8;overflow:hidden;border:1px solid #e0e9d6}
.gp-village-bar-fill{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#6aa84f,#3f7a35);transition:width .3s ease}
.gp-village-progress{margin:8px 0 0;font-size:12px;color:#5b6b52}
.gp-village-quota{margin:10px 0 0;font-size:13px;color:#33512f;font-weight:600}
.gp-village-contribute{display:flex;align-items:center;gap:10px;margin-top:10px}
.gp-village-amount{flex:0 0 96px;width:96px;padding:8px 10px;border:1px solid #cddcc4;border-radius:10px;font:600 14px/1.2 inherit;color:#33512f}
.gp-village-contribute .gp-button{flex:1 1 auto}
.gp-village-helprow{display:flex;align-items:center;gap:12px;margin:12px 0;padding:12px 14px;border-radius:16px;background:#f0f7fb;border:1px solid #d3e6f2}
.gp-village-helprow-info{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:3px}
.gp-village-helprow-info strong{font-size:13.5px;color:#0277bd}
.gp-village-helprow-info small{font-size:11.5px;color:#6c7a63;line-height:1.5}
.gp-village-member-list{display:flex;flex-direction:column;gap:8px}
.gp-village-member,.gp-village-app{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:14px;background:#fff;border:1px solid #e4eadd}
.gp-village-app{margin-bottom:8px}
.gp-village-avatar{flex:0 0 40px;width:40px;height:40px;border-radius:50%;background:#e8f5e9 center/cover no-repeat;display:flex;align-items:center;justify-content:center;font-size:22px}
.gp-village-member-info{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px}
.gp-village-member-info strong{font-size:13.5px;color:#294637}
.gp-village-member-info small{font-size:11.5px;color:#8a977f}
.gp-village-member-ops{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end;flex:0 0 auto}
.gp-village-member-ops .gp-button,.gp-village-app-ops .gp-button{padding:5px 10px;font-size:11.5px}
.gp-village-app-name{flex:1 1 auto;min-width:0;font-size:13.5px;color:#294637;font-weight:600}
.gp-village-app-ops{display:flex;gap:6px;flex:0 0 auto}
.gp-village-self{margin:16px 0 0;display:flex;flex-direction:column;gap:8px}
.gp-village-self .gp-button{border-color:#f0d0d0;color:#b23b3b}
.gp-village-rec-list{display:flex;flex-direction:column;gap:10px}
.gp-village-rec{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:14px;background:#fff;border:1px solid #e4eadd;box-shadow:0 6px 18px rgba(41,70,55,.06)}
.gp-village-rec-info{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:3px}
.gp-village-rec-info strong{font-size:14px;color:#294637}
.gp-village-rec-info small{font-size:11.5px;color:#8a977f;line-height:1.5}
.gp-village-create{padding:14px;border-radius:16px;background:#fbfdf7;border:1px solid #e4eadd;display:flex;flex-direction:column;gap:10px}
.gp-village-name-input,.gp-village-intro-input{width:100%;padding:10px 12px;border:1px solid #cddcc4;border-radius:10px;font:14px/1.2 inherit;color:#33512f}
.gp-village-create .gp-primary{margin-top:2px}

/* ---- P4 季节手册 / 共创评审 ---- */
.gp-season-page,.gp-ccreview-page{width:100%;max-width:720px;margin:0 auto;min-height:100vh;padding:12px 12px 40px;background:#f4f8ee;box-sizing:border-box;overflow-wrap:anywhere}
.gp-season-content,.gp-ccreview-content{display:flex;flex-direction:column;gap:12px;margin-top:12px}
.gp-season-content .gp-card,.gp-ccreview-content .gp-card{background:#fff;border:1px solid #e4eadd;border-radius:16px;padding:14px;display:flex;flex-direction:column;gap:8px}
.gp-season-content h2,.gp-ccreview-content h2{font-size:15px;color:#294637;margin:0}
.gp-season-meta,.gp-season-quota,.gp-ccreview-meta,.gp-ccreview-intro{font-size:12px;color:#8a977f;line-height:1.6;margin:0}
.gp-season-progress{font-size:22px;font-weight:700;color:#33512f;margin:0}
.gp-season-weather-city{font-size:14px;color:#294637;margin:0}
.gp-season-weather-temp{font-size:13px;color:#33512f;margin:0}
.gp-season-weather-src{font-size:11.5px;color:#8a977f;margin:0}
.gp-season-actions{display:flex;gap:8px;flex-wrap:wrap}
.gp-season-tier{display:flex;align-items:center;gap:8px;font-size:13px;color:#33512f}
.gp-season-tier-state{color:#8a977f}
.gp-season-tier-state.is-claimable{color:#c2703a;font-weight:700}
.gp-season-hint,.gp-ccreview-hint{font-size:11.5px;color:#a3ad97;line-height:1.6;margin:0}
.gp-ccreview-mine{display:flex;justify-content:space-between;gap:8px;font-size:13px;color:#33512f}
.gp-ccreview-mine-state{color:#8a977f}
.gp-ccreview-badge{font-size:12px;color:#c2703a;margin:0}
.gp-ccreview-submit{display:flex;gap:8px;align-items:center}
.gp-ccreview-wall-item{border-top:1px dashed #e4eadd;padding-top:8px;display:flex;flex-direction:column;gap:6px}
.gp-ccreview-wall-item h3{font-size:14px;color:#294637;margin:0}
.gp-ccreview-wall-content{font-size:13px;color:#33512f;line-height:1.6;margin:0}
.gp-ccreview-wall-meta{font-size:11.5px;color:#8a977f;margin:0}

/* ===== P5 实物资格（entitlement.js 作用域）===== */
.gp-ent-page{width:100%;max-width:720px;margin:0 auto;min-height:100vh;padding:16px 16px 32px;background:#f6f8f1;overflow-wrap:anywhere}
.gp-ent-content{display:flex;flex-direction:column;gap:12px;margin-top:12px}
.gp-ent-list{display:flex;flex-direction:column;gap:10px}
.gp-ent-list h2{font-size:15px;color:#294637;margin:0}
.gp-ent-content .gp-card{background:#fff;border:1px solid #e4eadd;border-radius:16px;padding:14px;display:flex;flex-direction:column;gap:8px}
.gp-ent-content .gp-card h2{font-size:15px;color:#294637;margin:0}
.gp-ent-goods{font-size:14px;color:#33512f;font-weight:600;margin:0}
.gp-ent-meta{font-size:12px;color:#8a977f;line-height:1.6;margin:0}
.gp-ent-note{font-size:11.5px;color:#a3ad97;line-height:1.6;margin:0}
.gp-ent-mine{font-size:12.5px;color:#c2703a;margin:0}
.gp-ent-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.gp-ent-address{flex:1 1 100%;min-width:0;width:100%;max-width:100%;border:1px solid #e4eadd;border-radius:10px;padding:8px;font-size:12.5px;color:#33512f;background:#fff}
.gp-ent-offer .gp-button[disabled]{opacity:.55;cursor:not-allowed}

@media (max-width:360px){
  .gp-bubble{right:calc(50% + 38px);width:60vw}
  .gp-companion.gp-home .gp-scale{--gp-scale:.7}
}
@media (prefers-reduced-motion:reduce){
  .gp-breath.gp-breathing{animation:none}
  .gp-button,.gp-poster{transition:none}
}
