/* 地表物件：景物（未翻找 / 敲过 / 稀有 / 挖空）与地表装饰
 * 从 styles.css 拆出，避免单文件过长；依赖 styles.css 的 :root，必须在其后加载。
 */

  /* 景物：地表上的物件，不是卡片。
   * 透明点击区（≥44px）+ 图标 + 贴地压痕 + 小字名字；
   * "能点"靠呼吸与地面光斑暗示，翻找过后去饱和、压痕变凹坑 */
  .spot {
    position: absolute;
    left: 0; top: 0;                 /* 位置全部由 transform 决定，避免每帧改布局属性 */
    will-change: transform, opacity;
    transform-origin: 50% 50%;
    display: flex; flex-direction: column; align-items: center; gap: 1px;
    padding: 3px 2px;
    min-width: 44px; min-height: 44px;   /* 触摸目标 ≥ 44px */
    border: 0; background: none;
    color: rgba(88,52,32,.86);
    font-size: 10px; line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .spot-art {
    position: relative;
    display: block;
    width: 38px; height: 38px;
    transition: transform .12s ease-out;
  }
  .spot:active .spot-art { transform: scale(.92); }
  /* 地表装饰：节点复用，只更新 transform */
  .deco {
    position: absolute;
    left: 0; top: 0;
    width: 14px; height: 8px;
    border-radius: 50%;
    background: #E6D2B6;
    pointer-events: none;
    will-change: transform, opacity;
  }
  .deco.d1 { width: 6px; height: 15px; border-radius: 3px; background: #D9BE9C; }
  .deco.d2 { width: 8px; height: 8px; background: #ECDCC4; }
  /* 景物图标：内联 SVG，暖色平涂 + 深棕描边（随星球换色只需覆盖 --spot-fg）
   * 不再垫白底方块，靠描边 + 投影在地表上站住 */
  .spot svg {
    position: relative; z-index: 1;   /* 压在压痕与光斑之上 */
    display: block;
    width: 38px; height: 38px;
    /* 一圈浅色外发光：暖色地表上靠明度差把物件"托"起来，也像在微微发亮 */
    filter: drop-shadow(0 0 1px #FFFCF4) drop-shadow(0 0 3px rgba(255,252,244,.9))
            drop-shadow(0 2px 3px rgba(110,72,40,.35));
    animation: spotIdle 3.2s ease-in-out infinite;
    transition: opacity .18s, filter .18s;
    will-change: transform;
  }
  .spot .fg {
    fill: #CE9760;
    stroke: #6B4326;
    stroke-width: 1.4;
    stroke-linejoin: round;
  }
  .spot .ln {
    fill: none;
    stroke: #6B4326;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  /* 贴地压痕：内阴影让物件像"坐在土上" */
  .spot-art::before {
    content: "";
    position: absolute; left: 50%; bottom: -4px;
    width: 34px; height: 9px; margin-left: -17px;
    border-radius: 50%;
    background: rgba(134,88,50,.24);
    box-shadow: inset 0 1.5px 2px rgba(110,72,40,.3);
    pointer-events: none;
  }
  /* 地面光斑：未翻找时脚下有一点亮光，"这里能点"的暗示。
   * 地表是暖色，暖黄光斑会被吃掉，所以用白色做明度对比 */
  .spot-art::after {
    content: "";
    position: absolute; left: 50%; bottom: -9px;
    width: 52px; height: 18px; margin-left: -26px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,.9), rgba(255,255,255,0) 70%);
    animation: spotGlow 2.6s ease-in-out infinite;
    pointer-events: none;
  }
  /* 名字反向旋转：物件随扇面倾斜，文字保持水平才好读 */
  .spot .name {
    transform: rotate(calc(var(--rel, 0deg) * -1));
    text-shadow: 0 1px 0 rgba(255,248,236,.9);
    pointer-events: none;
  }
  @keyframes spotIdle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2.5px); }
  }
  @keyframes spotGlow {
    0%, 100% { opacity: .5; }
    50% { opacity: 1; }
  }
  /* 敲过但还没挖空：图标暗一点、光斑弱下去，提示"翻过了但还有" */
  .spot.worn svg { opacity: .82; }
  .spot.worn .spot-art::after { filter: opacity(.45); }
  /* 稀有景物：金色光晕 + 更大的金色光斑，一眼看出这处不一样 */
  .spot.rare svg {
    filter: drop-shadow(0 0 2px rgba(255,214,102,.95)) drop-shadow(0 0 9px rgba(255,186,58,.8))
            drop-shadow(0 2px 3px rgba(110,72,40,.35));
    animation-duration: 2.4s;
  }
  .spot.rare .spot-art::after {
    width: 58px; height: 20px; margin-left: -29px; bottom: -10px;
    background: radial-gradient(ellipse at center, rgba(255,214,102,.95), rgba(255,186,58,0) 72%);
    animation-duration: 1.9s;
  }
  /* 翻找过：去饱和、变暗，光斑消失，压痕加深成凹坑（放在最后，覆盖稀有态） */
  .spot.dug { color: rgba(120,96,74,.62); }
  .spot.dug svg {
    filter: grayscale(.55) drop-shadow(0 1px 1px rgba(120,80,45,.2));
    opacity: .62;
    animation: none;
  }
  .spot.dug .spot-art::after { display: none; }
  .spot.dug .spot-art::before {
    background: rgba(116,82,52,.14);
    box-shadow: inset 0 2px 4px rgba(90,60,34,.38);
  }
