/* ==========================================================================
   line-dock.css — 「LINE 直接問」 entries (2026-12-01, owner approved)
   Markup: partials/line-dock (bar, pill, article rail card) + partials/line-cta (all LINE links).
   Colours follow the theme tokens (--panel / --fg / --line), so light pages never get a dark block. The only fixed
   colour is the official LINE green #06C755 (LINE's own button style: white logo and text on green).
   No top/left accent lines on rounded cards (owner rule 2026-11-12): cards use an even 1px border.
   ========================================================================== */
:root{--mcta-h:62px;--line-green:#06C755;--line-green-2:#05B04B}
.lc-logo{display:block;flex:none;width:24px;height:24px;border-radius:6px}

/* ---------- phone bottom bar ---------- */
.mcta,.mcta-space{display:none}
@media (max-width:820px){
  .mcta{position:fixed;left:0;right:0;bottom:calc(var(--status-h,25px) + env(safe-area-inset-bottom,0px));z-index:50;
    display:grid;grid-template-columns:1.12fr 1fr;gap:8px;height:var(--mcta-h);padding:8px 12px;box-sizing:border-box;
    background:var(--panel,#fff);border-top:1px solid var(--line,#D0DBE6);box-shadow:0 -12px 28px -20px rgba(9,42,73,.55);
    transition:transform .25s ease,opacity .2s ease}
  .mcta a{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;height:100%;border-radius:12px;
    font:800 16px/1.2 var(--font-sans);text-decoration:none;white-space:nowrap;-webkit-tap-highlight-color:transparent}
  .mcta .mcta-line{background:var(--line-green);border:1px solid var(--line-green-2);color:#fff}
  .mcta .mcta-line .lc-logo{width:28px;height:28px}
  .mcta .mcta-line:active{background:var(--line-green-2)}
  .mcta .mcta-consult{background:var(--panel,#fff);border:1.5px solid var(--accent-line,rgba(10,116,174,.34));color:var(--fg,#0B1B2B)}
  .mcta .mcta-consult:active{background:var(--accent-soft,rgba(10,116,174,.08))}
  .mcta-space{display:block;height:var(--mcta-h)}
  /* everything else that floats at the bottom moves up by the bar's height */
  :root:has(#mcta) .xg{bottom:calc(var(--xg-b,calc(var(--status-h) + 12px)) + var(--mcta-h))}
  :root:has(#mcta) .nlfab{bottom:calc(var(--status-h) + 16px + var(--mcta-h))}
  :root:has(#mcta) .acf{display:none!important}   /* the article consult bar: its link lives in this bar now */
  /* step aside for the 小浪 panel, the empty-editor sea and the phone keyboard */
  :root:has(#xg:not([data-state=closed])) .mcta,
  body.ide-is-empty .mcta,
  body:has(main :is(input,textarea,select):focus) .mcta{transform:translateY(calc(100% + var(--status-h,25px)));opacity:0;pointer-events:none}
}
@media (max-width:359px){.mcta a{font-size:15px;gap:6px}.mcta .mcta-line .lc-logo{width:24px;height:24px}}

/* ---------- desktop pill above 小浪 (or above the consult card on articles) ---------- */
.lpill{display:none}
@media (min-width:821px){
  .lpill{position:fixed;right:20px;bottom:calc(var(--status-h,25px) + 88px);z-index:94;display:inline-flex;align-items:center;gap:9px;
    height:48px;padding:0 20px 0 10px;box-sizing:border-box;border-radius:999px;background:var(--line-green);border:1px solid var(--line-green-2);color:#fff;
    font:800 16px/1 var(--font-sans);text-decoration:none;box-shadow:0 14px 30px -14px rgba(4,90,40,.65);
    transition:transform .2s ease,box-shadow .2s ease,opacity .2s ease}
  .lpill .lc-logo{width:30px;height:30px}
  .lpill:hover{color:#fff;transform:translateY(-2px);box-shadow:0 18px 34px -14px rgba(4,90,40,.75)}
  .lpill:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
  :root:has(.xg.is-left) .lpill:not(.is-art){bottom:calc(var(--status-h,25px) + 18px)}
  :root:has(#xg:not([data-state=closed])) .lpill,body.ide-is-empty .lpill,.lpill.is-off{opacity:0;pointer-events:none}
}

/* ---------- article right column card (≥1280px, under 本文大綱) ---------- */
.lrail{display:none}
@media (min-width:1280px){
  .lpill.is-art{display:none}
  .lrail{position:fixed;right:18px;top:72px;z-index:70;width:232px;box-sizing:border-box;display:flex;flex-direction:column;gap:8px;
    padding:14px;border-radius:14px;border:1px solid var(--line,#D0DBE6);background:var(--panel,#fff);color:var(--fg,#0B1B2B);
    text-decoration:none;box-shadow:0 14px 34px -22px rgba(9,42,73,.45);transition:border-color .2s ease}
  .lrail:not(.is-placed){visibility:hidden}   /* until the script has put it under 本文大綱 (or left it alone): no flash above the outline */
  .rtx-outline .lrail{position:sticky;top:auto;right:auto;bottom:0;width:auto;min-width:200px;flex-shrink:0;margin:14px 12px 0}
  a.lrail .lrail-t,a.lrail .lrail-p,a.lrail .lrail-go{min-width:0;width:auto;max-width:none;flex-shrink:0;writing-mode:horizontal-tb;word-break:normal}
  /* inside 本文大綱 the outline's own link rules (.rtx-outline a / a span / a:hover) must not reach the card */
  .rtx-outline a.lrail{display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:14px;border-radius:14px;font-size:inherit;line-height:1.4;color:var(--fg,#0B1B2B);background:var(--panel,#fff)}
  .rtx-outline a.lrail:hover{background:var(--panel,#fff);color:var(--fg,#0B1B2B)}
  .rtx-outline a.lrail span{flex:initial;width:auto;font-variant-numeric:normal}
  .rtx-outline.has-lc{max-height:calc(100vh - 72px - var(--status-h,25px) - 104px)}   /* ends above the consult card */
  a.lrail:hover{border-color:var(--line-green)}
  /* the parts use a.lrail … so they outrank .rtx-outline a span (0,1,2) */
  a.lrail .lrail-t{display:flex;align-items:center;gap:9px}
  a.lrail .lrail-t .lc-logo{width:30px;height:30px}
  a.lrail .lrail-t b{font-size:16px;font-weight:800;line-height:1.35;color:var(--fg,#0B1B2B)}
  a.lrail .lrail-p{display:block;font-size:14.5px;font-weight:400;line-height:1.6;color:var(--fg-2,#3A4E61)}
  a.lrail .lrail-go{display:flex;align-items:center;justify-content:center;gap:6px;height:40px;border-radius:10px;background:var(--line-green);color:#fff;font-size:15px;font-weight:800}
  a.lrail .lrail-go span{color:inherit;font-weight:inherit}
  a.lrail:hover .lrail-go{background:var(--line-green-2)}
}

/* ---------- article end card: LINE next to the contact button ---------- */
aside.dfy .actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
aside.dfy a.dfy-line{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:60px;padding:12px 22px;box-sizing:border-box;
  border-radius:12px;border:1.5px solid var(--line-green);background:color-mix(in srgb,var(--line-green) 7%,var(--panel,#fff));
  color:var(--fg,#0B1B2B);font:800 16.5px/1.4 var(--font-sans);text-decoration:none;transition:background .2s ease,transform .2s ease}
aside.dfy a.dfy-line:hover{background:color-mix(in srgb,var(--line-green) 15%,var(--panel,#fff));transform:translateY(-2px)}
aside.dfy a.dfy-line .lc-logo{width:28px;height:28px}
@media (max-width:640px){aside.dfy a.dfy-line{display:flex;width:100%;min-height:58px;padding:10px 14px}}

/* ---------- service pages: one line under the end CTA ---------- */
.end-cta p.lc-row,p.lc-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px 10px;max-width:none;margin:20px 0 0;font-size:16px;line-height:1.5;color:var(--fg-2,#3A4E61)}
p.lc-row a{display:inline-flex;align-items:center;gap:8px;padding:6px 4px;font-weight:800;color:var(--fg,#0B1B2B);text-decoration:underline;text-decoration-color:color-mix(in srgb,var(--line-green) 70%,transparent);text-underline-offset:5px;text-decoration-thickness:2px}
p.lc-row a:hover{text-decoration-color:var(--line-green)}
p.lc-row .lc-logo{width:26px;height:26px}
@media (prefers-reduced-motion:reduce){.mcta,.lpill,aside.dfy a.dfy-line{transition:none}}
