/* PHASE 1.5: light only. No dimensions, layout, animation or interaction changes.
   The two decorative spans have no layout box outside desktop holographic home.
   Keep blur on the OUTER span and clip-path on its pseudo-element: clipping the
   filtered element itself would cut off the bloom outside the polygon. */
.hud-edge-light, .hud-light-spill { display: none; }

@media (min-width: 1100px) {
  html.home-theme-holographic:not([data-view-mode="mobile"]) :is(.home-search-panel, .home-illustration-card, .latest-panel, .notice-panel, .visitor-summary-panel) {
    /* Level 1: soft, localized reading-panel light. */
    --hud-bloom-opacity: .5;
    --hud-bloom-blur: 2px;
    --hud-bloom-spread: 6px;
    --hud-spill-opacity: .45;
    --hud-node-size: 2px;
    --hud-node-a-x: 20px;
    --hud-node-a-y: 1px;
    --hud-node-b-x: calc(100% - 21px);
    --hud-node-b-y: calc(100% - 1px);
    --hud-light-segments:
      radial-gradient(ellipse 100px 55px at var(--hud-node-a-x) var(--hud-node-a-y), #d8faff, #68d4ffb3 35%, transparent 100%),
      radial-gradient(ellipse 95px 62px at var(--hud-node-b-x) var(--hud-node-b-y), #c8f7ff, #52c6ff85 35%, transparent 100%);
    /* Never filter the whole panel/text. Only the duplicate stroke emits light. */
    filter: none;
  }
  html.home-theme-holographic:not([data-view-mode="mobile"]) :is(.home-search-panel, .home-illustration-card, .latest-panel, .notice-panel, .visitor-summary-panel)::after {
    background: var(--hud-light-segments), var(--hud-outline);
  }
  html.home-theme-holographic:not([data-view-mode="mobile"]) .hud-edge-light,
  html.home-theme-holographic:not([data-view-mode="mobile"]) .hud-light-spill {
    display: block;
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    user-select: none;
  }
  html.home-theme-holographic:not([data-view-mode="mobile"]) .hud-edge-light {
    opacity: var(--hud-bloom-opacity);
    filter: blur(var(--hud-bloom-blur)) drop-shadow(0 0 var(--hud-bloom-spread) #38baff);
  }
  html.home-theme-holographic:not([data-view-mode="mobile"]) .hud-edge-light::before,
  html.home-theme-holographic:not([data-view-mode="mobile"]) .hud-edge-light::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    clip-path: var(--hud-ring);
    background: var(--hud-light-segments);
  }
  html.home-theme-holographic:not([data-view-mode="mobile"]) .hud-edge-light::after {
    /* Second offset stroke thickens the emitter without widening the crisp rim. */
    inset: -1px;
    opacity: .65;
  }
  html.home-theme-holographic:not([data-view-mode="mobile"]) .hud-light-spill {
    opacity: var(--hud-spill-opacity);
    /* A separate un-clipped layer lets nearby air/background catch the light. */
    background:
      radial-gradient(ellipse 95px 48px at var(--hud-node-a-x) var(--hud-node-a-y), #60ceff3d, #279cfb12 48%, transparent 75%),
      radial-gradient(ellipse 100px 48px at var(--hud-node-b-x) var(--hud-node-b-y), #5acbff33, #279cfb0d 48%, transparent 75%);
    /* Move only the halo outside the panel, preserving the stroke coordinates. */
    overflow: visible;
  }
  html.home-theme-holographic:not([data-view-mode="mobile"]) .hud-light-spill::before,
  html.home-theme-holographic:not([data-view-mode="mobile"]) .hud-light-spill::after {
    content: "";
    position: absolute;
    left: var(--hud-node-a-x);
    top: var(--hud-node-a-y);
    width: var(--hud-node-size);
    height: var(--hud-node-size);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #e5fcff;
    box-shadow: 0 0 4px 1px #c3f7ffcc, 0 0 10px 3px #4dc9ff80, 0 0 18px 7px #219fff35;
    pointer-events: none;
  }
  html.home-theme-holographic:not([data-view-mode="mobile"]) .hud-light-spill::after {
    left: var(--hud-node-b-x);
    top: var(--hud-node-b-y);
  }
  html.home-theme-holographic:not([data-view-mode="mobile"]) .notice-panel {
    --hud-node-a-x: 19px;
    --hud-node-b-x: calc(100% - 17px);
  }
  html.home-theme-holographic:not([data-view-mode="mobile"]) .visitor-summary-panel {
    --hud-node-a-x: 12px;
    --hud-node-b-x: calc(100% - 24px);
  }

  /* Level 2: three guide modules, lit corners and icons, quiet copy. */
  html.home-theme-holographic:not([data-view-mode="mobile"]) .home-illustration-card {
    --hud-bloom-opacity: .8;
    --hud-bloom-blur: 2.5px;
    --hud-bloom-spread: 8px;
    --hud-spill-opacity: .65;
    --hud-node-size: 2.5px;
    --hud-node-a-x: 21px;
    --hud-node-b-x: calc(100% - 18px);
    --guide-no: "01";
  }
  html.home-theme-holographic:not([data-view-mode="mobile"]) .home-illustration-card--care {
    --hud-node-a-x: calc(100% - 22px);
    --hud-node-b-x: 18px;
    --guide-no: "02";
  }
  html.home-theme-holographic:not([data-view-mode="mobile"]) .home-illustration-card--submit {
    --hud-node-a-x: 12px;
    --hud-node-b-x: calc(100% - 12px);
    --guide-no: "03";
  }
  html.home-theme-holographic:not([data-view-mode="mobile"]) .holo-section-icon {
    filter: drop-shadow(0 0 2px #a0eeffa6) drop-shadow(0 0 6px #35baff66);
  }
  html.home-theme-holographic:not([data-view-mode="mobile"]) .holo-hero-meta svg {
    filter: drop-shadow(0 0 3px #5ccfff70);
  }

  /* Level 3: search is the focal point; three short illuminated rim segments. */
  html.home-theme-holographic:not([data-view-mode="mobile"]) .home-search-panel {
    --hud-bloom-opacity: 1;
    --hud-bloom-blur: 3px;
    --hud-bloom-spread: 10px;
    --hud-spill-opacity: .95;
    --hud-node-size: 3px;
    --hud-light-segments:
      radial-gradient(ellipse 155px 85px at 20px 1px, #efffff, #73deff 30%, #45bdff70 60%, transparent 100%),
      radial-gradient(ellipse 100px 60px at 76% 8px, #d4faff, #55cbff99 35%, transparent 100%),
      radial-gradient(ellipse 165px 85px at calc(100% - 21px) calc(100% - 1px), #efffff, #73deff 30%, #45bdff70 60%, transparent 100%);
  }
  html.home-theme-holographic:not([data-view-mode="mobile"]) .home-search-panel .search-form .field::before {
    border-color: #e1faff;
    box-shadow: inset 0 0 4px #8be7ff99, 0 0 4px #b6f1ffbb, 0 0 10px #50caff99, 0 0 18px #35b5ff50;
  }
  html.home-theme-holographic:not([data-view-mode="mobile"]) .home-search-panel .search-form .field::after {
    background: #e1faff;
    box-shadow: 0 0 4px #a8efffbb, 0 0 10px #46c4ff99;
  }
  html.home-theme-holographic:not([data-view-mode="mobile"]) .home-search-panel .primary-button {
    background: linear-gradient(125deg, #86e3ff28, #1873bb50 60%, #5dcfff26) !important;
    border-color: #b8f4ff;
    box-shadow: inset 0 1px 0 #e1ffff88, inset 0 0 6px #7cddff50, inset 0 0 16px #36b6ff30,
      0 0 4px #a3ecff88, 0 0 10px #39bcff66, 0 0 18px #259cfa3d;
    text-shadow: none;
  }
  /* 登入 keeps the corner-bracket button of phase1, with a little more glow. */
  html.home-theme-holographic:not([data-view-mode="mobile"]) .site-header .primary-nav .nav-link-login {
    border-color: #8fdcffa6;
    box-shadow: inset 0 1px 0 #d4f9ff55, inset 0 0 12px #55c6ff26, 0 0 4px #8ce5ff50, 0 0 10px #31b7ff35;
  }
  html.home-theme-holographic:not([data-view-mode="mobile"]) .home-search-panel .primary-button:is(:hover, :focus-visible),
  html.home-theme-holographic:not([data-view-mode="mobile"]) .site-header .primary-nav :is(.nav-link.is-active, .nav-link-login):is(:hover, :focus-visible) {
    border-color: #e0fcff;
    box-shadow: inset 0 1px 0 #efffffaa, inset 0 0 16px #59cfff50,
      0 0 4px #b2f2ffb3, 0 0 10px #47c9ff8c, 0 0 18px #2ab0ff59;
  }
}

/* Holographic pedestal icons replace the inline line art at every screen size
   ([data-view-mode] is always set; it matches the desktop selectors' priority). */
html.home-theme-holographic[data-view-mode] .home-illustration-card { --guide-icon: url(../assets/holographic/guide-search.webp); }
html.home-theme-holographic[data-view-mode] .home-illustration-card--care { --guide-icon: url(../assets/holographic/guide-care.webp); }
html.home-theme-holographic[data-view-mode] .home-illustration-card--submit { --guide-icon: url(../assets/holographic/guide-submit.webp); }
html.home-theme-holographic[data-view-mode] .home-illustration-card .holo-guide-art {
  background: var(--guide-icon) center / contain no-repeat;
  filter: drop-shadow(0 0 2px #82e6ff99) drop-shadow(0 0 7px #30b9ff70);
}
html.home-theme-holographic[data-view-mode] .home-illustration-card .holo-guide-art > * {
  display: none;
}

@media (forced-colors: active) {
  html.home-theme-holographic:not([data-view-mode="mobile"]) .hud-edge-light,
  html.home-theme-holographic:not([data-view-mode="mobile"]) .hud-light-spill { display: none; }
  html.home-theme-holographic :is(.holo-guide-art, .holo-section-icon, .holo-hero-meta svg) { filter: none !important; }
  html.home-theme-holographic .home-search-panel .search-form .field::before,
  html.home-theme-holographic .home-search-panel .search-form .field::after { box-shadow: none; }
  html.home-theme-holographic:not([data-view-mode="mobile"]) .home-search-panel .primary-button,
  html.home-theme-holographic:not([data-view-mode="mobile"]) .site-header .primary-nav :is(.nav-link.is-active, .nav-link-login) {
    box-shadow: none !important;
    border-color: ButtonText;
  }
}
