/* ==========================================================================
   readability.css — v94 polish pass (loaded last on index / vietnam / packing)
   1. Kubai icons keep their inner detail on light ink (dark mode, hero, filled buttons)
   2. Decorative gradient / thick colored stripes on cards → hairline borders
   3. Light-mode sticky nav uses the porcelain canvas, not warm beige
   4. Mobile: floating buttons stop covering content
   ========================================================================== */

/* --- 1. Kubai icon detail ------------------------------------------------
   Kubai paints cut-outs (check marks, play triangles, ban bars, clipboard
   lines) with a literal #fff. When the icon itself is light (dark mode, hero
   pills, red YouTube button) fill + detail merge into a solid blob.
   --ki-detail flips to a near-black ink whenever currentColor is light. */
kubai-icon { --ki-detail: #fff; }
:root[data-theme="dark"] kubai-icon,
.editorial-hero kubai-icon,
.editorial-action-bar kubai-icon { --ki-detail: #0B0F17; }
@supports (color: oklch(from red l c h)) {
  kubai-icon {
    --ki-detail: oklch(from currentColor clamp(0.18, calc((0.62 - l) * 100), 1) 0.02 h);
  }
}
kubai-icon { --ki-w: var(--ki-detail); }
kubai-icon svg [fill="#fff"]:not(mask *):not(clipPath *):not(defs *) { fill: var(--ki-detail); }
kubai-icon svg [stroke="#fff"]:not(mask *):not(clipPath *):not(defs *) { stroke: var(--ki-detail); }

/* --- 2. Stripes off ------------------------------------------------------ */
.day-card::before,
.packing-header-card::before { content: none !important; }
.pattern-top-bar { display: none !important; }

.modal-card,
.pwa-ios-hint-card,
.currency-modal-card,
.expense-header-card,
.expense-form-card,
.expense-history-card {
  border-top-width: 1px !important;
  border-top-color: var(--color-washi-4) !important;
}

/* Inline 3–4px colored top borders on document / notice cards (自驾, 花费) */
.section-view [style*="border-top:3px"],
.section-view [style*="border-top:4px"],
.section-view [style*="border-top: 3px"],
.section-view [style*="border-top: 4px"] {
  border-top-width: 1px !important;
  border-top-style: solid !important;
  border-top-color: var(--color-washi-4) !important;
}

/* Thick left stripes on the daily guide / car snack / backup panels */
.daily-guide-container,
.car-snack-banner,
.backup-spots-container {
  border-left-width: 1px !important;
}

/* --- 3. Sticky nav canvas (light) --------------------------------------- */
:root:not([data-theme="dark"]) .sticky-nav-bar {
  background: color-mix(in srgb, var(--color-washi-0) 94%, transparent);
}

/* --- 4. Floating buttons on phones -------------------------------------
   Three stacked 42px circles covered the right edge of every card (map /
   video buttons, prices). Theme and mascot are already in the hero topbar,
   so phones keep only back-to-top. */
@media (max-width: 640px) {
  .theme-toggle-btn,
  .mascot-trigger-btn { display: none !important; }
}
